UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 62.6 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnTransitVirtualInterface=exports.CfnPublicVirtualInterface=exports.CfnPrivateVirtualInterface=exports.CfnLag=exports.CfnDirectConnectGatewayAssociation=exports.CfnDirectConnectGateway=exports.CfnConnection=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../core/lib");return cdk=()=>tmp,tmp},cfn_parse=()=>{var tmp=require("../../core/lib/helpers-internal");return cfn_parse=()=>tmp,tmp},cdk_errors=()=>{var tmp=require("../../core/lib/errors");return cdk_errors=()=>tmp,tmp};class CfnConnection extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_directconnect.CfnConnection",version:"2.246.0"};static CFN_RESOURCE_TYPE_NAME="AWS::DirectConnect::Connection";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnConnectionPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("UnexpectedIResolvable","Unexpected IResolvable",scope);const ret=new CfnConnection(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}static isCfnConnection(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnConnection.CFN_RESOURCE_TYPE_NAME}static arnForConnection(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_directconnect_IConnectionRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForConnection),error}return resource.connectionRef.connectionArn}bandwidth;cdkTagManager;connectionName;lagId;location;providerName;requestMacSec;tags;constructor(scope,id,props){super(scope,id,{type:CfnConnection.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_directconnect_CfnConnectionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnConnection),error}cdk().requireProperty(props,"bandwidth",this),cdk().requireProperty(props,"connectionName",this),cdk().requireProperty(props,"location",this),this.bandwidth=props.bandwidth,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::DirectConnect::Connection",void 0,{tagPropertyName:"tags"}),this.connectionName=props.connectionName,this.lagId=cdk().getRefProperty(props.lagId?.lagRef,"lagArn")??cdk().ensureStringOrUndefined(props.lagId,"lagId","directconnect.ILagRef | string"),this.location=props.location,this.providerName=props.providerName,this.requestMacSec=props.requestMacSec,this.tags=props.tags}get connectionRef(){return{connectionArn:this.ref}}get attrConnectionArn(){return cdk().Token.asString(this.getAtt("ConnectionArn",cdk().ResolutionTypeHint.STRING))}get attrConnectionId(){return cdk().Token.asString(this.getAtt("ConnectionId",cdk().ResolutionTypeHint.STRING))}get attrConnectionState(){return cdk().Token.asString(this.getAtt("ConnectionState",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{bandwidth:this.bandwidth,tags:this.cdkTagManager.renderTags(this.tags),connectionName:this.connectionName,lagId:this.lagId,location:this.location,providerName:this.providerName,requestMacSec:this.requestMacSec}}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",CfnConnection.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnConnectionPropsToCloudFormation(props)}}exports.CfnConnection=CfnConnection;function CfnConnectionPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("bandwidth",cdk().requiredValidator)(properties.bandwidth)),errors.collect(cdk().propertyValidator("bandwidth",cdk().validateString)(properties.bandwidth)),errors.collect(cdk().propertyValidator("connectionName",cdk().requiredValidator)(properties.connectionName)),errors.collect(cdk().propertyValidator("connectionName",cdk().validateString)(properties.connectionName)),errors.collect(cdk().propertyValidator("lagId",cdk().validateString)(properties.lagId)),errors.collect(cdk().propertyValidator("location",cdk().requiredValidator)(properties.location)),errors.collect(cdk().propertyValidator("location",cdk().validateString)(properties.location)),errors.collect(cdk().propertyValidator("providerName",cdk().validateString)(properties.providerName)),errors.collect(cdk().propertyValidator("requestMacSec",cdk().validateBoolean)(properties.requestMacSec)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnConnectionProps"')}function convertCfnConnectionPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnConnectionPropsValidator(properties).assertSuccess(),{Bandwidth:cdk().stringToCloudFormation(properties.bandwidth),ConnectionName:cdk().stringToCloudFormation(properties.connectionName),LagId:cdk().stringToCloudFormation(properties.lagId),Location:cdk().stringToCloudFormation(properties.location),ProviderName:cdk().stringToCloudFormation(properties.providerName),RequestMACSec:cdk().booleanToCloudFormation(properties.requestMacSec),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnConnectionPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("bandwidth","Bandwidth",properties.Bandwidth!=null?cfn_parse().FromCloudFormation.getString(properties.Bandwidth):void 0),ret.addPropertyResult("connectionName","ConnectionName",properties.ConnectionName!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectionName):void 0),ret.addPropertyResult("lagId","LagId",properties.LagId!=null?cfn_parse().FromCloudFormation.getString(properties.LagId):void 0),ret.addPropertyResult("location","Location",properties.Location!=null?cfn_parse().FromCloudFormation.getString(properties.Location):void 0),ret.addPropertyResult("providerName","ProviderName",properties.ProviderName!=null?cfn_parse().FromCloudFormation.getString(properties.ProviderName):void 0),ret.addPropertyResult("requestMacSec","RequestMACSec",properties.RequestMACSec!=null?cfn_parse().FromCloudFormation.getBoolean(properties.RequestMACSec):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 CfnDirectConnectGateway extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_directconnect.CfnDirectConnectGateway",version:"2.246.0"};static CFN_RESOURCE_TYPE_NAME="AWS::DirectConnect::DirectConnectGateway";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnDirectConnectGatewayPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("UnexpectedIResolvable","Unexpected IResolvable",scope);const ret=new CfnDirectConnectGateway(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}static isCfnDirectConnectGateway(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnDirectConnectGateway.CFN_RESOURCE_TYPE_NAME}static arnForDirectConnectGateway(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_directconnect_IDirectConnectGatewayRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForDirectConnectGateway),error}return resource.directConnectGatewayRef.directConnectGatewayArn}amazonSideAsn;cdkTagManager;directConnectGatewayName;tags;constructor(scope,id,props){super(scope,id,{type:CfnDirectConnectGateway.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_directconnect_CfnDirectConnectGatewayProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnDirectConnectGateway),error}cdk().requireProperty(props,"directConnectGatewayName",this),this.amazonSideAsn=props.amazonSideAsn,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::DirectConnect::DirectConnectGateway",void 0,{tagPropertyName:"tags"}),this.directConnectGatewayName=props.directConnectGatewayName,this.tags=props.tags}get directConnectGatewayRef(){return{directConnectGatewayArn:this.ref}}get attrDirectConnectGatewayArn(){return cdk().Token.asString(this.getAtt("DirectConnectGatewayArn",cdk().ResolutionTypeHint.STRING))}get attrDirectConnectGatewayId(){return cdk().Token.asString(this.getAtt("DirectConnectGatewayId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{amazonSideAsn:this.amazonSideAsn,tags:this.cdkTagManager.renderTags(this.tags),directConnectGatewayName:this.directConnectGatewayName}}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",CfnDirectConnectGateway.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnDirectConnectGatewayPropsToCloudFormation(props)}}exports.CfnDirectConnectGateway=CfnDirectConnectGateway;function CfnDirectConnectGatewayPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("amazonSideAsn",cdk().validateString)(properties.amazonSideAsn)),errors.collect(cdk().propertyValidator("directConnectGatewayName",cdk().requiredValidator)(properties.directConnectGatewayName)),errors.collect(cdk().propertyValidator("directConnectGatewayName",cdk().validateString)(properties.directConnectGatewayName)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnDirectConnectGatewayProps"')}function convertCfnDirectConnectGatewayPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDirectConnectGatewayPropsValidator(properties).assertSuccess(),{AmazonSideAsn:cdk().stringToCloudFormation(properties.amazonSideAsn),DirectConnectGatewayName:cdk().stringToCloudFormation(properties.directConnectGatewayName),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnDirectConnectGatewayPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("amazonSideAsn","AmazonSideAsn",properties.AmazonSideAsn!=null?cfn_parse().FromCloudFormation.getString(properties.AmazonSideAsn):void 0),ret.addPropertyResult("directConnectGatewayName","DirectConnectGatewayName",properties.DirectConnectGatewayName!=null?cfn_parse().FromCloudFormation.getString(properties.DirectConnectGatewayName):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 CfnDirectConnectGatewayAssociation extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_directconnect.CfnDirectConnectGatewayAssociation",version:"2.246.0"};static CFN_RESOURCE_TYPE_NAME="AWS::DirectConnect::DirectConnectGatewayAssociation";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnDirectConnectGatewayAssociationPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("UnexpectedIResolvable","Unexpected IResolvable",scope);const ret=new CfnDirectConnectGatewayAssociation(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}static isCfnDirectConnectGatewayAssociation(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnDirectConnectGatewayAssociation.CFN_RESOURCE_TYPE_NAME}acceptDirectConnectGatewayAssociationProposalRoleArn;allowedPrefixesToDirectConnectGateway;associatedGatewayId;directConnectGatewayId;constructor(scope,id,props){super(scope,id,{type:CfnDirectConnectGatewayAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_directconnect_CfnDirectConnectGatewayAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnDirectConnectGatewayAssociation),error}cdk().requireProperty(props,"associatedGatewayId",this),cdk().requireProperty(props,"directConnectGatewayId",this),this.acceptDirectConnectGatewayAssociationProposalRoleArn=props.acceptDirectConnectGatewayAssociationProposalRoleArn,this.allowedPrefixesToDirectConnectGateway=props.allowedPrefixesToDirectConnectGateway,this.associatedGatewayId=cdk().getRefProperty(props.associatedGatewayId?.transitGatewayRef,"transitGatewayArn")??cdk().getRefProperty(props.associatedGatewayId?.vpnGatewayRef,"vpnGatewayId")??cdk().getRefProperty(props.associatedGatewayId?.transitGatewayRef,"transitGatewayId")??cdk().ensureStringOrUndefined(props.associatedGatewayId,"associatedGatewayId","ec2.IVPNGatewayRef | ec2.ITransitGatewayRef | string"),this.directConnectGatewayId=cdk().getRefProperty(props.directConnectGatewayId?.directConnectGatewayRef,"directConnectGatewayArn")??cdk().ensureStringOrUndefined(props.directConnectGatewayId,"directConnectGatewayId","directconnect.IDirectConnectGatewayRef | string")}get directConnectGatewayAssociationRef(){return{associationId:this.ref}}get attrAssociationId(){return cdk().Token.asString(this.getAtt("AssociationId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{acceptDirectConnectGatewayAssociationProposalRoleArn:this.acceptDirectConnectGatewayAssociationProposalRoleArn,allowedPrefixesToDirectConnectGateway:this.allowedPrefixesToDirectConnectGateway,associatedGatewayId:this.associatedGatewayId,directConnectGatewayId:this.directConnectGatewayId}}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",CfnDirectConnectGatewayAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnDirectConnectGatewayAssociationPropsToCloudFormation(props)}}exports.CfnDirectConnectGatewayAssociation=CfnDirectConnectGatewayAssociation;function CfnDirectConnectGatewayAssociationPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("acceptDirectConnectGatewayAssociationProposalRoleArn",cdk().validateString)(properties.acceptDirectConnectGatewayAssociationProposalRoleArn)),errors.collect(cdk().propertyValidator("allowedPrefixesToDirectConnectGateway",cdk().listValidator(cdk().validateString))(properties.allowedPrefixesToDirectConnectGateway)),errors.collect(cdk().propertyValidator("associatedGatewayId",cdk().requiredValidator)(properties.associatedGatewayId)),errors.collect(cdk().propertyValidator("associatedGatewayId",cdk().validateString)(properties.associatedGatewayId)),errors.collect(cdk().propertyValidator("directConnectGatewayId",cdk().requiredValidator)(properties.directConnectGatewayId)),errors.collect(cdk().propertyValidator("directConnectGatewayId",cdk().validateString)(properties.directConnectGatewayId)),errors.wrap('supplied properties not correct for "CfnDirectConnectGatewayAssociationProps"')}function convertCfnDirectConnectGatewayAssociationPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnDirectConnectGatewayAssociationPropsValidator(properties).assertSuccess(),{AcceptDirectConnectGatewayAssociationProposalRoleArn:cdk().stringToCloudFormation(properties.acceptDirectConnectGatewayAssociationProposalRoleArn),AllowedPrefixesToDirectConnectGateway:cdk().listMapper(cdk().stringToCloudFormation)(properties.allowedPrefixesToDirectConnectGateway),AssociatedGatewayId:cdk().stringToCloudFormation(properties.associatedGatewayId),DirectConnectGatewayId:cdk().stringToCloudFormation(properties.directConnectGatewayId)}):properties}function CfnDirectConnectGatewayAssociationPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("acceptDirectConnectGatewayAssociationProposalRoleArn","AcceptDirectConnectGatewayAssociationProposalRoleArn",properties.AcceptDirectConnectGatewayAssociationProposalRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.AcceptDirectConnectGatewayAssociationProposalRoleArn):void 0),ret.addPropertyResult("allowedPrefixesToDirectConnectGateway","AllowedPrefixesToDirectConnectGateway",properties.AllowedPrefixesToDirectConnectGateway!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.AllowedPrefixesToDirectConnectGateway):void 0),ret.addPropertyResult("associatedGatewayId","AssociatedGatewayId",properties.AssociatedGatewayId!=null?cfn_parse().FromCloudFormation.getString(properties.AssociatedGatewayId):void 0),ret.addPropertyResult("directConnectGatewayId","DirectConnectGatewayId",properties.DirectConnectGatewayId!=null?cfn_parse().FromCloudFormation.getString(properties.DirectConnectGatewayId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnLag extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_directconnect.CfnLag",version:"2.246.0"};static CFN_RESOURCE_TYPE_NAME="AWS::DirectConnect::Lag";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnLagPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("UnexpectedIResolvable","Unexpected IResolvable",scope);const ret=new CfnLag(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}static isCfnLag(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnLag.CFN_RESOURCE_TYPE_NAME}static arnForLag(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_directconnect_ILagRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForLag),error}return resource.lagRef.lagArn}cdkTagManager;connectionsBandwidth;lagName;location;minimumLinks;providerName;requestMacSec;tags;constructor(scope,id,props){super(scope,id,{type:CfnLag.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_directconnect_CfnLagProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnLag),error}cdk().requireProperty(props,"connectionsBandwidth",this),cdk().requireProperty(props,"lagName",this),cdk().requireProperty(props,"location",this),this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::DirectConnect::Lag",void 0,{tagPropertyName:"tags"}),this.connectionsBandwidth=props.connectionsBandwidth,this.lagName=props.lagName,this.location=props.location,this.minimumLinks=props.minimumLinks,this.providerName=props.providerName,this.requestMacSec=props.requestMacSec,this.tags=props.tags}get lagRef(){return{lagArn:this.ref}}get attrLagArn(){return cdk().Token.asString(this.getAtt("LagArn",cdk().ResolutionTypeHint.STRING))}get attrLagId(){return cdk().Token.asString(this.getAtt("LagId",cdk().ResolutionTypeHint.STRING))}get attrLagState(){return cdk().Token.asString(this.getAtt("LagState",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{tags:this.cdkTagManager.renderTags(this.tags),connectionsBandwidth:this.connectionsBandwidth,lagName:this.lagName,location:this.location,minimumLinks:this.minimumLinks,providerName:this.providerName,requestMacSec:this.requestMacSec}}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",CfnLag.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnLagPropsToCloudFormation(props)}}exports.CfnLag=CfnLag;function CfnLagPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("connectionsBandwidth",cdk().requiredValidator)(properties.connectionsBandwidth)),errors.collect(cdk().propertyValidator("connectionsBandwidth",cdk().validateString)(properties.connectionsBandwidth)),errors.collect(cdk().propertyValidator("lagName",cdk().requiredValidator)(properties.lagName)),errors.collect(cdk().propertyValidator("lagName",cdk().validateString)(properties.lagName)),errors.collect(cdk().propertyValidator("location",cdk().requiredValidator)(properties.location)),errors.collect(cdk().propertyValidator("location",cdk().validateString)(properties.location)),errors.collect(cdk().propertyValidator("minimumLinks",cdk().validateNumber)(properties.minimumLinks)),errors.collect(cdk().propertyValidator("providerName",cdk().validateString)(properties.providerName)),errors.collect(cdk().propertyValidator("requestMacSec",cdk().validateBoolean)(properties.requestMacSec)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnLagProps"')}function convertCfnLagPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnLagPropsValidator(properties).assertSuccess(),{ConnectionsBandwidth:cdk().stringToCloudFormation(properties.connectionsBandwidth),LagName:cdk().stringToCloudFormation(properties.lagName),Location:cdk().stringToCloudFormation(properties.location),MinimumLinks:cdk().numberToCloudFormation(properties.minimumLinks),ProviderName:cdk().stringToCloudFormation(properties.providerName),RequestMACSec:cdk().booleanToCloudFormation(properties.requestMacSec),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnLagPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("connectionsBandwidth","ConnectionsBandwidth",properties.ConnectionsBandwidth!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectionsBandwidth):void 0),ret.addPropertyResult("lagName","LagName",properties.LagName!=null?cfn_parse().FromCloudFormation.getString(properties.LagName):void 0),ret.addPropertyResult("location","Location",properties.Location!=null?cfn_parse().FromCloudFormation.getString(properties.Location):void 0),ret.addPropertyResult("minimumLinks","MinimumLinks",properties.MinimumLinks!=null?cfn_parse().FromCloudFormation.getNumber(properties.MinimumLinks):void 0),ret.addPropertyResult("providerName","ProviderName",properties.ProviderName!=null?cfn_parse().FromCloudFormation.getString(properties.ProviderName):void 0),ret.addPropertyResult("requestMacSec","RequestMACSec",properties.RequestMACSec!=null?cfn_parse().FromCloudFormation.getBoolean(properties.RequestMACSec):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 CfnPrivateVirtualInterface extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_directconnect.CfnPrivateVirtualInterface",version:"2.246.0"};static CFN_RESOURCE_TYPE_NAME="AWS::DirectConnect::PrivateVirtualInterface";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPrivateVirtualInterfacePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("UnexpectedIResolvable","Unexpected IResolvable",scope);const ret=new CfnPrivateVirtualInterface(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}static isCfnPrivateVirtualInterface(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnPrivateVirtualInterface.CFN_RESOURCE_TYPE_NAME}allocatePrivateVirtualInterfaceRoleArn;bgpPeers;cdkTagManager;connectionId;directConnectGatewayId;enableSiteLink;mtu;tags;virtualGatewayId;virtualInterfaceName;vlan;constructor(scope,id,props){super(scope,id,{type:CfnPrivateVirtualInterface.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_directconnect_CfnPrivateVirtualInterfaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPrivateVirtualInterface),error}cdk().requireProperty(props,"bgpPeers",this),cdk().requireProperty(props,"connectionId",this),cdk().requireProperty(props,"virtualInterfaceName",this),cdk().requireProperty(props,"vlan",this),this.allocatePrivateVirtualInterfaceRoleArn=props.allocatePrivateVirtualInterfaceRoleArn,this.bgpPeers=props.bgpPeers,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::DirectConnect::PrivateVirtualInterface",void 0,{tagPropertyName:"tags"}),this.connectionId=cdk().getRefProperty(props.connectionId?.connectionRef,"connectionArn")??cdk().getRefProperty(props.connectionId?.lagRef,"lagArn")??cdk().ensureStringOrUndefined(props.connectionId,"connectionId","directconnect.IConnectionRef | directconnect.ILagRef | string"),this.directConnectGatewayId=cdk().getRefProperty(props.directConnectGatewayId?.directConnectGatewayRef,"directConnectGatewayArn")??cdk().ensureStringOrUndefined(props.directConnectGatewayId,"directConnectGatewayId","directconnect.IDirectConnectGatewayRef | string"),this.enableSiteLink=props.enableSiteLink,this.mtu=props.mtu,this.tags=props.tags,this.virtualGatewayId=props.virtualGatewayId,this.virtualInterfaceName=props.virtualInterfaceName,this.vlan=props.vlan}get privateVirtualInterfaceRef(){return{virtualInterfaceArn:this.ref}}get attrVirtualInterfaceArn(){return cdk().Token.asString(this.getAtt("VirtualInterfaceArn",cdk().ResolutionTypeHint.STRING))}get attrVirtualInterfaceId(){return cdk().Token.asString(this.getAtt("VirtualInterfaceId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{allocatePrivateVirtualInterfaceRoleArn:this.allocatePrivateVirtualInterfaceRoleArn,bgpPeers:this.bgpPeers,tags:this.cdkTagManager.renderTags(this.tags),connectionId:this.connectionId,directConnectGatewayId:this.directConnectGatewayId,enableSiteLink:this.enableSiteLink,mtu:this.mtu,virtualGatewayId:this.virtualGatewayId,virtualInterfaceName:this.virtualInterfaceName,vlan:this.vlan}}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",CfnPrivateVirtualInterface.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnPrivateVirtualInterfacePropsToCloudFormation(props)}}exports.CfnPrivateVirtualInterface=CfnPrivateVirtualInterface;function CfnPrivateVirtualInterfaceBgpPeerPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("addressFamily",cdk().requiredValidator)(properties.addressFamily)),errors.collect(cdk().propertyValidator("addressFamily",cdk().validateString)(properties.addressFamily)),errors.collect(cdk().propertyValidator("amazonAddress",cdk().validateString)(properties.amazonAddress)),errors.collect(cdk().propertyValidator("asn",cdk().requiredValidator)(properties.asn)),errors.collect(cdk().propertyValidator("asn",cdk().validateString)(properties.asn)),errors.collect(cdk().propertyValidator("authKey",cdk().validateString)(properties.authKey)),errors.collect(cdk().propertyValidator("bgpPeerId",cdk().validateString)(properties.bgpPeerId)),errors.collect(cdk().propertyValidator("customerAddress",cdk().validateString)(properties.customerAddress)),errors.wrap('supplied properties not correct for "BgpPeerProperty"')}function convertCfnPrivateVirtualInterfaceBgpPeerPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPrivateVirtualInterfaceBgpPeerPropertyValidator(properties).assertSuccess(),{AddressFamily:cdk().stringToCloudFormation(properties.addressFamily),AmazonAddress:cdk().stringToCloudFormation(properties.amazonAddress),Asn:cdk().stringToCloudFormation(properties.asn),AuthKey:cdk().stringToCloudFormation(properties.authKey),BgpPeerId:cdk().stringToCloudFormation(properties.bgpPeerId),CustomerAddress:cdk().stringToCloudFormation(properties.customerAddress)}):properties}function CfnPrivateVirtualInterfaceBgpPeerPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("addressFamily","AddressFamily",properties.AddressFamily!=null?cfn_parse().FromCloudFormation.getString(properties.AddressFamily):void 0),ret.addPropertyResult("amazonAddress","AmazonAddress",properties.AmazonAddress!=null?cfn_parse().FromCloudFormation.getString(properties.AmazonAddress):void 0),ret.addPropertyResult("asn","Asn",properties.Asn!=null?cfn_parse().FromCloudFormation.getString(properties.Asn):void 0),ret.addPropertyResult("authKey","AuthKey",properties.AuthKey!=null?cfn_parse().FromCloudFormation.getString(properties.AuthKey):void 0),ret.addPropertyResult("bgpPeerId","BgpPeerId",properties.BgpPeerId!=null?cfn_parse().FromCloudFormation.getString(properties.BgpPeerId):void 0),ret.addPropertyResult("customerAddress","CustomerAddress",properties.CustomerAddress!=null?cfn_parse().FromCloudFormation.getString(properties.CustomerAddress):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPrivateVirtualInterfacePropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("allocatePrivateVirtualInterfaceRoleArn",cdk().validateString)(properties.allocatePrivateVirtualInterfaceRoleArn)),errors.collect(cdk().propertyValidator("bgpPeers",cdk().requiredValidator)(properties.bgpPeers)),errors.collect(cdk().propertyValidator("bgpPeers",cdk().listValidator(CfnPrivateVirtualInterfaceBgpPeerPropertyValidator))(properties.bgpPeers)),errors.collect(cdk().propertyValidator("connectionId",cdk().requiredValidator)(properties.connectionId)),errors.collect(cdk().propertyValidator("connectionId",cdk().validateString)(properties.connectionId)),errors.collect(cdk().propertyValidator("directConnectGatewayId",cdk().validateString)(properties.directConnectGatewayId)),errors.collect(cdk().propertyValidator("enableSiteLink",cdk().validateBoolean)(properties.enableSiteLink)),errors.collect(cdk().propertyValidator("mtu",cdk().validateNumber)(properties.mtu)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("virtualGatewayId",cdk().validateString)(properties.virtualGatewayId)),errors.collect(cdk().propertyValidator("virtualInterfaceName",cdk().requiredValidator)(properties.virtualInterfaceName)),errors.collect(cdk().propertyValidator("virtualInterfaceName",cdk().validateString)(properties.virtualInterfaceName)),errors.collect(cdk().propertyValidator("vlan",cdk().requiredValidator)(properties.vlan)),errors.collect(cdk().propertyValidator("vlan",cdk().validateNumber)(properties.vlan)),errors.wrap('supplied properties not correct for "CfnPrivateVirtualInterfaceProps"')}function convertCfnPrivateVirtualInterfacePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPrivateVirtualInterfacePropsValidator(properties).assertSuccess(),{AllocatePrivateVirtualInterfaceRoleArn:cdk().stringToCloudFormation(properties.allocatePrivateVirtualInterfaceRoleArn),BgpPeers:cdk().listMapper(convertCfnPrivateVirtualInterfaceBgpPeerPropertyToCloudFormation)(properties.bgpPeers),ConnectionId:cdk().stringToCloudFormation(properties.connectionId),DirectConnectGatewayId:cdk().stringToCloudFormation(properties.directConnectGatewayId),EnableSiteLink:cdk().booleanToCloudFormation(properties.enableSiteLink),Mtu:cdk().numberToCloudFormation(properties.mtu),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),VirtualGatewayId:cdk().stringToCloudFormation(properties.virtualGatewayId),VirtualInterfaceName:cdk().stringToCloudFormation(properties.virtualInterfaceName),Vlan:cdk().numberToCloudFormation(properties.vlan)}):properties}function CfnPrivateVirtualInterfacePropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("allocatePrivateVirtualInterfaceRoleArn","AllocatePrivateVirtualInterfaceRoleArn",properties.AllocatePrivateVirtualInterfaceRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.AllocatePrivateVirtualInterfaceRoleArn):void 0),ret.addPropertyResult("bgpPeers","BgpPeers",properties.BgpPeers!=null?cfn_parse().FromCloudFormation.getArray(CfnPrivateVirtualInterfaceBgpPeerPropertyFromCloudFormation)(properties.BgpPeers):void 0),ret.addPropertyResult("connectionId","ConnectionId",properties.ConnectionId!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectionId):void 0),ret.addPropertyResult("directConnectGatewayId","DirectConnectGatewayId",properties.DirectConnectGatewayId!=null?cfn_parse().FromCloudFormation.getString(properties.DirectConnectGatewayId):void 0),ret.addPropertyResult("enableSiteLink","EnableSiteLink",properties.EnableSiteLink!=null?cfn_parse().FromCloudFormation.getBoolean(properties.EnableSiteLink):void 0),ret.addPropertyResult("mtu","Mtu",properties.Mtu!=null?cfn_parse().FromCloudFormation.getNumber(properties.Mtu):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("virtualGatewayId","VirtualGatewayId",properties.VirtualGatewayId!=null?cfn_parse().FromCloudFormation.getString(properties.VirtualGatewayId):void 0),ret.addPropertyResult("virtualInterfaceName","VirtualInterfaceName",properties.VirtualInterfaceName!=null?cfn_parse().FromCloudFormation.getString(properties.VirtualInterfaceName):void 0),ret.addPropertyResult("vlan","Vlan",properties.Vlan!=null?cfn_parse().FromCloudFormation.getNumber(properties.Vlan):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnPublicVirtualInterface extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_directconnect.CfnPublicVirtualInterface",version:"2.246.0"};static CFN_RESOURCE_TYPE_NAME="AWS::DirectConnect::PublicVirtualInterface";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnPublicVirtualInterfacePropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("UnexpectedIResolvable","Unexpected IResolvable",scope);const ret=new CfnPublicVirtualInterface(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}static isCfnPublicVirtualInterface(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnPublicVirtualInterface.CFN_RESOURCE_TYPE_NAME}allocatePublicVirtualInterfaceRoleArn;bgpPeers;cdkTagManager;connectionId;routeFilterPrefixes;tags;virtualInterfaceName;vlan;constructor(scope,id,props){super(scope,id,{type:CfnPublicVirtualInterface.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_directconnect_CfnPublicVirtualInterfaceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnPublicVirtualInterface),error}cdk().requireProperty(props,"bgpPeers",this),cdk().requireProperty(props,"connectionId",this),cdk().requireProperty(props,"virtualInterfaceName",this),cdk().requireProperty(props,"vlan",this),this.allocatePublicVirtualInterfaceRoleArn=props.allocatePublicVirtualInterfaceRoleArn,this.bgpPeers=props.bgpPeers,this.cdkTagManager=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::DirectConnect::PublicVirtualInterface",void 0,{tagPropertyName:"tags"}),this.connectionId=cdk().getRefProperty(props.connectionId?.connectionRef,"connectionArn")??cdk().getRefProperty(props.connectionId?.lagRef,"lagArn")??cdk().ensureStringOrUndefined(props.connectionId,"connectionId","directconnect.IConnectionRef | directconnect.ILagRef | string"),this.routeFilterPrefixes=props.routeFilterPrefixes,this.tags=props.tags,this.virtualInterfaceName=props.virtualInterfaceName,this.vlan=props.vlan}get publicVirtualInterfaceRef(){return{virtualInterfaceArn:this.ref}}get attrVirtualInterfaceArn(){return cdk().Token.asString(this.getAtt("VirtualInterfaceArn",cdk().ResolutionTypeHint.STRING))}get attrVirtualInterfaceId(){return cdk().Token.asString(this.getAtt("VirtualInterfaceId",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{allocatePublicVirtualInterfaceRoleArn:this.allocatePublicVirtualInterfaceRoleArn,bgpPeers:this.bgpPeers,tags:this.cdkTagManager.renderTags(this.tags),connectionId:this.connectionId,routeFilterPrefixes:this.routeFilterPrefixes,virtualInterfaceName:this.virtualInterfaceName,vlan:this.vlan}}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",CfnPublicVirtualInterface.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnPublicVirtualInterfacePropsToCloudFormation(props)}}exports.CfnPublicVirtualInterface=CfnPublicVirtualInterface;function CfnPublicVirtualInterfaceBgpPeerPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("addressFamily",cdk().requiredValidator)(properties.addressFamily)),errors.collect(cdk().propertyValidator("addressFamily",cdk().validateString)(properties.addressFamily)),errors.collect(cdk().propertyValidator("amazonAddress",cdk().validateString)(properties.amazonAddress)),errors.collect(cdk().propertyValidator("asn",cdk().requiredValidator)(properties.asn)),errors.collect(cdk().propertyValidator("asn",cdk().validateString)(properties.asn)),errors.collect(cdk().propertyValidator("authKey",cdk().validateString)(properties.authKey)),errors.collect(cdk().propertyValidator("bgpPeerId",cdk().validateString)(properties.bgpPeerId)),errors.collect(cdk().propertyValidator("customerAddress",cdk().validateString)(properties.customerAddress)),errors.wrap('supplied properties not correct for "BgpPeerProperty"')}function convertCfnPublicVirtualInterfaceBgpPeerPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPublicVirtualInterfaceBgpPeerPropertyValidator(properties).assertSuccess(),{AddressFamily:cdk().stringToCloudFormation(properties.addressFamily),AmazonAddress:cdk().stringToCloudFormation(properties.amazonAddress),Asn:cdk().stringToCloudFormation(properties.asn),AuthKey:cdk().stringToCloudFormation(properties.authKey),BgpPeerId:cdk().stringToCloudFormation(properties.bgpPeerId),CustomerAddress:cdk().stringToCloudFormation(properties.customerAddress)}):properties}function CfnPublicVirtualInterfaceBgpPeerPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("addressFamily","AddressFamily",properties.AddressFamily!=null?cfn_parse().FromCloudFormation.getString(properties.AddressFamily):void 0),ret.addPropertyResult("amazonAddress","AmazonAddress",properties.AmazonAddress!=null?cfn_parse().FromCloudFormation.getString(properties.AmazonAddress):void 0),ret.addPropertyResult("asn","Asn",properties.Asn!=null?cfn_parse().FromCloudFormation.getString(properties.Asn):void 0),ret.addPropertyResult("authKey","AuthKey",properties.AuthKey!=null?cfn_parse().FromCloudFormation.getString(properties.AuthKey):void 0),ret.addPropertyResult("bgpPeerId","BgpPeerId",properties.BgpPeerId!=null?cfn_parse().FromCloudFormation.getString(properties.BgpPeerId):void 0),ret.addPropertyResult("customerAddress","CustomerAddress",properties.CustomerAddress!=null?cfn_parse().FromCloudFormation.getString(properties.CustomerAddress):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnPublicVirtualInterfacePropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("allocatePublicVirtualInterfaceRoleArn",cdk().validateString)(properties.allocatePublicVirtualInterfaceRoleArn)),errors.collect(cdk().propertyValidator("bgpPeers",cdk().requiredValidator)(properties.bgpPeers)),errors.collect(cdk().propertyValidator("bgpPeers",cdk().listValidator(CfnPublicVirtualInterfaceBgpPeerPropertyValidator))(properties.bgpPeers)),errors.collect(cdk().propertyValidator("connectionId",cdk().requiredValidator)(properties.connectionId)),errors.collect(cdk().propertyValidator("connectionId",cdk().validateString)(properties.connectionId)),errors.collect(cdk().propertyValidator("routeFilterPrefixes",cdk().listValidator(cdk().validateString))(properties.routeFilterPrefixes)),errors.collect(cdk().propertyValidator("tags",cdk().listValidator(cdk().validateCfnTag))(properties.tags)),errors.collect(cdk().propertyValidator("virtualInterfaceName",cdk().requiredValidator)(properties.virtualInterfaceName)),errors.collect(cdk().propertyValidator("virtualInterfaceName",cdk().validateString)(properties.virtualInterfaceName)),errors.collect(cdk().propertyValidator("vlan",cdk().requiredValidator)(properties.vlan)),errors.collect(cdk().propertyValidator("vlan",cdk().validateNumber)(properties.vlan)),errors.wrap('supplied properties not correct for "CfnPublicVirtualInterfaceProps"')}function convertCfnPublicVirtualInterfacePropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnPublicVirtualInterfacePropsValidator(properties).assertSuccess(),{AllocatePublicVirtualInterfaceRoleArn:cdk().stringToCloudFormation(properties.allocatePublicVirtualInterfaceRoleArn),BgpPeers:cdk().listMapper(convertCfnPublicVirtualInterfaceBgpPeerPropertyToCloudFormation)(properties.bgpPeers),ConnectionId:cdk().stringToCloudFormation(properties.connectionId),RouteFilterPrefixes:cdk().listMapper(cdk().stringToCloudFormation)(properties.routeFilterPrefixes),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags),VirtualInterfaceName:cdk().stringToCloudFormation(properties.virtualInterfaceName),Vlan:cdk().numberToCloudFormation(properties.vlan)}):properties}function CfnPublicVirtualInterfacePropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("allocatePublicVirtualInterfaceRoleArn","AllocatePublicVirtualInterfaceRoleArn",properties.AllocatePublicVirtualInterfaceRoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.AllocatePublicVirtualInterfaceRoleArn):void 0),ret.addPropertyResult("bgpPeers","BgpPeers",properties.BgpPeers!=null?cfn_parse().FromCloudFormation.getArray(CfnPublicVirtualInterfaceBgpPeerPropertyFromCloudFormation)(properties.BgpPeers):void 0),ret.addPropertyResult("connectionId","ConnectionId",properties.ConnectionId!=null?cfn_parse().FromCloudFormation.getString(properties.ConnectionId):void 0),ret.addPropertyResult("routeFilterPrefixes","RouteFilterPrefixes",properties.RouteFilterPrefixes!=null?cfn_parse().FromCloudFormation.getArray(cfn_parse().FromCloudFormation.getString)(properties.RouteFilterPrefixes):void 0),ret.addPropertyResult("tags","Tags",pro