"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.MulticastDomain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Create a multicast domain in the current project.
 *
 * To get more information about MulticastDomain, see:
 *
 * * [API documentation](https://docs.cloud.google.com/vpc/docs/multicast/reference/rest/v1/projects.locations.multicastDomains)
 * * How-to Guides
 *     * [Create Multicast Domain](https://docs.cloud.google.com/vpc/docs/multicast/create-domains#create-domain)
 *
 * ## Example Usage
 *
 * ### Network Services Multicast Domain Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network = new gcp.compute.Network("network", {
 *     name: "test-md-network",
 *     autoCreateSubnetworks: false,
 * });
 * const mdTest = new gcp.networkservices.MulticastDomain("md_test", {
 *     multicastDomainId: "test-md-domain",
 *     location: "global",
 *     description: "A sample domain",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     adminNetwork: network.id,
 *     connectionConfig: {
 *         connectionType: "SAME_VPC",
 *         nccHub: "",
 *     },
 *     multicastDomainGroup: "",
 * }, {
 *     dependsOn: [network],
 * });
 * ```
 *
 * ## Import
 *
 * MulticastDomain can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/multicastDomains/{{multicast_domain_id}}`
 *
 * * `{{project}}/{{location}}/{{multicast_domain_id}}`
 *
 * * `{{location}}/{{multicast_domain_id}}`
 *
 * When using the `pulumi import` command, MulticastDomain can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:networkservices/multicastDomain:MulticastDomain default projects/{{project}}/locations/{{location}}/multicastDomains/{{multicast_domain_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networkservices/multicastDomain:MulticastDomain default {{project}}/{{location}}/{{multicast_domain_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networkservices/multicastDomain:MulticastDomain default {{location}}/{{multicast_domain_id}}
 * ```
 */
class MulticastDomain extends pulumi.CustomResource {
    /**
     * Get an existing MulticastDomain 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 MulticastDomain(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of MulticastDomain.  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'] === MulticastDomain.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminNetwork"] = state?.adminNetwork;
            resourceInputs["connectionConfig"] = state?.connectionConfig;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["multicastDomainGroup"] = state?.multicastDomainGroup;
            resourceInputs["multicastDomainId"] = state?.multicastDomainId;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["states"] = state?.states;
            resourceInputs["uniqueId"] = state?.uniqueId;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.adminNetwork === undefined && !opts.urn) {
                throw new Error("Missing required property 'adminNetwork'");
            }
            if (args?.connectionConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'connectionConfig'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.multicastDomainId === undefined && !opts.urn) {
                throw new Error("Missing required property 'multicastDomainId'");
            }
            resourceInputs["adminNetwork"] = args?.adminNetwork;
            resourceInputs["connectionConfig"] = args?.connectionConfig;
            resourceInputs["description"] = args?.description;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["multicastDomainGroup"] = args?.multicastDomainGroup;
            resourceInputs["multicastDomainId"] = args?.multicastDomainId;
            resourceInputs["project"] = args?.project;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["states"] = undefined /*out*/;
            resourceInputs["uniqueId"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(MulticastDomain.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MulticastDomain = MulticastDomain;
/** @internal */
MulticastDomain.__pulumiType = 'gcp:networkservices/multicastDomain:MulticastDomain';
//# sourceMappingURL=multicastDomain.js.map