"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.PointToPointVpnGateway = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Point-to-Site VPN Gateway.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualWan = new azure.network.VirtualWan("example", {
 *     name: "example-virtualwan",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const exampleVirtualHub = new azure.network.VirtualHub("example", {
 *     name: "example-virtualhub",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     virtualWanId: exampleVirtualWan.id,
 *     addressPrefix: "10.0.0.0/23",
 * });
 * const exampleVpnServerConfiguration = new azure.network.VpnServerConfiguration("example", {
 *     name: "example-config",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     vpnAuthenticationTypes: ["Certificate"],
 *     clientRootCertificates: [{
 *         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=
 * `,
 *     }],
 * });
 * const examplePointToPointVpnGateway = new azure.network.PointToPointVpnGateway("example", {
 *     name: "example-vpn-gateway",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     virtualHubId: exampleVirtualHub.id,
 *     vpnServerConfigurationId: exampleVpnServerConfiguration.id,
 *     scaleUnit: 1,
 *     connectionConfigurations: [{
 *         name: "example-gateway-config",
 *         vpnClientAddressPool: {
 *             addressPrefixes: ["10.0.2.0/24"],
 *         },
 *     }],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Network` - 2025-01-01
 *
 * ## Import
 *
 * Point-to-Site VPN Gateway's can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:network/pointToPointVpnGateway:PointToPointVpnGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/p2sVpnGateways/gateway1
 * ```
 */
class PointToPointVpnGateway extends pulumi.CustomResource {
    /**
     * Get an existing PointToPointVpnGateway 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 PointToPointVpnGateway(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:network/pointToPointVpnGateway:PointToPointVpnGateway';
    /**
     * Returns true if the given object is an instance of PointToPointVpnGateway.  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'] === PointToPointVpnGateway.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["connectionConfigurations"] = state?.connectionConfigurations;
            resourceInputs["dnsServers"] = state?.dnsServers;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["routingPreferenceInternetEnabled"] = state?.routingPreferenceInternetEnabled;
            resourceInputs["scaleUnit"] = state?.scaleUnit;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["virtualHubId"] = state?.virtualHubId;
            resourceInputs["vpnServerConfigurationId"] = state?.vpnServerConfigurationId;
        }
        else {
            const args = argsOrState;
            if (args?.connectionConfigurations === undefined && !opts.urn) {
                throw new Error("Missing required property 'connectionConfigurations'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.scaleUnit === undefined && !opts.urn) {
                throw new Error("Missing required property 'scaleUnit'");
            }
            if (args?.virtualHubId === undefined && !opts.urn) {
                throw new Error("Missing required property 'virtualHubId'");
            }
            if (args?.vpnServerConfigurationId === undefined && !opts.urn) {
                throw new Error("Missing required property 'vpnServerConfigurationId'");
            }
            resourceInputs["connectionConfigurations"] = args?.connectionConfigurations;
            resourceInputs["dnsServers"] = args?.dnsServers;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["routingPreferenceInternetEnabled"] = args?.routingPreferenceInternetEnabled;
            resourceInputs["scaleUnit"] = args?.scaleUnit;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["virtualHubId"] = args?.virtualHubId;
            resourceInputs["vpnServerConfigurationId"] = args?.vpnServerConfigurationId;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(PointToPointVpnGateway.__pulumiType, name, resourceInputs, opts);
    }
}
exports.PointToPointVpnGateway = PointToPointVpnGateway;
//# sourceMappingURL=pointToPointVpnGateway.js.map