"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.CxGenerator = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Generators contain prompt to be sent to the LLM model to generate text. The prompt can contain parameters which will be resolved before calling the model. It can optionally contain banned phrases to ensure the model responses are safe.
 *
 * To get more information about Generator, see:
 *
 * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.generators)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs)
 *
 * ## Example Usage
 *
 * ### Dialogflowcx Generator Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const agent = new gcp.diagflow.CxAgent("agent", {
 *     displayName: "dialogflowcx-agent-fucntion",
 *     location: "global",
 *     defaultLanguageCode: "en",
 *     supportedLanguageCodes: [
 *         "fr",
 *         "de",
 *         "es",
 *     ],
 *     timeZone: "America/New_York",
 *     description: "Example description.",
 * });
 * const generator = new gcp.diagflow.CxGenerator("generator", {
 *     parent: agent.id,
 *     languageCode: "fr",
 *     displayName: "TF Prompt generator",
 *     llmModelSettings: {
 *         model: "gemini-2.0-flash-001",
 *         promptText: "Return me some great results",
 *     },
 *     promptText: {
 *         text: "Send me great results in french",
 *     },
 *     modelParameter: {
 *         temperature: 0.55,
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * Generator can be imported using any of these accepted formats:
 *
 * * `{{parent}}/generators/{{name}}`
 *
 * * `{{parent}}/{{name}}`
 *
 * When using the `pulumi import` command, Generator can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxGenerator:CxGenerator default {{parent}}/generators/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:diagflow/cxGenerator:CxGenerator default {{parent}}/{{name}}
 * ```
 */
class CxGenerator extends pulumi.CustomResource {
    /**
     * Get an existing CxGenerator 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 CxGenerator(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of CxGenerator.  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'] === CxGenerator.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["languageCode"] = state?.languageCode;
            resourceInputs["llmModelSettings"] = state?.llmModelSettings;
            resourceInputs["modelParameter"] = state?.modelParameter;
            resourceInputs["name"] = state?.name;
            resourceInputs["parent"] = state?.parent;
            resourceInputs["placeholders"] = state?.placeholders;
            resourceInputs["promptText"] = state?.promptText;
        }
        else {
            const args = argsOrState;
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.promptText === undefined && !opts.urn) {
                throw new Error("Missing required property 'promptText'");
            }
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["languageCode"] = args?.languageCode;
            resourceInputs["llmModelSettings"] = args?.llmModelSettings;
            resourceInputs["modelParameter"] = args?.modelParameter;
            resourceInputs["parent"] = args?.parent;
            resourceInputs["placeholders"] = args?.placeholders;
            resourceInputs["promptText"] = args?.promptText;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(CxGenerator.__pulumiType, name, resourceInputs, opts);
    }
}
exports.CxGenerator = CxGenerator;
/** @internal */
CxGenerator.__pulumiType = 'gcp:diagflow/cxGenerator:CxGenerator';
//# sourceMappingURL=cxGenerator.js.map