"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CfnTransitVirtualInterfacePropsMixin = exports.CfnPublicVirtualInterfacePropsMixin = exports.CfnPrivateVirtualInterfacePropsMixin = exports.CfnLagPropsMixin = exports.CfnDirectConnectGatewayAssociationPropsMixin = exports.CfnDirectConnectGatewayPropsMixin = exports.CfnConnectionPropsMixin = void 0;
const jsiiDeprecationWarnings = require("../../../.warnings.jsii.js");
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
/* eslint-disable @stylistic/max-len, eol-last */
const cdk = __importStar(require("aws-cdk-lib/core"));
const service = __importStar(require("aws-cdk-lib/aws-directconnect"));
/**
 * Resource Type definition for AWS::DirectConnect::Connection.
 *
 * @cloudformationResource AWS::DirectConnect::Connection
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-connection.html
 */
class CfnConnectionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnConnectionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["bandwidth", "connectionName", "lagId", "location", "providerName", "requestMacSec", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::Connection`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnConnectionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnConnectionPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnConnectionMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnConnection.isCfnConnection(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnConnectionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnConnectionPropsMixin = CfnConnectionPropsMixin;
// @ts-ignore TS6133
function flattenCfnConnectionMixinProps(props) {
    const ret = {};
    if ((props.lagId !== undefined))
        ret.lagId = cdk.getRefProperty(props.lagId?.lagRef, 'lagArn') ?? cdk.ensureStringOrUndefined(props.lagId, "lagId", "directconnect.ILagRef | string");
    return ret;
}
/**
 * Resource Type definition for AWS::DirectConnect::DirectConnectGateway.
 *
 * @cloudformationResource AWS::DirectConnect::DirectConnectGateway
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-directconnectgateway.html
 */
class CfnDirectConnectGatewayPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnDirectConnectGatewayPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["amazonSideAsn", "directConnectGatewayName", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::DirectConnectGateway`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnDirectConnectGatewayMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDirectConnectGatewayPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDirectConnectGateway.isCfnDirectConnectGateway(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDirectConnectGatewayPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDirectConnectGatewayPropsMixin = CfnDirectConnectGatewayPropsMixin;
/**
 * Resource Type definition for AWS::DirectConnect::DirectConnectGatewayAssociation.
 *
 * @cloudformationResource AWS::DirectConnect::DirectConnectGatewayAssociation
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-directconnectgatewayassociation.html
 */
class CfnDirectConnectGatewayAssociationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnDirectConnectGatewayAssociationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["acceptDirectConnectGatewayAssociationProposalRoleArn", "allowedPrefixesToDirectConnectGateway", "associatedGatewayId", "directConnectGatewayId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::DirectConnectGatewayAssociation`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnDirectConnectGatewayAssociationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDirectConnectGatewayAssociationPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDirectConnectGatewayAssociationMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDirectConnectGatewayAssociation.isCfnDirectConnectGatewayAssociation(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDirectConnectGatewayAssociationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDirectConnectGatewayAssociationPropsMixin = CfnDirectConnectGatewayAssociationPropsMixin;
// @ts-ignore TS6133
function flattenCfnDirectConnectGatewayAssociationMixinProps(props) {
    const ret = {};
    if ((props.associatedGatewayId !== undefined))
        ret.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");
    if ((props.directConnectGatewayId !== undefined))
        ret.directConnectGatewayId = cdk.getRefProperty(props.directConnectGatewayId?.directConnectGatewayRef, 'directConnectGatewayArn') ?? cdk.ensureStringOrUndefined(props.directConnectGatewayId, "directConnectGatewayId", "directconnect.IDirectConnectGatewayRef | string");
    return ret;
}
/**
 * Resource Type definition for AWS::DirectConnect::Lag.
 *
 * @cloudformationResource AWS::DirectConnect::Lag
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-lag.html
 */
class CfnLagPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnLagPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["connectionsBandwidth", "lagName", "location", "minimumLinks", "providerName", "requestMacSec", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::Lag`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnLagMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnLagPropsMixin);
            }
            throw error;
        }
        this.props = props;
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnLag.isCfnLag(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnLagPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnLagPropsMixin = CfnLagPropsMixin;
/**
 * Resource Type definition for AWS::DirectConnect::PrivateVirtualInterface.
 *
 * @cloudformationResource AWS::DirectConnect::PrivateVirtualInterface
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-privatevirtualinterface.html
 */
class CfnPrivateVirtualInterfacePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnPrivateVirtualInterfacePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["allocatePrivateVirtualInterfaceRoleArn", "bgpPeers", "connectionId", "directConnectGatewayId", "enableSiteLink", "mtu", "tags", "virtualGatewayId", "virtualInterfaceName", "vlan"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::PrivateVirtualInterface`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnPrivateVirtualInterfaceMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnPrivateVirtualInterfacePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnPrivateVirtualInterfaceMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnPrivateVirtualInterface.isCfnPrivateVirtualInterface(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnPrivateVirtualInterfacePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnPrivateVirtualInterfacePropsMixin = CfnPrivateVirtualInterfacePropsMixin;
// @ts-ignore TS6133
function flattenCfnPrivateVirtualInterfaceMixinProps(props) {
    const ret = {};
    if ((props.connectionId !== undefined))
        ret.connectionId = cdk.getRefProperty(props.connectionId?.connectionRef, 'connectionArn') ?? cdk.getRefProperty(props.connectionId?.lagRef, 'lagArn') ?? cdk.ensureStringOrUndefined(props.connectionId, "connectionId", "directconnect.IConnectionRef | directconnect.ILagRef | string");
    if ((props.directConnectGatewayId !== undefined))
        ret.directConnectGatewayId = cdk.getRefProperty(props.directConnectGatewayId?.directConnectGatewayRef, 'directConnectGatewayArn') ?? cdk.ensureStringOrUndefined(props.directConnectGatewayId, "directConnectGatewayId", "directconnect.IDirectConnectGatewayRef | string");
    return ret;
}
/**
 * Resource Type definition for AWS::DirectConnect::PublicVirtualInterface.
 *
 * @cloudformationResource AWS::DirectConnect::PublicVirtualInterface
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-publicvirtualinterface.html
 */
class CfnPublicVirtualInterfacePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnPublicVirtualInterfacePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["allocatePublicVirtualInterfaceRoleArn", "bgpPeers", "connectionId", "routeFilterPrefixes", "tags", "virtualInterfaceName", "vlan"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::PublicVirtualInterface`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnPublicVirtualInterfaceMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnPublicVirtualInterfacePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnPublicVirtualInterfaceMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnPublicVirtualInterface.isCfnPublicVirtualInterface(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnPublicVirtualInterfacePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnPublicVirtualInterfacePropsMixin = CfnPublicVirtualInterfacePropsMixin;
// @ts-ignore TS6133
function flattenCfnPublicVirtualInterfaceMixinProps(props) {
    const ret = {};
    if ((props.connectionId !== undefined))
        ret.connectionId = cdk.getRefProperty(props.connectionId?.connectionRef, 'connectionArn') ?? cdk.getRefProperty(props.connectionId?.lagRef, 'lagArn') ?? cdk.ensureStringOrUndefined(props.connectionId, "connectionId", "directconnect.IConnectionRef | directconnect.ILagRef | string");
    return ret;
}
/**
 * Resource Type definition for AWS::DirectConnect::TransitVirtualInterface.
 *
 * @cloudformationResource AWS::DirectConnect::TransitVirtualInterface
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-directconnect-transitvirtualinterface.html
 */
class CfnTransitVirtualInterfacePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_directconnect.CfnTransitVirtualInterfacePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["allocateTransitVirtualInterfaceRoleArn", "bgpPeers", "connectionId", "directConnectGatewayId", "enableSiteLink", "mtu", "tags", "virtualInterfaceName", "vlan"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::DirectConnect::TransitVirtualInterface`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_directconnect_CfnTransitVirtualInterfaceMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnTransitVirtualInterfacePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnTransitVirtualInterfaceMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnTransitVirtualInterface.isCfnTransitVirtualInterface(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnTransitVirtualInterfacePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnTransitVirtualInterfacePropsMixin = CfnTransitVirtualInterfacePropsMixin;
// @ts-ignore TS6133
function flattenCfnTransitVirtualInterfaceMixinProps(props) {
    const ret = {};
    if ((props.connectionId !== undefined))
        ret.connectionId = cdk.getRefProperty(props.connectionId?.connectionRef, 'connectionArn') ?? cdk.getRefProperty(props.connectionId?.lagRef, 'lagArn') ?? cdk.ensureStringOrUndefined(props.connectionId, "connectionId", "directconnect.IConnectionRef | directconnect.ILagRef | string");
    if ((props.directConnectGatewayId !== undefined))
        ret.directConnectGatewayId = cdk.getRefProperty(props.directConnectGatewayId?.directConnectGatewayRef, 'directConnectGatewayArn') ?? cdk.ensureStringOrUndefined(props.directConnectGatewayId, "directConnectGatewayId", "directconnect.IDirectConnectGatewayRef | string");
    return ret;
}
