"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.CxGenerativeSettings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Settings for Generative AI.
 *
 * To get more information about GenerativeSettings, see:
 *
 * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents/getGenerativeSettings)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs)
 *
 * ## Example Usage
 *
 * ### Dialogflowcx Generative Settings 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",
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 * });
 * const fullGenerativeSettings = new gcp.diagflow.CxGenerativeSettings("full_generative_settings", {
 *     parent: agent.id,
 *     fallbackSettings: {
 *         selectedPrompt: "example prompt",
 *         promptTemplates: [{
 *             displayName: "example prompt",
 *             promptText: "example prompt text",
 *             frozen: false,
 *         }],
 *     },
 *     generativeSafetySettings: {
 *         defaultBannedPhraseMatchStrategy: "PARTIAL_MATCH",
 *         bannedPhrases: [{
 *             text: "example text",
 *             languageCode: "en",
 *         }],
 *     },
 *     knowledgeConnectorSettings: {
 *         business: "example business",
 *         agent: "example agent",
 *         agentIdentity: "virtual agent",
 *         businessDescription: "a family company selling freshly roasted coffee beans",
 *         agentScope: "Example company website",
 *         disableDataStoreFallback: false,
 *     },
 *     languageCode: "en",
 *     llmModelSettings: {
 *         model: "gemini-2.0-flash-001",
 *         promptText: "example prompt text",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * GenerativeSettings can be imported using any of these accepted formats:
 *
 * * `{{parent}}/generativeSettings`
 *
 * * `{{parent}}`
 *
 * When using the `pulumi import` command, GenerativeSettings can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxGenerativeSettings:CxGenerativeSettings default {{parent}}/generativeSettings
 * ```
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxGenerativeSettings:CxGenerativeSettings default {{parent}}
 * ```
 */
class CxGenerativeSettings extends pulumi.CustomResource {
    /**
     * Get an existing CxGenerativeSettings 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 CxGenerativeSettings(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CxGenerativeSettings.  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'] === CxGenerativeSettings.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["fallbackSettings"] = state?.fallbackSettings;
            resourceInputs["generativeSafetySettings"] = state?.generativeSafetySettings;
            resourceInputs["knowledgeConnectorSettings"] = state?.knowledgeConnectorSettings;
            resourceInputs["languageCode"] = state?.languageCode;
            resourceInputs["llmModelSettings"] = state?.llmModelSettings;
            resourceInputs["name"] = state?.name;
            resourceInputs["parent"] = state?.parent;
        }
        else {
            const args = argsOrState;
            if (args?.languageCode === undefined && !opts.urn) {
                throw new Error("Missing required property 'languageCode'");
            }
            resourceInputs["fallbackSettings"] = args?.fallbackSettings;
            resourceInputs["generativeSafetySettings"] = args?.generativeSafetySettings;
            resourceInputs["knowledgeConnectorSettings"] = args?.knowledgeConnectorSettings;
            resourceInputs["languageCode"] = args?.languageCode;
            resourceInputs["llmModelSettings"] = args?.llmModelSettings;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CxGenerativeSettings.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CxGenerativeSettings = CxGenerativeSettings;
/** @internal */
CxGenerativeSettings.__pulumiType = 'gcp:diagflow/cxGenerativeSettings:CxGenerativeSettings';
//# sourceMappingURL=cxGenerativeSettings.js.map