"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.CfnIntegrationPropsMixin = exports.CfnScheduledActionPropsMixin = exports.CfnEventSubscriptionPropsMixin = exports.CfnEndpointAuthorizationPropsMixin = exports.CfnEndpointAccessPropsMixin = exports.CfnClusterSubnetGroupPropsMixin = exports.CfnClusterSecurityGroupIngressPropsMixin = exports.CfnClusterSecurityGroupPropsMixin = exports.CfnClusterParameterGroupPropsMixin = exports.CfnClusterPropsMixin = 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-redshift"));
/**
 * Specifies a cluster. A *cluster* is a fully managed data warehouse that consists of a set of compute nodes.
 *
 * To create a cluster in Virtual Private Cloud (VPC), you must provide a cluster subnet group name. The cluster subnet group identifies the subnets of your VPC that Amazon Redshift uses when creating the cluster. For more information about managing clusters, go to [Amazon Redshift Clusters](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html) in the *Amazon Redshift Cluster Management Guide* .
 *
 * @cloudformationResource AWS::Redshift::Cluster
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-cluster.html
 */
class CfnClusterPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnClusterPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["allowVersionUpgrade", "aquaConfigurationStatus", "automatedSnapshotRetentionPeriod", "availabilityZone", "availabilityZoneRelocation", "availabilityZoneRelocationStatus", "classic", "clusterIdentifier", "clusterParameterGroupName", "clusterSecurityGroups", "clusterSubnetGroupName", "clusterType", "clusterVersion", "dbName", "deferMaintenance", "deferMaintenanceDuration", "deferMaintenanceEndTime", "deferMaintenanceStartTime", "destinationRegion", "elasticIp", "encrypted", "endpoint", "enhancedVpcRouting", "hsmClientCertificateIdentifier", "hsmConfigurationIdentifier", "iamRoles", "kmsKeyId", "loggingProperties", "maintenanceTrackName", "manageMasterPassword", "manualSnapshotRetentionPeriod", "masterPasswordSecretKmsKeyId", "masterUsername", "masterUserPassword", "multiAz", "namespaceResourcePolicy", "nodeType", "numberOfNodes", "ownerAccount", "port", "preferredMaintenanceWindow", "publiclyAccessible", "resourceAction", "revisionTarget", "rotateEncryptionKey", "snapshotClusterIdentifier", "snapshotCopyGrantName", "snapshotCopyManual", "snapshotCopyRetentionPeriod", "snapshotIdentifier", "tags", "vpcSecurityGroupIds"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::Cluster`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnClusterMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnClusterPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnClusterMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnCluster.isCfnCluster(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnClusterPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnClusterPropsMixin = CfnClusterPropsMixin;
// @ts-ignore TS6133
function flattenCfnClusterPropsMixinLoggingPropertiesProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bucketName: (!props.bucketName ? undefined : cdk.getRefProperty(props.bucketName?.bucketRef, 'bucketName') ?? cdk.ensureStringOrUndefined(props.bucketName, "bucketName", "s3.IBucketRef | string")),
        logDestinationType: (!props.logDestinationType ? undefined : props.logDestinationType),
        logExports: (!props.logExports ? undefined : props.logExports),
        s3KeyPrefix: (!props.s3KeyPrefix ? undefined : props.s3KeyPrefix)
    };
}
// @ts-ignore TS6133
function flattenCfnClusterMixinProps(props) {
    const ret = {};
    if ((props.clusterParameterGroupName !== undefined))
        ret.clusterParameterGroupName = cdk.getRefProperty(props.clusterParameterGroupName?.clusterParameterGroupRef, 'parameterGroupName') ?? cdk.ensureStringOrUndefined(props.clusterParameterGroupName, "clusterParameterGroupName", "redshift.IClusterParameterGroupRef | string");
    if ((props.clusterSecurityGroups !== undefined))
        ret.clusterSecurityGroups = cdk.mapArrayInPlace(props.clusterSecurityGroups, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.getRefProperty(item?.clusterSecurityGroupRef, 'clusterSecurityGroupId') ?? cdk.ensureStringOrUndefined(item, "clusterSecurityGroups", "ec2.ISecurityGroupRef | redshift.IClusterSecurityGroupRef | string"));
    if ((props.clusterSubnetGroupName !== undefined))
        ret.clusterSubnetGroupName = cdk.getRefProperty(props.clusterSubnetGroupName?.clusterSubnetGroupRef, 'clusterSubnetGroupName') ?? cdk.ensureStringOrUndefined(props.clusterSubnetGroupName, "clusterSubnetGroupName", "redshift.IClusterSubnetGroupRef | string");
    if ((props.elasticIp !== undefined))
        ret.elasticIp = cdk.getRefProperty(props.elasticIp?.eipRef, 'publicIp') ?? cdk.getRefProperty(props.elasticIp?.eipRef, 'allocationId') ?? cdk.ensureStringOrUndefined(props.elasticIp, "elasticIp", "ec2.IEIPRef | string");
    if ((props.iamRoles !== undefined))
        ret.iamRoles = cdk.mapArrayInPlace(props.iamRoles, (item) => cdk.getRefProperty(item?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(item, "iamRoles", "iam.IRoleRef | string"));
    if ((props.kmsKeyId !== undefined))
        ret.kmsKeyId = cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyArn') ?? cdk.getRefProperty(props.kmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.kmsKeyId, "kmsKeyId", "kms.IKeyRef | string");
    if ((props.loggingProperties !== undefined))
        ret.loggingProperties = flattenCfnClusterPropsMixinLoggingPropertiesProperty(props.loggingProperties);
    if ((props.masterPasswordSecretKmsKeyId !== undefined))
        ret.masterPasswordSecretKmsKeyId = cdk.getRefProperty(props.masterPasswordSecretKmsKeyId?.keyRef, 'keyArn') ?? cdk.getRefProperty(props.masterPasswordSecretKmsKeyId?.keyRef, 'keyId') ?? cdk.ensureStringOrUndefined(props.masterPasswordSecretKmsKeyId, "masterPasswordSecretKmsKeyId", "kms.IKeyRef | string");
    if ((props.vpcSecurityGroupIds !== undefined))
        ret.vpcSecurityGroupIds = cdk.mapArrayInPlace(props.vpcSecurityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "vpcSecurityGroupIds", "ec2.ISecurityGroupRef | string"));
    return ret;
}
/**
 * Describes a parameter group.
 *
 * @cloudformationResource AWS::Redshift::ClusterParameterGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clusterparametergroup.html
 */
class CfnClusterParameterGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnClusterParameterGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "parameterGroupFamily", "parameterGroupName", "parameters", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::ClusterParameterGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnClusterParameterGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnClusterParameterGroupPropsMixin);
            }
            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.CfnClusterParameterGroup.isCfnClusterParameterGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnClusterParameterGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnClusterParameterGroupPropsMixin = CfnClusterParameterGroupPropsMixin;
/**
 * Specifies a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters.
 *
 * For information about managing security groups, go to [Amazon Redshift Cluster Security Groups](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) in the *Amazon Redshift Cluster Management Guide* .
 *
 * @cloudformationResource AWS::Redshift::ClusterSecurityGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroup.html
 */
class CfnClusterSecurityGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnClusterSecurityGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::ClusterSecurityGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnClusterSecurityGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnClusterSecurityGroupPropsMixin);
            }
            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.CfnClusterSecurityGroup.isCfnClusterSecurityGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnClusterSecurityGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnClusterSecurityGroupPropsMixin = CfnClusterSecurityGroupPropsMixin;
/**
 * Adds an inbound (ingress) rule to an Amazon Redshift security group.
 *
 * Depending on whether the application accessing your cluster is running on the Internet or an Amazon EC2 instance, you can authorize inbound access to either a Classless Interdomain Routing (CIDR)/Internet Protocol (IP) range or to an Amazon EC2 security group. You can add as many as 20 ingress rules to an Amazon Redshift security group.
 *
 * If you authorize access to an Amazon EC2 security group, specify *EC2SecurityGroupName* and *EC2SecurityGroupOwnerId* . The Amazon EC2 security group and Amazon Redshift cluster must be in the same AWS Region .
 *
 * If you authorize access to a CIDR/IP address range, specify *CIDRIP* . For an overview of CIDR blocks, see the Wikipedia article on [Classless Inter-Domain Routing](https://docs.aws.amazon.com/http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) .
 *
 * You must also associate the security group with a cluster so that clients running on these IP addresses or the EC2 instance are authorized to connect to the cluster. For information about managing security groups, go to [Working with Security Groups](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-security-groups.html) in the *Amazon Redshift Cluster Management Guide* .
 *
 * @cloudformationResource AWS::Redshift::ClusterSecurityGroupIngress
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersecuritygroupingress.html
 */
class CfnClusterSecurityGroupIngressPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnClusterSecurityGroupIngressPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["cidrip", "clusterSecurityGroupName", "ec2SecurityGroupName", "ec2SecurityGroupOwnerId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::ClusterSecurityGroupIngress`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnClusterSecurityGroupIngressMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnClusterSecurityGroupIngressPropsMixin);
            }
            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.CfnClusterSecurityGroupIngress.isCfnClusterSecurityGroupIngress(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnClusterSecurityGroupIngressPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnClusterSecurityGroupIngressPropsMixin = CfnClusterSecurityGroupIngressPropsMixin;
/**
 * Specifies an Amazon Redshift subnet group.
 *
 * You must provide a list of one or more subnets in your existing Amazon Virtual Private Cloud ( Amazon VPC ) when creating Amazon Redshift subnet group.
 *
 * For information about subnet groups, go to [Amazon Redshift Cluster Subnet Groups](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-cluster-subnet-groups.html) in the *Amazon Redshift Cluster Management Guide* .
 *
 * @cloudformationResource AWS::Redshift::ClusterSubnetGroup
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersubnetgroup.html
 */
class CfnClusterSubnetGroupPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnClusterSubnetGroupPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "subnetIds", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::ClusterSubnetGroup`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnClusterSubnetGroupMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnClusterSubnetGroupPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnClusterSubnetGroupMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnClusterSubnetGroup.isCfnClusterSubnetGroup(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnClusterSubnetGroupPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnClusterSubnetGroupPropsMixin = CfnClusterSubnetGroupPropsMixin;
// @ts-ignore TS6133
function flattenCfnClusterSubnetGroupMixinProps(props) {
    const ret = {};
    if ((props.subnetIds !== undefined))
        ret.subnetIds = cdk.mapArrayInPlace(props.subnetIds, (item) => cdk.getRefProperty(item?.subnetRef, 'subnetId') ?? cdk.ensureStringOrUndefined(item, "subnetIds", "ec2.ISubnetRef | string"));
    return ret;
}
/**
 * Creates a Redshift-managed VPC endpoint.
 *
 * @cloudformationResource AWS::Redshift::EndpointAccess
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-endpointaccess.html
 */
class CfnEndpointAccessPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnEndpointAccessPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["clusterIdentifier", "endpointName", "resourceOwner", "subnetGroupName", "vpcSecurityGroupIds"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::EndpointAccess`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnEndpointAccessMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnEndpointAccessPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnEndpointAccessMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnEndpointAccess.isCfnEndpointAccess(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnEndpointAccessPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnEndpointAccessPropsMixin = CfnEndpointAccessPropsMixin;
// @ts-ignore TS6133
function flattenCfnEndpointAccessPropsMixinVpcEndpointProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        networkInterfaces: (!props.networkInterfaces ? undefined : props.networkInterfaces),
        vpcEndpointId: (!props.vpcEndpointId ? undefined : cdk.getRefProperty(props.vpcEndpointId?.vpcEndpointRef, 'vpcEndpointId') ?? cdk.ensureStringOrUndefined(props.vpcEndpointId, "vpcEndpointId", "ec2.IVPCEndpointRef | string")),
        vpcId: (!props.vpcId ? undefined : props.vpcId)
    };
}
// @ts-ignore TS6133
function flattenCfnEndpointAccessMixinProps(props) {
    const ret = {};
    if ((props.subnetGroupName !== undefined))
        ret.subnetGroupName = cdk.getRefProperty(props.subnetGroupName?.clusterSubnetGroupRef, 'clusterSubnetGroupName') ?? cdk.ensureStringOrUndefined(props.subnetGroupName, "subnetGroupName", "redshift.IClusterSubnetGroupRef | string");
    if ((props.vpcSecurityGroupIds !== undefined))
        ret.vpcSecurityGroupIds = cdk.mapArrayInPlace(props.vpcSecurityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "vpcSecurityGroupIds", "ec2.ISecurityGroupRef | string"));
    return ret;
}
/**
 * Describes an endpoint authorization for authorizing Redshift-managed VPC endpoint access to a cluster across AWS accounts .
 *
 * @cloudformationResource AWS::Redshift::EndpointAuthorization
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-endpointauthorization.html
 */
class CfnEndpointAuthorizationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnEndpointAuthorizationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["account", "clusterIdentifier", "force", "vpcIds"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::EndpointAuthorization`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnEndpointAuthorizationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnEndpointAuthorizationPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnEndpointAuthorizationMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnEndpointAuthorization.isCfnEndpointAuthorization(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnEndpointAuthorizationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnEndpointAuthorizationPropsMixin = CfnEndpointAuthorizationPropsMixin;
// @ts-ignore TS6133
function flattenCfnEndpointAuthorizationMixinProps(props) {
    const ret = {};
    if ((props.vpcIds !== undefined))
        ret.vpcIds = cdk.mapArrayInPlace(props.vpcIds, (item) => cdk.getRefProperty(item?.vpcRef, 'vpcId') ?? cdk.ensureStringOrUndefined(item, "vpcIds", "ec2.IVPCRef | string"));
    return ret;
}
/**
 * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-eventsubscription.html.
 *
 * @cloudformationResource AWS::Redshift::EventSubscription
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-eventsubscription.html
 */
class CfnEventSubscriptionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnEventSubscriptionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["enabled", "eventCategories", "severity", "snsTopicArn", "sourceIds", "sourceType", "subscriptionName", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::EventSubscription`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnEventSubscriptionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnEventSubscriptionPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnEventSubscriptionMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnEventSubscription.isCfnEventSubscription(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnEventSubscriptionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnEventSubscriptionPropsMixin = CfnEventSubscriptionPropsMixin;
// @ts-ignore TS6133
function flattenCfnEventSubscriptionMixinProps(props) {
    const ret = {};
    if ((props.snsTopicArn !== undefined))
        ret.snsTopicArn = cdk.getRefProperty(props.snsTopicArn?.topicRef, 'topicArn') ?? cdk.ensureStringOrUndefined(props.snsTopicArn, "snsTopicArn", "sns.ITopicRef | string");
    return ret;
}
/**
 * Creates a scheduled action.
 *
 * A scheduled action contains a schedule and an Amazon Redshift API action. For example, you can create a schedule of when to run the `ResizeCluster` API operation.
 *
 * @cloudformationResource AWS::Redshift::ScheduledAction
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-scheduledaction.html
 */
class CfnScheduledActionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnScheduledActionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["enable", "endTime", "iamRole", "schedule", "scheduledActionDescription", "scheduledActionName", "startTime", "targetAction"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::ScheduledAction`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnScheduledActionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnScheduledActionPropsMixin);
            }
            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.CfnScheduledAction.isCfnScheduledAction(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnScheduledActionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnScheduledActionPropsMixin = CfnScheduledActionPropsMixin;
/**
 * Describes a zero-ETL or S3 integration.
 *
 * @cloudformationResource AWS::Redshift::Integration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html
 */
class CfnIntegrationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_redshift.CfnIntegrationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["additionalEncryptionContext", "integrationName", "kmsKeyId", "sourceArn", "tags", "targetArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Redshift::Integration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_redshift_CfnIntegrationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnIntegrationPropsMixin);
            }
            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.CfnIntegration.isCfnIntegration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnIntegrationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnIntegrationPropsMixin = CfnIntegrationPropsMixin;
