UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1 lines 70.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.251.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(cfn_parse().lit`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 bandwidth(){return this._bandwidth}set bandwidth(value){cdk().traceProperty(this.node,"Bandwidth"),this._bandwidth=value}get connectionName(){return this._connectionName}set connectionName(value){cdk().traceProperty(this.node,"ConnectionName"),this._connectionName=value}get lagId(){return this._lagId}set lagId(value){cdk().traceProperty(this.node,"LagId"),this._lagId=value}get location(){return this._location}set location(value){cdk().traceProperty(this.node,"Location"),this._location=value}get providerName(){return this._providerName}set providerName(value){cdk().traceProperty(this.node,"ProviderName"),this._providerName=value}get requestMacSec(){return this._requestMacSec}set requestMacSec(value){cdk().traceProperty(this.node,"RequestMACSec"),this._requestMacSec=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`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 amazonSideAsn(){return this._amazonSideAsn}set amazonSideAsn(value){cdk().traceProperty(this.node,"AmazonSideAsn"),this._amazonSideAsn=value}get directConnectGatewayName(){return this._directConnectGatewayName}set directConnectGatewayName(value){cdk().traceProperty(this.node,"DirectConnectGatewayName"),this._directConnectGatewayName=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`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 acceptDirectConnectGatewayAssociationProposalRoleArn(){return this._acceptDirectConnectGatewayAssociationProposalRoleArn}set acceptDirectConnectGatewayAssociationProposalRoleArn(value){cdk().traceProperty(this.node,"AcceptDirectConnectGatewayAssociationProposalRoleArn"),this._acceptDirectConnectGatewayAssociationProposalRoleArn=value}get allowedPrefixesToDirectConnectGateway(){return this._allowedPrefixesToDirectConnectGateway}set allowedPrefixesToDirectConnectGateway(value){cdk().traceProperty(this.node,"AllowedPrefixesToDirectConnectGateway"),this._allowedPrefixesToDirectConnectGateway=value}get associatedGatewayId(){return this._associatedGatewayId}set associatedGatewayId(value){cdk().traceProperty(this.node,"AssociatedGatewayId"),this._associatedGatewayId=value}get directConnectGatewayId(){return this._directConnectGatewayId}set directConnectGatewayId(value){cdk().traceProperty(this.node,"DirectConnectGatewayId"),this._directConnectGatewayId=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`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 connectionsBandwidth(){return this._connectionsBandwidth}set connectionsBandwidth(value){cdk().traceProperty(this.node,"ConnectionsBandwidth"),this._connectionsBandwidth=value}get lagName(){return this._lagName}set lagName(value){cdk().traceProperty(this.node,"LagName"),this._lagName=value}get location(){return this._location}set location(value){cdk().traceProperty(this.node,"Location"),this._location=value}get minimumLinks(){return this._minimumLinks}set minimumLinks(value){cdk().traceProperty(this.node,"MinimumLinks"),this._minimumLinks=value}get providerName(){return this._providerName}set providerName(value){cdk().traceProperty(this.node,"ProviderName"),this._providerName=value}get requestMacSec(){return this._requestMacSec}set requestMacSec(value){cdk().traceProperty(this.node,"RequestMACSec"),this._requestMacSec=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`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 allocatePrivateVirtualInterfaceRoleArn(){return this._allocatePrivateVirtualInterfaceRoleArn}set allocatePrivateVirtualInterfaceRoleArn(value){cdk().traceProperty(this.node,"AllocatePrivateVirtualInterfaceRoleArn"),this._allocatePrivateVirtualInterfaceRoleArn=value}get bgpPeers(){return this._bgpPeers}set bgpPeers(value){cdk().traceProperty(this.node,"BgpPeers"),this._bgpPeers=value}get connectionId(){return this._connectionId}set connectionId(value){cdk().traceProperty(this.node,"ConnectionId"),this._connectionId=value}get directConnectGatewayId(){return this._directConnectGatewayId}set directConnectGatewayId(value){cdk().traceProperty(this.node,"DirectConnectGatewayId"),this._directConnectGatewayId=value}get enableSiteLink(){return this._enableSiteLink}set enableSiteLink(value){cdk().traceProperty(this.node,"EnableSiteLink"),this._enableSiteLink=value}get mtu(){return this._mtu}set mtu(value){cdk().traceProperty(this.node,"Mtu"),this._mtu=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get virtualGatewayId(){return this._virtualGatewayId}set virtualGatewayId(value){cdk().traceProperty(this.node,"VirtualGatewayId"),this._virtualGatewayId=value}get virtualInterfaceName(){return this._virtualInterfaceName}set virtualInterfaceName(value){cdk().traceProperty(this.node,"VirtualInterfaceName"),this._virtualInterfaceName=value}get vlan(){return this._vlan}set vlan(value){cdk().traceProperty(this.node,"Vlan"),this._vlan=value}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:logicalId",this._synthesizeLogicalId()),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.251.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(cfn_parse().lit`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 allocatePublicVirtualInterfaceRoleArn(){return this._allocatePublicVirtualInterfaceRoleArn}set allocatePublicVirtualInterfaceRoleArn(value){cdk().traceProperty(this.node,"AllocatePublicVirtualInterfaceRoleArn"),this._allocatePublicVirtualInterfaceRoleArn=value}get bgpPeers(){return this._bgpPeers}set bgpPeers(value){cdk().traceProperty(this.node,"BgpPeers"),this._bgpPeers=value}get connectionId(){return this._connectionId}set connectionId(value){cdk().traceProperty(this.node,"ConnectionId"),this._connectionId=value}get routeFilterPrefixes(){return this._routeFilterPrefixes}set routeFilterPrefixes(value){cdk().traceProperty(this.node,"RouteFilterPrefixes"),this._routeFilterPrefixes=value}get tags(){return this._tags}set tags(value){cdk().traceProperty(this.node,"Tags"),this._tags=value}get virtualInterfaceName(){return this._virtualInterfaceName}set virtualInterfaceName(value){cdk().traceProperty(this.node,"VirtualInterfaceName"),this._virtualInterfaceName=value}get vlan(){return this._vlan}set vlan(value){cdk().traceProperty(this.node,"Vlan"),this._vlan=value}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:logicalId",this._synthesizeLogicalId()),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))),err