"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.StepFunctionsRestApi=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),_1=require("."),stepfunctions_1=require("./integrations/stepfunctions"),sfn=require("../../aws-stepfunctions");class StepFunctionsRestApi extends _1.RestApi{constructor(scope,id,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_apigateway_StepFunctionsRestApiProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,StepFunctionsRestApi),error}if(props.defaultIntegration)throw new Error('Cannot specify "defaultIntegration" since Step Functions integration is automatically defined');if(props.stateMachine.node.defaultChild.stateMachineType!==sfn.StateMachineType.EXPRESS)throw new Error('State Machine must be of type "EXPRESS". Please use StateMachineType.EXPRESS as the stateMachineType');const stepfunctionsIntegration=stepfunctions_1.StepFunctionsIntegration.startExecution(props.stateMachine,{credentialsRole:props.role,requestContext:props.requestContext,path:props.path??!0,querystring:props.querystring??!0,headers:props.headers,authorizer:props.authorizer});super(scope,id,props),this.root.addMethod("ANY",stepfunctionsIntegration)}}exports.StepFunctionsRestApi=StepFunctionsRestApi,_a=JSII_RTTI_SYMBOL_1,StepFunctionsRestApi[_a]={fqn:"aws-cdk-lib.aws_apigateway.StepFunctionsRestApi",version:"2.96.1"};
