toCommandInvocationStatus method

CommandInvocationStatus toCommandInvocationStatus()

Implementation

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