"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageTemplate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Definition of AWS::Wisdom::MessageTemplate Resource Type
 */
class MessageTemplate extends pulumi.CustomResource {
    /**
     * Get an existing MessageTemplate resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, opts) {
        return new MessageTemplate(name, undefined, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of MessageTemplate.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === MessageTemplate.__pulumiType;
    }
    /**
     * Create a MessageTemplate resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name, args, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (!opts.id) {
            if (args?.channelSubtype === undefined && !opts.urn) {
                throw new Error("Missing required property 'channelSubtype'");
            }
            if (args?.content === undefined && !opts.urn) {
                throw new Error("Missing required property 'content'");
            }
            if (args?.knowledgeBaseArn === undefined && !opts.urn) {
                throw new Error("Missing required property 'knowledgeBaseArn'");
            }
            resourceInputs["channelSubtype"] = args?.channelSubtype;
            resourceInputs["content"] = args?.content;
            resourceInputs["defaultAttributes"] = args?.defaultAttributes;
            resourceInputs["description"] = args?.description;
            resourceInputs["groupingConfiguration"] = args?.groupingConfiguration;
            resourceInputs["knowledgeBaseArn"] = args?.knowledgeBaseArn;
            resourceInputs["language"] = args?.language;
            resourceInputs["messageTemplateAttachments"] = args?.messageTemplateAttachments;
            resourceInputs["name"] = args?.name;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["messageTemplateArn"] = undefined /*out*/;
            resourceInputs["messageTemplateContentSha256"] = undefined /*out*/;
            resourceInputs["messageTemplateId"] = undefined /*out*/;
        }
        else {
            resourceInputs["channelSubtype"] = undefined /*out*/;
            resourceInputs["content"] = undefined /*out*/;
            resourceInputs["defaultAttributes"] = undefined /*out*/;
            resourceInputs["description"] = undefined /*out*/;
            resourceInputs["groupingConfiguration"] = undefined /*out*/;
            resourceInputs["knowledgeBaseArn"] = undefined /*out*/;
            resourceInputs["language"] = undefined /*out*/;
            resourceInputs["messageTemplateArn"] = undefined /*out*/;
            resourceInputs["messageTemplateAttachments"] = undefined /*out*/;
            resourceInputs["messageTemplateContentSha256"] = undefined /*out*/;
            resourceInputs["messageTemplateId"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["tags"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const replaceOnChanges = { replaceOnChanges: ["channelSubtype", "knowledgeBaseArn"] };
        opts = pulumi.mergeOptions(opts, replaceOnChanges);
        super(MessageTemplate.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MessageTemplate = MessageTemplate;
/** @internal */
MessageTemplate.__pulumiType = 'aws-native:wisdom:MessageTemplate';
//# sourceMappingURL=messageTemplate.js.map