toAutomationExecutionStatus method

AutomationExecutionStatus toAutomationExecutionStatus()

Implementation

AutomationExecutionStatus toAutomationExecutionStatus() {
  switch (this) {
    case 'Pending':
      return AutomationExecutionStatus.pending;
    case 'InProgress':
      return AutomationExecutionStatus.inProgress;
    case 'Waiting':
      return AutomationExecutionStatus.waiting;
    case 'Success':
      return AutomationExecutionStatus.success;
    case 'TimedOut':
      return AutomationExecutionStatus.timedOut;
    case 'Cancelling':
      return AutomationExecutionStatus.cancelling;
    case 'Cancelled':
      return AutomationExecutionStatus.cancelled;
    case 'Failed':
      return AutomationExecutionStatus.failed;
    case 'PendingApproval':
      return AutomationExecutionStatus.pendingApproval;
    case 'Approved':
      return AutomationExecutionStatus.approved;
    case 'Rejected':
      return AutomationExecutionStatus.rejected;
    case 'Scheduled':
      return AutomationExecutionStatus.scheduled;
    case 'RunbookInProgress':
      return AutomationExecutionStatus.runbookInProgress;
    case 'PendingChangeCalendarOverride':
      return AutomationExecutionStatus.pendingChangeCalendarOverride;
    case 'ChangeCalendarOverrideApproved':
      return AutomationExecutionStatus.changeCalendarOverrideApproved;
    case 'ChangeCalendarOverrideRejected':
      return AutomationExecutionStatus.changeCalendarOverrideRejected;
    case 'CompletedWithSuccess':
      return AutomationExecutionStatus.completedWithSuccess;
    case 'CompletedWithFailure':
      return AutomationExecutionStatus.completedWithFailure;
  }
  throw Exception('$this is not known in enum AutomationExecutionStatus');
}