"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.AppHostingDefaultDomain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A domain name that is associated with a backend.
 *
 * ## Example Usage
 *
 * ### Firebase App Hosting Default Domain Minimal
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {
 *     project: "my-project-name",
 *     accountId: "service-account",
 *     displayName: "Firebase App Hosting compute service account",
 *     createIgnoreAlreadyExists: true,
 * });
 * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     backendId: "dd-mini",
 *     appId: "1:0000000000:web:674cde32020e16fbce9dbd",
 *     servingLocality: "GLOBAL_ACCESS",
 *     serviceAccount: serviceAccount.email,
 * });
 * const example = new gcp.firebase.AppHostingDefaultDomain("example", {
 *     project: exampleAppHostingBackend.project,
 *     location: exampleAppHostingBackend.location,
 *     backend: exampleAppHostingBackend.backendId,
 *     domainId: exampleAppHostingBackend.uri,
 * });
 * ```
 * ### Firebase App Hosting Default Domain Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {
 *     project: "my-project-name",
 *     accountId: "service-account",
 *     displayName: "Firebase App Hosting compute service account",
 *     createIgnoreAlreadyExists: true,
 * });
 * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     backendId: "dd-full",
 *     appId: "1:0000000000:web:674cde32020e16fbce9dbd",
 *     servingLocality: "GLOBAL_ACCESS",
 *     serviceAccount: serviceAccount.email,
 * });
 * const example = new gcp.firebase.AppHostingDefaultDomain("example", {
 *     project: exampleAppHostingBackend.project,
 *     location: exampleAppHostingBackend.location,
 *     backend: exampleAppHostingBackend.backendId,
 *     domainId: exampleAppHostingBackend.uri,
 *     disabled: false,
 * });
 * ```
 * ### Firebase App Hosting Default Domain Disabled
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const serviceAccount = new gcp.serviceaccount.Account("service_account", {
 *     project: "my-project-name",
 *     accountId: "service-account",
 *     displayName: "Firebase App Hosting compute service account",
 *     createIgnoreAlreadyExists: true,
 * });
 * const exampleAppHostingBackend = new gcp.firebase.AppHostingBackend("example", {
 *     project: "my-project-name",
 *     location: "us-central1",
 *     backendId: "dd-disabled",
 *     appId: "1:0000000000:web:674cde32020e16fbce9dbd",
 *     servingLocality: "GLOBAL_ACCESS",
 *     serviceAccount: serviceAccount.email,
 * });
 * const example = new gcp.firebase.AppHostingDefaultDomain("example", {
 *     project: exampleAppHostingBackend.project,
 *     location: exampleAppHostingBackend.location,
 *     backend: exampleAppHostingBackend.backendId,
 *     domainId: exampleAppHostingBackend.uri,
 *     disabled: true,
 * });
 * ```
 *
 * ## Import
 *
 * DefaultDomain can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/backends/{{backend}}/domains/{{domain_id}}`
 *
 * * `{{project}}/{{location}}/{{backend}}/{{domain_id}}`
 *
 * * `{{location}}/{{backend}}/{{domain_id}}`
 *
 * When using the `pulumi import` command, DefaultDomain can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain default projects/{{project}}/locations/{{location}}/backends/{{backend}}/domains/{{domain_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain default {{project}}/{{location}}/{{backend}}/{{domain_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain default {{location}}/{{backend}}/{{domain_id}}
 * ```
 */
class AppHostingDefaultDomain extends pulumi.CustomResource {
    /**
     * Get an existing AppHostingDefaultDomain 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 AppHostingDefaultDomain(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AppHostingDefaultDomain.  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'] === AppHostingDefaultDomain.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["backend"] = state?.backend;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["disabled"] = state?.disabled;
            resourceInputs["domainId"] = state?.domainId;
            resourceInputs["etag"] = state?.etag;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.backend === undefined && !opts.urn) {
                throw new Error("Missing required property 'backend'");
            }
            if (args?.domainId === undefined && !opts.urn) {
                throw new Error("Missing required property 'domainId'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            resourceInputs["backend"] = args?.backend;
            resourceInputs["disabled"] = args?.disabled;
            resourceInputs["domainId"] = args?.domainId;
            resourceInputs["location"] = args?.location;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["etag"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AppHostingDefaultDomain.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AppHostingDefaultDomain = AppHostingDefaultDomain;
/** @internal */
AppHostingDefaultDomain.__pulumiType = 'gcp:firebase/appHostingDefaultDomain:AppHostingDefaultDomain';
//# sourceMappingURL=appHostingDefaultDomain.js.map