toWorkspaceState method

WorkspaceState toWorkspaceState()

Implementation

WorkspaceState toWorkspaceState() {
  switch (this) {
    case 'PENDING':
      return WorkspaceState.pending;
    case 'AVAILABLE':
      return WorkspaceState.available;
    case 'IMPAIRED':
      return WorkspaceState.impaired;
    case 'UNHEALTHY':
      return WorkspaceState.unhealthy;
    case 'REBOOTING':
      return WorkspaceState.rebooting;
    case 'STARTING':
      return WorkspaceState.starting;
    case 'REBUILDING':
      return WorkspaceState.rebuilding;
    case 'RESTORING':
      return WorkspaceState.restoring;
    case 'MAINTENANCE':
      return WorkspaceState.maintenance;
    case 'ADMIN_MAINTENANCE':
      return WorkspaceState.adminMaintenance;
    case 'TERMINATING':
      return WorkspaceState.terminating;
    case 'TERMINATED':
      return WorkspaceState.terminated;
    case 'SUSPENDED':
      return WorkspaceState.suspended;
    case 'UPDATING':
      return WorkspaceState.updating;
    case 'STOPPING':
      return WorkspaceState.stopping;
    case 'STOPPED':
      return WorkspaceState.stopped;
    case 'ERROR':
      return WorkspaceState.error;
  }
  throw Exception('$this is not known in enum WorkspaceState');
}