UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,043 lines 477 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeRegionSecurityPolicy = exports.ComputeRegionSecurityPolicyUserDefinedFieldsList = exports.ComputeRegionSecurityPolicyUserDefinedFieldsOutputReference = exports.ComputeRegionSecurityPolicyTimeoutsOutputReference = exports.ComputeRegionSecurityPolicyRulesList = exports.ComputeRegionSecurityPolicyRulesOutputReference = exports.ComputeRegionSecurityPolicyRulesRateLimitOptionsOutputReference = exports.ComputeRegionSecurityPolicyRulesRateLimitOptionsRateLimitThresholdOutputReference = exports.ComputeRegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsList = exports.ComputeRegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsOutputReference = exports.ComputeRegionSecurityPolicyRulesRateLimitOptionsBanThresholdOutputReference = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigOutputReference = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionList = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionOutputReference = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestUriList = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestUriOutputReference = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamList = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamOutputReference = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderList = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieList = exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference = exports.ComputeRegionSecurityPolicyRulesNetworkMatchOutputReference = exports.ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList = exports.ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference = exports.ComputeRegionSecurityPolicyRulesMatchOutputReference = exports.ComputeRegionSecurityPolicyRulesMatchExprOutputReference = exports.ComputeRegionSecurityPolicyRulesMatchConfigOutputReference = exports.ComputeRegionSecurityPolicyDdosProtectionConfigOutputReference = void 0; exports.computeRegionSecurityPolicyDdosProtectionConfigToTerraform = computeRegionSecurityPolicyDdosProtectionConfigToTerraform; exports.computeRegionSecurityPolicyDdosProtectionConfigToHclTerraform = computeRegionSecurityPolicyDdosProtectionConfigToHclTerraform; exports.computeRegionSecurityPolicyRulesMatchConfigToTerraform = computeRegionSecurityPolicyRulesMatchConfigToTerraform; exports.computeRegionSecurityPolicyRulesMatchConfigToHclTerraform = computeRegionSecurityPolicyRulesMatchConfigToHclTerraform; exports.computeRegionSecurityPolicyRulesMatchExprToTerraform = computeRegionSecurityPolicyRulesMatchExprToTerraform; exports.computeRegionSecurityPolicyRulesMatchExprToHclTerraform = computeRegionSecurityPolicyRulesMatchExprToHclTerraform; exports.computeRegionSecurityPolicyRulesMatchToTerraform = computeRegionSecurityPolicyRulesMatchToTerraform; exports.computeRegionSecurityPolicyRulesMatchToHclTerraform = computeRegionSecurityPolicyRulesMatchToHclTerraform; exports.computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToTerraform = computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToTerraform; exports.computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToHclTerraform = computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToHclTerraform; exports.computeRegionSecurityPolicyRulesNetworkMatchToTerraform = computeRegionSecurityPolicyRulesNetworkMatchToTerraform; exports.computeRegionSecurityPolicyRulesNetworkMatchToHclTerraform = computeRegionSecurityPolicyRulesNetworkMatchToHclTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieToTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieToTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieToHclTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieToHclTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderToTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderToTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderToHclTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderToHclTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamToTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamToTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamToHclTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamToHclTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestUriToTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestUriToTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestUriToHclTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestUriToHclTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionToTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionToTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionToHclTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionToHclTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigToTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigToTerraform; exports.computeRegionSecurityPolicyRulesPreconfiguredWafConfigToHclTerraform = computeRegionSecurityPolicyRulesPreconfiguredWafConfigToHclTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsBanThresholdToTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsBanThresholdToTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsBanThresholdToHclTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsBanThresholdToHclTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsToTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsToTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsToHclTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsEnforceOnKeyConfigsToHclTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsRateLimitThresholdToTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsRateLimitThresholdToTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsRateLimitThresholdToHclTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsRateLimitThresholdToHclTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsToTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsToTerraform; exports.computeRegionSecurityPolicyRulesRateLimitOptionsToHclTerraform = computeRegionSecurityPolicyRulesRateLimitOptionsToHclTerraform; exports.computeRegionSecurityPolicyRulesToTerraform = computeRegionSecurityPolicyRulesToTerraform; exports.computeRegionSecurityPolicyRulesToHclTerraform = computeRegionSecurityPolicyRulesToHclTerraform; exports.computeRegionSecurityPolicyTimeoutsToTerraform = computeRegionSecurityPolicyTimeoutsToTerraform; exports.computeRegionSecurityPolicyTimeoutsToHclTerraform = computeRegionSecurityPolicyTimeoutsToHclTerraform; exports.computeRegionSecurityPolicyUserDefinedFieldsToTerraform = computeRegionSecurityPolicyUserDefinedFieldsToTerraform; exports.computeRegionSecurityPolicyUserDefinedFieldsToHclTerraform = computeRegionSecurityPolicyUserDefinedFieldsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeRegionSecurityPolicyDdosProtectionConfigToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { ddos_protection: cdktf.stringToTerraform(struct.ddosProtection), }; } function computeRegionSecurityPolicyDdosProtectionConfigToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { ddos_protection: { value: cdktf.stringToHclTerraform(struct.ddosProtection), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyDdosProtectionConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._ddosProtection !== undefined) { hasAnyValues = true; internalValueResult.ddosProtection = this._ddosProtection; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._ddosProtection = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._ddosProtection = value.ddosProtection; } } get ddosProtection() { return this.getStringAttribute('ddos_protection'); } set ddosProtection(value) { this._ddosProtection = value; } // Temporarily expose input value. Use with caution. get ddosProtectionInput() { return this._ddosProtection; } } exports.ComputeRegionSecurityPolicyDdosProtectionConfigOutputReference = ComputeRegionSecurityPolicyDdosProtectionConfigOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyDdosProtectionConfigOutputReference[_a] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyDdosProtectionConfigOutputReference", version: "14.35.1" }; function computeRegionSecurityPolicyRulesMatchConfigToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { src_ip_ranges: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcIpRanges), }; } function computeRegionSecurityPolicyRulesMatchConfigToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { src_ip_ranges: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcIpRanges), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesMatchConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._srcIpRanges !== undefined) { hasAnyValues = true; internalValueResult.srcIpRanges = this._srcIpRanges; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._srcIpRanges = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._srcIpRanges = value.srcIpRanges; } } get srcIpRanges() { return this.getListAttribute('src_ip_ranges'); } set srcIpRanges(value) { this._srcIpRanges = value; } resetSrcIpRanges() { this._srcIpRanges = undefined; } // Temporarily expose input value. Use with caution. get srcIpRangesInput() { return this._srcIpRanges; } } exports.ComputeRegionSecurityPolicyRulesMatchConfigOutputReference = ComputeRegionSecurityPolicyRulesMatchConfigOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesMatchConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesMatchConfigOutputReference", version: "14.35.1" }; function computeRegionSecurityPolicyRulesMatchExprToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { expression: cdktf.stringToTerraform(struct.expression), }; } function computeRegionSecurityPolicyRulesMatchExprToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { expression: { value: cdktf.stringToHclTerraform(struct.expression), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesMatchExprOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._expression !== undefined) { hasAnyValues = true; internalValueResult.expression = this._expression; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._expression = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._expression = value.expression; } } get expression() { return this.getStringAttribute('expression'); } set expression(value) { this._expression = value; } // Temporarily expose input value. Use with caution. get expressionInput() { return this._expression; } } exports.ComputeRegionSecurityPolicyRulesMatchExprOutputReference = ComputeRegionSecurityPolicyRulesMatchExprOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesMatchExprOutputReference[_c] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesMatchExprOutputReference", version: "14.35.1" }; function computeRegionSecurityPolicyRulesMatchToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { versioned_expr: cdktf.stringToTerraform(struct.versionedExpr), config: computeRegionSecurityPolicyRulesMatchConfigToTerraform(struct.config), expr: computeRegionSecurityPolicyRulesMatchExprToTerraform(struct.expr), }; } function computeRegionSecurityPolicyRulesMatchToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { versioned_expr: { value: cdktf.stringToHclTerraform(struct.versionedExpr), isBlock: false, type: "simple", storageClassType: "string", }, config: { value: computeRegionSecurityPolicyRulesMatchConfigToHclTerraform(struct.config), isBlock: true, type: "list", storageClassType: "ComputeRegionSecurityPolicyRulesMatchConfigList", }, expr: { value: computeRegionSecurityPolicyRulesMatchExprToHclTerraform(struct.expr), isBlock: true, type: "list", storageClassType: "ComputeRegionSecurityPolicyRulesMatchExprList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesMatchOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; // config - computed: false, optional: true, required: false this._config = new ComputeRegionSecurityPolicyRulesMatchConfigOutputReference(this, "config"); // expr - computed: false, optional: true, required: false this._expr = new ComputeRegionSecurityPolicyRulesMatchExprOutputReference(this, "expr"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._versionedExpr !== undefined) { hasAnyValues = true; internalValueResult.versionedExpr = this._versionedExpr; } if (this._config?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.config = this._config?.internalValue; } if (this._expr?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.expr = this._expr?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._versionedExpr = undefined; this._config.internalValue = undefined; this._expr.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._versionedExpr = value.versionedExpr; this._config.internalValue = value.config; this._expr.internalValue = value.expr; } } get versionedExpr() { return this.getStringAttribute('versioned_expr'); } set versionedExpr(value) { this._versionedExpr = value; } resetVersionedExpr() { this._versionedExpr = undefined; } // Temporarily expose input value. Use with caution. get versionedExprInput() { return this._versionedExpr; } get config() { return this._config; } putConfig(value) { this._config.internalValue = value; } resetConfig() { this._config.internalValue = undefined; } // Temporarily expose input value. Use with caution. get configInput() { return this._config.internalValue; } get expr() { return this._expr; } putExpr(value) { this._expr.internalValue = value; } resetExpr() { this._expr.internalValue = undefined; } // Temporarily expose input value. Use with caution. get exprInput() { return this._expr.internalValue; } } exports.ComputeRegionSecurityPolicyRulesMatchOutputReference = ComputeRegionSecurityPolicyRulesMatchOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesMatchOutputReference[_d] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesMatchOutputReference", version: "14.35.1" }; function computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { name: cdktf.stringToTerraform(struct.name), values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values), }; } function computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, values: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._values !== undefined) { hasAnyValues = true; internalValueResult.values = this._values; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._name = undefined; this._values = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._name = value.name; this._values = value.values; } } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get values() { return this.getListAttribute('values'); } set values(value) { this._values = value; } resetValues() { this._values = undefined; } // Temporarily expose input value. Use with caution. get valuesInput() { return this._values; } } exports.ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference = ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference[_e] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference", version: "14.35.1" }; class ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList = ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList; _f = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList[_f] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList", version: "14.35.1" }; function computeRegionSecurityPolicyRulesNetworkMatchToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { dest_ip_ranges: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destIpRanges), dest_ports: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destPorts), ip_protocols: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.ipProtocols), src_asns: cdktf.listMapper(cdktf.numberToTerraform, false)(struct.srcAsns), src_ip_ranges: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcIpRanges), src_ports: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcPorts), src_region_codes: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcRegionCodes), user_defined_fields: cdktf.listMapper(computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToTerraform, true)(struct.userDefinedFields), }; } function computeRegionSecurityPolicyRulesNetworkMatchToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { dest_ip_ranges: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destIpRanges), isBlock: false, type: "list", storageClassType: "stringList", }, dest_ports: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destPorts), isBlock: false, type: "list", storageClassType: "stringList", }, ip_protocols: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.ipProtocols), isBlock: false, type: "list", storageClassType: "stringList", }, src_asns: { value: cdktf.listMapperHcl(cdktf.numberToHclTerraform, false)(struct.srcAsns), isBlock: false, type: "list", storageClassType: "numberList", }, src_ip_ranges: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcIpRanges), isBlock: false, type: "list", storageClassType: "stringList", }, src_ports: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcPorts), isBlock: false, type: "list", storageClassType: "stringList", }, src_region_codes: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcRegionCodes), isBlock: false, type: "list", storageClassType: "stringList", }, user_defined_fields: { value: cdktf.listMapperHcl(computeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsToHclTerraform, true)(struct.userDefinedFields), isBlock: true, type: "list", storageClassType: "ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesNetworkMatchOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; // user_defined_fields - computed: false, optional: true, required: false this._userDefinedFields = new ComputeRegionSecurityPolicyRulesNetworkMatchUserDefinedFieldsList(this, "user_defined_fields", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._destIpRanges !== undefined) { hasAnyValues = true; internalValueResult.destIpRanges = this._destIpRanges; } if (this._destPorts !== undefined) { hasAnyValues = true; internalValueResult.destPorts = this._destPorts; } if (this._ipProtocols !== undefined) { hasAnyValues = true; internalValueResult.ipProtocols = this._ipProtocols; } if (this._srcAsns !== undefined) { hasAnyValues = true; internalValueResult.srcAsns = this._srcAsns; } if (this._srcIpRanges !== undefined) { hasAnyValues = true; internalValueResult.srcIpRanges = this._srcIpRanges; } if (this._srcPorts !== undefined) { hasAnyValues = true; internalValueResult.srcPorts = this._srcPorts; } if (this._srcRegionCodes !== undefined) { hasAnyValues = true; internalValueResult.srcRegionCodes = this._srcRegionCodes; } if (this._userDefinedFields?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.userDefinedFields = this._userDefinedFields?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._destIpRanges = undefined; this._destPorts = undefined; this._ipProtocols = undefined; this._srcAsns = undefined; this._srcIpRanges = undefined; this._srcPorts = undefined; this._srcRegionCodes = undefined; this._userDefinedFields.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._destIpRanges = value.destIpRanges; this._destPorts = value.destPorts; this._ipProtocols = value.ipProtocols; this._srcAsns = value.srcAsns; this._srcIpRanges = value.srcIpRanges; this._srcPorts = value.srcPorts; this._srcRegionCodes = value.srcRegionCodes; this._userDefinedFields.internalValue = value.userDefinedFields; } } get destIpRanges() { return this.getListAttribute('dest_ip_ranges'); } set destIpRanges(value) { this._destIpRanges = value; } resetDestIpRanges() { this._destIpRanges = undefined; } // Temporarily expose input value. Use with caution. get destIpRangesInput() { return this._destIpRanges; } get destPorts() { return this.getListAttribute('dest_ports'); } set destPorts(value) { this._destPorts = value; } resetDestPorts() { this._destPorts = undefined; } // Temporarily expose input value. Use with caution. get destPortsInput() { return this._destPorts; } get ipProtocols() { return this.getListAttribute('ip_protocols'); } set ipProtocols(value) { this._ipProtocols = value; } resetIpProtocols() { this._ipProtocols = undefined; } // Temporarily expose input value. Use with caution. get ipProtocolsInput() { return this._ipProtocols; } get srcAsns() { return this.getNumberListAttribute('src_asns'); } set srcAsns(value) { this._srcAsns = value; } resetSrcAsns() { this._srcAsns = undefined; } // Temporarily expose input value. Use with caution. get srcAsnsInput() { return this._srcAsns; } get srcIpRanges() { return this.getListAttribute('src_ip_ranges'); } set srcIpRanges(value) { this._srcIpRanges = value; } resetSrcIpRanges() { this._srcIpRanges = undefined; } // Temporarily expose input value. Use with caution. get srcIpRangesInput() { return this._srcIpRanges; } get srcPorts() { return this.getListAttribute('src_ports'); } set srcPorts(value) { this._srcPorts = value; } resetSrcPorts() { this._srcPorts = undefined; } // Temporarily expose input value. Use with caution. get srcPortsInput() { return this._srcPorts; } get srcRegionCodes() { return this.getListAttribute('src_region_codes'); } set srcRegionCodes(value) { this._srcRegionCodes = value; } resetSrcRegionCodes() { this._srcRegionCodes = undefined; } // Temporarily expose input value. Use with caution. get srcRegionCodesInput() { return this._srcRegionCodes; } get userDefinedFields() { return this._userDefinedFields; } putUserDefinedFields(value) { this._userDefinedFields.internalValue = value; } resetUserDefinedFields() { this._userDefinedFields.internalValue = undefined; } // Temporarily expose input value. Use with caution. get userDefinedFieldsInput() { return this._userDefinedFields.internalValue; } } exports.ComputeRegionSecurityPolicyRulesNetworkMatchOutputReference = ComputeRegionSecurityPolicyRulesNetworkMatchOutputReference; _g = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesNetworkMatchOutputReference[_g] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesNetworkMatchOutputReference", version: "14.35.1" }; function computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { operator: cdktf.stringToTerraform(struct.operator), value: cdktf.stringToTerraform(struct.value), }; } function computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.stringToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._operator = undefined; this._value = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._operator = value.operator; this._value = value.value; } } get operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } get value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } resetValue() { this._value = undefined; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference = ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference; _h = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference[_h] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference", version: "14.35.1" }; class ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieList = ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieList; _j = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieList[_j] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestCookieList", version: "14.35.1" }; function computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { operator: cdktf.stringToTerraform(struct.operator), value: cdktf.stringToTerraform(struct.value), }; } function computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.stringToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._operator = undefined; this._value = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._operator = value.operator; this._value = value.value; } } get operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } get value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } resetValue() { this._value = undefined; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference = ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference; _k = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference[_k] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference", version: "14.35.1" }; class ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderList = ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderList; _l = JSII_RTTI_SYMBOL_1; ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderList[_l] = { fqn: "@cdktf/provider-google.computeRegionSecurityPolicy.ComputeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestHeaderList", version: "14.35.1" }; function computeRegionSecurityPolicyRulesPreconfiguredWafConfigExclusionRequestQueryParamToTerraform(struct) { if (!cdktf.canInspect