UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 29.4 kB
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnSamplingRule=exports.CfnResourcePolicy=exports.CfnGroup=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 CfnGroupPropsValidator(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("filterExpression",cdk.validateString)(properties.filterExpression)),errors.collect(cdk.propertyValidator("groupName",cdk.validateString)(properties.groupName)),errors.collect(cdk.propertyValidator("insightsConfiguration",CfnGroup_InsightsConfigurationPropertyValidator)(properties.insightsConfiguration)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateObject))(properties.tags)),errors.wrap('supplied properties not correct for "CfnGroupProps"')}function cfnGroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnGroupPropsValidator(properties).assertSuccess(),{FilterExpression:cdk.stringToCloudFormation(properties.filterExpression),GroupName:cdk.stringToCloudFormation(properties.groupName),InsightsConfiguration:cfnGroupInsightsConfigurationPropertyToCloudFormation(properties.insightsConfiguration),Tags:cdk.listMapper(cdk.objectToCloudFormation)(properties.tags)}):properties}function CfnGroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("filterExpression","FilterExpression",properties.FilterExpression!=null?cfn_parse.FromCloudFormation.getString(properties.FilterExpression):void 0),ret.addPropertyResult("groupName","GroupName",properties.GroupName!=null?cfn_parse.FromCloudFormation.getString(properties.GroupName):void 0),ret.addPropertyResult("insightsConfiguration","InsightsConfiguration",properties.InsightsConfiguration!=null?CfnGroupInsightsConfigurationPropertyFromCloudFormation(properties.InsightsConfiguration):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getAny)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnGroup extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_xray_CfnGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnGroup),error}this.attrGroupArn=cdk.Token.asString(this.getAtt("GroupARN",cdk.ResolutionTypeHint.STRING)),this.filterExpression=props.filterExpression,this.groupName=props.groupName,this.insightsConfiguration=props.insightsConfiguration,this.tags=props.tags}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnGroupPropsFromCloudFormation(resourceProperties),ret=new CfnGroup(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",CfnGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{filterExpression:this.filterExpression,groupName:this.groupName,insightsConfiguration:this.insightsConfiguration,tags:this.tags}}renderProperties(props){return cfnGroupPropsToCloudFormation(props)}}exports.CfnGroup=CfnGroup,_a=JSII_RTTI_SYMBOL_1,CfnGroup[_a]={fqn:"aws-cdk-lib.aws_xray.CfnGroup",version:"2.70.0"},CfnGroup.CFN_RESOURCE_TYPE_NAME="AWS::XRay::Group";function CfnGroup_InsightsConfigurationPropertyValidator(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("insightsEnabled",cdk.validateBoolean)(properties.insightsEnabled)),errors.collect(cdk.propertyValidator("notificationsEnabled",cdk.validateBoolean)(properties.notificationsEnabled)),errors.wrap('supplied properties not correct for "InsightsConfigurationProperty"')}function cfnGroupInsightsConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnGroup_InsightsConfigurationPropertyValidator(properties).assertSuccess(),{InsightsEnabled:cdk.booleanToCloudFormation(properties.insightsEnabled),NotificationsEnabled:cdk.booleanToCloudFormation(properties.notificationsEnabled)}):properties}function CfnGroupInsightsConfigurationPropertyFromCloudFormation(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("insightsEnabled","InsightsEnabled",properties.InsightsEnabled!=null?cfn_parse.FromCloudFormation.getBoolean(properties.InsightsEnabled):void 0),ret.addPropertyResult("notificationsEnabled","NotificationsEnabled",properties.NotificationsEnabled!=null?cfn_parse.FromCloudFormation.getBoolean(properties.NotificationsEnabled):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnGroup_TagsItemsPropertyValidator(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("key",cdk.requiredValidator)(properties.key)),errors.collect(cdk.propertyValidator("key",cdk.validateString)(properties.key)),errors.collect(cdk.propertyValidator("value",cdk.requiredValidator)(properties.value)),errors.collect(cdk.propertyValidator("value",cdk.validateString)(properties.value)),errors.wrap('supplied properties not correct for "TagsItemsProperty"')}function cfnGroupTagsItemsPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnGroup_TagsItemsPropertyValidator(properties).assertSuccess(),{Key:cdk.stringToCloudFormation(properties.key),Value:cdk.stringToCloudFormation(properties.value)}):properties}function CfnGroupTagsItemsPropertyFromCloudFormation(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("key","Key",cfn_parse.FromCloudFormation.getString(properties.Key)),ret.addPropertyResult("value","Value",cfn_parse.FromCloudFormation.getString(properties.Value)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnResourcePolicyPropsValidator(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("bypassPolicyLockoutCheck",cdk.validateBoolean)(properties.bypassPolicyLockoutCheck)),errors.collect(cdk.propertyValidator("policyDocument",cdk.requiredValidator)(properties.policyDocument)),errors.collect(cdk.propertyValidator("policyDocument",cdk.validateString)(properties.policyDocument)),errors.collect(cdk.propertyValidator("policyName",cdk.requiredValidator)(properties.policyName)),errors.collect(cdk.propertyValidator("policyName",cdk.validateString)(properties.policyName)),errors.wrap('supplied properties not correct for "CfnResourcePolicyProps"')}function cfnResourcePolicyPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnResourcePolicyPropsValidator(properties).assertSuccess(),{PolicyDocument:cdk.stringToCloudFormation(properties.policyDocument),PolicyName:cdk.stringToCloudFormation(properties.policyName),BypassPolicyLockoutCheck:cdk.booleanToCloudFormation(properties.bypassPolicyLockoutCheck)}):properties}function CfnResourcePolicyPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("policyDocument","PolicyDocument",cfn_parse.FromCloudFormation.getString(properties.PolicyDocument)),ret.addPropertyResult("policyName","PolicyName",cfn_parse.FromCloudFormation.getString(properties.PolicyName)),ret.addPropertyResult("bypassPolicyLockoutCheck","BypassPolicyLockoutCheck",properties.BypassPolicyLockoutCheck!=null?cfn_parse.FromCloudFormation.getBoolean(properties.BypassPolicyLockoutCheck):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourcePolicy extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_xray_CfnResourcePolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourcePolicy),error}cdk.requireProperty(props,"policyDocument",this),cdk.requireProperty(props,"policyName",this),this.policyDocument=props.policyDocument,this.policyName=props.policyName,this.bypassPolicyLockoutCheck=props.bypassPolicyLockoutCheck}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourcePolicyPropsFromCloudFormation(resourceProperties),ret=new CfnResourcePolicy(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",CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{policyDocument:this.policyDocument,policyName:this.policyName,bypassPolicyLockoutCheck:this.bypassPolicyLockoutCheck}}renderProperties(props){return cfnResourcePolicyPropsToCloudFormation(props)}}exports.CfnResourcePolicy=CfnResourcePolicy,_b=JSII_RTTI_SYMBOL_1,CfnResourcePolicy[_b]={fqn:"aws-cdk-lib.aws_xray.CfnResourcePolicy",version:"2.70.0"},CfnResourcePolicy.CFN_RESOURCE_TYPE_NAME="AWS::XRay::ResourcePolicy";function CfnSamplingRulePropsValidator(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("ruleName",cdk.validateString)(properties.ruleName)),errors.collect(cdk.propertyValidator("samplingRule",CfnSamplingRule_SamplingRulePropertyValidator)(properties.samplingRule)),errors.collect(cdk.propertyValidator("samplingRuleRecord",CfnSamplingRule_SamplingRuleRecordPropertyValidator)(properties.samplingRuleRecord)),errors.collect(cdk.propertyValidator("samplingRuleUpdate",CfnSamplingRule_SamplingRuleUpdatePropertyValidator)(properties.samplingRuleUpdate)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateObject))(properties.tags)),errors.wrap('supplied properties not correct for "CfnSamplingRuleProps"')}function cfnSamplingRulePropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSamplingRulePropsValidator(properties).assertSuccess(),{RuleName:cdk.stringToCloudFormation(properties.ruleName),SamplingRule:cfnSamplingRuleSamplingRulePropertyToCloudFormation(properties.samplingRule),SamplingRuleRecord:cfnSamplingRuleSamplingRuleRecordPropertyToCloudFormation(properties.samplingRuleRecord),SamplingRuleUpdate:cfnSamplingRuleSamplingRuleUpdatePropertyToCloudFormation(properties.samplingRuleUpdate),Tags:cdk.listMapper(cdk.objectToCloudFormation)(properties.tags)}):properties}function CfnSamplingRulePropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("ruleName","RuleName",properties.RuleName!=null?cfn_parse.FromCloudFormation.getString(properties.RuleName):void 0),ret.addPropertyResult("samplingRule","SamplingRule",properties.SamplingRule!=null?CfnSamplingRuleSamplingRulePropertyFromCloudFormation(properties.SamplingRule):void 0),ret.addPropertyResult("samplingRuleRecord","SamplingRuleRecord",properties.SamplingRuleRecord!=null?CfnSamplingRuleSamplingRuleRecordPropertyFromCloudFormation(properties.SamplingRuleRecord):void 0),ret.addPropertyResult("samplingRuleUpdate","SamplingRuleUpdate",properties.SamplingRuleUpdate!=null?CfnSamplingRuleSamplingRuleUpdatePropertyFromCloudFormation(properties.SamplingRuleUpdate):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getAny)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSamplingRule extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnSamplingRule.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_xray_CfnSamplingRuleProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSamplingRule),error}this.attrRuleArn=cdk.Token.asString(this.getAtt("RuleARN",cdk.ResolutionTypeHint.STRING)),this.ruleName=props.ruleName,this.samplingRule=props.samplingRule,this.samplingRuleRecord=props.samplingRuleRecord,this.samplingRuleUpdate=props.samplingRuleUpdate,this.tags=props.tags}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSamplingRulePropsFromCloudFormation(resourceProperties),ret=new CfnSamplingRule(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",CfnSamplingRule.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{ruleName:this.ruleName,samplingRule:this.samplingRule,samplingRuleRecord:this.samplingRuleRecord,samplingRuleUpdate:this.samplingRuleUpdate,tags:this.tags}}renderProperties(props){return cfnSamplingRulePropsToCloudFormation(props)}}exports.CfnSamplingRule=CfnSamplingRule,_c=JSII_RTTI_SYMBOL_1,CfnSamplingRule[_c]={fqn:"aws-cdk-lib.aws_xray.CfnSamplingRule",version:"2.70.0"},CfnSamplingRule.CFN_RESOURCE_TYPE_NAME="AWS::XRay::SamplingRule";function CfnSamplingRule_SamplingRulePropertyValidator(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("attributes",cdk.hashValidator(cdk.validateString))(properties.attributes)),errors.collect(cdk.propertyValidator("fixedRate",cdk.validateNumber)(properties.fixedRate)),errors.collect(cdk.propertyValidator("httpMethod",cdk.validateString)(properties.httpMethod)),errors.collect(cdk.propertyValidator("host",cdk.validateString)(properties.host)),errors.collect(cdk.propertyValidator("priority",cdk.validateNumber)(properties.priority)),errors.collect(cdk.propertyValidator("reservoirSize",cdk.validateNumber)(properties.reservoirSize)),errors.collect(cdk.propertyValidator("resourceArn",cdk.validateString)(properties.resourceArn)),errors.collect(cdk.propertyValidator("ruleArn",cdk.validateString)(properties.ruleArn)),errors.collect(cdk.propertyValidator("ruleName",cdk.validateString)(properties.ruleName)),errors.collect(cdk.propertyValidator("serviceName",cdk.validateString)(properties.serviceName)),errors.collect(cdk.propertyValidator("serviceType",cdk.validateString)(properties.serviceType)),errors.collect(cdk.propertyValidator("urlPath",cdk.validateString)(properties.urlPath)),errors.collect(cdk.propertyValidator("version",cdk.validateNumber)(properties.version)),errors.wrap('supplied properties not correct for "SamplingRuleProperty"')}function cfnSamplingRuleSamplingRulePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSamplingRule_SamplingRulePropertyValidator(properties).assertSuccess(),{Attributes:cdk.hashMapper(cdk.stringToCloudFormation)(properties.attributes),FixedRate:cdk.numberToCloudFormation(properties.fixedRate),HTTPMethod:cdk.stringToCloudFormation(properties.httpMethod),Host:cdk.stringToCloudFormation(properties.host),Priority:cdk.numberToCloudFormation(properties.priority),ReservoirSize:cdk.numberToCloudFormation(properties.reservoirSize),ResourceARN:cdk.stringToCloudFormation(properties.resourceArn),RuleARN:cdk.stringToCloudFormation(properties.ruleArn),RuleName:cdk.stringToCloudFormation(properties.ruleName),ServiceName:cdk.stringToCloudFormation(properties.serviceName),ServiceType:cdk.stringToCloudFormation(properties.serviceType),URLPath:cdk.stringToCloudFormation(properties.urlPath),Version:cdk.numberToCloudFormation(properties.version)}):properties}function CfnSamplingRuleSamplingRulePropertyFromCloudFormation(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("attributes","Attributes",properties.Attributes!=null?cfn_parse.FromCloudFormation.getMap(cfn_parse.FromCloudFormation.getString)(properties.Attributes):void 0),ret.addPropertyResult("fixedRate","FixedRate",properties.FixedRate!=null?cfn_parse.FromCloudFormation.getNumber(properties.FixedRate):void 0),ret.addPropertyResult("httpMethod","HTTPMethod",properties.HTTPMethod!=null?cfn_parse.FromCloudFormation.getString(properties.HTTPMethod):void 0),ret.addPropertyResult("host","Host",properties.Host!=null?cfn_parse.FromCloudFormation.getString(properties.Host):void 0),ret.addPropertyResult("priority","Priority",properties.Priority!=null?cfn_parse.FromCloudFormation.getNumber(properties.Priority):void 0),ret.addPropertyResult("reservoirSize","ReservoirSize",properties.ReservoirSize!=null?cfn_parse.FromCloudFormation.getNumber(properties.ReservoirSize):void 0),ret.addPropertyResult("resourceArn","ResourceARN",properties.ResourceARN!=null?cfn_parse.FromCloudFormation.getString(properties.ResourceARN):void 0),ret.addPropertyResult("ruleArn","RuleARN",properties.RuleARN!=null?cfn_parse.FromCloudFormation.getString(properties.RuleARN):void 0),ret.addPropertyResult("ruleName","RuleName",properties.RuleName!=null?cfn_parse.FromCloudFormation.getString(properties.RuleName):void 0),ret.addPropertyResult("serviceName","ServiceName",properties.ServiceName!=null?cfn_parse.FromCloudFormation.getString(properties.ServiceName):void 0),ret.addPropertyResult("serviceType","ServiceType",properties.ServiceType!=null?cfn_parse.FromCloudFormation.getString(properties.ServiceType):void 0),ret.addPropertyResult("urlPath","URLPath",properties.URLPath!=null?cfn_parse.FromCloudFormation.getString(properties.URLPath):void 0),ret.addPropertyResult("version","Version",properties.Version!=null?cfn_parse.FromCloudFormation.getNumber(properties.Version):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnSamplingRule_SamplingRuleRecordPropertyValidator(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("createdAt",cdk.validateString)(properties.createdAt)),errors.collect(cdk.propertyValidator("modifiedAt",cdk.validateString)(properties.modifiedAt)),errors.collect(cdk.propertyValidator("samplingRule",CfnSamplingRule_SamplingRulePropertyValidator)(properties.samplingRule)),errors.wrap('supplied properties not correct for "SamplingRuleRecordProperty"')}function cfnSamplingRuleSamplingRuleRecordPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSamplingRule_SamplingRuleRecordPropertyValidator(properties).assertSuccess(),{CreatedAt:cdk.stringToCloudFormation(properties.createdAt),ModifiedAt:cdk.stringToCloudFormation(properties.modifiedAt),SamplingRule:cfnSamplingRuleSamplingRulePropertyToCloudFormation(properties.samplingRule)}):properties}function CfnSamplingRuleSamplingRuleRecordPropertyFromCloudFormation(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("createdAt","CreatedAt",properties.CreatedAt!=null?cfn_parse.FromCloudFormation.getString(properties.CreatedAt):void 0),ret.addPropertyResult("modifiedAt","ModifiedAt",properties.ModifiedAt!=null?cfn_parse.FromCloudFormation.getString(properties.ModifiedAt):void 0),ret.addPropertyResult("samplingRule","SamplingRule",properties.SamplingRule!=null?CfnSamplingRuleSamplingRulePropertyFromCloudFormation(properties.SamplingRule):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnSamplingRule_SamplingRuleUpdatePropertyValidator(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("attributes",cdk.hashValidator(cdk.validateString))(properties.attributes)),errors.collect(cdk.propertyValidator("fixedRate",cdk.validateNumber)(properties.fixedRate)),errors.collect(cdk.propertyValidator("httpMethod",cdk.validateString)(properties.httpMethod)),errors.collect(cdk.propertyValidator("host",cdk.validateString)(properties.host)),errors.collect(cdk.propertyValidator("priority",cdk.validateNumber)(properties.priority)),errors.collect(cdk.propertyValidator("reservoirSize",cdk.validateNumber)(properties.reservoirSize)),errors.collect(cdk.propertyValidator("resourceArn",cdk.validateString)(properties.resourceArn)),errors.collect(cdk.propertyValidator("ruleArn",cdk.validateString)(properties.ruleArn)),errors.collect(cdk.propertyValidator("ruleName",cdk.validateString)(properties.ruleName)),errors.collect(cdk.propertyValidator("serviceName",cdk.validateString)(properties.serviceName)),errors.collect(cdk.propertyValidator("serviceType",cdk.validateString)(properties.serviceType)),errors.collect(cdk.propertyValidator("urlPath",cdk.validateString)(properties.urlPath)),errors.wrap('supplied properties not correct for "SamplingRuleUpdateProperty"')}function cfnSamplingRuleSamplingRuleUpdatePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSamplingRule_SamplingRuleUpdatePropertyValidator(properties).assertSuccess(),{Attributes:cdk.hashMapper(cdk.stringToCloudFormation)(properties.attributes),FixedRate:cdk.numberToCloudFormation(properties.fixedRate),HTTPMethod:cdk.stringToCloudFormation(properties.httpMethod),Host:cdk.stringToCloudFormation(properties.host),Priority:cdk.numberToCloudFormation(properties.priority),ReservoirSize:cdk.numberToCloudFormation(properties.reservoirSize),ResourceARN:cdk.stringToCloudFormation(properties.resourceArn),RuleARN:cdk.stringToCloudFormation(properties.ruleArn),RuleName:cdk.stringToCloudFormation(properties.ruleName),ServiceName:cdk.stringToCloudFormation(properties.serviceName),ServiceType:cdk.stringToCloudFormation(properties.serviceType),URLPath:cdk.stringToCloudFormation(properties.urlPath)}):properties}function CfnSamplingRuleSamplingRuleUpdatePropertyFromCloudFormation(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("attributes","Attributes",properties.Attributes!=null?cfn_parse.FromCloudFormation.getMap(cfn_parse.FromCloudFormation.getString)(properties.Attributes):void 0),ret.addPropertyResult("fixedRate","FixedRate",properties.FixedRate!=null?cfn_parse.FromCloudFormation.getNumber(properties.FixedRate):void 0),ret.addPropertyResult("httpMethod","HTTPMethod",properties.HTTPMethod!=null?cfn_parse.FromCloudFormation.getString(properties.HTTPMethod):void 0),ret.addPropertyResult("host","Host",properties.Host!=null?cfn_parse.FromCloudFormation.getString(properties.Host):void 0),ret.addPropertyResult("priority","Priority",properties.Priority!=null?cfn_parse.FromCloudFormation.getNumber(properties.Priority):void 0),ret.addPropertyResult("reservoirSize","ReservoirSize",properties.ReservoirSize!=null?cfn_parse.FromCloudFormation.getNumber(properties.ReservoirSize):void 0),ret.addPropertyResult("resourceArn","ResourceARN",properties.ResourceARN!=null?cfn_parse.FromCloudFormation.getString(properties.ResourceARN):void 0),ret.addPropertyResult("ruleArn","RuleARN",properties.RuleARN!=null?cfn_parse.FromCloudFormation.getString(properties.RuleARN):void 0),ret.addPropertyResult("ruleName","RuleName",properties.RuleName!=null?cfn_parse.FromCloudFormation.getString(properties.RuleName):void 0),ret.addPropertyResult("serviceName","ServiceName",properties.ServiceName!=null?cfn_parse.FromCloudFormation.getString(properties.ServiceName):void 0),ret.addPropertyResult("serviceType","ServiceType",properties.ServiceType!=null?cfn_parse.FromCloudFormation.getString(properties.ServiceType):void 0),ret.addPropertyResult("urlPath","URLPath",properties.URLPath!=null?cfn_parse.FromCloudFormation.getString(properties.URLPath):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnSamplingRule_TagsItemsPropertyValidator(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("key",cdk.requiredValidator)(properties.key)),errors.collect(cdk.propertyValidator("key",cdk.validateString)(properties.key)),errors.collect(cdk.propertyValidator("value",cdk.requiredValidator)(properties.value)),errors.collect(cdk.propertyValidator("value",cdk.validateString)(properties.value)),errors.wrap('supplied properties not correct for "TagsItemsProperty"')}function cfnSamplingRuleTagsItemsPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSamplingRule_TagsItemsPropertyValidator(properties).assertSuccess(),{Key:cdk.stringToCloudFormation(properties.key),Value:cdk.stringToCloudFormation(properties.value)}):properties}function CfnSamplingRuleTagsItemsPropertyFromCloudFormation(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("key","Key",cfn_parse.FromCloudFormation.getString(properties.Key)),ret.addPropertyResult("value","Value",cfn_parse.FromCloudFormation.getString(properties.Value)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}