"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.AiLogicPromptTemplate = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The PromptTemplate resource for Firebase AI Logic.
 *
 * To get more information about PromptTemplate, see:
 *
 * * [API documentation](https://firebase.google.com/docs/reference/ai-logic/rest/v1beta/projects.locations.templates)
 * * How-to Guides
 *     * [Official Documentation](https://firebase.google.com/docs/ai-logic)
 *
 * ## Example Usage
 *
 * ### Firebaseailogic Prompt Template Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.firebase.AiLogicPromptTemplate("basic", {
 *     location: "global",
 *     templateId: "basic-template",
 *     templateString: `---
 * model: gemini-2.5-flash
 * ---
 * Hello world!
 * `,
 * });
 * ```
 *
 * ## Import
 *
 * PromptTemplate can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/templates/{{template_id}}`
 *
 * * `{{project}}/{{location}}/{{template_id}}`
 *
 * * `{{location}}/{{template_id}}`
 *
 * When using the `pulumi import` command, PromptTemplate can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default projects/{{project}}/locations/{{location}}/templates/{{template_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default {{project}}/{{location}}/{{template_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate default {{location}}/{{template_id}}
 * ```
 */
class AiLogicPromptTemplate extends pulumi.CustomResource {
    /**
     * Get an existing AiLogicPromptTemplate 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 AiLogicPromptTemplate(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AiLogicPromptTemplate.  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'] === AiLogicPromptTemplate.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["location"] = state?.location;
            resourceInputs["locked"] = state?.locked;
            resourceInputs["model"] = state?.model;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["stateChangeTime"] = state?.stateChangeTime;
            resourceInputs["templateId"] = state?.templateId;
            resourceInputs["templateString"] = state?.templateString;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.templateId === undefined && !opts.urn) {
                throw new Error("Missing required property 'templateId'");
            }
            if (args?.templateString === undefined && !opts.urn) {
                throw new Error("Missing required property 'templateString'");
            }
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["templateId"] = args?.templateId;
            resourceInputs["templateString"] = args?.templateString;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["locked"] = undefined /*out*/;
            resourceInputs["model"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["stateChangeTime"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AiLogicPromptTemplate.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AiLogicPromptTemplate = AiLogicPromptTemplate;
/** @internal */
AiLogicPromptTemplate.__pulumiType = 'gcp:firebase/aiLogicPromptTemplate:AiLogicPromptTemplate';
//# sourceMappingURL=aiLogicPromptTemplate.js.map