"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.CfnWorkflowPropsMixin = exports.CfnLifecyclePolicyPropsMixin = exports.CfnInfrastructureConfigurationPropsMixin = exports.CfnImageRecipePropsMixin = exports.CfnImagePipelinePropsMixin = exports.CfnImagePropsMixin = exports.CfnDistributionConfigurationPropsMixin = exports.CfnContainerRecipePropsMixin = exports.CfnComponentPropsMixin = 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-imagebuilder"));
/**
 * Creates a new component that can be used to build, validate, test, and assess your image.
 *
 * The component is based on a YAML document that you specify using exactly one of the following methods:
 *
 * - Inline, using the `data` property in the request body.
 * - A URL that points to a YAML document file stored in Amazon S3, using the `uri` property in the request body.
 *
 * @cloudformationResource AWS::ImageBuilder::Component
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-component.html
 */
class CfnComponentPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnComponentPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["changeDescription", "data", "description", "kmsKeyId", "name", "platform", "supportedOsVersions", "tags", "uri", "version"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::Component`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnComponentMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnComponentPropsMixin);
            }
            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.CfnComponent.isCfnComponent(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnComponentPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnComponentPropsMixin = CfnComponentPropsMixin;
/**
 * Creates a new container recipe.
 *
 * Container recipes define how images are configured, tested, and assessed.
 *
 * @cloudformationResource AWS::ImageBuilder::ContainerRecipe
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-containerrecipe.html
 */
class CfnContainerRecipePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnContainerRecipePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["components", "containerType", "description", "dockerfileTemplateData", "dockerfileTemplateUri", "imageOsVersionOverride", "instanceConfiguration", "kmsKeyId", "name", "parentImage", "platformOverride", "tags", "targetRepository", "version", "workingDirectory"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::ContainerRecipe`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnContainerRecipeMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnContainerRecipePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnContainerRecipeMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnContainerRecipe.isCfnContainerRecipe(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnContainerRecipePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnContainerRecipePropsMixin = CfnContainerRecipePropsMixin;
// @ts-ignore TS6133
function flattenCfnContainerRecipePropsMixinTargetContainerRepositoryProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        repositoryName: (!props.repositoryName ? undefined : cdk.getRefProperty(props.repositoryName?.repositoryRef, 'repositoryName') ?? cdk.ensureStringOrUndefined(props.repositoryName, "repositoryName", "ecr.IRepositoryRef | string")),
        service: (!props.service ? undefined : props.service)
    };
}
// @ts-ignore TS6133
function flattenCfnContainerRecipeMixinProps(props) {
    const ret = {};
    if ((props.targetRepository !== undefined))
        ret.targetRepository = flattenCfnContainerRecipePropsMixinTargetContainerRepositoryProperty(props.targetRepository);
    return ret;
}
/**
 * A distribution configuration allows you to specify the name and description of your output AMI, authorize other AWS account s to launch the AMI, and replicate the AMI to other AWS Regions .
 *
 * It also allows you to export the AMI to Amazon S3 .
 *
 * @cloudformationResource AWS::ImageBuilder::DistributionConfiguration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-distributionconfiguration.html
 */
class CfnDistributionConfigurationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnDistributionConfigurationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "distributions", "name", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::DistributionConfiguration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnDistributionConfigurationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnDistributionConfigurationPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnDistributionConfigurationMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnDistributionConfiguration.isCfnDistributionConfiguration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnDistributionConfigurationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnDistributionConfigurationPropsMixin = CfnDistributionConfigurationPropsMixin;
// @ts-ignore TS6133
function flattenCfnDistributionConfigurationPropsMixinLaunchTemplateConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        accountId: (!props.accountId ? undefined : props.accountId),
        launchTemplateId: (!props.launchTemplateId ? undefined : cdk.getRefProperty(props.launchTemplateId?.launchTemplateRef, 'launchTemplateId') ?? cdk.ensureStringOrUndefined(props.launchTemplateId, "launchTemplateId", "ec2.ILaunchTemplateRef | string")),
        setDefaultVersion: (!props.setDefaultVersion ? undefined : props.setDefaultVersion)
    };
}
// @ts-ignore TS6133
function flattenCfnDistributionConfigurationPropsMixinDistributionProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        amiDistributionConfiguration: (!props.amiDistributionConfiguration ? undefined : props.amiDistributionConfiguration),
        containerDistributionConfiguration: (!props.containerDistributionConfiguration ? undefined : props.containerDistributionConfiguration),
        fastLaunchConfigurations: (!props.fastLaunchConfigurations ? undefined : props.fastLaunchConfigurations),
        launchTemplateConfigurations: (!props.launchTemplateConfigurations ? undefined : (cdk.isResolvableObject(props.launchTemplateConfigurations) ? props.launchTemplateConfigurations : (!props.launchTemplateConfigurations ? undefined : cdk.mapArrayInPlace(props.launchTemplateConfigurations, (item) => flattenCfnDistributionConfigurationPropsMixinLaunchTemplateConfigurationProperty(item))))),
        licenseConfigurationArns: (!props.licenseConfigurationArns ? undefined : props.licenseConfigurationArns),
        region: (!props.region ? undefined : props.region),
        ssmParameterConfigurations: (!props.ssmParameterConfigurations ? undefined : props.ssmParameterConfigurations)
    };
}
// @ts-ignore TS6133
function flattenCfnDistributionConfigurationMixinProps(props) {
    const ret = {};
    if ((props.distributions !== undefined))
        ret.distributions = (cdk.isResolvableObject(props.distributions) ? props.distributions : cdk.mapArrayInPlace(props.distributions, (item) => flattenCfnDistributionConfigurationPropsMixinDistributionProperty(item)));
    return ret;
}
/**
 * Creates a new image.
 *
 * This request will create a new image along with all of the configured output resources defined in the distribution configuration. You must specify exactly one recipe for your image, using either a ContainerRecipeArn or an ImageRecipeArn.
 *
 * @cloudformationResource AWS::ImageBuilder::Image
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-image.html
 */
class CfnImagePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnImagePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["containerRecipeArn", "deletionSettings", "distributionConfigurationArn", "enhancedImageMetadataEnabled", "executionRole", "imagePipelineExecutionSettings", "imageRecipeArn", "imageScanningConfiguration", "imageTestsConfiguration", "infrastructureConfigurationArn", "loggingConfiguration", "tags", "workflows"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::Image`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnImageMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnImagePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnImageMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnImage.isCfnImage(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnImagePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnImagePropsMixin = CfnImagePropsMixin;
// @ts-ignore TS6133
function flattenCfnImageMixinProps(props) {
    const ret = {};
    if ((props.distributionConfigurationArn !== undefined))
        ret.distributionConfigurationArn = cdk.getRefProperty(props.distributionConfigurationArn?.distributionConfigurationRef, 'distributionConfigurationArn') ?? cdk.ensureStringOrUndefined(props.distributionConfigurationArn, "distributionConfigurationArn", "imagebuilder.IDistributionConfigurationRef | string");
    if ((props.imageRecipeArn !== undefined))
        ret.imageRecipeArn = cdk.getRefProperty(props.imageRecipeArn?.imageRecipeRef, 'imageRecipeArn') ?? cdk.ensureStringOrUndefined(props.imageRecipeArn, "imageRecipeArn", "imagebuilder.IImageRecipeRef | string");
    if ((props.infrastructureConfigurationArn !== undefined))
        ret.infrastructureConfigurationArn = cdk.getRefProperty(props.infrastructureConfigurationArn?.infrastructureConfigurationRef, 'infrastructureConfigurationArn') ?? cdk.ensureStringOrUndefined(props.infrastructureConfigurationArn, "infrastructureConfigurationArn", "imagebuilder.IInfrastructureConfigurationRef | string");
    return ret;
}
/**
 * An image pipeline is the automation configuration for building secure OS images on AWS .
 *
 * The Image Builder image pipeline is associated with an image recipe that defines the build, validation, and test phases for an image build lifecycle. An image pipeline can be associated with an infrastructure configuration that defines where your image is built. You can define attributes, such as instance types, a subnet for your VPC, security groups, logging, and other infrastructure-related configurations. You can also associate your image pipeline with a distribution configuration to define how you would like to deploy your image.
 *
 * @cloudformationResource AWS::ImageBuilder::ImagePipeline
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagepipeline.html
 */
class CfnImagePipelinePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnImagePipelinePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["containerRecipeArn", "description", "distributionConfigurationArn", "enhancedImageMetadataEnabled", "executionRole", "imageRecipeArn", "imageScanningConfiguration", "imageTestsConfiguration", "infrastructureConfigurationArn", "loggingConfiguration", "name", "schedule", "status", "tags", "workflows"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::ImagePipeline`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnImagePipelineMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnImagePipelinePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnImagePipelineMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnImagePipeline.isCfnImagePipeline(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnImagePipelinePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnImagePipelinePropsMixin = CfnImagePipelinePropsMixin;
// @ts-ignore TS6133
function flattenCfnImagePipelineMixinProps(props) {
    const ret = {};
    if ((props.containerRecipeArn !== undefined))
        ret.containerRecipeArn = cdk.getRefProperty(props.containerRecipeArn?.containerRecipeRef, 'containerRecipeArn') ?? cdk.ensureStringOrUndefined(props.containerRecipeArn, "containerRecipeArn", "imagebuilder.IContainerRecipeRef | string");
    if ((props.distributionConfigurationArn !== undefined))
        ret.distributionConfigurationArn = cdk.getRefProperty(props.distributionConfigurationArn?.distributionConfigurationRef, 'distributionConfigurationArn') ?? cdk.ensureStringOrUndefined(props.distributionConfigurationArn, "distributionConfigurationArn", "imagebuilder.IDistributionConfigurationRef | string");
    if ((props.imageRecipeArn !== undefined))
        ret.imageRecipeArn = cdk.getRefProperty(props.imageRecipeArn?.imageRecipeRef, 'imageRecipeArn') ?? cdk.ensureStringOrUndefined(props.imageRecipeArn, "imageRecipeArn", "imagebuilder.IImageRecipeRef | string");
    if ((props.infrastructureConfigurationArn !== undefined))
        ret.infrastructureConfigurationArn = cdk.getRefProperty(props.infrastructureConfigurationArn?.infrastructureConfigurationRef, 'infrastructureConfigurationArn') ?? cdk.ensureStringOrUndefined(props.infrastructureConfigurationArn, "infrastructureConfigurationArn", "imagebuilder.IInfrastructureConfigurationRef | string");
    return ret;
}
/**
 * Creates a new image recipe.
 *
 * Image recipes define how images are configured, tested, and assessed.
 *
 * @cloudformationResource AWS::ImageBuilder::ImageRecipe
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-imagerecipe.html
 */
class CfnImageRecipePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnImageRecipePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["additionalInstanceConfiguration", "amiTags", "blockDeviceMappings", "components", "description", "name", "parentImage", "tags", "version", "workingDirectory"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::ImageRecipe`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnImageRecipeMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnImageRecipePropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnImageRecipeMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnImageRecipe.isCfnImageRecipe(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnImageRecipePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnImageRecipePropsMixin = CfnImageRecipePropsMixin;
// @ts-ignore TS6133
function flattenCfnImageRecipePropsMixinComponentConfigurationProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        componentArn: (!props.componentArn ? undefined : cdk.getRefProperty(props.componentArn?.componentRef, 'componentArn') ?? cdk.ensureStringOrUndefined(props.componentArn, "componentArn", "imagebuilder.IComponentRef | string")),
        parameters: (!props.parameters ? undefined : props.parameters)
    };
}
// @ts-ignore TS6133
function flattenCfnImageRecipeMixinProps(props) {
    const ret = {};
    if ((props.components !== undefined))
        ret.components = (cdk.isResolvableObject(props.components) ? props.components : cdk.mapArrayInPlace(props.components, (item) => flattenCfnImageRecipePropsMixinComponentConfigurationProperty(item)));
    return ret;
}
/**
 * Creates a new infrastructure configuration.
 *
 * An infrastructure configuration defines the environment in which your image will be built and tested.
 *
 * @cloudformationResource AWS::ImageBuilder::InfrastructureConfiguration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-infrastructureconfiguration.html
 */
class CfnInfrastructureConfigurationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnInfrastructureConfigurationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "instanceMetadataOptions", "instanceProfileName", "instanceTypes", "keyPair", "logging", "name", "placement", "resourceTags", "securityGroupIds", "snsTopicArn", "subnetId", "tags", "terminateInstanceOnFailure"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::InfrastructureConfiguration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnInfrastructureConfigurationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnInfrastructureConfigurationPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnInfrastructureConfigurationMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnInfrastructureConfiguration.isCfnInfrastructureConfiguration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnInfrastructureConfigurationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnInfrastructureConfigurationPropsMixin = CfnInfrastructureConfigurationPropsMixin;
// @ts-ignore TS6133
function flattenCfnInfrastructureConfigurationPropsMixinS3LogsProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        s3BucketName: (!props.s3BucketName ? undefined : cdk.getRefProperty(props.s3BucketName?.bucketRef, 'bucketName') ?? cdk.ensureStringOrUndefined(props.s3BucketName, "s3BucketName", "s3.IBucketRef | string")),
        s3KeyPrefix: (!props.s3KeyPrefix ? undefined : props.s3KeyPrefix)
    };
}
// @ts-ignore TS6133
function flattenCfnInfrastructureConfigurationPropsMixinLoggingProperty(props) {
    if (cdk.isResolvableObject(props))
        return props;
    return {
        s3Logs: (!props.s3Logs ? undefined : (!props.s3Logs ? undefined : flattenCfnInfrastructureConfigurationPropsMixinS3LogsProperty(props.s3Logs)))
    };
}
// @ts-ignore TS6133
function flattenCfnInfrastructureConfigurationMixinProps(props) {
    const ret = {};
    if ((props.instanceProfileName !== undefined))
        ret.instanceProfileName = cdk.getRefProperty(props.instanceProfileName?.instanceProfileRef, 'instanceProfileName') ?? cdk.ensureStringOrUndefined(props.instanceProfileName, "instanceProfileName", "iam.IInstanceProfileRef | string");
    if ((props.logging !== undefined))
        ret.logging = flattenCfnInfrastructureConfigurationPropsMixinLoggingProperty(props.logging);
    if ((props.snsTopicArn !== undefined))
        ret.snsTopicArn = cdk.getRefProperty(props.snsTopicArn?.topicRef, 'topicArn') ?? cdk.ensureStringOrUndefined(props.snsTopicArn, "snsTopicArn", "sns.ITopicRef | string");
    return ret;
}
/**
 * Create a lifecycle policy resource.
 *
 * @cloudformationResource AWS::ImageBuilder::LifecyclePolicy
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html
 */
class CfnLifecyclePolicyPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnLifecyclePolicyPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "executionRole", "name", "policyDetails", "resourceSelection", "resourceType", "status", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::LifecyclePolicy`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnLifecyclePolicyMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnLifecyclePolicyPropsMixin);
            }
            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.CfnLifecyclePolicy.isCfnLifecyclePolicy(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnLifecyclePolicyPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnLifecyclePolicyPropsMixin = CfnLifecyclePolicyPropsMixin;
/**
 * Create a new workflow or a new version of an existing workflow.
 *
 * @cloudformationResource AWS::ImageBuilder::Workflow
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-workflow.html
 */
class CfnWorkflowPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_imagebuilder.CfnWorkflowPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["changeDescription", "data", "description", "kmsKeyId", "name", "tags", "type", "uri", "version"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::ImageBuilder::Workflow`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_imagebuilder_CfnWorkflowMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnWorkflowPropsMixin);
            }
            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.CfnWorkflow.isCfnWorkflow(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnWorkflowPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnWorkflowPropsMixin = CfnWorkflowPropsMixin;
