"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.AppCheckServiceConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The enforcement configuration for a service supported by App Check.
 *
 * To get more information about ServiceConfig, see:
 *
 * * [API documentation](https://firebase.google.com/docs/reference/appcheck/rest/v1/projects.services)
 * * How-to Guides
 *     * [Official Documentation](https://firebase.google.com/docs/app-check)
 *
 * ## Example Usage
 *
 * ### Firebase App Check Service Config Off
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const appcheck = new gcp.projects.Service("appcheck", {
 *     project: "my-project-name",
 *     service: "firebaseappcheck.googleapis.com",
 * });
 * const _default = new gcp.firebase.AppCheckServiceConfig("default", {
 *     project: "my-project-name",
 *     serviceId: "firestore.googleapis.com",
 * }, {
 *     dependsOn: [appcheck],
 * });
 * ```
 * ### Firebase App Check Service Config Enforced
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const appcheck = new gcp.projects.Service("appcheck", {
 *     project: "my-project-name",
 *     service: "firebaseappcheck.googleapis.com",
 * });
 * const _default = new gcp.firebase.AppCheckServiceConfig("default", {
 *     project: "my-project-name",
 *     serviceId: "firebasestorage.googleapis.com",
 *     enforcementMode: "ENFORCED",
 * }, {
 *     dependsOn: [appcheck],
 * });
 * ```
 * ### Firebase App Check Service Config Unenforced
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const appcheck = new gcp.projects.Service("appcheck", {
 *     project: "my-project-name",
 *     service: "firebaseappcheck.googleapis.com",
 * });
 * const _default = new gcp.firebase.AppCheckServiceConfig("default", {
 *     project: "my-project-name",
 *     serviceId: "identitytoolkit.googleapis.com",
 *     enforcementMode: "UNENFORCED",
 * }, {
 *     dependsOn: [appcheck],
 * });
 * ```
 *
 * ## Import
 *
 * ServiceConfig can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/services/{{service_id}}`
 *
 * * `{{project}}/{{service_id}}`
 *
 * * `{{service_id}}`
 *
 * When using the `pulumi import` command, ServiceConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig default projects/{{project}}/services/{{service_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig default {{project}}/{{service_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig default {{service_id}}
 * ```
 */
class AppCheckServiceConfig extends pulumi.CustomResource {
    /**
     * Get an existing AppCheckServiceConfig 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 AppCheckServiceConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AppCheckServiceConfig.  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'] === AppCheckServiceConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["enforcementMode"] = state?.enforcementMode;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["serviceId"] = state?.serviceId;
        }
        else {
            const args = argsOrState;
            if (args?.serviceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'serviceId'");
            }
            resourceInputs["enforcementMode"] = args?.enforcementMode;
            resourceInputs["project"] = args?.project;
            resourceInputs["serviceId"] = args?.serviceId;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AppCheckServiceConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppCheckServiceConfig = AppCheckServiceConfig;
/** @internal */
AppCheckServiceConfig.__pulumiType = 'gcp:firebase/appCheckServiceConfig:AppCheckServiceConfig';
//# sourceMappingURL=appCheckServiceConfig.js.map