UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 2.02 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomState=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var state_1=()=>{var tmp=require("./state");return state_1=()=>tmp,tmp},__1=()=>{var tmp=require("..");return __1=()=>tmp,tmp};class CustomState extends state_1().State{constructor(scope,id,props){super(scope,id,{});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_CustomStateProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CustomState),error}this.endStates=[this],this.stateJson=props.stateJson}addRetry(props={}){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_RetryProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addRetry),error}return super._addRetry(props),this}addCatch(handler,props={}){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_IChainable(handler),jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_CatchProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.addCatch),error}return super._addCatch(handler.startState,props),this}next(next){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_stepfunctions_IChainable(next)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.next),error}return super.makeNext(next.startState),__1().Chain.sequence(this,next)}toStateJson(){const state={...this.renderNextEnd(),...this.stateJson,...this.renderRetryCatch()};return Array.isArray(this.stateJson.Retry)&&(state.Retry=[...state.Retry,...this.stateJson.Retry]),state}}exports.CustomState=CustomState,_a=JSII_RTTI_SYMBOL_1,CustomState[_a]={fqn:"aws-cdk-lib.aws_stepfunctions.CustomState",version:"2.130.0"};