"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.Config = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Identity Platform configuration for a Cloud project. Identity Platform is an
 * end-to-end authentication system for third-party users to access apps
 * and services.
 *
 * This entity is created only once during intialization and cannot be deleted,
 * individual Identity Providers may be disabled instead.  This resource may only
 * be created in billing-enabled projects.
 *
 * To get more information about Config, see:
 *
 * * [API documentation](https://cloud.google.com/identity-platform/docs/reference/rest/v2/Config)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/identity-platform/docs)
 *
 * ## Example Usage
 *
 * ### Identity Platform Config Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = new gcp.organizations.Project("default", {
 *     projectId: "my-project",
 *     name: "my-project",
 *     orgId: "123456789",
 *     billingAccount: "000000-0000000-0000000-000000",
 *     deletionPolicy: "DELETE",
 *     labels: {
 *         firebase: "enabled",
 *     },
 * });
 * const identitytoolkit = new gcp.projects.Service("identitytoolkit", {
 *     project: _default.projectId,
 *     service: "identitytoolkit.googleapis.com",
 * });
 * const defaultConfig = new gcp.identityplatform.Config("default", {
 *     project: _default.projectId,
 *     autodeleteAnonymousUsers: true,
 *     signIn: {
 *         allowDuplicateEmails: true,
 *         anonymous: {
 *             enabled: true,
 *         },
 *         email: {
 *             enabled: true,
 *             passwordRequired: false,
 *         },
 *         phoneNumber: {
 *             enabled: true,
 *             testPhoneNumbers: {
 *                 "+11231231234": "000000",
 *             },
 *         },
 *     },
 *     smsRegionConfig: {
 *         allowlistOnly: {
 *             allowedRegions: [
 *                 "US",
 *                 "CA",
 *             ],
 *         },
 *     },
 *     blockingFunctions: {
 *         triggers: [{
 *             eventType: "beforeSignIn",
 *             functionUri: "https://us-east1-my-project.cloudfunctions.net/before-sign-in",
 *         }],
 *         forwardInboundCredentials: {
 *             refreshToken: true,
 *             accessToken: true,
 *             idToken: true,
 *         },
 *     },
 *     quota: {
 *         signUpQuotaConfig: {
 *             quota: 1000,
 *             startTime: "2014-10-02T15:01:23Z",
 *             quotaDuration: "7200s",
 *         },
 *     },
 *     authorizedDomains: [
 *         "localhost",
 *         "my-project.firebaseapp.com",
 *         "my-project.web.app",
 *     ],
 * });
 * ```
 *
 * ## Import
 *
 * Config can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/config`
 *
 * * `projects/{{project}}`
 *
 * * `{{project}}`
 *
 * When using the `pulumi import` command, Config can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:identityplatform/config:Config default projects/{{project}}/config
 * ```
 *
 * ```sh
 * $ pulumi import gcp:identityplatform/config:Config default projects/{{project}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:identityplatform/config:Config default {{project}}
 * ```
 */
class Config extends pulumi.CustomResource {
    /**
     * Get an existing Config 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 Config(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Config.  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'] === Config.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["authorizedDomains"] = state?.authorizedDomains;
            resourceInputs["autodeleteAnonymousUsers"] = state?.autodeleteAnonymousUsers;
            resourceInputs["blockingFunctions"] = state?.blockingFunctions;
            resourceInputs["client"] = state?.client;
            resourceInputs["mfa"] = state?.mfa;
            resourceInputs["monitoring"] = state?.monitoring;
            resourceInputs["multiTenant"] = state?.multiTenant;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["quota"] = state?.quota;
            resourceInputs["signIn"] = state?.signIn;
            resourceInputs["smsRegionConfig"] = state?.smsRegionConfig;
        }
        else {
            const args = argsOrState;
            resourceInputs["authorizedDomains"] = args?.authorizedDomains;
            resourceInputs["autodeleteAnonymousUsers"] = args?.autodeleteAnonymousUsers;
            resourceInputs["blockingFunctions"] = args?.blockingFunctions;
            resourceInputs["client"] = args?.client;
            resourceInputs["mfa"] = args?.mfa;
            resourceInputs["monitoring"] = args?.monitoring;
            resourceInputs["multiTenant"] = args?.multiTenant;
            resourceInputs["project"] = args?.project;
            resourceInputs["quota"] = args?.quota;
            resourceInputs["signIn"] = args?.signIn;
            resourceInputs["smsRegionConfig"] = args?.smsRegionConfig;
            resourceInputs["name"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Config.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Config = Config;
/** @internal */
Config.__pulumiType = 'gcp:identityplatform/config:Config';
//# sourceMappingURL=config.js.map