"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.WafDomain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage waf domain
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.waf.WafDomain("foo", {
 *     accessMode: 10,
 *     backendGroups: [{
 *         accessPorts: [80],
 *         backends: [
 *             {
 *                 ip: "192.168.0.0",
 *                 port: 80,
 *                 protocol: "HTTP",
 *                 weight: 40,
 *             },
 *             {
 *                 ip: "192.168.1.0",
 *                 port: 80,
 *                 protocol: "HTTP",
 *                 weight: 60,
 *             },
 *         ],
 *         name: "default",
 *     }],
 *     clientIpLocation: 0,
 *     clientMaxBodySize: 1024,
 *     customHeaders: [
 *         "x-top-1",
 *         "x-top-2",
 *     ],
 *     domain: "www.tf-test.com",
 *     enableIpv6: 0,
 *     keepAliveRequest: 200,
 *     keepAliveTimeOut: 100,
 *     lbAlgorithm: "wlc",
 *     protocolPorts: {
 *         https: [80],
 *     },
 *     protocols: ["HTTP"],
 *     proxyConfig: 1,
 *     proxyConnectTimeOut: 10,
 *     proxyKeepAlive: 101,
 *     proxyKeepAliveTimeOut: 20,
 *     proxyReadTimeOut: 200,
 *     proxyRetry: 10,
 *     proxyWriteTimeOut: 120,
 *     publicRealServer: 0,
 *     vpcId: "vpc-2d6485y7p95og58ozfcvxxxxx",
 * });
 * ```
 *
 * ## Import
 *
 * WafDomain can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:waf/wafDomain:WafDomain default resource_id
 * ```
 */
class WafDomain extends pulumi.CustomResource {
    /**
     * Get an existing WafDomain 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 WafDomain(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of WafDomain.  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'] === WafDomain.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["accessMode"] = state ? state.accessMode : undefined;
            resourceInputs["advancedDefenseIp"] = state ? state.advancedDefenseIp : undefined;
            resourceInputs["advancedDefenseIpv6"] = state ? state.advancedDefenseIpv6 : undefined;
            resourceInputs["apiEnable"] = state ? state.apiEnable : undefined;
            resourceInputs["attackStatus"] = state ? state.attackStatus : undefined;
            resourceInputs["autoCcEnable"] = state ? state.autoCcEnable : undefined;
            resourceInputs["backendGroups"] = state ? state.backendGroups : undefined;
            resourceInputs["blackIpEnable"] = state ? state.blackIpEnable : undefined;
            resourceInputs["blackLctEnable"] = state ? state.blackLctEnable : undefined;
            resourceInputs["botDytokenEnable"] = state ? state.botDytokenEnable : undefined;
            resourceInputs["botFrequencyEnable"] = state ? state.botFrequencyEnable : undefined;
            resourceInputs["botRepeatEnable"] = state ? state.botRepeatEnable : undefined;
            resourceInputs["botSequenceDefaultAction"] = state ? state.botSequenceDefaultAction : undefined;
            resourceInputs["botSequenceEnable"] = state ? state.botSequenceEnable : undefined;
            resourceInputs["ccEnable"] = state ? state.ccEnable : undefined;
            resourceInputs["certificateId"] = state ? state.certificateId : undefined;
            resourceInputs["certificateName"] = state ? state.certificateName : undefined;
            resourceInputs["certificatePlatform"] = state ? state.certificatePlatform : undefined;
            resourceInputs["clientIpLocation"] = state ? state.clientIpLocation : undefined;
            resourceInputs["clientMaxBodySize"] = state ? state.clientMaxBodySize : undefined;
            resourceInputs["cloudAccessConfigs"] = state ? state.cloudAccessConfigs : undefined;
            resourceInputs["cname"] = state ? state.cname : undefined;
            resourceInputs["customBotEnable"] = state ? state.customBotEnable : undefined;
            resourceInputs["customHeaders"] = state ? state.customHeaders : undefined;
            resourceInputs["customRspEnable"] = state ? state.customRspEnable : undefined;
            resourceInputs["customSni"] = state ? state.customSni : undefined;
            resourceInputs["defenceMode"] = state ? state.defenceMode : undefined;
            resourceInputs["defenceModeComputed"] = state ? state.defenceModeComputed : undefined;
            resourceInputs["dlpEnable"] = state ? state.dlpEnable : undefined;
            resourceInputs["domain"] = state ? state.domain : undefined;
            resourceInputs["enableCustomRedirect"] = state ? state.enableCustomRedirect : undefined;
            resourceInputs["enableHttp2"] = state ? state.enableHttp2 : undefined;
            resourceInputs["enableIpv6"] = state ? state.enableIpv6 : undefined;
            resourceInputs["enableSni"] = state ? state.enableSni : undefined;
            resourceInputs["extraDefenceModeLbInstances"] = state ? state.extraDefenceModeLbInstances : undefined;
            resourceInputs["keepAliveRequest"] = state ? state.keepAliveRequest : undefined;
            resourceInputs["keepAliveTimeOut"] = state ? state.keepAliveTimeOut : undefined;
            resourceInputs["lbAlgorithm"] = state ? state.lbAlgorithm : undefined;
            resourceInputs["llmAvailable"] = state ? state.llmAvailable : undefined;
            resourceInputs["projectName"] = state ? state.projectName : undefined;
            resourceInputs["protocolFollow"] = state ? state.protocolFollow : undefined;
            resourceInputs["protocolPorts"] = state ? state.protocolPorts : undefined;
            resourceInputs["protocols"] = state ? state.protocols : undefined;
            resourceInputs["proxyConfig"] = state ? state.proxyConfig : undefined;
            resourceInputs["proxyConnectTimeOut"] = state ? state.proxyConnectTimeOut : undefined;
            resourceInputs["proxyKeepAlive"] = state ? state.proxyKeepAlive : undefined;
            resourceInputs["proxyKeepAliveTimeOut"] = state ? state.proxyKeepAliveTimeOut : undefined;
            resourceInputs["proxyReadTimeOut"] = state ? state.proxyReadTimeOut : undefined;
            resourceInputs["proxyRetry"] = state ? state.proxyRetry : undefined;
            resourceInputs["proxyWriteTimeOut"] = state ? state.proxyWriteTimeOut : undefined;
            resourceInputs["publicRealServer"] = state ? state.publicRealServer : undefined;
            resourceInputs["redirectHttps"] = state ? state.redirectHttps : undefined;
            resourceInputs["serverIps"] = state ? state.serverIps : undefined;
            resourceInputs["srcIps"] = state ? state.srcIps : undefined;
            resourceInputs["sslCiphers"] = state ? state.sslCiphers : undefined;
            resourceInputs["sslProtocols"] = state ? state.sslProtocols : undefined;
            resourceInputs["status"] = state ? state.status : undefined;
            resourceInputs["systemBotEnable"] = state ? state.systemBotEnable : undefined;
            resourceInputs["tamperProofEnable"] = state ? state.tamperProofEnable : undefined;
            resourceInputs["tlsEnable"] = state ? state.tlsEnable : undefined;
            resourceInputs["tlsFieldsConfig"] = state ? state.tlsFieldsConfig : undefined;
            resourceInputs["updateTime"] = state ? state.updateTime : undefined;
            resourceInputs["volcCertificateId"] = state ? state.volcCertificateId : undefined;
            resourceInputs["vpcId"] = state ? state.vpcId : undefined;
            resourceInputs["wafEnable"] = state ? state.wafEnable : undefined;
            resourceInputs["wafWhiteReqEnable"] = state ? state.wafWhiteReqEnable : undefined;
            resourceInputs["whiteEnable"] = state ? state.whiteEnable : undefined;
            resourceInputs["whiteFieldEnable"] = state ? state.whiteFieldEnable : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.accessMode === undefined) && !opts.urn) {
                throw new Error("Missing required property 'accessMode'");
            }
            if ((!args || args.domain === undefined) && !opts.urn) {
                throw new Error("Missing required property 'domain'");
            }
            resourceInputs["accessMode"] = args ? args.accessMode : undefined;
            resourceInputs["apiEnable"] = args ? args.apiEnable : undefined;
            resourceInputs["autoCcEnable"] = args ? args.autoCcEnable : undefined;
            resourceInputs["backendGroups"] = args ? args.backendGroups : undefined;
            resourceInputs["blackIpEnable"] = args ? args.blackIpEnable : undefined;
            resourceInputs["blackLctEnable"] = args ? args.blackLctEnable : undefined;
            resourceInputs["botDytokenEnable"] = args ? args.botDytokenEnable : undefined;
            resourceInputs["botFrequencyEnable"] = args ? args.botFrequencyEnable : undefined;
            resourceInputs["botRepeatEnable"] = args ? args.botRepeatEnable : undefined;
            resourceInputs["botSequenceDefaultAction"] = args ? args.botSequenceDefaultAction : undefined;
            resourceInputs["botSequenceEnable"] = args ? args.botSequenceEnable : undefined;
            resourceInputs["ccEnable"] = args ? args.ccEnable : undefined;
            resourceInputs["certificateId"] = args ? args.certificateId : undefined;
            resourceInputs["certificatePlatform"] = args ? args.certificatePlatform : undefined;
            resourceInputs["clientIpLocation"] = args ? args.clientIpLocation : undefined;
            resourceInputs["clientMaxBodySize"] = args ? args.clientMaxBodySize : undefined;
            resourceInputs["cloudAccessConfigs"] = args ? args.cloudAccessConfigs : undefined;
            resourceInputs["customBotEnable"] = args ? args.customBotEnable : undefined;
            resourceInputs["customHeaders"] = args ? args.customHeaders : undefined;
            resourceInputs["customRspEnable"] = args ? args.customRspEnable : undefined;
            resourceInputs["customSni"] = args ? args.customSni : undefined;
            resourceInputs["defenceMode"] = args ? args.defenceMode : undefined;
            resourceInputs["dlpEnable"] = args ? args.dlpEnable : undefined;
            resourceInputs["domain"] = args ? args.domain : undefined;
            resourceInputs["enableCustomRedirect"] = args ? args.enableCustomRedirect : undefined;
            resourceInputs["enableHttp2"] = args ? args.enableHttp2 : undefined;
            resourceInputs["enableIpv6"] = args ? args.enableIpv6 : undefined;
            resourceInputs["enableSni"] = args ? args.enableSni : undefined;
            resourceInputs["extraDefenceModeLbInstances"] = args ? args.extraDefenceModeLbInstances : undefined;
            resourceInputs["keepAliveRequest"] = args ? args.keepAliveRequest : undefined;
            resourceInputs["keepAliveTimeOut"] = args ? args.keepAliveTimeOut : undefined;
            resourceInputs["lbAlgorithm"] = args ? args.lbAlgorithm : undefined;
            resourceInputs["llmAvailable"] = args ? args.llmAvailable : undefined;
            resourceInputs["projectName"] = args ? args.projectName : undefined;
            resourceInputs["protocolFollow"] = args ? args.protocolFollow : undefined;
            resourceInputs["protocolPorts"] = args ? args.protocolPorts : undefined;
            resourceInputs["protocols"] = args ? args.protocols : undefined;
            resourceInputs["proxyConfig"] = args ? args.proxyConfig : undefined;
            resourceInputs["proxyConnectTimeOut"] = args ? args.proxyConnectTimeOut : undefined;
            resourceInputs["proxyKeepAlive"] = args ? args.proxyKeepAlive : undefined;
            resourceInputs["proxyKeepAliveTimeOut"] = args ? args.proxyKeepAliveTimeOut : undefined;
            resourceInputs["proxyReadTimeOut"] = args ? args.proxyReadTimeOut : undefined;
            resourceInputs["proxyRetry"] = args ? args.proxyRetry : undefined;
            resourceInputs["proxyWriteTimeOut"] = args ? args.proxyWriteTimeOut : undefined;
            resourceInputs["publicRealServer"] = args ? args.publicRealServer : undefined;
            resourceInputs["redirectHttps"] = args ? args.redirectHttps : undefined;
            resourceInputs["sslCiphers"] = args ? args.sslCiphers : undefined;
            resourceInputs["sslProtocols"] = args ? args.sslProtocols : undefined;
            resourceInputs["systemBotEnable"] = args ? args.systemBotEnable : undefined;
            resourceInputs["tamperProofEnable"] = args ? args.tamperProofEnable : undefined;
            resourceInputs["tlsEnable"] = args ? args.tlsEnable : undefined;
            resourceInputs["tlsFieldsConfig"] = args ? args.tlsFieldsConfig : undefined;
            resourceInputs["volcCertificateId"] = args ? args.volcCertificateId : undefined;
            resourceInputs["vpcId"] = args ? args.vpcId : undefined;
            resourceInputs["wafEnable"] = args ? args.wafEnable : undefined;
            resourceInputs["wafWhiteReqEnable"] = args ? args.wafWhiteReqEnable : undefined;
            resourceInputs["whiteEnable"] = args ? args.whiteEnable : undefined;
            resourceInputs["whiteFieldEnable"] = args ? args.whiteFieldEnable : undefined;
            resourceInputs["advancedDefenseIp"] = undefined /*out*/;
            resourceInputs["advancedDefenseIpv6"] = undefined /*out*/;
            resourceInputs["attackStatus"] = undefined /*out*/;
            resourceInputs["certificateName"] = undefined /*out*/;
            resourceInputs["cname"] = undefined /*out*/;
            resourceInputs["defenceModeComputed"] = undefined /*out*/;
            resourceInputs["serverIps"] = undefined /*out*/;
            resourceInputs["srcIps"] = undefined /*out*/;
            resourceInputs["status"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(WafDomain.__pulumiType, name, resourceInputs, opts);
    }
}
exports.WafDomain = WafDomain;
/** @internal */
WafDomain.__pulumiType = 'volcengine:waf/wafDomain:WafDomain';
//# sourceMappingURL=wafDomain.js.map