toTaskStatus method
Implementation
TaskStatus toTaskStatus() {
switch (this) {
case 'AVAILABLE':
return TaskStatus.available;
case 'CREATING':
return TaskStatus.creating;
case 'QUEUED':
return TaskStatus.queued;
case 'RUNNING':
return TaskStatus.running;
case 'UNAVAILABLE':
return TaskStatus.unavailable;
}
throw Exception('$this is not known in enum TaskStatus');
}