toPackageStatus method

PackageStatus toPackageStatus()

Implementation

PackageStatus toPackageStatus() {
  switch (this) {
    case 'COPYING':
      return PackageStatus.copying;
    case 'COPY_FAILED':
      return PackageStatus.copyFailed;
    case 'VALIDATING':
      return PackageStatus.validating;
    case 'VALIDATION_FAILED':
      return PackageStatus.validationFailed;
    case 'AVAILABLE':
      return PackageStatus.available;
    case 'DELETING':
      return PackageStatus.deleting;
    case 'DELETED':
      return PackageStatus.deleted;
    case 'DELETE_FAILED':
      return PackageStatus.deleteFailed;
  }
  throw Exception('$this is not known in enum PackageStatus');
}