"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.Network = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Manages a VPC network or legacy network resource on GCP.
 *
 * To get more information about Network, see:
 *
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/networks)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/vpc/docs/vpc)
 *
 * ## Example Usage
 *
 * ### Network Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {name: "vpc-network"});
 * ```
 * ### Network Custom Mtu
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {
 *     project: "my-project-name",
 *     name: "vpc-network",
 *     autoCreateSubnetworks: true,
 *     mtu: 1460,
 * });
 * ```
 * ### Network Custom Firewall Enforcement Order
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {
 *     project: "my-project-name",
 *     name: "vpc-network",
 *     autoCreateSubnetworks: true,
 *     networkFirewallPolicyEnforcementOrder: "BEFORE_CLASSIC_FIREWALL",
 * });
 * ```
 * ### Network Bgp Best Path Selection Mode
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {
 *     project: "my-project-name",
 *     name: "vpc-network",
 *     routingMode: "GLOBAL",
 * });
 * ```
 * ### Network Bgp Best Path Selection Mode Standard
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {
 *     project: "my-project-name",
 *     name: "vpc-network",
 *     routingMode: "GLOBAL",
 *     bgpBestPathSelectionMode: "STANDARD",
 * });
 * ```
 * ### Network Bgp Best Path Selection Mode Standard Custom Fields
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {
 *     project: "my-project-name",
 *     name: "vpc-network",
 *     routingMode: "GLOBAL",
 *     bgpBestPathSelectionMode: "STANDARD",
 *     bgpAlwaysCompareMed: true,
 *     bgpInterRegionCost: "ADD_COST_TO_MED",
 * });
 * ```
 * ### Network Bgp Standard Mode Delete Med
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const vpcNetwork = new gcp.compute.Network("vpc_network", {
 *     name: "vpc-network",
 *     autoCreateSubnetworks: false,
 *     routingMode: "GLOBAL",
 *     project: "my-project-name",
 *     bgpBestPathSelectionMode: "LEGACY",
 *     bgpAlwaysCompareMed: false,
 *     deleteBgpAlwaysCompareMed: true,
 * });
 * ```
 *
 * ## Import
 *
 * Network can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/global/networks/{{name}}`
 *
 * * `{{project}}/{{name}}`
 *
 * * `{{name}}`
 *
 * When using the `pulumi import` command, Network can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:compute/network:Network default projects/{{project}}/global/networks/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/network:Network default {{project}}/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:compute/network:Network default {{name}}
 * ```
 */
class Network extends pulumi.CustomResource {
    /**
     * Get an existing Network 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 Network(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of Network.  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'] === Network.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["autoCreateSubnetworks"] = state?.autoCreateSubnetworks;
            resourceInputs["bgpAlwaysCompareMed"] = state?.bgpAlwaysCompareMed;
            resourceInputs["bgpBestPathSelectionMode"] = state?.bgpBestPathSelectionMode;
            resourceInputs["bgpInterRegionCost"] = state?.bgpInterRegionCost;
            resourceInputs["deleteBgpAlwaysCompareMed"] = state?.deleteBgpAlwaysCompareMed;
            resourceInputs["deleteDefaultRoutesOnCreate"] = state?.deleteDefaultRoutesOnCreate;
            resourceInputs["description"] = state?.description;
            resourceInputs["enableUlaInternalIpv6"] = state?.enableUlaInternalIpv6;
            resourceInputs["gatewayIpv4"] = state?.gatewayIpv4;
            resourceInputs["internalIpv6Range"] = state?.internalIpv6Range;
            resourceInputs["mtu"] = state?.mtu;
            resourceInputs["name"] = state?.name;
            resourceInputs["networkFirewallPolicyEnforcementOrder"] = state?.networkFirewallPolicyEnforcementOrder;
            resourceInputs["networkId"] = state?.networkId;
            resourceInputs["networkProfile"] = state?.networkProfile;
            resourceInputs["numericId"] = state?.numericId;
            resourceInputs["params"] = state?.params;
            resourceInputs["project"] = state?.project;
            resourceInputs["routingMode"] = state?.routingMode;
            resourceInputs["selfLink"] = state?.selfLink;
        }
        else {
            const args = argsOrState;
            resourceInputs["autoCreateSubnetworks"] = args?.autoCreateSubnetworks;
            resourceInputs["bgpAlwaysCompareMed"] = args?.bgpAlwaysCompareMed;
            resourceInputs["bgpBestPathSelectionMode"] = args?.bgpBestPathSelectionMode;
            resourceInputs["bgpInterRegionCost"] = args?.bgpInterRegionCost;
            resourceInputs["deleteBgpAlwaysCompareMed"] = args?.deleteBgpAlwaysCompareMed;
            resourceInputs["deleteDefaultRoutesOnCreate"] = args?.deleteDefaultRoutesOnCreate;
            resourceInputs["description"] = args?.description;
            resourceInputs["enableUlaInternalIpv6"] = args?.enableUlaInternalIpv6;
            resourceInputs["internalIpv6Range"] = args?.internalIpv6Range;
            resourceInputs["mtu"] = args?.mtu;
            resourceInputs["name"] = args?.name;
            resourceInputs["networkFirewallPolicyEnforcementOrder"] = args?.networkFirewallPolicyEnforcementOrder;
            resourceInputs["networkProfile"] = args?.networkProfile;
            resourceInputs["params"] = args?.params;
            resourceInputs["project"] = args?.project;
            resourceInputs["routingMode"] = args?.routingMode;
            resourceInputs["gatewayIpv4"] = undefined /*out*/;
            resourceInputs["networkId"] = undefined /*out*/;
            resourceInputs["numericId"] = undefined /*out*/;
            resourceInputs["selfLink"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Network.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Network = Network;
/** @internal */
Network.__pulumiType = 'gcp:compute/network:Network';
//# sourceMappingURL=network.js.map