toOperationStatus method

OperationStatus toOperationStatus()

Implementation

OperationStatus toOperationStatus() {
  switch (this) {
    case 'SUBMITTED':
      return OperationStatus.submitted;
    case 'IN_PROGRESS':
      return OperationStatus.inProgress;
    case 'ERROR':
      return OperationStatus.error;
    case 'SUCCESSFUL':
      return OperationStatus.successful;
    case 'FAILED':
      return OperationStatus.failed;
  }
  throw Exception('$this is not known in enum OperationStatus');
}