"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.ServerGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
class ServerGroup extends pulumi.CustomResource {
    /**
     * Get an existing ServerGroup 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 ServerGroup(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of ServerGroup.  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'] === ServerGroup.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["anyPortEnabled"] = state ? state.anyPortEnabled : undefined;
            resourceInputs["bypassSecurityGroupEnabled"] = state ? state.bypassSecurityGroupEnabled : undefined;
            resourceInputs["connectionDrainEnabled"] = state ? state.connectionDrainEnabled : undefined;
            resourceInputs["connectionDrainTimeout"] = state ? state.connectionDrainTimeout : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["healthCheck"] = state ? state.healthCheck : undefined;
            resourceInputs["ipAddressVersion"] = state ? state.ipAddressVersion : undefined;
            resourceInputs["preserveClientIpEnabled"] = state ? state.preserveClientIpEnabled : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["protocol"] = state ? state.protocol : undefined;
            resourceInputs["proxyProtocolType"] = state ? state.proxyProtocolType : undefined;
            resourceInputs["scheduler"] = state ? state.scheduler : undefined;
            resourceInputs["serverCount"] = state ? state.serverCount : undefined;
            resourceInputs["serverGroupName"] = state ? state.serverGroupName : undefined;
            resourceInputs["servers"] = state ? state.servers : undefined;
            resourceInputs["sessionPersistenceEnabled"] = state ? state.sessionPersistenceEnabled : undefined;
            resourceInputs["sessionPersistenceTimeout"] = state ? state.sessionPersistenceTimeout : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["tags"] = state ? state.tags : undefined;
            resourceInputs["timestampRemoveEnabled"] = state ? state.timestampRemoveEnabled : undefined;
            resourceInputs["type"] = state ? state.type : undefined;
            resourceInputs["vpcId"] = state ? state.vpcId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.serverGroupName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'serverGroupName'");
            }
            if ((!args || args.vpcId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'vpcId'");
            }
            resourceInputs["anyPortEnabled"] = args ? args.anyPortEnabled : undefined;
            resourceInputs["bypassSecurityGroupEnabled"] = args ? args.bypassSecurityGroupEnabled : undefined;
            resourceInputs["connectionDrainEnabled"] = args ? args.connectionDrainEnabled : undefined;
            resourceInputs["connectionDrainTimeout"] = args ? args.connectionDrainTimeout : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["healthCheck"] = args ? args.healthCheck : undefined;
            resourceInputs["ipAddressVersion"] = args ? args.ipAddressVersion : undefined;
            resourceInputs["preserveClientIpEnabled"] = args ? args.preserveClientIpEnabled : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["protocol"] = args ? args.protocol : undefined;
            resourceInputs["proxyProtocolType"] = args ? args.proxyProtocolType : undefined;
            resourceInputs["scheduler"] = args ? args.scheduler : undefined;
            resourceInputs["serverGroupName"] = args ? args.serverGroupName : undefined;
            resourceInputs["servers"] = args ? args.servers : undefined;
            resourceInputs["sessionPersistenceEnabled"] = args ? args.sessionPersistenceEnabled : undefined;
            resourceInputs["sessionPersistenceTimeout"] = args ? args.sessionPersistenceTimeout : undefined;
            resourceInputs["tags"] = args ? args.tags : undefined;
            resourceInputs["timestampRemoveEnabled"] = args ? args.timestampRemoveEnabled : undefined;
            resourceInputs["type"] = args ? args.type : undefined;
            resourceInputs["vpcId"] = args ? args.vpcId : undefined;
            resourceInputs["serverCount"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ServerGroup.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ServerGroup = ServerGroup;
/** @internal */
ServerGroup.__pulumiType = 'volcengine:nlb/serverGroup:ServerGroup';
//# sourceMappingURL=serverGroup.js.map