"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.CxIntent = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An intent represents a user's intent to interact with a conversational agent.
 *
 * To get more information about Intent, see:
 *
 * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.intents)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs)
 *
 * ## Example Usage
 *
 * ### Dialogflowcx Intent Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent",
 *     location: "global",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "fr",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 *     avatarUri: "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png",
 *     enableStackdriverLogging: true,
 *     enableSpellCorrection: true,
 *     speechToTextSettings: {
 *         enableSpeechAdaptation: true,
 *     },
 * });
 * const basicIntent = new gcp.diagflow.CxIntent("basic_intent", {
 *     parent: agent.id,
 *     displayName: "Example",
 *     priority: 1,
 *     description: "Intent example",
 *     trainingPhrases: [{
 *         parts: [
 *             {
 *                 text: "training",
 *             },
 *             {
 *                 text: "phrase",
 *             },
 *             {
 *                 text: "example",
 *             },
 *         ],
 *         repeatCount: 1,
 *     }],
 *     parameters: [{
 *         id: "param1",
 *         entityType: "projects/-/locations/-/agents/-/entityTypes/sys.date",
 *     }],
 *     labels: {
 *         label1: "value1",
 *         label2: "value2",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Intent can be imported using any of these accepted formats:
 *
 * * `{{parent}}/intents/{{name}}`
 *
 * * `{{parent}}/{{name}}`
 *
 * When using the `pulumi import` command, Intent can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/intents/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxIntent:CxIntent default {{parent}}/{{name}}
 * ```
 */
class CxIntent extends pulumi.CustomResource {
    /**
     * Get an existing CxIntent 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 state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new CxIntent(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CxIntent.  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'] === CxIntent.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["isDefaultNegativeIntent"] = state?.isDefaultNegativeIntent;
            resourceInputs["isDefaultWelcomeIntent"] = state?.isDefaultWelcomeIntent;
            resourceInputs["isFallback"] = state?.isFallback;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["languageCode"] = state?.languageCode;
            resourceInputs["name"] = state?.name;
            resourceInputs["parameters"] = state?.parameters;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["priority"] = state?.priority;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["trainingPhrases"] = state?.trainingPhrases;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["isDefaultNegativeIntent"] = args?.isDefaultNegativeIntent;
            resourceInputs["isDefaultWelcomeIntent"] = args?.isDefaultWelcomeIntent;
            resourceInputs["isFallback"] = args?.isFallback;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["languageCode"] = args?.languageCode;
            resourceInputs["parameters"] = args?.parameters;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["priority"] = args?.priority;
            resourceInputs["trainingPhrases"] = args?.trainingPhrases;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(CxIntent.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CxIntent = CxIntent;
/** @internal */
CxIntent.__pulumiType = 'gcp:diagflow/cxIntent:CxIntent';
//# sourceMappingURL=cxIntent.js.map