"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.CfnStudioComponentPropsMixin = exports.CfnStudioPropsMixin = exports.CfnStreamingImagePropsMixin = exports.CfnLaunchProfilePropsMixin = 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-nimblestudio"));
/**
 * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-launchprofile.html.
 *
 * @cloudformationResource AWS::NimbleStudio::LaunchProfile
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-launchprofile.html
 */
class CfnLaunchProfilePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_nimblestudio.CfnLaunchProfilePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "ec2SubnetIds", "launchProfileProtocolVersions", "name", "streamConfiguration", "studioComponentIds", "studioId", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::NimbleStudio::LaunchProfile`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_nimblestudio_CfnLaunchProfileMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnLaunchProfilePropsMixin);
            }
            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.CfnLaunchProfile.isCfnLaunchProfile(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnLaunchProfilePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnLaunchProfilePropsMixin = CfnLaunchProfilePropsMixin;
/**
 * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-streamingimage.html.
 *
 * @cloudformationResource AWS::NimbleStudio::StreamingImage
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-streamingimage.html
 */
class CfnStreamingImagePropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_nimblestudio.CfnStreamingImagePropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["description", "ec2ImageId", "name", "studioId", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::NimbleStudio::StreamingImage`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_nimblestudio_CfnStreamingImageMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnStreamingImagePropsMixin);
            }
            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.CfnStreamingImage.isCfnStreamingImage(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnStreamingImagePropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnStreamingImagePropsMixin = CfnStreamingImagePropsMixin;
/**
 * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-studio.html.
 *
 * @cloudformationResource AWS::NimbleStudio::Studio
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-studio.html
 */
class CfnStudioPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_nimblestudio.CfnStudioPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["adminRoleArn", "displayName", "studioEncryptionConfiguration", "studioName", "tags", "userRoleArn"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::NimbleStudio::Studio`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_nimblestudio_CfnStudioMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnStudioPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnStudioMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnStudio.isCfnStudio(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnStudioPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnStudioPropsMixin = CfnStudioPropsMixin;
// @ts-ignore TS6133
function flattenCfnStudioMixinProps(props) {
    const ret = {};
    if ((props.adminRoleArn !== undefined))
        ret.adminRoleArn = cdk.getRefProperty(props.adminRoleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.adminRoleArn, "adminRoleArn", "iam.IRoleRef | string");
    if ((props.userRoleArn !== undefined))
        ret.userRoleArn = cdk.getRefProperty(props.userRoleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.userRoleArn, "userRoleArn", "iam.IRoleRef | string");
    return ret;
}
/**
 * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-studiocomponent.html.
 *
 * @cloudformationResource AWS::NimbleStudio::StudioComponent
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-studiocomponent.html
 */
class CfnStudioComponentPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_nimblestudio.CfnStudioComponentPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["configuration", "description", "ec2SecurityGroupIds", "initializationScripts", "name", "scriptParameters", "studioId", "subtype", "tags", "type"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::NimbleStudio::StudioComponent`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_nimblestudio_CfnStudioComponentMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnStudioComponentPropsMixin);
            }
            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.CfnStudioComponent.isCfnStudioComponent(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnStudioComponentPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnStudioComponentPropsMixin = CfnStudioComponentPropsMixin;
