"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.NetworkPeering = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents a network peering resource. Network peerings are global resources.
 *
 * To get more information about NetworkPeering, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/networks/addPeering)
 *
 * ## Example Usage
 *
 * ### Vmware Engine Network Peering Ven
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network_peering_nw = new gcp.vmwareengine.Network("network-peering-nw", {
 *     name: "default-np-nw",
 *     location: "global",
 *     type: "STANDARD",
 * });
 * const network_peering_peer_nw = new gcp.vmwareengine.Network("network-peering-peer-nw", {
 *     name: "peer-np-nw",
 *     location: "global",
 *     type: "STANDARD",
 * });
 * const vmw_engine_network_peering = new gcp.vmwareengine.NetworkPeering("vmw-engine-network-peering", {
 *     name: "sample-network-peering",
 *     description: "Sample description",
 *     vmwareEngineNetwork: network_peering_nw.id,
 *     peerNetwork: network_peering_peer_nw.id,
 *     peerNetworkType: "VMWARE_ENGINE_NETWORK",
 *     exportCustomRoutes: false,
 *     importCustomRoutes: false,
 *     exportCustomRoutesWithPublicIp: false,
 *     importCustomRoutesWithPublicIp: false,
 * });
 * ```
 * ### Vmware Engine Network Peering Standard
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network_peering_vpc = new gcp.compute.Network("network-peering-vpc", {name: "default-vpc"});
 * const network_peering_standard_nw = new gcp.vmwareengine.Network("network-peering-standard-nw", {
 *     name: "default-standard-nw-np",
 *     location: "global",
 *     type: "STANDARD",
 * });
 * const vmw_engine_network_peering = new gcp.vmwareengine.NetworkPeering("vmw-engine-network-peering", {
 *     name: "sample-network-peering",
 *     description: "Sample description",
 *     peerNetwork: network_peering_vpc.id,
 *     peerNetworkType: "STANDARD",
 *     vmwareEngineNetwork: network_peering_standard_nw.id,
 * });
 * ```
 *
 * ## Import
 *
 * NetworkPeering can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/global/networkPeerings/{{name}}`
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, NetworkPeering can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:vmwareengine/networkPeering:NetworkPeering default projects/{{project}}/locations/global/networkPeerings/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vmwareengine/networkPeering:NetworkPeering default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:vmwareengine/networkPeering:NetworkPeering default {{name}}
 * ```
 */
class NetworkPeering extends pulumi.CustomResource {
    /**
     * Get an existing NetworkPeering 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 NetworkPeering(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of NetworkPeering.  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'] === NetworkPeering.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["exportCustomRoutes"] = state?.exportCustomRoutes;
            resourceInputs["exportCustomRoutesWithPublicIp"] = state?.exportCustomRoutesWithPublicIp;
            resourceInputs["importCustomRoutes"] = state?.importCustomRoutes;
            resourceInputs["importCustomRoutesWithPublicIp"] = state?.importCustomRoutesWithPublicIp;
            resourceInputs["name"] = state?.name;
            resourceInputs["peerNetwork"] = state?.peerNetwork;
            resourceInputs["peerNetworkType"] = state?.peerNetworkType;
            resourceInputs["project"] = state?.project;
            resourceInputs["state"] = state?.state;
            resourceInputs["stateDetails"] = state?.stateDetails;
            resourceInputs["uid"] = state?.uid;
            resourceInputs["updateTime"] = state?.updateTime;
            resourceInputs["vmwareEngineNetwork"] = state?.vmwareEngineNetwork;
            resourceInputs["vmwareEngineNetworkCanonical"] = state?.vmwareEngineNetworkCanonical;
        }
        else {
            const args = argsOrState;
            if (args?.peerNetwork === undefined && !opts.urn) {
                throw new Error("Missing required property 'peerNetwork'");
            }
            if (args?.peerNetworkType === undefined && !opts.urn) {
                throw new Error("Missing required property 'peerNetworkType'");
            }
            if (args?.vmwareEngineNetwork === undefined && !opts.urn) {
                throw new Error("Missing required property 'vmwareEngineNetwork'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["exportCustomRoutes"] = args?.exportCustomRoutes;
            resourceInputs["exportCustomRoutesWithPublicIp"] = args?.exportCustomRoutesWithPublicIp;
            resourceInputs["importCustomRoutes"] = args?.importCustomRoutes;
            resourceInputs["importCustomRoutesWithPublicIp"] = args?.importCustomRoutesWithPublicIp;
            resourceInputs["name"] = args?.name;
            resourceInputs["peerNetwork"] = args?.peerNetwork;
            resourceInputs["peerNetworkType"] = args?.peerNetworkType;
            resourceInputs["project"] = args?.project;
            resourceInputs["vmwareEngineNetwork"] = args?.vmwareEngineNetwork;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["stateDetails"] = undefined /*out*/;
            resourceInputs["uid"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
            resourceInputs["vmwareEngineNetworkCanonical"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(NetworkPeering.__pulumiType, name, resourceInputs, opts);
    }
}
exports.NetworkPeering = NetworkPeering;
/** @internal */
NetworkPeering.__pulumiType = 'gcp:vmwareengine/networkPeering:NetworkPeering';
//# sourceMappingURL=networkPeering.js.map