toScheduleLambdaFunctionFailedCause method

ScheduleLambdaFunctionFailedCause toScheduleLambdaFunctionFailedCause()

Implementation

ScheduleLambdaFunctionFailedCause toScheduleLambdaFunctionFailedCause() {
  switch (this) {
    case 'ID_ALREADY_IN_USE':
      return ScheduleLambdaFunctionFailedCause.idAlreadyInUse;
    case 'OPEN_LAMBDA_FUNCTIONS_LIMIT_EXCEEDED':
      return ScheduleLambdaFunctionFailedCause
          .openLambdaFunctionsLimitExceeded;
    case 'LAMBDA_FUNCTION_CREATION_RATE_EXCEEDED':
      return ScheduleLambdaFunctionFailedCause
          .lambdaFunctionCreationRateExceeded;
    case 'LAMBDA_SERVICE_NOT_AVAILABLE_IN_REGION':
      return ScheduleLambdaFunctionFailedCause
          .lambdaServiceNotAvailableInRegion;
  }
  throw Exception(
      '$this is not known in enum ScheduleLambdaFunctionFailedCause');
}