"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.WireGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * The WireGroup resource represents a group of redundant wires between interconnects in two different metros. Each WireGroup belongs to a CrossSiteNetwork. A wire group defines endpoints and the wires which exist between them.
 *
 * To get more information about WireGroup, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/wireGroups)
 * * How-to Guides
 *     * [Create a WireGroup](https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/modify-network#add-wire-group)
 *
 * ## Example Usage
 *
 * ### Compute Wire Group Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const project = gcp.organizations.getProject({});
 * const example_cross_site_network = new gcp.compute.CrossSiteNetwork("example-cross-site-network", {
 *     name: "test-cross-site-network",
 *     description: "Example cross site network",
 * });
 * const example_test_wire_group = new gcp.compute.WireGroup("example-test-wire-group", {
 *     name: "test-wire-group",
 *     description: "Example Wire Group",
 *     crossSiteNetwork: "test-cross-site-network",
 *     wireProperties: {
 *         bandwidthUnmetered: 10,
 *         faultResponse: "NONE",
 *         bandwidthAllocation: "ALLOCATE_PER_WIRE",
 *     },
 *     wireGroupProperties: {
 *         type: "WIRE",
 *     },
 *     adminEnabled: true,
 * }, {
 *     dependsOn: [example_cross_site_network],
 * });
 * ```
 *
 * ## Import
 *
 * WireGroup can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}`
 *
 * * `{{project}}/{{cross_site_network}}/{{name}}`
 *
 * * `{{cross_site_network}}/{{name}}`
 *
 * When using the `pulumi import` command, WireGroup can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/wireGroup:WireGroup default projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/wireGroup:WireGroup default {{project}}/{{cross_site_network}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/wireGroup:WireGroup default {{cross_site_network}}/{{name}}
 * ```
 */
class WireGroup extends pulumi.CustomResource {
    /**
     * Get an existing WireGroup 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 WireGroup(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of WireGroup.  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'] === WireGroup.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminEnabled"] = state?.adminEnabled;
            resourceInputs["creationTimestamp"] = state?.creationTimestamp;
            resourceInputs["crossSiteNetwork"] = state?.crossSiteNetwork;
            resourceInputs["description"] = state?.description;
            resourceInputs["endpoints"] = state?.endpoints;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["topologies"] = state?.topologies;
            resourceInputs["wireGroupProperties"] = state?.wireGroupProperties;
            resourceInputs["wireProperties"] = state?.wireProperties;
            resourceInputs["wires"] = state?.wires;
        }
        else {
            const args = argsOrState;
            if (args?.crossSiteNetwork === undefined && !opts.urn) {
                throw new Error("Missing required property 'crossSiteNetwork'");
            }
            resourceInputs["adminEnabled"] = args?.adminEnabled;
            resourceInputs["crossSiteNetwork"] = args?.crossSiteNetwork;
            resourceInputs["description"] = args?.description;
            resourceInputs["endpoints"] = args?.endpoints;
            resourceInputs["name"] = args?.name;
            resourceInputs["project"] = args?.project;
            resourceInputs["wireGroupProperties"] = args?.wireGroupProperties;
            resourceInputs["wireProperties"] = args?.wireProperties;
            resourceInputs["creationTimestamp"] = undefined /*out*/;
            resourceInputs["topologies"] = undefined /*out*/;
            resourceInputs["wires"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(WireGroup.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WireGroup = WireGroup;
/** @internal */
WireGroup.__pulumiType = 'gcp:compute/wireGroup:WireGroup';
//# sourceMappingURL=wireGroup.js.map