toJobStatus method
Implementation
JobStatus toJobStatus() {
switch (this) {
case 'Active':
return JobStatus.active;
case 'Cancelled':
return JobStatus.cancelled;
case 'Cancelling':
return JobStatus.cancelling;
case 'Complete':
return JobStatus.complete;
case 'Completing':
return JobStatus.completing;
case 'Failed':
return JobStatus.failed;
case 'Failing':
return JobStatus.failing;
case 'New':
return JobStatus.$new;
case 'Paused':
return JobStatus.paused;
case 'Pausing':
return JobStatus.pausing;
case 'Preparing':
return JobStatus.preparing;
case 'Ready':
return JobStatus.ready;
case 'Suspended':
return JobStatus.suspended;
}
throw Exception('$this is not known in enum JobStatus');
}