"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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualNetworkGateway = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Virtual Network Gateway to establish secure, cross-premises connectivity.
 *
 * > **Note:** Please be aware that provisioning a Virtual Network Gateway takes a long time (between 30 minutes and 1 hour)
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "test",
 *     location: "West Europe",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "test",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     addressSpaces: ["10.0.0.0/16"],
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "GatewaySubnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "test",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     allocationMethod: "Dynamic",
 * });
 * const exampleVirtualNetworkGateway = new azure.network.VirtualNetworkGateway("example", {
 *     name: "test",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     type: "Vpn",
 *     vpnType: "RouteBased",
 *     activeActive: false,
 *     bgpEnabled: false,
 *     sku: "Basic",
 *     ipConfigurations: [{
 *         name: "vnetGatewayConfig",
 *         publicIpAddressId: examplePublicIp.id,
 *         privateIpAddressAllocation: "Dynamic",
 *         subnetId: exampleSubnet.id,
 *     }],
 *     vpnClientConfiguration: {
 *         addressSpaces: ["10.2.0.0/24"],
 *         rootCertificates: [{
 *             name: "DigiCert-Federated-ID-Root-CA",
 *             publicCertData: `MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn
 * MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
 * d3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg
 * Um9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV
 * BAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp
 * Y2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB
 * MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j
 * QPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8
 * zAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf
 * GTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d
 * GTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8
 * Dk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2
 * DwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV
 * HQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW
 * jKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP
 * 9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR
 * QELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL
 * uGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn
 * WsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq
 * M/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk=
 * `,
 *         }],
 *         revokedCertificates: [{
 *             name: "Verizon-Global-Root-CA",
 *             thumbprint: "912198EEF23DCAC40939312FEE97DD560BAE49B1",
 *         }],
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Network` - 2025-01-01
 *
 * ## Import
 *
 * Virtual Network Gateways can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:network/virtualNetworkGateway:VirtualNetworkGateway exampleGateway /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.Network/virtualNetworkGateways/myGateway1
 * ```
 */
class VirtualNetworkGateway extends pulumi.CustomResource {
    /**
     * Get an existing VirtualNetworkGateway 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 VirtualNetworkGateway(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:network/virtualNetworkGateway:VirtualNetworkGateway';
    /**
     * Returns true if the given object is an instance of VirtualNetworkGateway.  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'] === VirtualNetworkGateway.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["activeActive"] = state?.activeActive;
            resourceInputs["bgpEnabled"] = state?.bgpEnabled;
            resourceInputs["bgpRouteTranslationForNatEnabled"] = state?.bgpRouteTranslationForNatEnabled;
            resourceInputs["bgpSettings"] = state?.bgpSettings;
            resourceInputs["customRoute"] = state?.customRoute;
            resourceInputs["defaultLocalNetworkGatewayId"] = state?.defaultLocalNetworkGatewayId;
            resourceInputs["dnsForwardingEnabled"] = state?.dnsForwardingEnabled;
            resourceInputs["edgeZone"] = state?.edgeZone;
            resourceInputs["enableBgp"] = state?.enableBgp;
            resourceInputs["generation"] = state?.generation;
            resourceInputs["ipConfigurations"] = state?.ipConfigurations;
            resourceInputs["ipSecReplayProtectionEnabled"] = state?.ipSecReplayProtectionEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["policyGroups"] = state?.policyGroups;
            resourceInputs["privateIpAddressEnabled"] = state?.privateIpAddressEnabled;
            resourceInputs["remoteVnetTrafficEnabled"] = state?.remoteVnetTrafficEnabled;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["sku"] = state?.sku;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["type"] = state?.type;
            resourceInputs["virtualWanTrafficEnabled"] = state?.virtualWanTrafficEnabled;
            resourceInputs["vpnClientConfiguration"] = state?.vpnClientConfiguration;
            resourceInputs["vpnType"] = state?.vpnType;
        }
        else {
            const args = argsOrState;
            if (args?.ipConfigurations === undefined && !opts.urn) {
                throw new Error("Missing required property 'ipConfigurations'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.sku === undefined && !opts.urn) {
                throw new Error("Missing required property 'sku'");
            }
            if (args?.type === undefined && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            resourceInputs["activeActive"] = args?.activeActive;
            resourceInputs["bgpEnabled"] = args?.bgpEnabled;
            resourceInputs["bgpRouteTranslationForNatEnabled"] = args?.bgpRouteTranslationForNatEnabled;
            resourceInputs["bgpSettings"] = args?.bgpSettings;
            resourceInputs["customRoute"] = args?.customRoute;
            resourceInputs["defaultLocalNetworkGatewayId"] = args?.defaultLocalNetworkGatewayId;
            resourceInputs["dnsForwardingEnabled"] = args?.dnsForwardingEnabled;
            resourceInputs["edgeZone"] = args?.edgeZone;
            resourceInputs["enableBgp"] = args?.enableBgp;
            resourceInputs["generation"] = args?.generation;
            resourceInputs["ipConfigurations"] = args?.ipConfigurations;
            resourceInputs["ipSecReplayProtectionEnabled"] = args?.ipSecReplayProtectionEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["policyGroups"] = args?.policyGroups;
            resourceInputs["privateIpAddressEnabled"] = args?.privateIpAddressEnabled;
            resourceInputs["remoteVnetTrafficEnabled"] = args?.remoteVnetTrafficEnabled;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["type"] = args?.type;
            resourceInputs["virtualWanTrafficEnabled"] = args?.virtualWanTrafficEnabled;
            resourceInputs["vpnClientConfiguration"] = args?.vpnClientConfiguration;
            resourceInputs["vpnType"] = args?.vpnType;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(VirtualNetworkGateway.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VirtualNetworkGateway = VirtualNetworkGateway;
//# sourceMappingURL=virtualNetworkGateway.js.map