"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.CfnDomainNameV2PropsMixin = exports.CfnDomainNameAccessAssociationPropsMixin = exports.CfnBasePathMappingV2PropsMixin = exports.CfnVpcLinkPropsMixin = exports.CfnUsagePlanKeyPropsMixin = exports.CfnUsagePlanPropsMixin = exports.CfnStagePropsMixin = exports.CfnRestApiPropsMixin = exports.CfnResourcePropsMixin = exports.CfnRequestValidatorPropsMixin = exports.CfnModelPropsMixin = exports.CfnMethodPropsMixin = exports.CfnGatewayResponsePropsMixin = exports.CfnDomainNamePropsMixin = exports.CfnDocumentationVersionPropsMixin = exports.CfnDocumentationPartPropsMixin = exports.CfnDeploymentPropsMixin = exports.CfnClientCertificatePropsMixin = exports.CfnBasePathMappingPropsMixin = exports.CfnAuthorizerPropsMixin = exports.CfnApiKeyPropsMixin = exports.CfnAccountPropsMixin = 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-apigateway"));
/**
 * The `AWS::ApiGateway::Account` resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs.
 *
 * To avoid overwriting other roles, you should only have one `AWS::ApiGateway::Account` resource per region per account.
 *
 * When you delete a stack containing this resource, API Gateway can still assume the provided IAM role to write API logs to CloudWatch Logs. To deny API Gateway access to write API logs to CloudWatch logs, update the permissions policies or change the IAM role to deny access.
 *
 * @cloudformationResource AWS::ApiGateway::Account
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-account.html
 */
class CfnAccountPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnAccountPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["cloudWatchRoleArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Account`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnAccountMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnAccountPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnAccountMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnAccount.isCfnAccount(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnAccountPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnAccountPropsMixin = CfnAccountPropsMixin;
// @ts-ignore TS6133
function flattenCfnAccountMixinProps(props) {
    const ret = {};
    if ((props.cloudWatchRoleArn !== undefined))
        ret.cloudWatchRoleArn = cdk.getRefProperty(props.cloudWatchRoleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.cloudWatchRoleArn, "cloudWatchRoleArn", "iam.IRoleRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::ApiKey` resource creates a unique key that you can distribute to clients who are executing API Gateway `Method` resources that require an API key.
 *
 * To specify which API key clients must use, map the API key with the `RestApi` and `Stage` resources that include the methods that require a key.
 *
 * @cloudformationResource AWS::ApiGateway::ApiKey
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html
 */
class CfnApiKeyPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnApiKeyPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["customerId", "description", "enabled", "generateDistinctId", "name", "stageKeys", "tags", "value"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::ApiKey`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnApiKeyMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnApiKeyPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnApiKeyMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnApiKey.isCfnApiKey(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnApiKeyPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnApiKeyPropsMixin = CfnApiKeyPropsMixin;
// @ts-ignore TS6133
function flattenCfnApiKeyPropsMixinStageKeyProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        restApiId: (!props.restApiId ? undefined : cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string")),
        stageName: (!props.stageName ? undefined : cdk.getRefProperty(props.stageName?.stageRef, 'stageName') ?? cdk.ensureStringOrUndefined(props.stageName, "stageName", "apigateway.IStageRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnApiKeyMixinProps(props) {
    const ret = {};
    if ((props.stageKeys !== undefined))
        ret.stageKeys = (cdk.isResolvableObject(props.stageKeys) ? props.stageKeys : cdk.mapArrayInPlace(props.stageKeys, (item) => flattenCfnApiKeyPropsMixinStageKeyProperty(item)));
    return ret;
}
/**
 * The `AWS::ApiGateway::Authorizer` resource creates an authorization layer that API Gateway activates for methods that have authorization enabled.
 *
 * API Gateway activates the authorizer when a client calls those methods.
 *
 * @cloudformationResource AWS::ApiGateway::Authorizer
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html
 */
class CfnAuthorizerPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnAuthorizerPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["authorizerCredentials", "authorizerResultTtlInSeconds", "authorizerUri", "authType", "identitySource", "identityValidationExpression", "name", "providerArns", "restApiId", "type"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Authorizer`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnAuthorizerMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnAuthorizerPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnAuthorizerMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnAuthorizer.isCfnAuthorizer(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnAuthorizerPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnAuthorizerPropsMixin = CfnAuthorizerPropsMixin;
// @ts-ignore TS6133
function flattenCfnAuthorizerMixinProps(props) {
    const ret = {};
    if ((props.authorizerCredentials !== undefined))
        ret.authorizerCredentials = cdk.getRefProperty(props.authorizerCredentials?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.authorizerCredentials, "authorizerCredentials", "iam.IRoleRef | string");
    if ((props.providerArns !== undefined))
        ret.providerArns = cdk.mapArrayInPlace(props.providerArns, (item) => cdk.getRefProperty(item?.userPoolRef, 'userPoolArn') ?? cdk.ensureStringOrUndefined(item, "providerArns", "cognito.IUserPoolRef | string"));
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::BasePathMapping` resource creates a base path that clients who call your API must use in the invocation URL.
 *
 * Supported only for public custom domain names.
 *
 * @cloudformationResource AWS::ApiGateway::BasePathMapping
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmapping.html
 */
class CfnBasePathMappingPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnBasePathMappingPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["basePath", "domainName", "id", "restApiId", "stage"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::BasePathMapping`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnBasePathMappingMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnBasePathMappingPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnBasePathMappingMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnBasePathMapping.isCfnBasePathMapping(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnBasePathMappingPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnBasePathMappingPropsMixin = CfnBasePathMappingPropsMixin;
// @ts-ignore TS6133
function flattenCfnBasePathMappingMixinProps(props) {
    const ret = {};
    if ((props.domainName !== undefined))
        ret.domainName = cdk.getRefProperty(props.domainName?.domainNameRef, 'domainName') ?? cdk.ensureStringOrUndefined(props.domainName, "domainName", "apigateway.IDomainNameRef | string");
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    if ((props.stage !== undefined))
        ret.stage = cdk.getRefProperty(props.stage?.stageRef, 'stageName') ?? cdk.ensureStringOrUndefined(props.stage, "stage", "apigateway.IStageRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::ClientCertificate` resource creates a client certificate that API Gateway uses to configure client-side SSL authentication for sending requests to the integration endpoint.
 *
 * @cloudformationResource AWS::ApiGateway::ClientCertificate
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-clientcertificate.html
 */
class CfnClientCertificatePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnClientCertificatePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::ClientCertificate`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnClientCertificateMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnClientCertificatePropsMixin);
            }
            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.CfnClientCertificate.isCfnClientCertificate(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnClientCertificatePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnClientCertificatePropsMixin = CfnClientCertificatePropsMixin;
/**
 * The `AWS::ApiGateway::Deployment` resource deploys an API Gateway `RestApi` resource to a stage so that clients can call the API over the internet.
 *
 * The stage acts as an environment.
 *
 * @cloudformationResource AWS::ApiGateway::Deployment
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-deployment.html
 */
class CfnDeploymentPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnDeploymentPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["deploymentCanarySettings", "description", "restApiId", "stageDescription", "stageName"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Deployment`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnDeploymentMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDeploymentPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDeploymentMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDeployment.isCfnDeployment(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDeploymentPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDeploymentPropsMixin = CfnDeploymentPropsMixin;
// @ts-ignore TS6133
function flattenCfnDeploymentMixinProps(props) {
    const ret = {};
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::DocumentationPart` resource creates a documentation part for an API.
 *
 * For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide* .
 *
 * @cloudformationResource AWS::ApiGateway::DocumentationPart
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationpart.html
 */
class CfnDocumentationPartPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnDocumentationPartPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["location", "properties", "restApiId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::DocumentationPart`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnDocumentationPartMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDocumentationPartPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDocumentationPartMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDocumentationPart.isCfnDocumentationPart(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDocumentationPartPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDocumentationPartPropsMixin = CfnDocumentationPartPropsMixin;
// @ts-ignore TS6133
function flattenCfnDocumentationPartMixinProps(props) {
    const ret = {};
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::DocumentationVersion` resource creates a snapshot of the documentation for an API.
 *
 * For more information, see [Representation of API Documentation in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api-content-representation.html) in the *API Gateway Developer Guide* .
 *
 * @cloudformationResource AWS::ApiGateway::DocumentationVersion
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationversion.html
 */
class CfnDocumentationVersionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnDocumentationVersionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "documentationVersion", "restApiId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::DocumentationVersion`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnDocumentationVersionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDocumentationVersionPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDocumentationVersionMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDocumentationVersion.isCfnDocumentationVersion(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDocumentationVersionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDocumentationVersionPropsMixin = CfnDocumentationVersionPropsMixin;
// @ts-ignore TS6133
function flattenCfnDocumentationVersionMixinProps(props) {
    const ret = {};
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::DomainName` resource specifies a public custom domain name for your API in API Gateway.
 *
 * To create a custom domain name for private APIs, use [AWS::ApiGateway::DomainNameV2](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainnamev2.html) .
 *
 * You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see [Set up Custom Domain Name for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) in the *API Gateway Developer Guide* .
 *
 * @cloudformationResource AWS::ApiGateway::DomainName
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html
 */
class CfnDomainNamePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnDomainNamePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["certificateArn", "domainName", "endpointAccessMode", "endpointConfiguration", "mutualTlsAuthentication", "ownershipVerificationCertificateArn", "regionalCertificateArn", "routingMode", "securityPolicy", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::DomainName`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnDomainNameMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDomainNamePropsMixin);
            }
            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.CfnDomainName.isCfnDomainName(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDomainNamePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDomainNamePropsMixin = CfnDomainNamePropsMixin;
/**
 * The `AWS::ApiGateway::GatewayResponse` resource creates a gateway response for your API.
 *
 * When you delete a stack containing this resource, your custom gateway responses are reset. For more information, see [API Gateway Responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html#api-gateway-gatewayResponse-definition) in the *API Gateway Developer Guide* .
 *
 * @cloudformationResource AWS::ApiGateway::GatewayResponse
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html
 */
class CfnGatewayResponsePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnGatewayResponsePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["responseParameters", "responseTemplates", "responseType", "restApiId", "statusCode"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::GatewayResponse`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnGatewayResponseMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnGatewayResponsePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnGatewayResponseMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnGatewayResponse.isCfnGatewayResponse(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnGatewayResponsePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnGatewayResponsePropsMixin = CfnGatewayResponsePropsMixin;
// @ts-ignore TS6133
function flattenCfnGatewayResponseMixinProps(props) {
    const ret = {};
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::Method` resource creates API Gateway methods that define the parameters and body that clients must send in their requests.
 *
 * @cloudformationResource AWS::ApiGateway::Method
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html
 */
class CfnMethodPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnMethodPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["apiKeyRequired", "authorizationScopes", "authorizationType", "authorizerId", "httpMethod", "integration", "methodResponses", "operationName", "requestModels", "requestParameters", "requestValidatorId", "resourceId", "restApiId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Method`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnMethodMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnMethodPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnMethodMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnMethod.isCfnMethod(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnMethodPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnMethodPropsMixin = CfnMethodPropsMixin;
// @ts-ignore TS6133
function flattenCfnMethodPropsMixinIntegrationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        cacheKeyParameters: (!props.cacheKeyParameters ? undefined : props.cacheKeyParameters),
        cacheNamespace: (!props.cacheNamespace ? undefined : props.cacheNamespace),
        connectionId: (!props.connectionId ? undefined : cdk.getRefProperty(props.connectionId?.vpcLinkRef, 'vpcLinkId') ?? cdk.ensureStringOrUndefined(props.connectionId, "connectionId", "apigateway.IVpcLinkRef | string")),
        connectionType: (!props.connectionType ? undefined : props.connectionType),
        contentHandling: (!props.contentHandling ? undefined : props.contentHandling),
        credentials: (!props.credentials ? undefined : cdk.getRefProperty(props.credentials?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.credentials, "credentials", "iam.IRoleRef | string")),
        integrationHttpMethod: (!props.integrationHttpMethod ? undefined : props.integrationHttpMethod),
        integrationResponses: (!props.integrationResponses ? undefined : props.integrationResponses),
        integrationTarget: (!props.integrationTarget ? undefined : props.integrationTarget),
        passthroughBehavior: (!props.passthroughBehavior ? undefined : props.passthroughBehavior),
        requestParameters: (!props.requestParameters ? undefined : props.requestParameters),
        requestTemplates: (!props.requestTemplates ? undefined : props.requestTemplates),
        responseTransferMode: (!props.responseTransferMode ? undefined : props.responseTransferMode),
        timeoutInMillis: (!props.timeoutInMillis ? undefined : props.timeoutInMillis),
        type: (!props.type ? undefined : props.type),
        uri: (!props.uri ? undefined : cdk.getRefProperty(props.uri?.functionRef, 'functionArn') ?? cdk.getRefProperty(props.uri?.aliasRef, 'aliasArn') ?? cdk.ensureStringOrUndefined(props.uri, "uri", "lambda.IFunctionRef | lambda.IAliasRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnMethodMixinProps(props) {
    const ret = {};
    if ((props.authorizerId !== undefined))
        ret.authorizerId = cdk.getRefProperty(props.authorizerId?.authorizerRef, 'authorizerId') ?? cdk.ensureStringOrUndefined(props.authorizerId, "authorizerId", "apigateway.IAuthorizerRef | string");
    if ((props.integration !== undefined))
        ret.integration = flattenCfnMethodPropsMixinIntegrationProperty(props.integration);
    if ((props.requestValidatorId !== undefined))
        ret.requestValidatorId = cdk.getRefProperty(props.requestValidatorId?.requestValidatorRef, 'requestValidatorId') ?? cdk.ensureStringOrUndefined(props.requestValidatorId, "requestValidatorId", "apigateway.IRequestValidatorRef | string");
    if ((props.resourceId !== undefined))
        ret.resourceId = cdk.getRefProperty(props.resourceId?.resourceRef, 'resourceId') ?? cdk.ensureStringOrUndefined(props.resourceId, "resourceId", "apigateway.IResourceRef | string");
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::Model` resource defines the structure of a request or response payload for an API method.
 *
 * @cloudformationResource AWS::ApiGateway::Model
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html
 */
class CfnModelPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnModelPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["contentType", "description", "name", "restApiId", "schema"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Model`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnModelMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnModelPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnModelMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnModel.isCfnModel(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnModelPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnModelPropsMixin = CfnModelPropsMixin;
// @ts-ignore TS6133
function flattenCfnModelMixinProps(props) {
    const ret = {};
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::RequestValidator` resource sets up basic validation rules for incoming requests to your API.
 *
 * For more information, see [Enable Basic Request Validation for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) in the *API Gateway Developer Guide* .
 *
 * @cloudformationResource AWS::ApiGateway::RequestValidator
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-requestvalidator.html
 */
class CfnRequestValidatorPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnRequestValidatorPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["name", "restApiId", "validateRequestBody", "validateRequestParameters"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::RequestValidator`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnRequestValidatorMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnRequestValidatorPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnRequestValidatorMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnRequestValidator.isCfnRequestValidator(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnRequestValidatorPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnRequestValidatorPropsMixin = CfnRequestValidatorPropsMixin;
// @ts-ignore TS6133
function flattenCfnRequestValidatorMixinProps(props) {
    const ret = {};
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::Resource` resource creates a resource in an API.
 *
 * @cloudformationResource AWS::ApiGateway::Resource
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html
 */
class CfnResourcePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnResourcePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["parentId", "pathPart", "restApiId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Resource`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnResourceMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnResourcePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnResourceMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnResource.isCfnResource(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnResourcePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnResourcePropsMixin = CfnResourcePropsMixin;
// @ts-ignore TS6133
function flattenCfnResourceMixinProps(props) {
    const ret = {};
    if ((props.parentId !== undefined))
        ret.parentId = cdk.getRefProperty(props.parentId?.resourceRef, 'resourceId') ?? cdk.ensureStringOrUndefined(props.parentId, "parentId", "apigateway.IResourceRef | string");
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::RestApi` resource creates a REST API.
 *
 * For more information, see [restapi:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateRestApi.html) in the *Amazon API Gateway REST API Reference* .
 *
 * > On January 1, 2016, the Swagger Specification was donated to the [OpenAPI initiative](https://docs.aws.amazon.com/https://www.openapis.org/) , becoming the foundation of the OpenAPI Specification.
 *
 * @cloudformationResource AWS::ApiGateway::RestApi
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html
 */
class CfnRestApiPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnRestApiPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["apiKeySourceType", "binaryMediaTypes", "body", "bodyS3Location", "cloneFrom", "description", "disableExecuteApiEndpoint", "endpointAccessMode", "endpointConfiguration", "failOnWarnings", "minimumCompressionSize", "mode", "name", "parameters", "policy", "securityPolicy", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::RestApi`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnRestApiMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnRestApiPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnRestApiMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnRestApi.isCfnRestApi(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnRestApiPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnRestApiPropsMixin = CfnRestApiPropsMixin;
// @ts-ignore TS6133
function flattenCfnRestApiPropsMixinS3LocationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bucket: (!props.bucket ? undefined : cdk.getRefProperty(props.bucket?.bucketRef, 'bucketName') ?? cdk.ensureStringOrUndefined(props.bucket, "bucket", "s3.IBucketRef | string")),
        eTag: (!props.eTag ? undefined : props.eTag),
        key: (!props.key ? undefined : props.key),
        version: (!props.version ? undefined : props.version)
    };
}
// @ts-ignore TS6133
function flattenCfnRestApiPropsMixinEndpointConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        ipAddressType: (!props.ipAddressType ? undefined : props.ipAddressType),
        types: (!props.types ? undefined : props.types),
        vpcEndpointIds: (!props.vpcEndpointIds ? undefined : cdk.mapArrayInPlace(props.vpcEndpointIds, (item) => cdk.getRefProperty(item?.vpcEndpointRef, 'vpcEndpointId') ?? cdk.ensureStringOrUndefined(item, "vpcEndpointIds", "ec2.IVPCEndpointRef | string")))
    };
}
// @ts-ignore TS6133
function flattenCfnRestApiMixinProps(props) {
    const ret = {};
    if ((props.bodyS3Location !== undefined))
        ret.bodyS3Location = flattenCfnRestApiPropsMixinS3LocationProperty(props.bodyS3Location);
    if ((props.cloneFrom !== undefined))
        ret.cloneFrom = cdk.getRefProperty(props.cloneFrom?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.cloneFrom, "cloneFrom", "apigateway.IRestApiRef | string");
    if ((props.endpointConfiguration !== undefined))
        ret.endpointConfiguration = flattenCfnRestApiPropsMixinEndpointConfigurationProperty(props.endpointConfiguration);
    return ret;
}
/**
 * The `AWS::ApiGateway::Stage` resource creates a stage for a deployment.
 *
 * @cloudformationResource AWS::ApiGateway::Stage
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html
 */
class CfnStagePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnStagePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["accessLogSetting", "cacheClusterEnabled", "cacheClusterSize", "canarySetting", "clientCertificateId", "deploymentId", "description", "documentationVersion", "methodSettings", "restApiId", "stageName", "tags", "tracingEnabled", "variables"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::Stage`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnStageMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnStagePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnStageMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnStage.isCfnStage(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnStagePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnStagePropsMixin = CfnStagePropsMixin;
// @ts-ignore TS6133
function flattenCfnStagePropsMixinCanarySettingProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        deploymentId: (!props.deploymentId ? undefined : cdk.getRefProperty(props.deploymentId?.deploymentRef, 'deploymentId') ?? cdk.ensureStringOrUndefined(props.deploymentId, "deploymentId", "apigateway.IDeploymentRef | string")),
        percentTraffic: (!props.percentTraffic ? undefined : props.percentTraffic),
        stageVariableOverrides: (!props.stageVariableOverrides ? undefined : props.stageVariableOverrides),
        useStageCache: (!props.useStageCache ? undefined : props.useStageCache)
    };
}
// @ts-ignore TS6133
function flattenCfnStagePropsMixinAccessLogSettingProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        destinationArn: (!props.destinationArn ? undefined : cdk.getRefProperty(props.destinationArn?.logGroupRef, 'logGroupArn') ?? cdk.ensureStringOrUndefined(props.destinationArn, "destinationArn", "logs.ILogGroupRef | string")),
        format: (!props.format ? undefined : props.format)
    };
}
// @ts-ignore TS6133
function flattenCfnStageMixinProps(props) {
    const ret = {};
    if ((props.accessLogSetting !== undefined))
        ret.accessLogSetting = flattenCfnStagePropsMixinAccessLogSettingProperty(props.accessLogSetting);
    if ((props.canarySetting !== undefined))
        ret.canarySetting = flattenCfnStagePropsMixinCanarySettingProperty(props.canarySetting);
    if ((props.clientCertificateId !== undefined))
        ret.clientCertificateId = cdk.getRefProperty(props.clientCertificateId?.clientCertificateRef, 'clientCertificateId') ?? cdk.ensureStringOrUndefined(props.clientCertificateId, "clientCertificateId", "apigateway.IClientCertificateRef | string");
    if ((props.deploymentId !== undefined))
        ret.deploymentId = cdk.getRefProperty(props.deploymentId?.deploymentRef, 'deploymentId') ?? cdk.ensureStringOrUndefined(props.deploymentId, "deploymentId", "apigateway.IDeploymentRef | string");
    if ((props.restApiId !== undefined))
        ret.restApiId = cdk.getRefProperty(props.restApiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.restApiId, "restApiId", "apigateway.IRestApiRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::UsagePlan` resource creates a usage plan for deployed APIs.
 *
 * A usage plan sets a target for the throttling and quota limits on individual client API keys. For more information, see [Creating and Using API Usage Plans in Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) in the *API Gateway Developer Guide* .
 *
 * In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using [AWS Budgets](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) to monitor costs and [AWS WAF](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) to manage API requests.
 *
 * @cloudformationResource AWS::ApiGateway::UsagePlan
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html
 */
class CfnUsagePlanPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnUsagePlanPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["apiStages", "description", "quota", "tags", "throttle", "usagePlanName"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::UsagePlan`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnUsagePlanMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnUsagePlanPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnUsagePlanMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnUsagePlan.isCfnUsagePlan(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnUsagePlanPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnUsagePlanPropsMixin = CfnUsagePlanPropsMixin;
// @ts-ignore TS6133
function flattenCfnUsagePlanPropsMixinApiStageProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        apiId: (!props.apiId ? undefined : cdk.getRefProperty(props.apiId?.restApiRef, 'restApiId') ?? cdk.ensureStringOrUndefined(props.apiId, "apiId", "apigateway.IRestApiRef | string")),
        stage: (!props.stage ? undefined : cdk.getRefProperty(props.stage?.stageRef, 'stageName') ?? cdk.ensureStringOrUndefined(props.stage, "stage", "apigateway.IStageRef | string")),
        throttle: (!props.throttle ? undefined : props.throttle)
    };
}
// @ts-ignore TS6133
function flattenCfnUsagePlanMixinProps(props) {
    const ret = {};
    if ((props.apiStages !== undefined))
        ret.apiStages = (cdk.isResolvableObject(props.apiStages) ? props.apiStages : cdk.mapArrayInPlace(props.apiStages, (item) => flattenCfnUsagePlanPropsMixinApiStageProperty(item)));
    return ret;
}
/**
 * The `AWS::ApiGateway::UsagePlanKey` resource associates an API key with a usage plan.
 *
 * This association determines which users the usage plan is applied to.
 *
 * @cloudformationResource AWS::ApiGateway::UsagePlanKey
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplankey.html
 */
class CfnUsagePlanKeyPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnUsagePlanKeyPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["keyId", "keyType", "usagePlanId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::UsagePlanKey`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnUsagePlanKeyMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnUsagePlanKeyPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnUsagePlanKeyMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnUsagePlanKey.isCfnUsagePlanKey(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnUsagePlanKeyPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnUsagePlanKeyPropsMixin = CfnUsagePlanKeyPropsMixin;
// @ts-ignore TS6133
function flattenCfnUsagePlanKeyMixinProps(props) {
    const ret = {};
    if ((props.keyId !== undefined))
        ret.keyId = cdk.getRefProperty(props.keyId?.apiKeyRef, 'apiKeyId') ?? cdk.ensureStringOrUndefined(props.keyId, "keyId", "apigateway.IApiKeyRef | string");
    if ((props.usagePlanId !== undefined))
        ret.usagePlanId = cdk.getRefProperty(props.usagePlanId?.usagePlanRef, 'usagePlanId') ?? cdk.ensureStringOrUndefined(props.usagePlanId, "usagePlanId", "apigateway.IUsagePlanRef | string");
    return ret;
}
/**
 * The `AWS::ApiGateway::VpcLink` resource creates an API Gateway VPC link for a REST API to access resources in an Amazon Virtual Private Cloud (VPC).
 *
 * For more information, see [vpclink:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateVpcLink.html) in the `Amazon API Gateway REST API Reference` .
 *
 * @cloudformationResource AWS::ApiGateway::VpcLink
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-vpclink.html
 */
class CfnVpcLinkPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnVpcLinkPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "name", "tags", "targetArns"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::VpcLink`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnVpcLinkMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnVpcLinkPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnVpcLinkMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnVpcLink.isCfnVpcLink(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnVpcLinkPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnVpcLinkPropsMixin = CfnVpcLinkPropsMixin;
// @ts-ignore TS6133
function flattenCfnVpcLinkMixinProps(props) {
    const ret = {};
    if ((props.targetArns !== undefined))
        ret.targetArns = cdk.mapArrayInPlace(props.targetArns, (item) => cdk.getRefProperty(item?.loadBalancerRef, 'loadBalancerArn') ?? cdk.ensureStringOrUndefined(item, "targetArns", "elasticloadbalancingv2.ILoadBalancerRef | string"));
    return ret;
}
/**
 * The `AWS::ApiGateway::BasePathMappingV2` resource creates a base path that clients who call your API must use in the invocation URL.
 *
 * Supported only for private custom domain names.
 *
 * @cloudformationResource AWS::ApiGateway::BasePathMappingV2
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-basepathmappingv2.html
 */
class CfnBasePathMappingV2PropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnBasePathMappingV2PropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["basePath", "domainNameArn", "restApiId", "stage"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::BasePathMappingV2`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnBasePathMappingV2MixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnBasePathMappingV2PropsMixin);
            }
            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.CfnBasePathMappingV2.isCfnBasePathMappingV2(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnBasePathMappingV2PropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnBasePathMappingV2PropsMixin = CfnBasePathMappingV2PropsMixin;
/**
 * The `AWS::ApiGateway::DomainNameAccessAssociation` resource creates a domain name access association between an access association source and a private custom domain name.
 *
 * Use a domain name access association to invoke a private custom domain name while isolated from the public internet.
 *
 * You can only create or delete a DomainNameAccessAssociation using CloudFormation. To reject a domain name access association, use the AWS CLI.
 *
 * @cloudformationResource AWS::ApiGateway::DomainNameAccessAssociation
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainnameaccessassociation.html
 */
class CfnDomainNameAccessAssociationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnDomainNameAccessAssociationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["accessAssociationSource", "accessAssociationSourceType", "domainNameArn", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::DomainNameAccessAssociation`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnDomainNameAccessAssociationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDomainNameAccessAssociationPropsMixin);
            }
            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.CfnDomainNameAccessAssociation.isCfnDomainNameAccessAssociation(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDomainNameAccessAssociationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDomainNameAccessAssociationPropsMixin = CfnDomainNameAccessAssociationPropsMixin;
/**
 * The `AWS::ApiGateway::DomainNameV2` resource specifies a custom domain name for your private APIs in API Gateway.
 *
 * You can use a private custom domain name to provide a URL for your private API that's more intuitive and easier to recall.
 *
 * @cloudformationResource AWS::ApiGateway::DomainNameV2
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainnamev2.html
 */
class CfnDomainNameV2PropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_apigateway.CfnDomainNameV2PropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["certificateArn", "domainName", "endpointAccessMode", "endpointConfiguration", "policy", "routingMode", "securityPolicy", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ApiGateway::DomainNameV2`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_apigateway_CfnDomainNameV2MixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDomainNameV2PropsMixin);
            }
            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.CfnDomainNameV2.isCfnDomainNameV2(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDomainNameV2PropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDomainNameV2PropsMixin = CfnDomainNameV2PropsMixin;
