UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 263 kB
"use strict";var _a,_b,_c,_d,_e,_f;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnWebACLAssociation=exports.CfnWebACL=exports.CfnRuleGroup=exports.CfnRegexPatternSet=exports.CfnLoggingConfiguration=exports.CfnIPSet=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 CfnIPSetPropsValidator(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("addresses",cdk.requiredValidator)(properties.addresses)),errors.collect(cdk.propertyValidator("addresses",cdk.listValidator(cdk.validateString))(properties.addresses)),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("ipAddressVersion",cdk.requiredValidator)(properties.ipAddressVersion)),errors.collect(cdk.propertyValidator("ipAddressVersion",cdk.validateString)(properties.ipAddressVersion)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("scope",cdk.requiredValidator)(properties.scope)),errors.collect(cdk.propertyValidator("scope",cdk.validateString)(properties.scope)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnIPSetProps"')}function cfnIPSetPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnIPSetPropsValidator(properties).assertSuccess(),{Addresses:cdk.listMapper(cdk.stringToCloudFormation)(properties.addresses),IPAddressVersion:cdk.stringToCloudFormation(properties.ipAddressVersion),Scope:cdk.stringToCloudFormation(properties.scope),Description:cdk.stringToCloudFormation(properties.description),Name:cdk.stringToCloudFormation(properties.name),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnIPSetPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("addresses","Addresses",cfn_parse.FromCloudFormation.getStringArray(properties.Addresses)),ret.addPropertyResult("ipAddressVersion","IPAddressVersion",cfn_parse.FromCloudFormation.getString(properties.IPAddressVersion)),ret.addPropertyResult("scope","Scope",cfn_parse.FromCloudFormation.getString(properties.Scope)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse.FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnIPSet extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnIPSet.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_wafv2_CfnIPSetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnIPSet),error}cdk.requireProperty(props,"addresses",this),cdk.requireProperty(props,"ipAddressVersion",this),cdk.requireProperty(props,"scope",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.addresses=props.addresses,this.ipAddressVersion=props.ipAddressVersion,this.scope=props.scope,this.description=props.description,this.name=props.name,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::WAFv2::IPSet",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnIPSetPropsFromCloudFormation(resourceProperties),ret=new CfnIPSet(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",CfnIPSet.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{addresses:this.addresses,ipAddressVersion:this.ipAddressVersion,scope:this.scope,description:this.description,name:this.name,tags:this.tags.renderTags()}}renderProperties(props){return cfnIPSetPropsToCloudFormation(props)}}exports.CfnIPSet=CfnIPSet,_a=JSII_RTTI_SYMBOL_1,CfnIPSet[_a]={fqn:"aws-cdk-lib.aws_wafv2.CfnIPSet",version:"2.70.0"},CfnIPSet.CFN_RESOURCE_TYPE_NAME="AWS::WAFv2::IPSet";function CfnLoggingConfigurationPropsValidator(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("logDestinationConfigs",cdk.requiredValidator)(properties.logDestinationConfigs)),errors.collect(cdk.propertyValidator("logDestinationConfigs",cdk.listValidator(cdk.validateString))(properties.logDestinationConfigs)),errors.collect(cdk.propertyValidator("loggingFilter",cdk.validateObject)(properties.loggingFilter)),errors.collect(cdk.propertyValidator("redactedFields",cdk.listValidator(CfnLoggingConfiguration_FieldToMatchPropertyValidator))(properties.redactedFields)),errors.collect(cdk.propertyValidator("resourceArn",cdk.requiredValidator)(properties.resourceArn)),errors.collect(cdk.propertyValidator("resourceArn",cdk.validateString)(properties.resourceArn)),errors.wrap('supplied properties not correct for "CfnLoggingConfigurationProps"')}function cfnLoggingConfigurationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfigurationPropsValidator(properties).assertSuccess(),{LogDestinationConfigs:cdk.listMapper(cdk.stringToCloudFormation)(properties.logDestinationConfigs),ResourceArn:cdk.stringToCloudFormation(properties.resourceArn),LoggingFilter:cdk.objectToCloudFormation(properties.loggingFilter),RedactedFields:cdk.listMapper(cfnLoggingConfigurationFieldToMatchPropertyToCloudFormation)(properties.redactedFields)}):properties}function CfnLoggingConfigurationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("logDestinationConfigs","LogDestinationConfigs",cfn_parse.FromCloudFormation.getStringArray(properties.LogDestinationConfigs)),ret.addPropertyResult("resourceArn","ResourceArn",cfn_parse.FromCloudFormation.getString(properties.ResourceArn)),ret.addPropertyResult("loggingFilter","LoggingFilter",properties.LoggingFilter!=null?cfn_parse.FromCloudFormation.getAny(properties.LoggingFilter):void 0),ret.addPropertyResult("redactedFields","RedactedFields",properties.RedactedFields!=null?cfn_parse.FromCloudFormation.getArray(CfnLoggingConfigurationFieldToMatchPropertyFromCloudFormation)(properties.RedactedFields):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnLoggingConfiguration extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnLoggingConfiguration.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_wafv2_CfnLoggingConfigurationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnLoggingConfiguration),error}cdk.requireProperty(props,"logDestinationConfigs",this),cdk.requireProperty(props,"resourceArn",this),this.attrManagedByFirewallManager=this.getAtt("ManagedByFirewallManager",cdk.ResolutionTypeHint.STRING),this.logDestinationConfigs=props.logDestinationConfigs,this.resourceArn=props.resourceArn,this.loggingFilter=props.loggingFilter,this.redactedFields=props.redactedFields}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnLoggingConfigurationPropsFromCloudFormation(resourceProperties),ret=new CfnLoggingConfiguration(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",CfnLoggingConfiguration.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{logDestinationConfigs:this.logDestinationConfigs,resourceArn:this.resourceArn,loggingFilter:this.loggingFilter,redactedFields:this.redactedFields}}renderProperties(props){return cfnLoggingConfigurationPropsToCloudFormation(props)}}exports.CfnLoggingConfiguration=CfnLoggingConfiguration,_b=JSII_RTTI_SYMBOL_1,CfnLoggingConfiguration[_b]={fqn:"aws-cdk-lib.aws_wafv2.CfnLoggingConfiguration",version:"2.70.0"},CfnLoggingConfiguration.CFN_RESOURCE_TYPE_NAME="AWS::WAFv2::LoggingConfiguration";function CfnLoggingConfiguration_ActionConditionPropertyValidator(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("action",cdk.requiredValidator)(properties.action)),errors.collect(cdk.propertyValidator("action",cdk.validateString)(properties.action)),errors.wrap('supplied properties not correct for "ActionConditionProperty"')}function cfnLoggingConfigurationActionConditionPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_ActionConditionPropertyValidator(properties).assertSuccess(),{Action:cdk.stringToCloudFormation(properties.action)}):properties}function CfnLoggingConfigurationActionConditionPropertyFromCloudFormation(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("action","Action",cfn_parse.FromCloudFormation.getString(properties.Action)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_ConditionPropertyValidator(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("actionCondition",CfnLoggingConfiguration_ActionConditionPropertyValidator)(properties.actionCondition)),errors.collect(cdk.propertyValidator("labelNameCondition",CfnLoggingConfiguration_LabelNameConditionPropertyValidator)(properties.labelNameCondition)),errors.wrap('supplied properties not correct for "ConditionProperty"')}function cfnLoggingConfigurationConditionPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_ConditionPropertyValidator(properties).assertSuccess(),{ActionCondition:cfnLoggingConfigurationActionConditionPropertyToCloudFormation(properties.actionCondition),LabelNameCondition:cfnLoggingConfigurationLabelNameConditionPropertyToCloudFormation(properties.labelNameCondition)}):properties}function CfnLoggingConfigurationConditionPropertyFromCloudFormation(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("actionCondition","ActionCondition",properties.ActionCondition!=null?CfnLoggingConfigurationActionConditionPropertyFromCloudFormation(properties.ActionCondition):void 0),ret.addPropertyResult("labelNameCondition","LabelNameCondition",properties.LabelNameCondition!=null?CfnLoggingConfigurationLabelNameConditionPropertyFromCloudFormation(properties.LabelNameCondition):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_FieldToMatchPropertyValidator(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("jsonBody",cdk.validateObject)(properties.jsonBody)),errors.collect(cdk.propertyValidator("method",cdk.validateObject)(properties.method)),errors.collect(cdk.propertyValidator("queryString",cdk.validateObject)(properties.queryString)),errors.collect(cdk.propertyValidator("singleHeader",cdk.validateObject)(properties.singleHeader)),errors.collect(cdk.propertyValidator("uriPath",cdk.validateObject)(properties.uriPath)),errors.wrap('supplied properties not correct for "FieldToMatchProperty"')}function cfnLoggingConfigurationFieldToMatchPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_FieldToMatchPropertyValidator(properties).assertSuccess(),{JsonBody:cdk.objectToCloudFormation(properties.jsonBody),Method:cdk.objectToCloudFormation(properties.method),QueryString:cdk.objectToCloudFormation(properties.queryString),SingleHeader:cdk.objectToCloudFormation(properties.singleHeader),UriPath:cdk.objectToCloudFormation(properties.uriPath)}):properties}function CfnLoggingConfigurationFieldToMatchPropertyFromCloudFormation(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("jsonBody","JsonBody",properties.JsonBody!=null?cfn_parse.FromCloudFormation.getAny(properties.JsonBody):void 0),ret.addPropertyResult("method","Method",properties.Method!=null?cfn_parse.FromCloudFormation.getAny(properties.Method):void 0),ret.addPropertyResult("queryString","QueryString",properties.QueryString!=null?cfn_parse.FromCloudFormation.getAny(properties.QueryString):void 0),ret.addPropertyResult("singleHeader","SingleHeader",properties.SingleHeader!=null?cfn_parse.FromCloudFormation.getAny(properties.SingleHeader):void 0),ret.addPropertyResult("uriPath","UriPath",properties.UriPath!=null?cfn_parse.FromCloudFormation.getAny(properties.UriPath):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_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("behavior",cdk.requiredValidator)(properties.behavior)),errors.collect(cdk.propertyValidator("behavior",cdk.validateString)(properties.behavior)),errors.collect(cdk.propertyValidator("conditions",cdk.requiredValidator)(properties.conditions)),errors.collect(cdk.propertyValidator("conditions",cdk.listValidator(CfnLoggingConfiguration_ConditionPropertyValidator))(properties.conditions)),errors.collect(cdk.propertyValidator("requirement",cdk.requiredValidator)(properties.requirement)),errors.collect(cdk.propertyValidator("requirement",cdk.validateString)(properties.requirement)),errors.wrap('supplied properties not correct for "FilterProperty"')}function cfnLoggingConfigurationFilterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_FilterPropertyValidator(properties).assertSuccess(),{Behavior:cdk.stringToCloudFormation(properties.behavior),Conditions:cdk.listMapper(cfnLoggingConfigurationConditionPropertyToCloudFormation)(properties.conditions),Requirement:cdk.stringToCloudFormation(properties.requirement)}):properties}function CfnLoggingConfigurationFilterPropertyFromCloudFormation(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("behavior","Behavior",cfn_parse.FromCloudFormation.getString(properties.Behavior)),ret.addPropertyResult("conditions","Conditions",cfn_parse.FromCloudFormation.getArray(CfnLoggingConfigurationConditionPropertyFromCloudFormation)(properties.Conditions)),ret.addPropertyResult("requirement","Requirement",cfn_parse.FromCloudFormation.getString(properties.Requirement)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_JsonBodyPropertyValidator(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("invalidFallbackBehavior",cdk.validateString)(properties.invalidFallbackBehavior)),errors.collect(cdk.propertyValidator("matchPattern",cdk.requiredValidator)(properties.matchPattern)),errors.collect(cdk.propertyValidator("matchPattern",CfnLoggingConfiguration_MatchPatternPropertyValidator)(properties.matchPattern)),errors.collect(cdk.propertyValidator("matchScope",cdk.requiredValidator)(properties.matchScope)),errors.collect(cdk.propertyValidator("matchScope",cdk.validateString)(properties.matchScope)),errors.wrap('supplied properties not correct for "JsonBodyProperty"')}function cfnLoggingConfigurationJsonBodyPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_JsonBodyPropertyValidator(properties).assertSuccess(),{InvalidFallbackBehavior:cdk.stringToCloudFormation(properties.invalidFallbackBehavior),MatchPattern:cfnLoggingConfigurationMatchPatternPropertyToCloudFormation(properties.matchPattern),MatchScope:cdk.stringToCloudFormation(properties.matchScope)}):properties}function CfnLoggingConfigurationJsonBodyPropertyFromCloudFormation(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("invalidFallbackBehavior","InvalidFallbackBehavior",properties.InvalidFallbackBehavior!=null?cfn_parse.FromCloudFormation.getString(properties.InvalidFallbackBehavior):void 0),ret.addPropertyResult("matchPattern","MatchPattern",CfnLoggingConfigurationMatchPatternPropertyFromCloudFormation(properties.MatchPattern)),ret.addPropertyResult("matchScope","MatchScope",cfn_parse.FromCloudFormation.getString(properties.MatchScope)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_LabelNameConditionPropertyValidator(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("labelName",cdk.requiredValidator)(properties.labelName)),errors.collect(cdk.propertyValidator("labelName",cdk.validateString)(properties.labelName)),errors.wrap('supplied properties not correct for "LabelNameConditionProperty"')}function cfnLoggingConfigurationLabelNameConditionPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_LabelNameConditionPropertyValidator(properties).assertSuccess(),{LabelName:cdk.stringToCloudFormation(properties.labelName)}):properties}function CfnLoggingConfigurationLabelNameConditionPropertyFromCloudFormation(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("labelName","LabelName",cfn_parse.FromCloudFormation.getString(properties.LabelName)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_LoggingFilterPropertyValidator(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("defaultBehavior",cdk.requiredValidator)(properties.defaultBehavior)),errors.collect(cdk.propertyValidator("defaultBehavior",cdk.validateString)(properties.defaultBehavior)),errors.collect(cdk.propertyValidator("filters",cdk.requiredValidator)(properties.filters)),errors.collect(cdk.propertyValidator("filters",cdk.listValidator(CfnLoggingConfiguration_FilterPropertyValidator))(properties.filters)),errors.wrap('supplied properties not correct for "LoggingFilterProperty"')}function cfnLoggingConfigurationLoggingFilterPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_LoggingFilterPropertyValidator(properties).assertSuccess(),{DefaultBehavior:cdk.stringToCloudFormation(properties.defaultBehavior),Filters:cdk.listMapper(cfnLoggingConfigurationFilterPropertyToCloudFormation)(properties.filters)}):properties}function CfnLoggingConfigurationLoggingFilterPropertyFromCloudFormation(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("defaultBehavior","DefaultBehavior",cfn_parse.FromCloudFormation.getString(properties.DefaultBehavior)),ret.addPropertyResult("filters","Filters",cfn_parse.FromCloudFormation.getArray(CfnLoggingConfigurationFilterPropertyFromCloudFormation)(properties.Filters)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_MatchPatternPropertyValidator(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("all",cdk.validateObject)(properties.all)),errors.collect(cdk.propertyValidator("includedPaths",cdk.listValidator(cdk.validateString))(properties.includedPaths)),errors.wrap('supplied properties not correct for "MatchPatternProperty"')}function cfnLoggingConfigurationMatchPatternPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_MatchPatternPropertyValidator(properties).assertSuccess(),{All:cdk.objectToCloudFormation(properties.all),IncludedPaths:cdk.listMapper(cdk.stringToCloudFormation)(properties.includedPaths)}):properties}function CfnLoggingConfigurationMatchPatternPropertyFromCloudFormation(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("all","All",properties.All!=null?cfn_parse.FromCloudFormation.getAny(properties.All):void 0),ret.addPropertyResult("includedPaths","IncludedPaths",properties.IncludedPaths!=null?cfn_parse.FromCloudFormation.getStringArray(properties.IncludedPaths):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnLoggingConfiguration_SingleHeaderPropertyValidator(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("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.wrap('supplied properties not correct for "SingleHeaderProperty"')}function cfnLoggingConfigurationSingleHeaderPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnLoggingConfiguration_SingleHeaderPropertyValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name)}):properties}function CfnLoggingConfigurationSingleHeaderPropertyFromCloudFormation(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("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRegexPatternSetPropsValidator(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("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("regularExpressionList",cdk.requiredValidator)(properties.regularExpressionList)),errors.collect(cdk.propertyValidator("regularExpressionList",cdk.listValidator(cdk.validateString))(properties.regularExpressionList)),errors.collect(cdk.propertyValidator("scope",cdk.requiredValidator)(properties.scope)),errors.collect(cdk.propertyValidator("scope",cdk.validateString)(properties.scope)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnRegexPatternSetProps"')}function cfnRegexPatternSetPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRegexPatternSetPropsValidator(properties).assertSuccess(),{RegularExpressionList:cdk.listMapper(cdk.stringToCloudFormation)(properties.regularExpressionList),Scope:cdk.stringToCloudFormation(properties.scope),Description:cdk.stringToCloudFormation(properties.description),Name:cdk.stringToCloudFormation(properties.name),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnRegexPatternSetPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("regularExpressionList","RegularExpressionList",cfn_parse.FromCloudFormation.getStringArray(properties.RegularExpressionList)),ret.addPropertyResult("scope","Scope",cfn_parse.FromCloudFormation.getString(properties.Scope)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse.FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnRegexPatternSet extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnRegexPatternSet.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_wafv2_CfnRegexPatternSetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRegexPatternSet),error}cdk.requireProperty(props,"regularExpressionList",this),cdk.requireProperty(props,"scope",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.regularExpressionList=props.regularExpressionList,this.scope=props.scope,this.description=props.description,this.name=props.name,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::WAFv2::RegexPatternSet",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRegexPatternSetPropsFromCloudFormation(resourceProperties),ret=new CfnRegexPatternSet(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",CfnRegexPatternSet.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{regularExpressionList:this.regularExpressionList,scope:this.scope,description:this.description,name:this.name,tags:this.tags.renderTags()}}renderProperties(props){return cfnRegexPatternSetPropsToCloudFormation(props)}}exports.CfnRegexPatternSet=CfnRegexPatternSet,_c=JSII_RTTI_SYMBOL_1,CfnRegexPatternSet[_c]={fqn:"aws-cdk-lib.aws_wafv2.CfnRegexPatternSet",version:"2.70.0"},CfnRegexPatternSet.CFN_RESOURCE_TYPE_NAME="AWS::WAFv2::RegexPatternSet";function CfnRuleGroupPropsValidator(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("availableLabels",cdk.listValidator(CfnRuleGroup_LabelSummaryPropertyValidator))(properties.availableLabels)),errors.collect(cdk.propertyValidator("capacity",cdk.requiredValidator)(properties.capacity)),errors.collect(cdk.propertyValidator("capacity",cdk.validateNumber)(properties.capacity)),errors.collect(cdk.propertyValidator("consumedLabels",cdk.listValidator(CfnRuleGroup_LabelSummaryPropertyValidator))(properties.consumedLabels)),errors.collect(cdk.propertyValidator("customResponseBodies",cdk.hashValidator(CfnRuleGroup_CustomResponseBodyPropertyValidator))(properties.customResponseBodies)),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("rules",cdk.listValidator(CfnRuleGroup_RulePropertyValidator))(properties.rules)),errors.collect(cdk.propertyValidator("scope",cdk.requiredValidator)(properties.scope)),errors.collect(cdk.propertyValidator("scope",cdk.validateString)(properties.scope)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("visibilityConfig",cdk.requiredValidator)(properties.visibilityConfig)),errors.collect(cdk.propertyValidator("visibilityConfig",CfnRuleGroup_VisibilityConfigPropertyValidator)(properties.visibilityConfig)),errors.wrap('supplied properties not correct for "CfnRuleGroupProps"')}function cfnRuleGroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroupPropsValidator(properties).assertSuccess(),{Capacity:cdk.numberToCloudFormation(properties.capacity),Scope:cdk.stringToCloudFormation(properties.scope),VisibilityConfig:cfnRuleGroupVisibilityConfigPropertyToCloudFormation(properties.visibilityConfig),AvailableLabels:cdk.listMapper(cfnRuleGroupLabelSummaryPropertyToCloudFormation)(properties.availableLabels),ConsumedLabels:cdk.listMapper(cfnRuleGroupLabelSummaryPropertyToCloudFormation)(properties.consumedLabels),CustomResponseBodies:cdk.hashMapper(cfnRuleGroupCustomResponseBodyPropertyToCloudFormation)(properties.customResponseBodies),Description:cdk.stringToCloudFormation(properties.description),Name:cdk.stringToCloudFormation(properties.name),Rules:cdk.listMapper(cfnRuleGroupRulePropertyToCloudFormation)(properties.rules),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnRuleGroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("capacity","Capacity",cfn_parse.FromCloudFormation.getNumber(properties.Capacity)),ret.addPropertyResult("scope","Scope",cfn_parse.FromCloudFormation.getString(properties.Scope)),ret.addPropertyResult("visibilityConfig","VisibilityConfig",CfnRuleGroupVisibilityConfigPropertyFromCloudFormation(properties.VisibilityConfig)),ret.addPropertyResult("availableLabels","AvailableLabels",properties.AvailableLabels!=null?cfn_parse.FromCloudFormation.getArray(CfnRuleGroupLabelSummaryPropertyFromCloudFormation)(properties.AvailableLabels):void 0),ret.addPropertyResult("consumedLabels","ConsumedLabels",properties.ConsumedLabels!=null?cfn_parse.FromCloudFormation.getArray(CfnRuleGroupLabelSummaryPropertyFromCloudFormation)(properties.ConsumedLabels):void 0),ret.addPropertyResult("customResponseBodies","CustomResponseBodies",properties.CustomResponseBodies!=null?cfn_parse.FromCloudFormation.getMap(CfnRuleGroupCustomResponseBodyPropertyFromCloudFormation)(properties.CustomResponseBodies):void 0),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse.FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("rules","Rules",properties.Rules!=null?cfn_parse.FromCloudFormation.getArray(CfnRuleGroupRulePropertyFromCloudFormation)(properties.Rules):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnRuleGroup extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnRuleGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_wafv2_CfnRuleGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnRuleGroup),error}cdk.requireProperty(props,"capacity",this),cdk.requireProperty(props,"scope",this),cdk.requireProperty(props,"visibilityConfig",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.attrLabelNamespace=cdk.Token.asString(this.getAtt("LabelNamespace",cdk.ResolutionTypeHint.STRING)),this.capacity=props.capacity,this.scope=props.scope,this.visibilityConfig=props.visibilityConfig,this.availableLabels=props.availableLabels,this.consumedLabels=props.consumedLabels,this.customResponseBodies=props.customResponseBodies,this.description=props.description,this.name=props.name,this.rules=props.rules,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::WAFv2::RuleGroup",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnRuleGroupPropsFromCloudFormation(resourceProperties),ret=new CfnRuleGroup(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",CfnRuleGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{capacity:this.capacity,scope:this.scope,visibilityConfig:this.visibilityConfig,availableLabels:this.availableLabels,consumedLabels:this.consumedLabels,customResponseBodies:this.customResponseBodies,description:this.description,name:this.name,rules:this.rules,tags:this.tags.renderTags()}}renderProperties(props){return cfnRuleGroupPropsToCloudFormation(props)}}exports.CfnRuleGroup=CfnRuleGroup,_d=JSII_RTTI_SYMBOL_1,CfnRuleGroup[_d]={fqn:"aws-cdk-lib.aws_wafv2.CfnRuleGroup",version:"2.70.0"},CfnRuleGroup.CFN_RESOURCE_TYPE_NAME="AWS::WAFv2::RuleGroup";function CfnRuleGroup_AllowPropertyValidator(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("customRequestHandling",CfnRuleGroup_CustomRequestHandlingPropertyValidator)(properties.customRequestHandling)),errors.wrap('supplied properties not correct for "AllowProperty"')}function cfnRuleGroupAllowPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_AllowPropertyValidator(properties).assertSuccess(),{CustomRequestHandling:cfnRuleGroupCustomRequestHandlingPropertyToCloudFormation(properties.customRequestHandling)}):properties}function CfnRuleGroupAllowPropertyFromCloudFormation(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("customRequestHandling","CustomRequestHandling",properties.CustomRequestHandling!=null?CfnRuleGroupCustomRequestHandlingPropertyFromCloudFormation(properties.CustomRequestHandling):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRuleGroup_AndStatementPropertyValidator(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("statements",cdk.requiredValidator)(properties.statements)),errors.collect(cdk.propertyValidator("statements",cdk.listValidator(CfnRuleGroup_StatementPropertyValidator))(properties.statements)),errors.wrap('supplied properties not correct for "AndStatementProperty"')}function cfnRuleGroupAndStatementPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_AndStatementPropertyValidator(properties).assertSuccess(),{Statements:cdk.listMapper(cfnRuleGroupStatementPropertyToCloudFormation)(properties.statements)}):properties}function CfnRuleGroupAndStatementPropertyFromCloudFormation(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("statements","Statements",cfn_parse.FromCloudFormation.getArray(CfnRuleGroupStatementPropertyFromCloudFormation)(properties.Statements)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRuleGroup_BlockPropertyValidator(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("customResponse",CfnRuleGroup_CustomResponsePropertyValidator)(properties.customResponse)),errors.wrap('supplied properties not correct for "BlockProperty"')}function cfnRuleGroupBlockPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_BlockPropertyValidator(properties).assertSuccess(),{CustomResponse:cfnRuleGroupCustomResponsePropertyToCloudFormation(properties.customResponse)}):properties}function CfnRuleGroupBlockPropertyFromCloudFormation(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("customResponse","CustomResponse",properties.CustomResponse!=null?CfnRuleGroupCustomResponsePropertyFromCloudFormation(properties.CustomResponse):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRuleGroup_BodyPropertyValidator(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("oversizeHandling",cdk.validateString)(properties.oversizeHandling)),errors.wrap('supplied properties not correct for "BodyProperty"')}function cfnRuleGroupBodyPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_BodyPropertyValidator(properties).assertSuccess(),{OversizeHandling:cdk.stringToCloudFormation(properties.oversizeHandling)}):properties}function CfnRuleGroupBodyPropertyFromCloudFormation(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("oversizeHandling","OversizeHandling",properties.OversizeHandling!=null?cfn_parse.FromCloudFormation.getString(properties.OversizeHandling):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRuleGroup_ByteMatchStatementPropertyValidator(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("fieldToMatch",cdk.requiredValidator)(properties.fieldToMatch)),errors.collect(cdk.propertyValidator("fieldToMatch",CfnRuleGroup_FieldToMatchPropertyValidator)(properties.fieldToMatch)),errors.collect(cdk.propertyValidator("positionalConstraint",cdk.requiredValidator)(properties.positionalConstraint)),errors.collect(cdk.propertyValidator("positionalConstraint",cdk.validateString)(properties.positionalConstraint)),errors.collect(cdk.propertyValidator("searchString",cdk.validateString)(properties.searchString)),errors.collect(cdk.propertyValidator("searchStringBase64",cdk.validateString)(properties.searchStringBase64)),errors.collect(cdk.propertyValidator("textTransformations",cdk.requiredValidator)(properties.textTransformations)),errors.collect(cdk.propertyValidator("textTransformations",cdk.listValidator(CfnRuleGroup_TextTransformationPropertyValidator))(properties.textTransformations)),errors.wrap('supplied properties not correct for "ByteMatchStatementProperty"')}function cfnRuleGroupByteMatchStatementPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_ByteMatchStatementPropertyValidator(properties).assertSuccess(),{FieldToMatch:cfnRuleGroupFieldToMatchPropertyToCloudFormation(properties.fieldToMatch),PositionalConstraint:cdk.stringToCloudFormation(properties.positionalConstraint),SearchString:cdk.stringToCloudFormation(properties.searchString),SearchStringBase64:cdk.stringToCloudFormation(properties.searchStringBase64),TextTransformations:cdk.listMapper(cfnRuleGroupTextTransformationPropertyToCloudFormation)(properties.textTransformations)}):properties}function CfnRuleGroupByteMatchStatementPropertyFromCloudFormation(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("fieldToMatch","FieldToMatch",CfnRuleGroupFieldToMatchPropertyFromCloudFormation(properties.FieldToMatch)),ret.addPropertyResult("positionalConstraint","PositionalConstraint",cfn_parse.FromCloudFormation.getString(properties.PositionalConstraint)),ret.addPropertyResult("searchString","SearchString",properties.SearchString!=null?cfn_parse.FromCloudFormation.getString(properties.SearchString):void 0),ret.addPropertyResult("searchStringBase64","SearchStringBase64",properties.SearchStringBase64!=null?cfn_parse.FromCloudFormation.getString(properties.SearchStringBase64):void 0),ret.addPropertyResult("textTransformations","TextTransformations",cfn_parse.FromCloudFormation.getArray(CfnRuleGroupTextTransformationPropertyFromCloudFormation)(properties.TextTransformations)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRuleGroup_CaptchaPropertyValidator(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("customRequestHandling",CfnRuleGroup_CustomRequestHandlingPropertyValidator)(properties.customRequestHandling)),errors.wrap('supplied properties not correct for "CaptchaProperty"')}function cfnRuleGroupCaptchaPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_CaptchaPropertyValidator(properties).assertSuccess(),{CustomRequestHandling:cfnRuleGroupCustomRequestHandlingPropertyToCloudFormation(properties.customRequestHandling)}):properties}function CfnRuleGroupCaptchaPropertyFromCloudFormation(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("customRequestHandling","CustomRequestHandling",properties.CustomRequestHandling!=null?CfnRuleGroupCustomRequestHandlingPropertyFromCloudFormation(properties.CustomRequestHandling):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnRuleGroup_CaptchaConfigPropertyValidator(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("immunityTimeProperty",CfnRuleGroup_ImmunityTimePropertyPropertyValidator)(properties.immunityTimeProperty)),errors.wrap('supplied properties not correct for "CaptchaConfigProperty"')}function cfnRuleGroupCaptchaConfigPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnRuleGroup_CaptchaConfigPropertyValidator(properties).assertSuccess(),{ImmunityTimeProperty:cfnRuleGroupImmunityTimePropertyPropertyToCloudFormation(properties.immunityTimeProperty)}):properties}function CfnRuleGroupCaptchaConfigPropertyFromCloudFormation(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("immunityTimeProperty","ImmunityTimeP