aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 22.7 kB
JavaScript
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnListener=exports.CfnEndpointGroup=exports.CfnAccelerator=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 CfnAcceleratorPropsValidator(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("enabled",cdk.validateBoolean)(properties.enabled)),errors.collect(cdk.propertyValidator("ipAddressType",cdk.validateString)(properties.ipAddressType)),errors.collect(cdk.propertyValidator("ipAddresses",cdk.listValidator(cdk.validateString))(properties.ipAddresses)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnAcceleratorProps"')}function cfnAcceleratorPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAcceleratorPropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Enabled:cdk.booleanToCloudFormation(properties.enabled),IpAddresses:cdk.listMapper(cdk.stringToCloudFormation)(properties.ipAddresses),IpAddressType:cdk.stringToCloudFormation(properties.ipAddressType),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnAcceleratorPropsFromCloudFormation(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.addPropertyResult("enabled","Enabled",properties.Enabled!=null?cfn_parse.FromCloudFormation.getBoolean(properties.Enabled):void 0),ret.addPropertyResult("ipAddresses","IpAddresses",properties.IpAddresses!=null?cfn_parse.FromCloudFormation.getStringArray(properties.IpAddresses):void 0),ret.addPropertyResult("ipAddressType","IpAddressType",properties.IpAddressType!=null?cfn_parse.FromCloudFormation.getString(properties.IpAddressType):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 CfnAccelerator extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnAccelerator.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_globalaccelerator_CfnAcceleratorProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccelerator),error}cdk.requireProperty(props,"name",this),this.attrAcceleratorArn=cdk.Token.asString(this.getAtt("AcceleratorArn",cdk.ResolutionTypeHint.STRING)),this.attrDnsName=cdk.Token.asString(this.getAtt("DnsName",cdk.ResolutionTypeHint.STRING)),this.attrDualStackDnsName=cdk.Token.asString(this.getAtt("DualStackDnsName",cdk.ResolutionTypeHint.STRING)),this.attrIpv4Addresses=cdk.Token.asList(this.getAtt("Ipv4Addresses",cdk.ResolutionTypeHint.STRING_LIST)),this.attrIpv6Addresses=cdk.Token.asList(this.getAtt("Ipv6Addresses",cdk.ResolutionTypeHint.STRING_LIST)),this.name=props.name,this.enabled=props.enabled,this.ipAddresses=props.ipAddresses,this.ipAddressType=props.ipAddressType,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::GlobalAccelerator::Accelerator",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAcceleratorPropsFromCloudFormation(resourceProperties),ret=new CfnAccelerator(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",CfnAccelerator.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,enabled:this.enabled,ipAddresses:this.ipAddresses,ipAddressType:this.ipAddressType,tags:this.tags.renderTags()}}renderProperties(props){return cfnAcceleratorPropsToCloudFormation(props)}}exports.CfnAccelerator=CfnAccelerator,_a=JSII_RTTI_SYMBOL_1,CfnAccelerator[_a]={fqn:"aws-cdk-lib.aws_globalaccelerator.CfnAccelerator",version:"2.70.0"},CfnAccelerator.CFN_RESOURCE_TYPE_NAME="AWS::GlobalAccelerator::Accelerator";function CfnEndpointGroupPropsValidator(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("endpointConfigurations",cdk.listValidator(CfnEndpointGroup_EndpointConfigurationPropertyValidator))(properties.endpointConfigurations)),errors.collect(cdk.propertyValidator("endpointGroupRegion",cdk.requiredValidator)(properties.endpointGroupRegion)),errors.collect(cdk.propertyValidator("endpointGroupRegion",cdk.validateString)(properties.endpointGroupRegion)),errors.collect(cdk.propertyValidator("healthCheckIntervalSeconds",cdk.validateNumber)(properties.healthCheckIntervalSeconds)),errors.collect(cdk.propertyValidator("healthCheckPath",cdk.validateString)(properties.healthCheckPath)),errors.collect(cdk.propertyValidator("healthCheckPort",cdk.validateNumber)(properties.healthCheckPort)),errors.collect(cdk.propertyValidator("healthCheckProtocol",cdk.validateString)(properties.healthCheckProtocol)),errors.collect(cdk.propertyValidator("listenerArn",cdk.requiredValidator)(properties.listenerArn)),errors.collect(cdk.propertyValidator("listenerArn",cdk.validateString)(properties.listenerArn)),errors.collect(cdk.propertyValidator("portOverrides",cdk.listValidator(CfnEndpointGroup_PortOverridePropertyValidator))(properties.portOverrides)),errors.collect(cdk.propertyValidator("thresholdCount",cdk.validateNumber)(properties.thresholdCount)),errors.collect(cdk.propertyValidator("trafficDialPercentage",cdk.validateNumber)(properties.trafficDialPercentage)),errors.wrap('supplied properties not correct for "CfnEndpointGroupProps"')}function cfnEndpointGroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEndpointGroupPropsValidator(properties).assertSuccess(),{EndpointGroupRegion:cdk.stringToCloudFormation(properties.endpointGroupRegion),ListenerArn:cdk.stringToCloudFormation(properties.listenerArn),EndpointConfigurations:cdk.listMapper(cfnEndpointGroupEndpointConfigurationPropertyToCloudFormation)(properties.endpointConfigurations),HealthCheckIntervalSeconds:cdk.numberToCloudFormation(properties.healthCheckIntervalSeconds),HealthCheckPath:cdk.stringToCloudFormation(properties.healthCheckPath),HealthCheckPort:cdk.numberToCloudFormation(properties.healthCheckPort),HealthCheckProtocol:cdk.stringToCloudFormation(properties.healthCheckProtocol),PortOverrides:cdk.listMapper(cfnEndpointGroupPortOverridePropertyToCloudFormation)(properties.portOverrides),ThresholdCount:cdk.numberToCloudFormation(properties.thresholdCount),TrafficDialPercentage:cdk.numberToCloudFormation(properties.trafficDialPercentage)}):properties}function CfnEndpointGroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("endpointGroupRegion","EndpointGroupRegion",cfn_parse.FromCloudFormation.getString(properties.EndpointGroupRegion)),ret.addPropertyResult("listenerArn","ListenerArn",cfn_parse.FromCloudFormation.getString(properties.ListenerArn)),ret.addPropertyResult("endpointConfigurations","EndpointConfigurations",properties.EndpointConfigurations!=null?cfn_parse.FromCloudFormation.getArray(CfnEndpointGroupEndpointConfigurationPropertyFromCloudFormation)(properties.EndpointConfigurations):void 0),ret.addPropertyResult("healthCheckIntervalSeconds","HealthCheckIntervalSeconds",properties.HealthCheckIntervalSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.HealthCheckIntervalSeconds):void 0),ret.addPropertyResult("healthCheckPath","HealthCheckPath",properties.HealthCheckPath!=null?cfn_parse.FromCloudFormation.getString(properties.HealthCheckPath):void 0),ret.addPropertyResult("healthCheckPort","HealthCheckPort",properties.HealthCheckPort!=null?cfn_parse.FromCloudFormation.getNumber(properties.HealthCheckPort):void 0),ret.addPropertyResult("healthCheckProtocol","HealthCheckProtocol",properties.HealthCheckProtocol!=null?cfn_parse.FromCloudFormation.getString(properties.HealthCheckProtocol):void 0),ret.addPropertyResult("portOverrides","PortOverrides",properties.PortOverrides!=null?cfn_parse.FromCloudFormation.getArray(CfnEndpointGroupPortOverridePropertyFromCloudFormation)(properties.PortOverrides):void 0),ret.addPropertyResult("thresholdCount","ThresholdCount",properties.ThresholdCount!=null?cfn_parse.FromCloudFormation.getNumber(properties.ThresholdCount):void 0),ret.addPropertyResult("trafficDialPercentage","TrafficDialPercentage",properties.TrafficDialPercentage!=null?cfn_parse.FromCloudFormation.getNumber(properties.TrafficDialPercentage):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnEndpointGroup extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnEndpointGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_globalaccelerator_CfnEndpointGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnEndpointGroup),error}cdk.requireProperty(props,"endpointGroupRegion",this),cdk.requireProperty(props,"listenerArn",this),this.attrEndpointGroupArn=cdk.Token.asString(this.getAtt("EndpointGroupArn",cdk.ResolutionTypeHint.STRING)),this.endpointGroupRegion=props.endpointGroupRegion,this.listenerArn=props.listenerArn,this.endpointConfigurations=props.endpointConfigurations,this.healthCheckIntervalSeconds=props.healthCheckIntervalSeconds,this.healthCheckPath=props.healthCheckPath,this.healthCheckPort=props.healthCheckPort,this.healthCheckProtocol=props.healthCheckProtocol,this.portOverrides=props.portOverrides,this.thresholdCount=props.thresholdCount,this.trafficDialPercentage=props.trafficDialPercentage}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnEndpointGroupPropsFromCloudFormation(resourceProperties),ret=new CfnEndpointGroup(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",CfnEndpointGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{endpointGroupRegion:this.endpointGroupRegion,listenerArn:this.listenerArn,endpointConfigurations:this.endpointConfigurations,healthCheckIntervalSeconds:this.healthCheckIntervalSeconds,healthCheckPath:this.healthCheckPath,healthCheckPort:this.healthCheckPort,healthCheckProtocol:this.healthCheckProtocol,portOverrides:this.portOverrides,thresholdCount:this.thresholdCount,trafficDialPercentage:this.trafficDialPercentage}}renderProperties(props){return cfnEndpointGroupPropsToCloudFormation(props)}}exports.CfnEndpointGroup=CfnEndpointGroup,_b=JSII_RTTI_SYMBOL_1,CfnEndpointGroup[_b]={fqn:"aws-cdk-lib.aws_globalaccelerator.CfnEndpointGroup",version:"2.70.0"},CfnEndpointGroup.CFN_RESOURCE_TYPE_NAME="AWS::GlobalAccelerator::EndpointGroup";function CfnEndpointGroup_EndpointConfigurationPropertyValidator(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("clientIpPreservationEnabled",cdk.validateBoolean)(properties.clientIpPreservationEnabled)),errors.collect(cdk.propertyValidator("endpointId",cdk.requiredValidator)(properties.endpointId)),errors.collect(cdk.propertyValidator("endpointId",cdk.validateString)(properties.endpointId)),errors.collect(cdk.propertyValidator("weight",cdk.validateNumber)(properties.weight)),errors.wrap('supplied properties not correct for "EndpointConfigurationProperty"')}function cfnEndpointGroupEndpointConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEndpointGroup_EndpointConfigurationPropertyValidator(properties).assertSuccess(),{ClientIPPreservationEnabled:cdk.booleanToCloudFormation(properties.clientIpPreservationEnabled),EndpointId:cdk.stringToCloudFormation(properties.endpointId),Weight:cdk.numberToCloudFormation(properties.weight)}):properties}function CfnEndpointGroupEndpointConfigurationPropertyFromCloudFormation(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("clientIpPreservationEnabled","ClientIPPreservationEnabled",properties.ClientIPPreservationEnabled!=null?cfn_parse.FromCloudFormation.getBoolean(properties.ClientIPPreservationEnabled):void 0),ret.addPropertyResult("endpointId","EndpointId",cfn_parse.FromCloudFormation.getString(properties.EndpointId)),ret.addPropertyResult("weight","Weight",properties.Weight!=null?cfn_parse.FromCloudFormation.getNumber(properties.Weight):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnEndpointGroup_PortOverridePropertyValidator(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("endpointPort",cdk.requiredValidator)(properties.endpointPort)),errors.collect(cdk.propertyValidator("endpointPort",cdk.validateNumber)(properties.endpointPort)),errors.collect(cdk.propertyValidator("listenerPort",cdk.requiredValidator)(properties.listenerPort)),errors.collect(cdk.propertyValidator("listenerPort",cdk.validateNumber)(properties.listenerPort)),errors.wrap('supplied properties not correct for "PortOverrideProperty"')}function cfnEndpointGroupPortOverridePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnEndpointGroup_PortOverridePropertyValidator(properties).assertSuccess(),{EndpointPort:cdk.numberToCloudFormation(properties.endpointPort),ListenerPort:cdk.numberToCloudFormation(properties.listenerPort)}):properties}function CfnEndpointGroupPortOverridePropertyFromCloudFormation(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("endpointPort","EndpointPort",cfn_parse.FromCloudFormation.getNumber(properties.EndpointPort)),ret.addPropertyResult("listenerPort","ListenerPort",cfn_parse.FromCloudFormation.getNumber(properties.ListenerPort)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnListenerPropsValidator(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("acceleratorArn",cdk.requiredValidator)(properties.acceleratorArn)),errors.collect(cdk.propertyValidator("acceleratorArn",cdk.validateString)(properties.acceleratorArn)),errors.collect(cdk.propertyValidator("clientAffinity",cdk.validateString)(properties.clientAffinity)),errors.collect(cdk.propertyValidator("portRanges",cdk.requiredValidator)(properties.portRanges)),errors.collect(cdk.propertyValidator("portRanges",cdk.listValidator(CfnListener_PortRangePropertyValidator))(properties.portRanges)),errors.collect(cdk.propertyValidator("protocol",cdk.requiredValidator)(properties.protocol)),errors.collect(cdk.propertyValidator("protocol",cdk.validateString)(properties.protocol)),errors.wrap('supplied properties not correct for "CfnListenerProps"')}function cfnListenerPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnListenerPropsValidator(properties).assertSuccess(),{AcceleratorArn:cdk.stringToCloudFormation(properties.acceleratorArn),PortRanges:cdk.listMapper(cfnListenerPortRangePropertyToCloudFormation)(properties.portRanges),Protocol:cdk.stringToCloudFormation(properties.protocol),ClientAffinity:cdk.stringToCloudFormation(properties.clientAffinity)}):properties}function CfnListenerPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("acceleratorArn","AcceleratorArn",cfn_parse.FromCloudFormation.getString(properties.AcceleratorArn)),ret.addPropertyResult("portRanges","PortRanges",cfn_parse.FromCloudFormation.getArray(CfnListenerPortRangePropertyFromCloudFormation)(properties.PortRanges)),ret.addPropertyResult("protocol","Protocol",cfn_parse.FromCloudFormation.getString(properties.Protocol)),ret.addPropertyResult("clientAffinity","ClientAffinity",properties.ClientAffinity!=null?cfn_parse.FromCloudFormation.getString(properties.ClientAffinity):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnListener extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnListener.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_globalaccelerator_CfnListenerProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnListener),error}cdk.requireProperty(props,"acceleratorArn",this),cdk.requireProperty(props,"portRanges",this),cdk.requireProperty(props,"protocol",this),this.attrListenerArn=cdk.Token.asString(this.getAtt("ListenerArn",cdk.ResolutionTypeHint.STRING)),this.acceleratorArn=props.acceleratorArn,this.portRanges=props.portRanges,this.protocol=props.protocol,this.clientAffinity=props.clientAffinity}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnListenerPropsFromCloudFormation(resourceProperties),ret=new CfnListener(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",CfnListener.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{acceleratorArn:this.acceleratorArn,portRanges:this.portRanges,protocol:this.protocol,clientAffinity:this.clientAffinity}}renderProperties(props){return cfnListenerPropsToCloudFormation(props)}}exports.CfnListener=CfnListener,_c=JSII_RTTI_SYMBOL_1,CfnListener[_c]={fqn:"aws-cdk-lib.aws_globalaccelerator.CfnListener",version:"2.70.0"},CfnListener.CFN_RESOURCE_TYPE_NAME="AWS::GlobalAccelerator::Listener";function CfnListener_PortRangePropertyValidator(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("fromPort",cdk.requiredValidator)(properties.fromPort)),errors.collect(cdk.propertyValidator("fromPort",cdk.validateNumber)(properties.fromPort)),errors.collect(cdk.propertyValidator("toPort",cdk.requiredValidator)(properties.toPort)),errors.collect(cdk.propertyValidator("toPort",cdk.validateNumber)(properties.toPort)),errors.wrap('supplied properties not correct for "PortRangeProperty"')}function cfnListenerPortRangePropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnListener_PortRangePropertyValidator(properties).assertSuccess(),{FromPort:cdk.numberToCloudFormation(properties.fromPort),ToPort:cdk.numberToCloudFormation(properties.toPort)}):properties}function CfnListenerPortRangePropertyFromCloudFormation(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("fromPort","FromPort",cfn_parse.FromCloudFormation.getNumber(properties.FromPort)),ret.addPropertyResult("toPort","ToPort",cfn_parse.FromCloudFormation.getNumber(properties.ToPort)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}