"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaRestApi=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var integrations_1=()=>{var tmp=require("./integrations");return integrations_1=()=>tmp,tmp},restapi_1=()=>{var tmp=require("./restapi");return restapi_1=()=>tmp,tmp};class LambdaRestApi extends restapi_1().RestApi{constructor(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigateway_LambdaRestApiProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,LambdaRestApi),error}if(props.options?.defaultIntegration||props.defaultIntegration)throw new Error('Cannot specify "defaultIntegration" since Lambda integration is automatically defined');super(scope,id,{defaultIntegration:new(integrations_1()).LambdaIntegration(props.handler,props.integrationOptions),...props.options,...props}),props.proxy!==!1&&(this.root.addProxy(),this.root.addResource=addResourceThrows,this.root.addMethod=addMethodThrows,this.root.addProxy=addProxyThrows),this.node.addValidation({validate(){for(const value of Object.values(props.deployOptions?.variables??{})){const regexp=/[A-Za-z0-9-._~:/?#&=,]+/;if(value.match(regexp)===null)return["Stage variable value "+value+" does not match the regex."]}return[]}})}}exports.LambdaRestApi=LambdaRestApi,_a=JSII_RTTI_SYMBOL_1,LambdaRestApi[_a]={fqn:"aws-cdk-lib.aws_apigateway.LambdaRestApi",version:"2.159.0"};function addResourceThrows(){throw new Error("Cannot call 'addResource' on a proxying LambdaRestApi; set 'proxy' to false")}function addMethodThrows(){throw new Error("Cannot call 'addMethod' on a proxying LambdaRestApi; set 'proxy' to false")}function addProxyThrows(){throw new Error("Cannot call 'addProxy' on a proxying LambdaRestApi; set 'proxy' to false")}
