"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.AiLogicConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Configuration for Firebase AI Logic.
 *
 * To get more information about Config, see:
 *
 * * [API documentation](https://firebase.google.com/docs/reference/ai-logic/rest)
 * * How-to Guides
 *     * [Official Documentation](https://firebase.google.com/docs/ai-logic)
 *
 * > **Note:**  All arguments marked as write-only values will not be stored in the state: `generative_language_config.api_key_wo`.
 * Read more about Write-only Arguments.
 *
 * ## Example Usage
 *
 * ### Firebaseailogic Config Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumiverse/time";
 *
 * const project = new gcp.organizations.Project("project", {
 *     projectId: "basic",
 *     name: "Firebase Project",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 * });
 * const _default = new gcp.firebase.Project("default", {project: project.projectId});
 * const firebase = new gcp.projects.Service("firebase", {
 *     project: project.projectId,
 *     service: "firebase.googleapis.com",
 * });
 * const ailogic = new gcp.projects.Service("ailogic", {
 *     project: project.projectId,
 *     service: "firebasevertexai.googleapis.com",
 * });
 * // It takes a while for permissions to propagate
 * // If your Terraform setup has a retry mechanism, this wait is unnecessary
 * const wait30s = new time.Sleep("wait_30s", {createDuration: "30s"}, {
 *     dependsOn: [
 *         ailogic,
 *         firebase,
 *     ],
 * });
 * const defaultAiLogicConfig = new gcp.firebase.AiLogicConfig("default", {
 *     project: _default.project,
 *     location: "global",
 * }, {
 *     dependsOn: [wait30s],
 * });
 * ```
 * ### Firebaseailogic Config Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumiverse/time";
 *
 * const project = new gcp.organizations.Project("project", {
 *     projectId: "full",
 *     name: "Firebase Project",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 * });
 * const _default = new gcp.firebase.Project("default", {project: project.projectId});
 * const firebase = new gcp.projects.Service("firebase", {
 *     project: project.projectId,
 *     service: "firebase.googleapis.com",
 * });
 * const ailogic = new gcp.projects.Service("ailogic", {
 *     project: project.projectId,
 *     service: "firebasevertexai.googleapis.com",
 * });
 * const gemini = new gcp.projects.ApiKey("gemini", {
 *     project: project.projectId,
 *     name: "gemini-api-key",
 *     displayName: "Gemini Developer API key",
 *     restrictions: {
 *         apiTargets: [{
 *             service: "generativelanguage.googleapis.com",
 *         }],
 *     },
 * });
 * // It takes a while for permissions to propagate
 * // If your Terraform setup has a retry mechanism, this wait is unnecessary
 * const wait30s = new time.Sleep("wait_30s", {createDuration: "30s"}, {
 *     dependsOn: [
 *         ailogic,
 *         firebase,
 *     ],
 * });
 * const defaultAiLogicConfig = new gcp.firebase.AiLogicConfig("default", {
 *     project: _default.project,
 *     location: "global",
 *     generativeLanguageConfig: {
 *         apiKey: gemini.keyString,
 *     },
 *     telemetryConfig: {
 *         mode: "ALL",
 *         samplingRate: 1,
 *     },
 * }, {
 *     dependsOn: [wait30s],
 * });
 * ```
 *
 * ## Import
 *
 * Config can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/config`
 *
 * * `{{project}}/{{location}}`
 *
 * * `{{location}}`
 *
 * When using the `pulumi import` command, Config can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicConfig:AiLogicConfig default projects/{{project}}/locations/{{location}}/config
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicConfig:AiLogicConfig default {{project}}/{{location}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/aiLogicConfig:AiLogicConfig default {{location}}
 * ```
 */
class AiLogicConfig extends pulumi.CustomResource {
    /**
     * Get an existing AiLogicConfig 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 AiLogicConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AiLogicConfig.  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'] === AiLogicConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["generativeLanguageConfig"] = state?.generativeLanguageConfig;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["telemetryConfig"] = state?.telemetryConfig;
        }
        else {
            const args = argsOrState;
            resourceInputs["generativeLanguageConfig"] = args?.generativeLanguageConfig;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["telemetryConfig"] = args?.telemetryConfig;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AiLogicConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AiLogicConfig = AiLogicConfig;
/** @internal */
AiLogicConfig.__pulumiType = 'gcp:firebase/aiLogicConfig:AiLogicConfig';
//# sourceMappingURL=aiLogicConfig.js.map