"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.SslVpnServer = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage ssl vpn server
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooZones = volcengine.ecs.getZones({});
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc",
 *     cidrBlock: "172.16.0.0/16",
 * });
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     subnetName: "acc-test-subnet",
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     vpcId: fooVpc.id,
 * });
 * const fooGateway = new volcengine.vpn.Gateway("fooGateway", {
 *     vpcId: fooVpc.id,
 *     subnetId: fooSubnet.id,
 *     bandwidth: 5,
 *     vpnGatewayName: "acc-test1",
 *     description: "acc-test1",
 *     period: 7,
 *     projectName: "default",
 *     sslEnabled: true,
 *     sslMaxConnections: 5,
 * });
 * const fooSslVpnServer = new volcengine.vpn.SslVpnServer("fooSslVpnServer", {
 *     vpnGatewayId: fooGateway.id,
 *     localSubnets: [fooSubnet.cidrBlock],
 *     clientIpPool: "172.16.2.0/24",
 *     sslVpnServerName: "acc-test-ssl",
 *     description: "acc-test",
 *     protocol: "UDP",
 *     cipher: "AES-128-CBC",
 *     auth: "SHA1",
 *     compress: true,
 * });
 * ```
 *
 * ## Import
 *
 * SSL VPN server can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:vpn/sslVpnServer:SslVpnServer default vss-zm55pqtvk17oq32zd****
 * ```
 */
class SslVpnServer extends pulumi.CustomResource {
    /**
     * Get an existing SslVpnServer 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 SslVpnServer(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of SslVpnServer.  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'] === SslVpnServer.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["auth"] = state ? state.auth : undefined;
            resourceInputs["cipher"] = state ? state.cipher : undefined;
            resourceInputs["clientIpPool"] = state ? state.clientIpPool : undefined;
            resourceInputs["compress"] = state ? state.compress : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["localSubnets"] = state ? state.localSubnets : undefined;
            resourceInputs["port"] = state ? state.port : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["protocol"] = state ? state.protocol : undefined;
            resourceInputs["sslVpnServerId"] = state ? state.sslVpnServerId : undefined;
            resourceInputs["sslVpnServerName"] = state ? state.sslVpnServerName : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["vpnGatewayId"] = state ? state.vpnGatewayId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.clientIpPool === undefined) && !opts.urn) {
                throw new Error("Missing required property 'clientIpPool'");
            }
            if ((!args || args.localSubnets === undefined) && !opts.urn) {
                throw new Error("Missing required property 'localSubnets'");
            }
            if ((!args || args.vpnGatewayId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'vpnGatewayId'");
            }
            resourceInputs["auth"] = args ? args.auth : undefined;
            resourceInputs["cipher"] = args ? args.cipher : undefined;
            resourceInputs["clientIpPool"] = args ? args.clientIpPool : undefined;
            resourceInputs["compress"] = args ? args.compress : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["localSubnets"] = args ? args.localSubnets : undefined;
            resourceInputs["port"] = args ? args.port : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["protocol"] = args ? args.protocol : undefined;
            resourceInputs["sslVpnServerName"] = args ? args.sslVpnServerName : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["vpnGatewayId"] = args ? args.vpnGatewayId : undefined;
            resourceInputs["sslVpnServerId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(SslVpnServer.__pulumiType, name, resourceInputs, opts);
    }
}
exports.SslVpnServer = SslVpnServer;
/** @internal */
SslVpnServer.__pulumiType = 'volcengine:vpn/sslVpnServer:SslVpnServer';
//# sourceMappingURL=sslVpnServer.js.map