aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 1.85 kB
JavaScript
;var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Wait=exports.WaitTime=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),state_type_1=require("./private/state-type"),state_1=require("./state"),chain_1=require("../chain");class WaitTime{constructor(json){this.json=json}static duration(duration){try{jsiiDeprecationWarnings.aws_cdk_lib_Duration(duration)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.duration),error}return new WaitTime({Seconds:duration.toSeconds()})}static timestamp(timestamp){return new WaitTime({Timestamp:timestamp})}static secondsPath(path){return new WaitTime({SecondsPath:path})}static timestampPath(path){return new WaitTime({TimestampPath:path})}get _json(){return this.json}}exports.WaitTime=WaitTime,_a=JSII_RTTI_SYMBOL_1,WaitTime[_a]={fqn:"aws-cdk-lib.aws_stepfunctions.WaitTime",version:"2.70.0"};class Wait extends state_1.State{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_stepfunctions_WaitProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Wait),error}this.time=props.time,this.endStates=[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),chain_1.Chain.sequence(this,next)}toStateJson(){return{Type:state_type_1.StateType.WAIT,Comment:this.comment,...this.time._json,...this.renderNextEnd()}}}exports.Wait=Wait,_b=JSII_RTTI_SYMBOL_1,Wait[_b]={fqn:"aws-cdk-lib.aws_stepfunctions.Wait",version:"2.70.0"};