"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.Agent = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Dialogflow agent is a virtual agent that handles conversations with your end-users. It is a natural language
 * understanding module that understands the nuances of human language. Dialogflow translates end-user text or audio
 * during a conversation to structured data that your apps and services can understand. You design and build a Dialogflow
 * agent to handle the types of conversations required for your system.
 *
 * To get more information about Agent, see:
 *
 * * [API documentation](https://cloud.google.com/dialogflow/docs/reference/rest/v2/projects/agent)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/docs/)
 *
 * ## Example Usage
 *
 * ### Dialogflow Agent Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const fullAgent = new gcp.diagflow.Agent("full_agent", {
 *     displayName: "dialogflow-agent",
 *     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",
 *     enableLogging: true,
 *     matchMode: "MATCH_MODE_ML_ONLY",
 *     classificationThreshold: 0.3,
 *     apiVersion: "API_VERSION_V2_BETA_1",
 *     tier: "TIER_STANDARD",
 * });
 * ```
 *
 * ## Import
 *
 * Agent can be imported using any of these accepted formats:
 *
 * * `{{project}}`
 *
 * When using the `pulumi import` command, Agent can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:diagflow/agent:Agent default {{project}}
 * ```
 */
class Agent extends pulumi.CustomResource {
    /**
     * Get an existing Agent 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 Agent(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Agent.  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'] === Agent.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["apiVersion"] = state?.apiVersion;
            resourceInputs["avatarUri"] = state?.avatarUri;
            resourceInputs["avatarUriBackend"] = state?.avatarUriBackend;
            resourceInputs["classificationThreshold"] = state?.classificationThreshold;
            resourceInputs["defaultLanguageCode"] = state?.defaultLanguageCode;
            resourceInputs["description"] = state?.description;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["enableLogging"] = state?.enableLogging;
            resourceInputs["matchMode"] = state?.matchMode;
            resourceInputs["project"] = state?.project;
            resourceInputs["supportedLanguageCodes"] = state?.supportedLanguageCodes;
            resourceInputs["tier"] = state?.tier;
            resourceInputs["timeZone"] = state?.timeZone;
        }
        else {
            const args = argsOrState;
            if (args?.defaultLanguageCode === undefined && !opts.urn) {
                throw new Error("Missing required property 'defaultLanguageCode'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.timeZone === undefined && !opts.urn) {
                throw new Error("Missing required property 'timeZone'");
            }
            resourceInputs["apiVersion"] = args?.apiVersion;
            resourceInputs["avatarUri"] = args?.avatarUri;
            resourceInputs["classificationThreshold"] = args?.classificationThreshold;
            resourceInputs["defaultLanguageCode"] = args?.defaultLanguageCode;
            resourceInputs["description"] = args?.description;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["enableLogging"] = args?.enableLogging;
            resourceInputs["matchMode"] = args?.matchMode;
            resourceInputs["project"] = args?.project;
            resourceInputs["supportedLanguageCodes"] = args?.supportedLanguageCodes;
            resourceInputs["tier"] = args?.tier;
            resourceInputs["timeZone"] = args?.timeZone;
            resourceInputs["avatarUriBackend"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Agent.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Agent = Agent;
/** @internal */
Agent.__pulumiType = 'gcp:diagflow/agent:Agent';
//# sourceMappingURL=agent.js.map