"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.CfnDeliveryStreamPropsMixin = 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-kinesisfirehose"));
/**
 * The `AWS::KinesisFirehose::DeliveryStream` resource specifies an Amazon Kinesis Data Firehose (Kinesis Data Firehose) delivery stream that delivers real-time streaming data to an Amazon Simple Storage Service (Amazon S3), Amazon Redshift, or Amazon Elasticsearch Service (Amazon ES) destination.
 *
 * For more information, see [Creating an Amazon Kinesis Data Firehose Delivery Stream](https://docs.aws.amazon.com/firehose/latest/dev/basic-create.html) in the *Amazon Kinesis Data Firehose Developer Guide* .
 *
 * @cloudformationResource AWS::KinesisFirehose::DeliveryStream
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesisfirehose-deliverystream.html
 */
class CfnDeliveryStreamPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_kinesisfirehose.CfnDeliveryStreamPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["amazonOpenSearchServerlessDestinationConfiguration", "amazonopensearchserviceDestinationConfiguration", "databaseSourceConfiguration", "deliveryStreamEncryptionConfigurationInput", "deliveryStreamName", "deliveryStreamType", "directPutSourceConfiguration", "elasticsearchDestinationConfiguration", "extendedS3DestinationConfiguration", "httpEndpointDestinationConfiguration", "icebergDestinationConfiguration", "kinesisStreamSourceConfiguration", "mskSourceConfiguration", "redshiftDestinationConfiguration", "s3DestinationConfiguration", "snowflakeDestinationConfiguration", "splunkDestinationConfiguration", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::KinesisFirehose::DeliveryStream`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_kinesisfirehose_CfnDeliveryStreamMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDeliveryStreamPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDeliveryStreamMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDeliveryStream.isCfnDeliveryStream(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDeliveryStreamPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDeliveryStreamPropsMixin = CfnDeliveryStreamPropsMixin;
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinDeliveryStreamEncryptionConfigurationInputProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        keyArn: (!props.keyArn ? undefined : cdk.getRefProperty(props.keyArn?.keyRef, 'keyArn') ?? cdk.ensureStringOrUndefined(props.keyArn, "keyArn", "kms.IKeyRef | string")),
        keyType: (!props.keyType ? undefined : props.keyType)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinKMSEncryptionConfigProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        awskmsKeyArn: (!props.awskmsKeyArn ? undefined : cdk.getRefProperty(props.awskmsKeyArn?.keyRef, 'keyArn') ?? cdk.ensureStringOrUndefined(props.awskmsKeyArn, "awskmsKeyArn", "kms.IKeyRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinEncryptionConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        kmsEncryptionConfig: (!props.kmsEncryptionConfig ? undefined : (!props.kmsEncryptionConfig ? undefined : flattenCfnDeliveryStreamPropsMixinKMSEncryptionConfigProperty(props.kmsEncryptionConfig))),
        noEncryptionConfig: (!props.noEncryptionConfig ? undefined : props.noEncryptionConfig)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        enabled: (!props.enabled ? undefined : props.enabled),
        logGroupName: (!props.logGroupName ? undefined : cdk.getRefProperty(props.logGroupName?.logGroupRef, 'logGroupName') ?? cdk.ensureStringOrUndefined(props.logGroupName, "logGroupName", "logs.ILogGroupRef | string")),
        logStreamName: (!props.logStreamName ? undefined : cdk.getRefProperty(props.logStreamName?.logStreamRef, 'logStreamName') ?? cdk.getRefProperty(props.logStreamName?.logStreamRef, 'logGroupName') ?? cdk.getRefProperty(props.logStreamName?.logGroupRef, 'logGroupName') ?? cdk.ensureStringOrUndefined(props.logStreamName, "logStreamName", "logs.ILogStreamRef | logs.ILogGroupRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bucketArn: (!props.bucketArn ? undefined : cdk.getRefProperty(props.bucketArn?.bucketRef, 'bucketArn') ?? cdk.ensureStringOrUndefined(props.bucketArn, "bucketArn", "s3.IBucketRef | string")),
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        compressionFormat: (!props.compressionFormat ? undefined : props.compressionFormat),
        encryptionConfiguration: (!props.encryptionConfiguration ? undefined : (!props.encryptionConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinEncryptionConfigurationProperty(props.encryptionConfiguration))),
        errorOutputPrefix: (!props.errorOutputPrefix ? undefined : props.errorOutputPrefix),
        prefix: (!props.prefix ? undefined : props.prefix),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinProcessorParameterProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        parameterName: (!props.parameterName ? undefined : props.parameterName),
        parameterValue: (!props.parameterValue ? undefined : cdk.getRefProperty(props.parameterValue?.functionRef, 'functionArn') ?? cdk.getRefProperty(props.parameterValue?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.parameterValue, "parameterValue", "lambda.IFunctionRef | iam.IRoleRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinProcessorProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        parameters: (!props.parameters ? undefined : (cdk.isResolvableObject(props.parameters) ? props.parameters : (!props.parameters ? undefined : cdk.mapArrayInPlace(props.parameters, (item) => flattenCfnDeliveryStreamPropsMixinProcessorParameterProperty(item))))),
        type: (!props.type ? undefined : props.type)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        enabled: (!props.enabled ? undefined : props.enabled),
        processors: (!props.processors ? undefined : (cdk.isResolvableObject(props.processors) ? props.processors : (!props.processors ? undefined : cdk.mapArrayInPlace(props.processors, (item) => flattenCfnDeliveryStreamPropsMixinProcessorProperty(item)))))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinHttpEndpointDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        endpointConfiguration: (!props.endpointConfiguration ? undefined : props.endpointConfiguration),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        requestConfiguration: (!props.requestConfiguration ? undefined : props.requestConfiguration),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : props.roleArn),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        secretsManagerConfiguration: (!props.secretsManagerConfiguration ? undefined : props.secretsManagerConfiguration)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinKinesisStreamSourceConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        kinesisStreamArn: (!props.kinesisStreamArn ? undefined : cdk.getRefProperty(props.kinesisStreamArn?.streamRef, 'streamArn') ?? cdk.ensureStringOrUndefined(props.kinesisStreamArn, "kinesisStreamArn", "kinesis.IStreamRef | string")),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string"))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinRedshiftDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        clusterJdbcurl: (!props.clusterJdbcurl ? undefined : props.clusterJdbcurl),
        copyCommand: (!props.copyCommand ? undefined : props.copyCommand),
        password: (!props.password ? undefined : props.password),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        s3BackupConfiguration: (!props.s3BackupConfiguration ? undefined : (!props.s3BackupConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3BackupConfiguration))),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        secretsManagerConfiguration: (!props.secretsManagerConfiguration ? undefined : props.secretsManagerConfiguration),
        username: (!props.username ? undefined : props.username)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinVpcConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        securityGroupIds: (!props.securityGroupIds ? undefined : cdk.mapArrayInPlace(props.securityGroupIds, (item) => cdk.getRefProperty(item?.securityGroupRef, 'securityGroupId') ?? cdk.ensureStringOrUndefined(item, "securityGroupIds", "ec2.ISecurityGroupRef | string"))),
        subnetIds: (!props.subnetIds ? undefined : cdk.mapArrayInPlace(props.subnetIds, (item) => cdk.getRefProperty(item?.subnetRef, 'subnetId') ?? cdk.ensureStringOrUndefined(item, "subnetIds", "ec2.ISubnetRef | string")))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinAmazonopensearchserviceDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        clusterEndpoint: (!props.clusterEndpoint ? undefined : props.clusterEndpoint),
        documentIdOptions: (!props.documentIdOptions ? undefined : props.documentIdOptions),
        domainArn: (!props.domainArn ? undefined : cdk.getRefProperty(props.domainArn?.domainRef, 'domainArn') ?? cdk.ensureStringOrUndefined(props.domainArn, "domainArn", "opensearchservice.IDomainRef | string")),
        indexName: (!props.indexName ? undefined : props.indexName),
        indexRotationPeriod: (!props.indexRotationPeriod ? undefined : props.indexRotationPeriod),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        typeName: (!props.typeName ? undefined : props.typeName),
        vpcConfiguration: (!props.vpcConfiguration ? undefined : (!props.vpcConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinVpcConfigurationProperty(props.vpcConfiguration)))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinSplunkDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        hecAcknowledgmentTimeoutInSeconds: (!props.hecAcknowledgmentTimeoutInSeconds ? undefined : props.hecAcknowledgmentTimeoutInSeconds),
        hecEndpoint: (!props.hecEndpoint ? undefined : props.hecEndpoint),
        hecEndpointType: (!props.hecEndpointType ? undefined : props.hecEndpointType),
        hecToken: (!props.hecToken ? undefined : props.hecToken),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        secretsManagerConfiguration: (!props.secretsManagerConfiguration ? undefined : props.secretsManagerConfiguration)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinSchemaConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        catalogId: (!props.catalogId ? undefined : props.catalogId),
        databaseName: (!props.databaseName ? undefined : props.databaseName),
        region: (!props.region ? undefined : props.region),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        tableName: (!props.tableName ? undefined : props.tableName),
        versionId: (!props.versionId ? undefined : props.versionId)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinDataFormatConversionConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        enabled: (!props.enabled ? undefined : props.enabled),
        inputFormatConfiguration: (!props.inputFormatConfiguration ? undefined : props.inputFormatConfiguration),
        outputFormatConfiguration: (!props.outputFormatConfiguration ? undefined : props.outputFormatConfiguration),
        schemaConfiguration: (!props.schemaConfiguration ? undefined : (!props.schemaConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinSchemaConfigurationProperty(props.schemaConfiguration)))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinExtendedS3DestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bucketArn: (!props.bucketArn ? undefined : cdk.getRefProperty(props.bucketArn?.bucketRef, 'bucketArn') ?? cdk.ensureStringOrUndefined(props.bucketArn, "bucketArn", "s3.IBucketRef | string")),
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        compressionFormat: (!props.compressionFormat ? undefined : props.compressionFormat),
        customTimeZone: (!props.customTimeZone ? undefined : props.customTimeZone),
        dataFormatConversionConfiguration: (!props.dataFormatConversionConfiguration ? undefined : (!props.dataFormatConversionConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinDataFormatConversionConfigurationProperty(props.dataFormatConversionConfiguration))),
        dynamicPartitioningConfiguration: (!props.dynamicPartitioningConfiguration ? undefined : props.dynamicPartitioningConfiguration),
        encryptionConfiguration: (!props.encryptionConfiguration ? undefined : (!props.encryptionConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinEncryptionConfigurationProperty(props.encryptionConfiguration))),
        errorOutputPrefix: (!props.errorOutputPrefix ? undefined : props.errorOutputPrefix),
        fileExtension: (!props.fileExtension ? undefined : props.fileExtension),
        prefix: (!props.prefix ? undefined : props.prefix),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        s3BackupConfiguration: (!props.s3BackupConfiguration ? undefined : (!props.s3BackupConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3BackupConfiguration))),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinAmazonOpenSearchServerlessDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        collectionEndpoint: (!props.collectionEndpoint ? undefined : props.collectionEndpoint),
        indexName: (!props.indexName ? undefined : props.indexName),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        vpcConfiguration: (!props.vpcConfiguration ? undefined : (!props.vpcConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinVpcConfigurationProperty(props.vpcConfiguration)))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinElasticsearchDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        clusterEndpoint: (!props.clusterEndpoint ? undefined : props.clusterEndpoint),
        documentIdOptions: (!props.documentIdOptions ? undefined : props.documentIdOptions),
        domainArn: (!props.domainArn ? undefined : cdk.getRefProperty(props.domainArn?.domainRef, 'domainArn') ?? cdk.getRefProperty(props.domainArn?.domainRef, 'domainArn') ?? cdk.ensureStringOrUndefined(props.domainArn, "domainArn", "elasticsearch.IDomainRef | opensearchservice.IDomainRef | string")),
        indexName: (!props.indexName ? undefined : props.indexName),
        indexRotationPeriod: (!props.indexRotationPeriod ? undefined : props.indexRotationPeriod),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : cdk.getRefProperty(props.roleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.roleArn, "roleArn", "iam.IRoleRef | string")),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        typeName: (!props.typeName ? undefined : props.typeName),
        vpcConfiguration: (!props.vpcConfiguration ? undefined : (!props.vpcConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinVpcConfigurationProperty(props.vpcConfiguration)))
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinIcebergDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        appendOnly: (!props.appendOnly ? undefined : props.appendOnly),
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        catalogConfiguration: (!props.catalogConfiguration ? undefined : props.catalogConfiguration),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        destinationTableConfigurationList: (!props.destinationTableConfigurationList ? undefined : props.destinationTableConfigurationList),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : props.roleArn),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        schemaEvolutionConfiguration: (!props.schemaEvolutionConfiguration ? undefined : props.schemaEvolutionConfiguration),
        tableCreationConfiguration: (!props.tableCreationConfiguration ? undefined : props.tableCreationConfiguration)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamPropsMixinSnowflakeDestinationConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        accountUrl: (!props.accountUrl ? undefined : props.accountUrl),
        bufferingHints: (!props.bufferingHints ? undefined : props.bufferingHints),
        cloudWatchLoggingOptions: (!props.cloudWatchLoggingOptions ? undefined : (!props.cloudWatchLoggingOptions ? undefined : flattenCfnDeliveryStreamPropsMixinCloudWatchLoggingOptionsProperty(props.cloudWatchLoggingOptions))),
        contentColumnName: (!props.contentColumnName ? undefined : props.contentColumnName),
        database: (!props.database ? undefined : props.database),
        dataLoadingOption: (!props.dataLoadingOption ? undefined : props.dataLoadingOption),
        keyPassphrase: (!props.keyPassphrase ? undefined : props.keyPassphrase),
        metaDataColumnName: (!props.metaDataColumnName ? undefined : props.metaDataColumnName),
        privateKey: (!props.privateKey ? undefined : props.privateKey),
        processingConfiguration: (!props.processingConfiguration ? undefined : (!props.processingConfiguration ? undefined : flattenCfnDeliveryStreamPropsMixinProcessingConfigurationProperty(props.processingConfiguration))),
        retryOptions: (!props.retryOptions ? undefined : props.retryOptions),
        roleArn: (!props.roleArn ? undefined : props.roleArn),
        s3BackupMode: (!props.s3BackupMode ? undefined : props.s3BackupMode),
        s3Configuration: (!props.s3Configuration ? undefined : flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3Configuration)),
        schema: (!props.schema ? undefined : props.schema),
        secretsManagerConfiguration: (!props.secretsManagerConfiguration ? undefined : props.secretsManagerConfiguration),
        snowflakeRoleConfiguration: (!props.snowflakeRoleConfiguration ? undefined : props.snowflakeRoleConfiguration),
        snowflakeVpcConfiguration: (!props.snowflakeVpcConfiguration ? undefined : props.snowflakeVpcConfiguration),
        table: (!props.table ? undefined : props.table),
        user: (!props.user ? undefined : props.user)
    };
}
// @ts-ignore TS6133
function flattenCfnDeliveryStreamMixinProps(props) {
    const ret = {};
    if ((props.amazonOpenSearchServerlessDestinationConfiguration !== undefined))
        ret.amazonOpenSearchServerlessDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinAmazonOpenSearchServerlessDestinationConfigurationProperty(props.amazonOpenSearchServerlessDestinationConfiguration);
    if ((props.amazonopensearchserviceDestinationConfiguration !== undefined))
        ret.amazonopensearchserviceDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinAmazonopensearchserviceDestinationConfigurationProperty(props.amazonopensearchserviceDestinationConfiguration);
    if ((props.deliveryStreamEncryptionConfigurationInput !== undefined))
        ret.deliveryStreamEncryptionConfigurationInput = flattenCfnDeliveryStreamPropsMixinDeliveryStreamEncryptionConfigurationInputProperty(props.deliveryStreamEncryptionConfigurationInput);
    if ((props.deliveryStreamName !== undefined))
        ret.deliveryStreamName = cdk.getRefProperty(props.deliveryStreamName?.streamRef, 'streamName') ?? cdk.ensureStringOrUndefined(props.deliveryStreamName, "deliveryStreamName", "kinesis.IStreamRef | string");
    if ((props.elasticsearchDestinationConfiguration !== undefined))
        ret.elasticsearchDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinElasticsearchDestinationConfigurationProperty(props.elasticsearchDestinationConfiguration);
    if ((props.extendedS3DestinationConfiguration !== undefined))
        ret.extendedS3DestinationConfiguration = flattenCfnDeliveryStreamPropsMixinExtendedS3DestinationConfigurationProperty(props.extendedS3DestinationConfiguration);
    if ((props.httpEndpointDestinationConfiguration !== undefined))
        ret.httpEndpointDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinHttpEndpointDestinationConfigurationProperty(props.httpEndpointDestinationConfiguration);
    if ((props.icebergDestinationConfiguration !== undefined))
        ret.icebergDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinIcebergDestinationConfigurationProperty(props.icebergDestinationConfiguration);
    if ((props.kinesisStreamSourceConfiguration !== undefined))
        ret.kinesisStreamSourceConfiguration = flattenCfnDeliveryStreamPropsMixinKinesisStreamSourceConfigurationProperty(props.kinesisStreamSourceConfiguration);
    if ((props.redshiftDestinationConfiguration !== undefined))
        ret.redshiftDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinRedshiftDestinationConfigurationProperty(props.redshiftDestinationConfiguration);
    if ((props.s3DestinationConfiguration !== undefined))
        ret.s3DestinationConfiguration = flattenCfnDeliveryStreamPropsMixinS3DestinationConfigurationProperty(props.s3DestinationConfiguration);
    if ((props.snowflakeDestinationConfiguration !== undefined))
        ret.snowflakeDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinSnowflakeDestinationConfigurationProperty(props.snowflakeDestinationConfiguration);
    if ((props.splunkDestinationConfiguration !== undefined))
        ret.splunkDestinationConfiguration = flattenCfnDeliveryStreamPropsMixinSplunkDestinationConfigurationProperty(props.splunkDestinationConfiguration);
    return ret;
}
