toJobStatus method

JobStatus toJobStatus()

Implementation

JobStatus toJobStatus() {
  switch (this) {
    case 'CREATED':
      return JobStatus.created;
    case 'PREPARING_FOR_INITIALIZATION':
      return JobStatus.preparingForInitialization;
    case 'INITIALIZING':
      return JobStatus.initializing;
    case 'PROCESSING':
      return JobStatus.processing;
    case 'PENDING_JOB':
      return JobStatus.pendingJob;
    case 'COMPLETING':
      return JobStatus.completing;
    case 'COMPLETED':
      return JobStatus.completed;
    case 'FAILING':
      return JobStatus.failing;
    case 'FAILED':
      return JobStatus.failed;
  }
  throw Exception('$this is not known in enum JobStatus');
}