"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.Gateway = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * 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: "cn-beijing-a",
 *     vpcId: fooVpc.id,
 * });
 * const fooGateway = new volcengine.vpn.Gateway("fooGateway", {
 *     vpcId: fooVpc.id,
 *     subnetId: fooSubnet.id,
 *     bandwidth: 50,
 *     vpnGatewayName: "acc-test1",
 *     description: "acc-test1",
 *     period: 7,
 *     projectName: "default",
 * });
 * ```
 *
 * ## Import
 *
 * VpnGateway can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:vpn/gateway:Gateway default vgw-273zkshb2qayo7fap8t2****
 * ```
 */
class Gateway extends pulumi.CustomResource {
    /**
     * Get an existing Gateway 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 Gateway(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of Gateway.  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'] === Gateway.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accountId"] = state ? state.accountId : undefined;
            resourceInputs["bandwidth"] = state ? state.bandwidth : undefined;
            resourceInputs["billingType"] = state ? state.billingType : undefined;
            resourceInputs["businessStatus"] = state ? state.businessStatus : undefined;
            resourceInputs["connectionCount"] = state ? state.connectionCount : undefined;
            resourceInputs["creationTime"] = state ? state.creationTime : undefined;
            resourceInputs["deletedTime"] = state ? state.deletedTime : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["expiredTime"] = state ? state.expiredTime : undefined;
            resourceInputs["ipAddress"] = state ? state.ipAddress : undefined;
            resourceInputs["ipsecEnabled"] = state ? state.ipsecEnabled : undefined;
            resourceInputs["lockReason"] = state ? state.lockReason : undefined;
            resourceInputs["period"] = state ? state.period : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["renewType"] = state ? state.renewType : undefined;
            resourceInputs["routeCount"] = state ? state.routeCount : undefined;
            resourceInputs["sslEnabled"] = state ? state.sslEnabled : undefined;
            resourceInputs["sslMaxConnections"] = state ? state.sslMaxConnections : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["subnetId"] = state ? state.subnetId : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["updateTime"] = state ? state.updateTime : undefined;
            resourceInputs["vpcId"] = state ? state.vpcId : undefined;
            resourceInputs["vpnGatewayId"] = state ? state.vpnGatewayId : undefined;
            resourceInputs["vpnGatewayName"] = state ? state.vpnGatewayName : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.bandwidth === undefined) && !opts.urn) {
                throw new Error("Missing required property 'bandwidth'");
            }
            if ((!args || args.subnetId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            if ((!args || args.vpcId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'vpcId'");
            }
            resourceInputs["bandwidth"] = args ? args.bandwidth : undefined;
            resourceInputs["billingType"] = args ? args.billingType : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["ipsecEnabled"] = args ? args.ipsecEnabled : undefined;
            resourceInputs["period"] = args ? args.period : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["sslEnabled"] = args ? args.sslEnabled : undefined;
            resourceInputs["sslMaxConnections"] = args ? args.sslMaxConnections : undefined;
            resourceInputs["subnetId"] = args ? args.subnetId : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["vpcId"] = args ? args.vpcId : undefined;
            resourceInputs["vpnGatewayName"] = args ? args.vpnGatewayName : undefined;
            resourceInputs["accountId"] = undefined /*out*/;
            resourceInputs["businessStatus"] = undefined /*out*/;
            resourceInputs["connectionCount"] = undefined /*out*/;
            resourceInputs["creationTime"] = undefined /*out*/;
            resourceInputs["deletedTime"] = undefined /*out*/;
            resourceInputs["expiredTime"] = undefined /*out*/;
            resourceInputs["ipAddress"] = undefined /*out*/;
            resourceInputs["lockReason"] = undefined /*out*/;
            resourceInputs["renewType"] = undefined /*out*/;
            resourceInputs["routeCount"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
            resourceInputs["vpnGatewayId"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(Gateway.__pulumiType, name, resourceInputs, opts);
    }
}
exports.Gateway = Gateway;
/** @internal */
Gateway.__pulumiType = 'volcengine:vpn/gateway:Gateway';
//# sourceMappingURL=gateway.js.map