UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 119 kB
"use strict";var _a,_b,_c,_d,_e,_f,_g,_h,_j,_k;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnVersion=exports.CfnUrl=exports.CfnPermission=exports.CfnLayerVersionPermission=exports.CfnLayerVersion=exports.CfnFunction=exports.CfnEventSourceMapping=exports.CfnEventInvokeConfig=exports.CfnCodeSigningConfig=exports.CfnAlias=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),cfn_parse=require("../../core/lib/helpers-internal");function CfnAliasPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("functionName",cdk.requiredValidator)(properties.functionName)),errors.collect(cdk.propertyValidator("functionName",cdk.validateString)(properties.functionName)),errors.collect(cdk.propertyValidator("functionVersion",cdk.requiredValidator)(properties.functionVersion)),errors.collect(cdk.propertyValidator("functionVersion",cdk.validateString)(properties.functionVersion)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("provisionedConcurrencyConfig",CfnAlias_ProvisionedConcurrencyConfigurationPropertyValidator)(properties.provisionedConcurrencyConfig)),errors.collect(cdk.propertyValidator("routingConfig",CfnAlias_AliasRoutingConfigurationPropertyValidator)(properties.routingConfig)),errors.wrap('supplied properties not correct for "CfnAliasProps"')}function cfnAliasPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAliasPropsValidator(properties).assertSuccess(),{FunctionName:cdk.stringToCloudFormation(properties.functionName),FunctionVersion:cdk.stringToCloudFormation(properties.functionVersion),Name:cdk.stringToCloudFormation(properties.name),Description:cdk.stringToCloudFormation(properties.description),ProvisionedConcurrencyConfig:cfnAliasProvisionedConcurrencyConfigurationPropertyToCloudFormation(properties.provisionedConcurrencyConfig),RoutingConfig:cfnAliasAliasRoutingConfigurationPropertyToCloudFormation(properties.routingConfig)}):properties}function CfnAliasPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("functionName","FunctionName",cfn_parse.FromCloudFormation.getString(properties.FunctionName)),ret.addPropertyResult("functionVersion","FunctionVersion",cfn_parse.FromCloudFormation.getString(properties.FunctionVersion)),ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("provisionedConcurrencyConfig","ProvisionedConcurrencyConfig",properties.ProvisionedConcurrencyConfig!=null?CfnAliasProvisionedConcurrencyConfigurationPropertyFromCloudFormation(properties.ProvisionedConcurrencyConfig):void 0),ret.addPropertyResult("routingConfig","RoutingConfig",properties.RoutingConfig!=null?CfnAliasAliasRoutingConfigurationPropertyFromCloudFormation(properties.RoutingConfig):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAlias extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnAlias.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_CfnAliasProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAlias),error}cdk.requireProperty(props,"functionName",this),cdk.requireProperty(props,"functionVersion",this),cdk.requireProperty(props,"name",this),this.functionName=props.functionName,this.functionVersion=props.functionVersion,this.name=props.name,this.description=props.description,this.provisionedConcurrencyConfig=props.provisionedConcurrencyConfig,this.routingConfig=props.routingConfig}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAliasPropsFromCloudFormation(resourceProperties),ret=new CfnAlias(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnAlias.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{functionName:this.functionName,functionVersion:this.functionVersion,name:this.name,description:this.description,provisionedConcurrencyConfig:this.provisionedConcurrencyConfig,routingConfig:this.routingConfig}}renderProperties(props){return cfnAliasPropsToCloudFormation(props)}}exports.CfnAlias=CfnAlias,_a=JSII_RTTI_SYMBOL_1,CfnAlias[_a]={fqn:"aws-cdk-lib.aws_lambda.CfnAlias",version:"2.70.0"},CfnAlias.CFN_RESOURCE_TYPE_NAME="AWS::Lambda::Alias";function CfnAlias_AliasRoutingConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("additionalVersionWeights",cdk.requiredValidator)(properties.additionalVersionWeights)),errors.collect(cdk.propertyValidator("additionalVersionWeights",cdk.listValidator(CfnAlias_VersionWeightPropertyValidator))(properties.additionalVersionWeights)),errors.wrap('supplied properties not correct for "AliasRoutingConfigurationProperty"')}function cfnAliasAliasRoutingConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAlias_AliasRoutingConfigurationPropertyValidator(properties).assertSuccess(),{AdditionalVersionWeights:cdk.listMapper(cfnAliasVersionWeightPropertyToCloudFormation)(properties.additionalVersionWeights)}):properties}function CfnAliasAliasRoutingConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("additionalVersionWeights","AdditionalVersionWeights",cfn_parse.FromCloudFormation.getArray(CfnAliasVersionWeightPropertyFromCloudFormation)(properties.AdditionalVersionWeights)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAlias_ProvisionedConcurrencyConfigurationPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("provisionedConcurrentExecutions",cdk.requiredValidator)(properties.provisionedConcurrentExecutions)),errors.collect(cdk.propertyValidator("provisionedConcurrentExecutions",cdk.validateNumber)(properties.provisionedConcurrentExecutions)),errors.wrap('supplied properties not correct for "ProvisionedConcurrencyConfigurationProperty"')}function cfnAliasProvisionedConcurrencyConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAlias_ProvisionedConcurrencyConfigurationPropertyValidator(properties).assertSuccess(),{ProvisionedConcurrentExecutions:cdk.numberToCloudFormation(properties.provisionedConcurrentExecutions)}):properties}function CfnAliasProvisionedConcurrencyConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("provisionedConcurrentExecutions","ProvisionedConcurrentExecutions",cfn_parse.FromCloudFormation.getNumber(properties.ProvisionedConcurrentExecutions)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnAlias_VersionWeightPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("functionVersion",cdk.requiredValidator)(properties.functionVersion)),errors.collect(cdk.propertyValidator("functionVersion",cdk.validateString)(properties.functionVersion)),errors.collect(cdk.propertyValidator("functionWeight",cdk.requiredValidator)(properties.functionWeight)),errors.collect(cdk.propertyValidator("functionWeight",cdk.validateNumber)(properties.functionWeight)),errors.wrap('supplied properties not correct for "VersionWeightProperty"')}function cfnAliasVersionWeightPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAlias_VersionWeightPropertyValidator(properties).assertSuccess(),{FunctionVersion:cdk.stringToCloudFormation(properties.functionVersion),FunctionWeight:cdk.numberToCloudFormation(properties.functionWeight)}):properties}function CfnAliasVersionWeightPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("functionVersion","FunctionVersion",cfn_parse.FromCloudFormation.getString(properties.FunctionVersion)),ret.addPropertyResult("functionWeight","FunctionWeight",cfn_parse.FromCloudFormation.getNumber(properties.FunctionWeight)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCodeSigningConfigPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("allowedPublishers",cdk.requiredValidator)(properties.allowedPublishers)),errors.collect(cdk.propertyValidator("allowedPublishers",CfnCodeSigningConfig_AllowedPublishersPropertyValidator)(properties.allowedPublishers)),errors.collect(cdk.propertyValidator("codeSigningPolicies",CfnCodeSigningConfig_CodeSigningPoliciesPropertyValidator)(properties.codeSigningPolicies)),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.wrap('supplied properties not correct for "CfnCodeSigningConfigProps"')}function cfnCodeSigningConfigPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCodeSigningConfigPropsValidator(properties).assertSuccess(),{AllowedPublishers:cfnCodeSigningConfigAllowedPublishersPropertyToCloudFormation(properties.allowedPublishers),CodeSigningPolicies:cfnCodeSigningConfigCodeSigningPoliciesPropertyToCloudFormation(properties.codeSigningPolicies),Description:cdk.stringToCloudFormation(properties.description)}):properties}function CfnCodeSigningConfigPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("allowedPublishers","AllowedPublishers",CfnCodeSigningConfigAllowedPublishersPropertyFromCloudFormation(properties.AllowedPublishers)),ret.addPropertyResult("codeSigningPolicies","CodeSigningPolicies",properties.CodeSigningPolicies!=null?CfnCodeSigningConfigCodeSigningPoliciesPropertyFromCloudFormation(properties.CodeSigningPolicies):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnCodeSigningConfig extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnCodeSigningConfig.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_CfnCodeSigningConfigProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnCodeSigningConfig),error}cdk.requireProperty(props,"allowedPublishers",this),this.attrCodeSigningConfigArn=cdk.Token.asString(this.getAtt("CodeSigningConfigArn",cdk.ResolutionTypeHint.STRING)),this.attrCodeSigningConfigId=cdk.Token.asString(this.getAtt("CodeSigningConfigId",cdk.ResolutionTypeHint.STRING)),this.allowedPublishers=props.allowedPublishers,this.codeSigningPolicies=props.codeSigningPolicies,this.description=props.description}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnCodeSigningConfigPropsFromCloudFormation(resourceProperties),ret=new CfnCodeSigningConfig(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnCodeSigningConfig.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{allowedPublishers:this.allowedPublishers,codeSigningPolicies:this.codeSigningPolicies,description:this.description}}renderProperties(props){return cfnCodeSigningConfigPropsToCloudFormation(props)}}exports.CfnCodeSigningConfig=CfnCodeSigningConfig,_b=JSII_RTTI_SYMBOL_1,CfnCodeSigningConfig[_b]={fqn:"aws-cdk-lib.aws_lambda.CfnCodeSigningConfig",version:"2.70.0"},CfnCodeSigningConfig.CFN_RESOURCE_TYPE_NAME="AWS::Lambda::CodeSigningConfig";function CfnCodeSigningConfig_AllowedPublishersPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("signingProfileVersionArns",cdk.requiredValidator)(properties.signingProfileVersionArns)),errors.collect(cdk.propertyValidator("signingProfileVersionArns",cdk.listValidator(cdk.validateString))(properties.signingProfileVersionArns)),errors.wrap('supplied properties not correct for "AllowedPublishersProperty"')}function cfnCodeSigningConfigAllowedPublishersPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCodeSigningConfig_AllowedPublishersPropertyValidator(properties).assertSuccess(),{SigningProfileVersionArns:cdk.listMapper(cdk.stringToCloudFormation)(properties.signingProfileVersionArns)}):properties}function CfnCodeSigningConfigAllowedPublishersPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("signingProfileVersionArns","SigningProfileVersionArns",cfn_parse.FromCloudFormation.getStringArray(properties.SigningProfileVersionArns)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnCodeSigningConfig_CodeSigningPoliciesPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("untrustedArtifactOnDeployment",cdk.requiredValidator)(properties.untrustedArtifactOnDeployment)),errors.collect(cdk.propertyValidator("untrustedArtifactOnDeployment",cdk.validateString)(properties.untrustedArtifactOnDeployment)),errors.wrap('supplied properties not correct for "CodeSigningPoliciesProperty"')}function cfnCodeSigningConfigCodeSigningPoliciesPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnCodeSigningConfig_CodeSigningPoliciesPropertyValidator(properties).assertSuccess(),{UntrustedArtifactOnDeployment:cdk.stringToCloudFormation(properties.untrustedArtifactOnDeployment)}):properties}function CfnCodeSigningConfigCodeSigningPoliciesPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("untrustedArtifactOnDeployment","UntrustedArtifactOnDeployment",cfn_parse.FromCloudFormation.getString(properties.UntrustedArtifactOnDeployment)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventInvokeConfigPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("destinationConfig",CfnEventInvokeConfig_DestinationConfigPropertyValidator)(properties.destinationConfig)),errors.collect(cdk.propertyValidator("functionName",cdk.requiredValidator)(properties.functionName)),errors.collect(cdk.propertyValidator("functionName",cdk.validateString)(properties.functionName)),errors.collect(cdk.propertyValidator("maximumEventAgeInSeconds",cdk.validateNumber)(properties.maximumEventAgeInSeconds)),errors.collect(cdk.propertyValidator("maximumRetryAttempts",cdk.validateNumber)(properties.maximumRetryAttempts)),errors.collect(cdk.propertyValidator("qualifier",cdk.requiredValidator)(properties.qualifier)),errors.collect(cdk.propertyValidator("qualifier",cdk.validateString)(properties.qualifier)),errors.wrap('supplied properties not correct for "CfnEventInvokeConfigProps"')}function cfnEventInvokeConfigPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventInvokeConfigPropsValidator(properties).assertSuccess(),{FunctionName:cdk.stringToCloudFormation(properties.functionName),Qualifier:cdk.stringToCloudFormation(properties.qualifier),DestinationConfig:cfnEventInvokeConfigDestinationConfigPropertyToCloudFormation(properties.destinationConfig),MaximumEventAgeInSeconds:cdk.numberToCloudFormation(properties.maximumEventAgeInSeconds),MaximumRetryAttempts:cdk.numberToCloudFormation(properties.maximumRetryAttempts)}):properties}function CfnEventInvokeConfigPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("functionName","FunctionName",cfn_parse.FromCloudFormation.getString(properties.FunctionName)),ret.addPropertyResult("qualifier","Qualifier",cfn_parse.FromCloudFormation.getString(properties.Qualifier)),ret.addPropertyResult("destinationConfig","DestinationConfig",properties.DestinationConfig!=null?CfnEventInvokeConfigDestinationConfigPropertyFromCloudFormation(properties.DestinationConfig):void 0),ret.addPropertyResult("maximumEventAgeInSeconds","MaximumEventAgeInSeconds",properties.MaximumEventAgeInSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.MaximumEventAgeInSeconds):void 0),ret.addPropertyResult("maximumRetryAttempts","MaximumRetryAttempts",properties.MaximumRetryAttempts!=null?cfn_parse.FromCloudFormation.getNumber(properties.MaximumRetryAttempts):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnEventInvokeConfig extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnEventInvokeConfig.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_CfnEventInvokeConfigProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEventInvokeConfig),error}cdk.requireProperty(props,"functionName",this),cdk.requireProperty(props,"qualifier",this),this.functionName=props.functionName,this.qualifier=props.qualifier,this.destinationConfig=props.destinationConfig,this.maximumEventAgeInSeconds=props.maximumEventAgeInSeconds,this.maximumRetryAttempts=props.maximumRetryAttempts}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEventInvokeConfigPropsFromCloudFormation(resourceProperties),ret=new CfnEventInvokeConfig(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnEventInvokeConfig.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{functionName:this.functionName,qualifier:this.qualifier,destinationConfig:this.destinationConfig,maximumEventAgeInSeconds:this.maximumEventAgeInSeconds,maximumRetryAttempts:this.maximumRetryAttempts}}renderProperties(props){return cfnEventInvokeConfigPropsToCloudFormation(props)}}exports.CfnEventInvokeConfig=CfnEventInvokeConfig,_c=JSII_RTTI_SYMBOL_1,CfnEventInvokeConfig[_c]={fqn:"aws-cdk-lib.aws_lambda.CfnEventInvokeConfig",version:"2.70.0"},CfnEventInvokeConfig.CFN_RESOURCE_TYPE_NAME="AWS::Lambda::EventInvokeConfig";function CfnEventInvokeConfig_DestinationConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("onFailure",CfnEventInvokeConfig_OnFailurePropertyValidator)(properties.onFailure)),errors.collect(cdk.propertyValidator("onSuccess",CfnEventInvokeConfig_OnSuccessPropertyValidator)(properties.onSuccess)),errors.wrap('supplied properties not correct for "DestinationConfigProperty"')}function cfnEventInvokeConfigDestinationConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventInvokeConfig_DestinationConfigPropertyValidator(properties).assertSuccess(),{OnFailure:cfnEventInvokeConfigOnFailurePropertyToCloudFormation(properties.onFailure),OnSuccess:cfnEventInvokeConfigOnSuccessPropertyToCloudFormation(properties.onSuccess)}):properties}function CfnEventInvokeConfigDestinationConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("onFailure","OnFailure",properties.OnFailure!=null?CfnEventInvokeConfigOnFailurePropertyFromCloudFormation(properties.OnFailure):void 0),ret.addPropertyResult("onSuccess","OnSuccess",properties.OnSuccess!=null?CfnEventInvokeConfigOnSuccessPropertyFromCloudFormation(properties.OnSuccess):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventInvokeConfig_OnFailurePropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("destination",cdk.requiredValidator)(properties.destination)),errors.collect(cdk.propertyValidator("destination",cdk.validateString)(properties.destination)),errors.wrap('supplied properties not correct for "OnFailureProperty"')}function cfnEventInvokeConfigOnFailurePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventInvokeConfig_OnFailurePropertyValidator(properties).assertSuccess(),{Destination:cdk.stringToCloudFormation(properties.destination)}):properties}function CfnEventInvokeConfigOnFailurePropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("destination","Destination",cfn_parse.FromCloudFormation.getString(properties.Destination)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventInvokeConfig_OnSuccessPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("destination",cdk.requiredValidator)(properties.destination)),errors.collect(cdk.propertyValidator("destination",cdk.validateString)(properties.destination)),errors.wrap('supplied properties not correct for "OnSuccessProperty"')}function cfnEventInvokeConfigOnSuccessPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventInvokeConfig_OnSuccessPropertyValidator(properties).assertSuccess(),{Destination:cdk.stringToCloudFormation(properties.destination)}):properties}function CfnEventInvokeConfigOnSuccessPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("destination","Destination",cfn_parse.FromCloudFormation.getString(properties.Destination)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventSourceMappingPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("amazonManagedKafkaEventSourceConfig",CfnEventSourceMapping_AmazonManagedKafkaEventSourceConfigPropertyValidator)(properties.amazonManagedKafkaEventSourceConfig)),errors.collect(cdk.propertyValidator("batchSize",cdk.validateNumber)(properties.batchSize)),errors.collect(cdk.propertyValidator("bisectBatchOnFunctionError",cdk.validateBoolean)(properties.bisectBatchOnFunctionError)),errors.collect(cdk.propertyValidator("destinationConfig",CfnEventSourceMapping_DestinationConfigPropertyValidator)(properties.destinationConfig)),errors.collect(cdk.propertyValidator("documentDbEventSourceConfig",CfnEventSourceMapping_DocumentDBEventSourceConfigPropertyValidator)(properties.documentDbEventSourceConfig)),errors.collect(cdk.propertyValidator("enabled",cdk.validateBoolean)(properties.enabled)),errors.collect(cdk.propertyValidator("eventSourceArn",cdk.validateString)(properties.eventSourceArn)),errors.collect(cdk.propertyValidator("filterCriteria",CfnEventSourceMapping_FilterCriteriaPropertyValidator)(properties.filterCriteria)),errors.collect(cdk.propertyValidator("functionName",cdk.requiredValidator)(properties.functionName)),errors.collect(cdk.propertyValidator("functionName",cdk.validateString)(properties.functionName)),errors.collect(cdk.propertyValidator("functionResponseTypes",cdk.listValidator(cdk.validateString))(properties.functionResponseTypes)),errors.collect(cdk.propertyValidator("maximumBatchingWindowInSeconds",cdk.validateNumber)(properties.maximumBatchingWindowInSeconds)),errors.collect(cdk.propertyValidator("maximumRecordAgeInSeconds",cdk.validateNumber)(properties.maximumRecordAgeInSeconds)),errors.collect(cdk.propertyValidator("maximumRetryAttempts",cdk.validateNumber)(properties.maximumRetryAttempts)),errors.collect(cdk.propertyValidator("parallelizationFactor",cdk.validateNumber)(properties.parallelizationFactor)),errors.collect(cdk.propertyValidator("queues",cdk.listValidator(cdk.validateString))(properties.queues)),errors.collect(cdk.propertyValidator("scalingConfig",CfnEventSourceMapping_ScalingConfigPropertyValidator)(properties.scalingConfig)),errors.collect(cdk.propertyValidator("selfManagedEventSource",CfnEventSourceMapping_SelfManagedEventSourcePropertyValidator)(properties.selfManagedEventSource)),errors.collect(cdk.propertyValidator("selfManagedKafkaEventSourceConfig",CfnEventSourceMapping_SelfManagedKafkaEventSourceConfigPropertyValidator)(properties.selfManagedKafkaEventSourceConfig)),errors.collect(cdk.propertyValidator("sourceAccessConfigurations",cdk.listValidator(CfnEventSourceMapping_SourceAccessConfigurationPropertyValidator))(properties.sourceAccessConfigurations)),errors.collect(cdk.propertyValidator("startingPosition",cdk.validateString)(properties.startingPosition)),errors.collect(cdk.propertyValidator("startingPositionTimestamp",cdk.validateNumber)(properties.startingPositionTimestamp)),errors.collect(cdk.propertyValidator("topics",cdk.listValidator(cdk.validateString))(properties.topics)),errors.collect(cdk.propertyValidator("tumblingWindowInSeconds",cdk.validateNumber)(properties.tumblingWindowInSeconds)),errors.wrap('supplied properties not correct for "CfnEventSourceMappingProps"')}function cfnEventSourceMappingPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventSourceMappingPropsValidator(properties).assertSuccess(),{FunctionName:cdk.stringToCloudFormation(properties.functionName),AmazonManagedKafkaEventSourceConfig:cfnEventSourceMappingAmazonManagedKafkaEventSourceConfigPropertyToCloudFormation(properties.amazonManagedKafkaEventSourceConfig),BatchSize:cdk.numberToCloudFormation(properties.batchSize),BisectBatchOnFunctionError:cdk.booleanToCloudFormation(properties.bisectBatchOnFunctionError),DestinationConfig:cfnEventSourceMappingDestinationConfigPropertyToCloudFormation(properties.destinationConfig),DocumentDBEventSourceConfig:cfnEventSourceMappingDocumentDBEventSourceConfigPropertyToCloudFormation(properties.documentDbEventSourceConfig),Enabled:cdk.booleanToCloudFormation(properties.enabled),EventSourceArn:cdk.stringToCloudFormation(properties.eventSourceArn),FilterCriteria:cfnEventSourceMappingFilterCriteriaPropertyToCloudFormation(properties.filterCriteria),FunctionResponseTypes:cdk.listMapper(cdk.stringToCloudFormation)(properties.functionResponseTypes),MaximumBatchingWindowInSeconds:cdk.numberToCloudFormation(properties.maximumBatchingWindowInSeconds),MaximumRecordAgeInSeconds:cdk.numberToCloudFormation(properties.maximumRecordAgeInSeconds),MaximumRetryAttempts:cdk.numberToCloudFormation(properties.maximumRetryAttempts),ParallelizationFactor:cdk.numberToCloudFormation(properties.parallelizationFactor),Queues:cdk.listMapper(cdk.stringToCloudFormation)(properties.queues),ScalingConfig:cfnEventSourceMappingScalingConfigPropertyToCloudFormation(properties.scalingConfig),SelfManagedEventSource:cfnEventSourceMappingSelfManagedEventSourcePropertyToCloudFormation(properties.selfManagedEventSource),SelfManagedKafkaEventSourceConfig:cfnEventSourceMappingSelfManagedKafkaEventSourceConfigPropertyToCloudFormation(properties.selfManagedKafkaEventSourceConfig),SourceAccessConfigurations:cdk.listMapper(cfnEventSourceMappingSourceAccessConfigurationPropertyToCloudFormation)(properties.sourceAccessConfigurations),StartingPosition:cdk.stringToCloudFormation(properties.startingPosition),StartingPositionTimestamp:cdk.numberToCloudFormation(properties.startingPositionTimestamp),Topics:cdk.listMapper(cdk.stringToCloudFormation)(properties.topics),TumblingWindowInSeconds:cdk.numberToCloudFormation(properties.tumblingWindowInSeconds)}):properties}function CfnEventSourceMappingPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("functionName","FunctionName",cfn_parse.FromCloudFormation.getString(properties.FunctionName)),ret.addPropertyResult("amazonManagedKafkaEventSourceConfig","AmazonManagedKafkaEventSourceConfig",properties.AmazonManagedKafkaEventSourceConfig!=null?CfnEventSourceMappingAmazonManagedKafkaEventSourceConfigPropertyFromCloudFormation(properties.AmazonManagedKafkaEventSourceConfig):void 0),ret.addPropertyResult("batchSize","BatchSize",properties.BatchSize!=null?cfn_parse.FromCloudFormation.getNumber(properties.BatchSize):void 0),ret.addPropertyResult("bisectBatchOnFunctionError","BisectBatchOnFunctionError",properties.BisectBatchOnFunctionError!=null?cfn_parse.FromCloudFormation.getBoolean(properties.BisectBatchOnFunctionError):void 0),ret.addPropertyResult("destinationConfig","DestinationConfig",properties.DestinationConfig!=null?CfnEventSourceMappingDestinationConfigPropertyFromCloudFormation(properties.DestinationConfig):void 0),ret.addPropertyResult("documentDbEventSourceConfig","DocumentDBEventSourceConfig",properties.DocumentDBEventSourceConfig!=null?CfnEventSourceMappingDocumentDBEventSourceConfigPropertyFromCloudFormation(properties.DocumentDBEventSourceConfig):void 0),ret.addPropertyResult("enabled","Enabled",properties.Enabled!=null?cfn_parse.FromCloudFormation.getBoolean(properties.Enabled):void 0),ret.addPropertyResult("eventSourceArn","EventSourceArn",properties.EventSourceArn!=null?cfn_parse.FromCloudFormation.getString(properties.EventSourceArn):void 0),ret.addPropertyResult("filterCriteria","FilterCriteria",properties.FilterCriteria!=null?CfnEventSourceMappingFilterCriteriaPropertyFromCloudFormation(properties.FilterCriteria):void 0),ret.addPropertyResult("functionResponseTypes","FunctionResponseTypes",properties.FunctionResponseTypes!=null?cfn_parse.FromCloudFormation.getStringArray(properties.FunctionResponseTypes):void 0),ret.addPropertyResult("maximumBatchingWindowInSeconds","MaximumBatchingWindowInSeconds",properties.MaximumBatchingWindowInSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.MaximumBatchingWindowInSeconds):void 0),ret.addPropertyResult("maximumRecordAgeInSeconds","MaximumRecordAgeInSeconds",properties.MaximumRecordAgeInSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.MaximumRecordAgeInSeconds):void 0),ret.addPropertyResult("maximumRetryAttempts","MaximumRetryAttempts",properties.MaximumRetryAttempts!=null?cfn_parse.FromCloudFormation.getNumber(properties.MaximumRetryAttempts):void 0),ret.addPropertyResult("parallelizationFactor","ParallelizationFactor",properties.ParallelizationFactor!=null?cfn_parse.FromCloudFormation.getNumber(properties.ParallelizationFactor):void 0),ret.addPropertyResult("queues","Queues",properties.Queues!=null?cfn_parse.FromCloudFormation.getStringArray(properties.Queues):void 0),ret.addPropertyResult("scalingConfig","ScalingConfig",properties.ScalingConfig!=null?CfnEventSourceMappingScalingConfigPropertyFromCloudFormation(properties.ScalingConfig):void 0),ret.addPropertyResult("selfManagedEventSource","SelfManagedEventSource",properties.SelfManagedEventSource!=null?CfnEventSourceMappingSelfManagedEventSourcePropertyFromCloudFormation(properties.SelfManagedEventSource):void 0),ret.addPropertyResult("selfManagedKafkaEventSourceConfig","SelfManagedKafkaEventSourceConfig",properties.SelfManagedKafkaEventSourceConfig!=null?CfnEventSourceMappingSelfManagedKafkaEventSourceConfigPropertyFromCloudFormation(properties.SelfManagedKafkaEventSourceConfig):void 0),ret.addPropertyResult("sourceAccessConfigurations","SourceAccessConfigurations",properties.SourceAccessConfigurations!=null?cfn_parse.FromCloudFormation.getArray(CfnEventSourceMappingSourceAccessConfigurationPropertyFromCloudFormation)(properties.SourceAccessConfigurations):void 0),ret.addPropertyResult("startingPosition","StartingPosition",properties.StartingPosition!=null?cfn_parse.FromCloudFormation.getString(properties.StartingPosition):void 0),ret.addPropertyResult("startingPositionTimestamp","StartingPositionTimestamp",properties.StartingPositionTimestamp!=null?cfn_parse.FromCloudFormation.getNumber(properties.StartingPositionTimestamp):void 0),ret.addPropertyResult("topics","Topics",properties.Topics!=null?cfn_parse.FromCloudFormation.getStringArray(properties.Topics):void 0),ret.addPropertyResult("tumblingWindowInSeconds","TumblingWindowInSeconds",properties.TumblingWindowInSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.TumblingWindowInSeconds):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnEventSourceMapping extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnEventSourceMapping.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_CfnEventSourceMappingProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEventSourceMapping),error}cdk.requireProperty(props,"functionName",this),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.functionName=props.functionName,this.amazonManagedKafkaEventSourceConfig=props.amazonManagedKafkaEventSourceConfig,this.batchSize=props.batchSize,this.bisectBatchOnFunctionError=props.bisectBatchOnFunctionError,this.destinationConfig=props.destinationConfig,this.documentDbEventSourceConfig=props.documentDbEventSourceConfig,this.enabled=props.enabled,this.eventSourceArn=props.eventSourceArn,this.filterCriteria=props.filterCriteria,this.functionResponseTypes=props.functionResponseTypes,this.maximumBatchingWindowInSeconds=props.maximumBatchingWindowInSeconds,this.maximumRecordAgeInSeconds=props.maximumRecordAgeInSeconds,this.maximumRetryAttempts=props.maximumRetryAttempts,this.parallelizationFactor=props.parallelizationFactor,this.queues=props.queues,this.scalingConfig=props.scalingConfig,this.selfManagedEventSource=props.selfManagedEventSource,this.selfManagedKafkaEventSourceConfig=props.selfManagedKafkaEventSourceConfig,this.sourceAccessConfigurations=props.sourceAccessConfigurations,this.startingPosition=props.startingPosition,this.startingPositionTimestamp=props.startingPositionTimestamp,this.topics=props.topics,this.tumblingWindowInSeconds=props.tumblingWindowInSeconds}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEventSourceMappingPropsFromCloudFormation(resourceProperties),ret=new CfnEventSourceMapping(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnEventSourceMapping.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{functionName:this.functionName,amazonManagedKafkaEventSourceConfig:this.amazonManagedKafkaEventSourceConfig,batchSize:this.batchSize,bisectBatchOnFunctionError:this.bisectBatchOnFunctionError,destinationConfig:this.destinationConfig,documentDbEventSourceConfig:this.documentDbEventSourceConfig,enabled:this.enabled,eventSourceArn:this.eventSourceArn,filterCriteria:this.filterCriteria,functionResponseTypes:this.functionResponseTypes,maximumBatchingWindowInSeconds:this.maximumBatchingWindowInSeconds,maximumRecordAgeInSeconds:this.maximumRecordAgeInSeconds,maximumRetryAttempts:this.maximumRetryAttempts,parallelizationFactor:this.parallelizationFactor,queues:this.queues,scalingConfig:this.scalingConfig,selfManagedEventSource:this.selfManagedEventSource,selfManagedKafkaEventSourceConfig:this.selfManagedKafkaEventSourceConfig,sourceAccessConfigurations:this.sourceAccessConfigurations,startingPosition:this.startingPosition,startingPositionTimestamp:this.startingPositionTimestamp,topics:this.topics,tumblingWindowInSeconds:this.tumblingWindowInSeconds}}renderProperties(props){return cfnEventSourceMappingPropsToCloudFormation(props)}}exports.CfnEventSourceMapping=CfnEventSourceMapping,_d=JSII_RTTI_SYMBOL_1,CfnEventSourceMapping[_d]={fqn:"aws-cdk-lib.aws_lambda.CfnEventSourceMapping",version:"2.70.0"},CfnEventSourceMapping.CFN_RESOURCE_TYPE_NAME="AWS::Lambda::EventSourceMapping";function CfnEventSourceMapping_AmazonManagedKafkaEventSourceConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("consumerGroupId",cdk.validateString)(properties.consumerGroupId)),errors.wrap('supplied properties not correct for "AmazonManagedKafkaEventSourceConfigProperty"')}function cfnEventSourceMappingAmazonManagedKafkaEventSourceConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventSourceMapping_AmazonManagedKafkaEventSourceConfigPropertyValidator(properties).assertSuccess(),{ConsumerGroupId:cdk.stringToCloudFormation(properties.consumerGroupId)}):properties}function CfnEventSourceMappingAmazonManagedKafkaEventSourceConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("consumerGroupId","ConsumerGroupId",properties.ConsumerGroupId!=null?cfn_parse.FromCloudFormation.getString(properties.ConsumerGroupId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventSourceMapping_DestinationConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("onFailure",CfnEventSourceMapping_OnFailurePropertyValidator)(properties.onFailure)),errors.wrap('supplied properties not correct for "DestinationConfigProperty"')}function cfnEventSourceMappingDestinationConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventSourceMapping_DestinationConfigPropertyValidator(properties).assertSuccess(),{OnFailure:cfnEventSourceMappingOnFailurePropertyToCloudFormation(properties.onFailure)}):properties}function CfnEventSourceMappingDestinationConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("onFailure","OnFailure",properties.OnFailure!=null?CfnEventSourceMappingOnFailurePropertyFromCloudFormation(properties.OnFailure):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventSourceMapping_DocumentDBEventSourceConfigPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("collectionName",cdk.validateString)(properties.collectionName)),errors.collect(cdk.propertyValidator("databaseName",cdk.validateString)(properties.databaseName)),errors.collect(cdk.propertyValidator("fullDocument",cdk.validateString)(properties.fullDocument)),errors.wrap('supplied properties not correct for "DocumentDBEventSourceConfigProperty"')}function cfnEventSourceMappingDocumentDBEventSourceConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventSourceMapping_DocumentDBEventSourceConfigPropertyValidator(properties).assertSuccess(),{CollectionName:cdk.stringToCloudFormation(properties.collectionName),DatabaseName:cdk.stringToCloudFormation(properties.databaseName),FullDocument:cdk.stringToCloudFormation(properties.fullDocument)}):properties}function CfnEventSourceMappingDocumentDBEventSourceConfigPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("collectionName","CollectionName",properties.CollectionName!=null?cfn_parse.FromCloudFormation.getString(properties.CollectionName):void 0),ret.addPropertyResult("databaseName","DatabaseName",properties.DatabaseName!=null?cfn_parse.FromCloudFormation.getString(properties.DatabaseName):void 0),ret.addPropertyResult("fullDocument","FullDocument",properties.FullDocument!=null?cfn_parse.FromCloudFormation.getString(properties.FullDocument):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventSourceMapping_EndpointsPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("kafkaBootstrapServers",cdk.listValidator(cdk.validateString))(properties.kafkaBootstrapServers)),errors.wrap('supplied properties not correct for "EndpointsProperty"')}function cfnEventSourceMappingEndpointsPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventSourceMapping_EndpointsPropertyValidator(properties).assertSuccess(),{KafkaBootstrapServers:cdk.listMapper(cdk.stringToCloudFormation)(properties.kafkaBootstrapServers)}):properties}function CfnEventSourceMappingEndpointsPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("kafkaBootstrapServers","KafkaBootstrapServers",properties.KafkaBootstrapServers!=null?cfn_parse.FromCloudFormation.getStringArray(properties.KafkaBootstrapServers):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEventSourceMapping_FilterPropertyValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("pattern",cdk.validateString)(properties.pattern)),errors.wrap('supplied properties not correct for "FilterProperty"')}function cfnEventSourceMappingFilterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEventSourceMapping_FilterPropertyValidator(properties).assertSuccess(),{Pattern:cdk.stringToCloudFormation(properties.pattern)}):properties}function CfnEventSourceMappingFilterPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("pattern","Pattern",properties.Pattern!=null?cfn_parse.FromCloudFormation.getString(properties.Pattern):void 0),ret.addUnrecognizedPrope