"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.AiLogicPromptTemplateLock = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A resource that manages the lock state of a PromptTemplate.
 * When this resource is created, the template is locked.
 * When this resource is deleted, the template is unlocked.
 *
 * ## Example Usage
 *
 * ### Firebaseailogic Prompt Template Lock Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const basic = new gcp.firebase.AiLogicPromptTemplate("basic", {
 *     location: "global",
 *     templateId: "lock-template",
 *     templateString: `---
 * model: googleai/gemini-1.5-flash
 * ---
 * Hello World
 * `,
 * });
 * const basicLock = new gcp.firebase.AiLogicPromptTemplateLock("basic_lock", {
 *     location: basic.location,
 *     templateId: basic.templateId,
 * });
 * ```
 *
 * ## Import
 *
 * PromptTemplateLock 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, PromptTemplateLock can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicPromptTemplateLock:AiLogicPromptTemplateLock default projects/{{project}}/locations/{{location}}/templates/{{template_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicPromptTemplateLock:AiLogicPromptTemplateLock default {{project}}/{{location}}/{{template_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicPromptTemplateLock:AiLogicPromptTemplateLock default {{location}}/{{template_id}}
 * ```
 */
class AiLogicPromptTemplateLock extends pulumi.CustomResource {
    /**
     * Get an existing AiLogicPromptTemplateLock 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 AiLogicPromptTemplateLock(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AiLogicPromptTemplateLock.  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'] === AiLogicPromptTemplateLock.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["location"] = state?.location;
            resourceInputs["locked"] = state?.locked;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["templateId"] = state?.templateId;
        }
        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'");
            }
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["templateId"] = args?.templateId;
            resourceInputs["locked"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AiLogicPromptTemplateLock.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AiLogicPromptTemplateLock = AiLogicPromptTemplateLock;
/** @internal */
AiLogicPromptTemplateLock.__pulumiType = 'gcp:firebase/aiLogicPromptTemplateLock:AiLogicPromptTemplateLock';
//# sourceMappingURL=aiLogicPromptTemplateLock.js.map