toCommandStatus method
Implementation
CommandStatus toCommandStatus() {
switch (this) {
case 'Pending':
return CommandStatus.pending;
case 'InProgress':
return CommandStatus.inProgress;
case 'Success':
return CommandStatus.success;
case 'Cancelled':
return CommandStatus.cancelled;
case 'Failed':
return CommandStatus.failed;
case 'TimedOut':
return CommandStatus.timedOut;
case 'Cancelling':
return CommandStatus.cancelling;
}
throw Exception('$this is not known in enum CommandStatus');
}