toContinueAsNewWorkflowExecutionFailedCause method

ContinueAsNewWorkflowExecutionFailedCause toContinueAsNewWorkflowExecutionFailedCause()

Implementation

ContinueAsNewWorkflowExecutionFailedCause
    toContinueAsNewWorkflowExecutionFailedCause() {
  switch (this) {
    case 'UNHANDLED_DECISION':
      return ContinueAsNewWorkflowExecutionFailedCause.unhandledDecision;
    case 'WORKFLOW_TYPE_DEPRECATED':
      return ContinueAsNewWorkflowExecutionFailedCause.workflowTypeDeprecated;
    case 'WORKFLOW_TYPE_DOES_NOT_EXIST':
      return ContinueAsNewWorkflowExecutionFailedCause
          .workflowTypeDoesNotExist;
    case 'DEFAULT_EXECUTION_START_TO_CLOSE_TIMEOUT_UNDEFINED':
      return ContinueAsNewWorkflowExecutionFailedCause
          .defaultExecutionStartToCloseTimeoutUndefined;
    case 'DEFAULT_TASK_START_TO_CLOSE_TIMEOUT_UNDEFINED':
      return ContinueAsNewWorkflowExecutionFailedCause
          .defaultTaskStartToCloseTimeoutUndefined;
    case 'DEFAULT_TASK_LIST_UNDEFINED':
      return ContinueAsNewWorkflowExecutionFailedCause
          .defaultTaskListUndefined;
    case 'DEFAULT_CHILD_POLICY_UNDEFINED':
      return ContinueAsNewWorkflowExecutionFailedCause
          .defaultChildPolicyUndefined;
    case 'CONTINUE_AS_NEW_WORKFLOW_EXECUTION_RATE_EXCEEDED':
      return ContinueAsNewWorkflowExecutionFailedCause
          .continueAsNewWorkflowExecutionRateExceeded;
    case 'OPERATION_NOT_PERMITTED':
      return ContinueAsNewWorkflowExecutionFailedCause.operationNotPermitted;
  }
  throw Exception(
      '$this is not known in enum ContinueAsNewWorkflowExecutionFailedCause');
}