"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.CfnSlackWorkspaceConfigurationPropsMixin = exports.CfnSlackChannelConfigurationPropsMixin = exports.CfnAccountAliasPropsMixin = 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-supportapp"));
/**
 * You can use the `AWS::SupportApp::AccountAlias` resource to specify your AWS account when you configure the AWS Support App in Slack.
 *
 * Your alias name appears on the AWS Support App page in the Support Center Console and in messages from the  App. You can use this alias to identify the account you've configured with the AWS Support App .
 *
 * For more information, see [AWS Support App in Slack](https://docs.aws.amazon.com/awssupport/latest/user/aws-support-app-for-slack.html) in the *User Guide* .
 *
 * @cloudformationResource AWS::SupportApp::AccountAlias
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-supportapp-accountalias.html
 */
class CfnAccountAliasPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_supportapp.CfnAccountAliasPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["accountAlias"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::SupportApp::AccountAlias`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_supportapp_CfnAccountAliasMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnAccountAliasPropsMixin);
            }
            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.CfnAccountAlias.isCfnAccountAlias(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnAccountAliasPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnAccountAliasPropsMixin = CfnAccountAliasPropsMixin;
/**
 * You can use the `AWS::SupportApp::SlackChannelConfiguration` resource to specify your AWS account when you configure the AWS Support App .
 *
 * This resource includes the following information:
 *
 * - The Slack channel name and ID
 * - The team ID in Slack
 * - The Amazon Resource Name (ARN) of the AWS Identity and Access Management ( IAM ) role
 * - Whether you want the AWS Support App to notify you when your support cases are created, updated, resolved, or reopened
 * - The case severity that you want to get notified for
 *
 * For more information, see the following topics in the *User Guide* :
 *
 * - [AWS Support App in Slack](https://docs.aws.amazon.com/awssupport/latest/user/aws-support-app-for-slack.html)
 * - [Creating AWS Support App in Slack resources with AWS CloudFormation](https://docs.aws.amazon.com/awssupport/latest/user/creating-resources-with-cloudformation.html)
 *
 * @cloudformationResource AWS::SupportApp::SlackChannelConfiguration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-supportapp-slackchannelconfiguration.html
 */
class CfnSlackChannelConfigurationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_supportapp.CfnSlackChannelConfigurationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["channelId", "channelName", "channelRoleArn", "notifyOnAddCorrespondenceToCase", "notifyOnCaseSeverity", "notifyOnCreateOrReopenCase", "notifyOnResolveCase", "teamId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::SupportApp::SlackChannelConfiguration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_supportapp_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.channelRoleArn !== undefined))
        ret.channelRoleArn = cdk.getRefProperty(props.channelRoleArn?.roleRef, 'roleArn') ?? cdk.ensureStringOrUndefined(props.channelRoleArn, "channelRoleArn", "iam.IRoleRef | string");
    return ret;
}
/**
 * You can use the `AWS::SupportApp::SlackWorkspaceConfiguration` resource to specify your Slack workspace configuration.
 *
 * This resource configures your AWS account so that you can use the specified Slack workspace in the AWS Support App . This resource includes the following information:
 *
 * - The team ID for the Slack workspace
 * - The version ID of the resource to use with AWS CloudFormation
 *
 * For more information, see the following topics in the *User Guide* :
 *
 * - [AWS Support App in Slack](https://docs.aws.amazon.com/awssupport/latest/user/aws-support-app-for-slack.html)
 * - [Creating AWS Support App in Slack resources with AWS CloudFormation](https://docs.aws.amazon.com/awssupport/latest/user/creating-resources-with-cloudformation.html)
 *
 * @cloudformationResource AWS::SupportApp::SlackWorkspaceConfiguration
 * @mixin true
 * @stability external
 * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-supportapp-slackworkspaceconfiguration.html
 */
class CfnSlackWorkspaceConfigurationPropsMixin extends cdk.Mixin {
    static [JSII_RTTI_SYMBOL_1] = { fqn: "@aws-cdk/cfn-property-mixins.aws_supportapp.CfnSlackWorkspaceConfigurationPropsMixin", version: "2.258.1" };
    static CFN_PROPERTY_KEYS = ["teamId", "versionId"];
    props;
    strategy;
    /**
     * Create a mixin to apply properties to `AWS::SupportApp::SlackWorkspaceConfiguration`.
     *
     * @param props L1 properties to apply
     * @param options Mixin options
     */
    constructor(props, options = {}) {
        super();
        try {
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_aws_supportapp_CfnSlackWorkspaceConfigurationMixinProps(props);
            jsiiDeprecationWarnings._aws_cdk_cfn_property_mixins_CfnPropertyMixinOptions(options);
        }
        catch (error) {
            if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
                Error.captureStackTrace(error, CfnSlackWorkspaceConfigurationPropsMixin);
            }
            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.CfnSlackWorkspaceConfiguration.isCfnSlackWorkspaceConfiguration(construct));
    }
    /**
     * Apply the mixin properties to the construct
     */
    applyTo(construct) {
        if (this.supports(construct)) {
            this.strategy.apply(construct, this.props, CfnSlackWorkspaceConfigurationPropsMixin.CFN_PROPERTY_KEYS);
        }
    }
}
exports.CfnSlackWorkspaceConfigurationPropsMixin = CfnSlackWorkspaceConfigurationPropsMixin;
