"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.Domain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Creates a Microsoft AD domain
 *
 * To get more information about Domain, see:
 *
 * * [API documentation](https://cloud.google.com/managed-microsoft-ad/reference/rest/v1/projects.locations.global.domains)
 * * How-to Guides
 *     * [Managed Microsoft Active Directory Quickstart](https://cloud.google.com/managed-microsoft-ad/docs/quickstarts)
 *
 * ## Example Usage
 *
 * ### Active Directory Domain Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const ad_domain = new gcp.activedirectory.Domain("ad-domain", {
 *     domainName: "tfgen.org.com",
 *     locations: ["us-central1"],
 *     reservedIpRange: "192.168.255.0/24",
 *     deletionProtection: false,
 * });
 * ```
 *
 * ## Import
 *
 * Domain can be imported using any of these accepted formats:
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{project}} {{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Domain can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:activedirectory/domain:Domain default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:activedirectory/domain:Domain default "{{project}} {{name}}"
 * ```
 *
 * ```sh
 * $ pulumi import gcp:activedirectory/domain:Domain default {{name}}
 * ```
 */
class Domain extends pulumi.CustomResource {
    /**
     * Get an existing Domain 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 Domain(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Domain.  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'] === Domain.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["admin"] = state?.admin;
            resourceInputs["authorizedNetworks"] = state?.authorizedNetworks;
            resourceInputs["deletionProtection"] = state?.deletionProtection;
            resourceInputs["domainName"] = state?.domainName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["fqdn"] = state?.fqdn;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["locations"] = state?.locations;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["reservedIpRange"] = state?.reservedIpRange;
        }
        else {
            const args = argsOrState;
            if (args?.domainName === undefined && !opts.urn) {
                throw new Error("Missing required property 'domainName'");
            }
            if (args?.locations === undefined && !opts.urn) {
                throw new Error("Missing required property 'locations'");
            }
            if (args?.reservedIpRange === undefined && !opts.urn) {
                throw new Error("Missing required property 'reservedIpRange'");
            }
            resourceInputs["admin"] = args?.admin;
            resourceInputs["authorizedNetworks"] = args?.authorizedNetworks;
            resourceInputs["deletionProtection"] = args?.deletionProtection;
            resourceInputs["domainName"] = args?.domainName;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["locations"] = args?.locations;
            resourceInputs["project"] = args?.project;
            resourceInputs["reservedIpRange"] = args?.reservedIpRange;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["fqdn"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(Domain.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Domain = Domain;
/** @internal */
Domain.__pulumiType = 'gcp:activedirectory/domain:Domain';
//# sourceMappingURL=domain.js.map