toResourceStatus method

ResourceStatus toResourceStatus()

Implementation

ResourceStatus toResourceStatus() {
  switch (this) {
    case 'CREATION_IN_PROGRESS':
      return ResourceStatus.creationInProgress;
    case 'CREATION_SUCCESSFUL':
      return ResourceStatus.creationSuccessful;
    case 'CREATION_FAILED':
      return ResourceStatus.creationFailed;
    case 'UPDATE_IN_PROGRESS':
      return ResourceStatus.updateInProgress;
    case 'UPDATE_SUCCESSFUL':
      return ResourceStatus.updateSuccessful;
    case 'UPDATE_FAILED':
      return ResourceStatus.updateFailed;
    case 'DELETED':
      return ResourceStatus.deleted;
  }
  throw Exception('$this is not known in enum ResourceStatus');
}