"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.CfnCustomActionPropsMixin = exports.CfnSlackChannelConfigurationPropsMixin = exports.CfnMicrosoftTeamsChannelConfigurationPropsMixin = 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-chatbot"));
/**
 * > AWS Chatbot is now  . [Learn more](https://docs.aws.amazon.com//chatbot/latest/adminguide/service-rename.html) >  > `Type` attribute values remain unchanged.
 *
 * The `AWS::Chatbot::MicrosoftTeamsChannelConfiguration` resource configures a Microsoft Teams channel to allow users to use  with CloudFormation templates.
 *
 * This resource requires some setup to be done in the  in chat applications console. To provide the required Microsoft Teams team and tenant IDs, you must perform the initial authorization flow with Microsoft Teams in the  in chat applications console, then copy and paste the IDs from the console. For more details, see steps 1-3 in [Get started with Microsoft Teams](https://docs.aws.amazon.com/chatbot/latest/adminguide/teams-setup.html#teams-client-setup) in the *in chat applications Administrator Guide* .
 *
 * @cloudformationResource AWS::Chatbot::MicrosoftTeamsChannelConfiguration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-chatbot-microsoftteamschannelconfiguration.html
 */
class CfnMicrosoftTeamsChannelConfigurationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_chatbot.CfnMicrosoftTeamsChannelConfigurationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["configurationName", "customizationResourceArns", "guardrailPolicies", "iamRoleArn", "loggingLevel", "snsTopicArns", "tags", "teamId", "teamsChannelId", "teamsChannelName", "teamsTenantId", "userRoleRequired"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Chatbot::MicrosoftTeamsChannelConfiguration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_chatbot_CfnMicrosoftTeamsChannelConfigurationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnMicrosoftTeamsChannelConfigurationPropsMixin);
            }
            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.CfnMicrosoftTeamsChannelConfiguration.isCfnMicrosoftTeamsChannelConfiguration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnMicrosoftTeamsChannelConfigurationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnMicrosoftTeamsChannelConfigurationPropsMixin = CfnMicrosoftTeamsChannelConfigurationPropsMixin;
/**
 * > AWS Chatbot is now  . [Learn more](https://docs.aws.amazon.com//chatbot/latest/adminguide/service-rename.html) >  > `Type` attribute values remain unchanged.
 *
 * The `AWS::Chatbot::SlackChannelConfiguration` resource configures a Slack channel to allow users to use  with CloudFormation templates.
 *
 * This resource requires some setup to be done in the  in chat applications console. To provide the required Slack workspace ID, you must perform the initial authorization flow with Slack in the  in chat applications console, then copy and paste the workspace ID from the console. For more details, see steps 1-3 in [Tutorial: Get started with Slack](https://docs.aws.amazon.com/chatbot/latest/adminguide/slack-setup.html#slack-client-setup) in the *in chat applications User Guide* .
 *
 * @cloudformationResource AWS::Chatbot::SlackChannelConfiguration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-chatbot-slackchannelconfiguration.html
 */
class CfnSlackChannelConfigurationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_chatbot.CfnSlackChannelConfigurationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["configurationName", "customizationResourceArns", "guardrailPolicies", "iamRoleArn", "loggingLevel", "slackChannelId", "slackWorkspaceId", "snsTopicArns", "tags", "userRoleRequired"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Chatbot::SlackChannelConfiguration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_chatbot_CfnSlackChannelConfigurationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnSlackChannelConfigurationPropsMixin);
            }
            throw error;
        }
        this.props = {
            ...props,
            ...flattenCfnSlackChannelConfigurationMixinProps(props)
        };
        this.strategy = (options.strategy ?? cdk.PropertyMergeStrategy.combine());
    }
    /**
     * Check if this mixin supports the given construct
     */
    supports(construct) {
        return (cdk.CfnResource.isCfnResource(construct) && service.CfnSlackChannelConfiguration.isCfnSlackChannelConfiguration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnSlackChannelConfigurationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnSlackChannelConfigurationPropsMixin = CfnSlackChannelConfigurationPropsMixin;
// @ts-ignore TS6133
function flattenCfnSlackChannelConfigurationMixinProps(props) {
    const ret = {};
    if ((props.iamRoleArn !== undefined))
        ret.iamRoleArn = cdk.getRefProperty(props.iamRoleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.iamRoleArn, "iamRoleArn", "iam.IRoleRef | string");
    if ((props.snsTopicArns !== undefined))
        ret.snsTopicArns = cdk.mapArrayInPlace(props.snsTopicArns, (item) => cdk.getRefProperty(item?.topicRef, 'topicArn') ?? cdk.ensureStringOrUndefined(item, "snsTopicArns", "sns.ITopicRef | string"));
    return ret;
}
/**
 * > AWS Chatbot is now  .
 *
 * [Learn more](https://docs.aws.amazon.com//chatbot/latest/adminguide/service-rename.html)
 * >
 * > `Type` attribute values remain unchanged.
 *
 * @cloudformationResource AWS::Chatbot::CustomAction
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-chatbot-customaction.html
 */
class CfnCustomActionPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_chatbot.CfnCustomActionPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["actionName", "aliasName", "attachments", "definition", "tags"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::Chatbot::CustomAction`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_chatbot_CfnCustomActionMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnCustomActionPropsMixin);
            }
            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.CfnCustomAction.isCfnCustomAction(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnCustomActionPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnCustomActionPropsMixin = CfnCustomActionPropsMixin;
