"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ParameterMapping=exports.MappingValue=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class MappingValue{static requestHeader(name){return new MappingValue(`$request.header.${name}`)}static requestQueryString(name){return new MappingValue(`$request.querystring.${name}`)}static requestBody(name){return new MappingValue(`$request.body.${name}`)}static requestPath(){return new MappingValue("$request.path")}static requestPathParam(name){return new MappingValue(`$request.path.${name}`)}static contextVariable(variableName){return new MappingValue(`$context.${variableName}`)}static stageVariable(variableName){return new MappingValue(`$stageVariables.${variableName}`)}static custom(value){return new MappingValue(value)}constructor(value){this.value=value}}exports.MappingValue=MappingValue,_a=JSII_RTTI_SYMBOL_1,MappingValue[_a]={fqn:"aws-cdk-lib.aws_apigatewayv2.MappingValue",version:"2.159.0"},MappingValue.NONE=new MappingValue("");class ParameterMapping{static fromObject(obj){const mapping=new ParameterMapping;for(const[k,m]of Object.entries(obj))mapping.custom(k,m.value);return mapping}constructor(){this.mappings={}}appendHeader(name,value){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_MappingValue(value)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.appendHeader),error}return this.mappings[`append:header.${name}`]=value.value,this}overwriteHeader(name,value){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_MappingValue(value)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.overwriteHeader),error}return this.mappings[`overwrite:header.${name}`]=value.value,this}removeHeader(name){return this.mappings[`remove:header.${name}`]="",this}appendQueryString(name,value){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_MappingValue(value)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.appendQueryString),error}return this.mappings[`append:querystring.${name}`]=value.value,this}overwriteQueryString(name,value){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_MappingValue(value)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.overwriteQueryString),error}return this.mappings[`overwrite:querystring.${name}`]=value.value,this}removeQueryString(name){return this.mappings[`remove:querystring.${name}`]="",this}overwritePath(value){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_apigatewayv2_MappingValue(value)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.overwritePath),error}return this.mappings["overwrite:path"]=value.value,this}custom(key,value){return this.mappings[key]=value,this}}exports.ParameterMapping=ParameterMapping,_b=JSII_RTTI_SYMBOL_1,ParameterMapping[_b]={fqn:"aws-cdk-lib.aws_apigatewayv2.ParameterMapping",version:"2.159.0"};
