toJobStatus method

JobStatus toJobStatus()

Implementation

JobStatus toJobStatus() {
  switch (this) {
    case 'SUBMITTED':
      return JobStatus.submitted;
    case 'IN_PROGRESS':
      return JobStatus.inProgress;
    case 'COMPLETED':
      return JobStatus.completed;
    case 'FAILED':
      return JobStatus.failed;
    case 'STOP_REQUESTED':
      return JobStatus.stopRequested;
    case 'STOPPED':
      return JobStatus.stopped;
  }
  throw Exception('$this is not known in enum JobStatus');
}