UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,017 lines 376 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; Object.defineProperty(exports, "__esModule", { value: true }); exports.computeSecurityPolicyRuleRedirectOptionsToTerraform = exports.ComputeSecurityPolicyRuleRateLimitOptionsOutputReference = exports.computeSecurityPolicyRuleRateLimitOptionsToHclTerraform = exports.computeSecurityPolicyRuleRateLimitOptionsToTerraform = exports.ComputeSecurityPolicyRuleRateLimitOptionsRateLimitThresholdOutputReference = exports.computeSecurityPolicyRuleRateLimitOptionsRateLimitThresholdToHclTerraform = exports.computeSecurityPolicyRuleRateLimitOptionsRateLimitThresholdToTerraform = exports.ComputeSecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsOutputReference = exports.computeSecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsToHclTerraform = exports.computeSecurityPolicyRuleRateLimitOptionsExceedRedirectOptionsToTerraform = exports.ComputeSecurityPolicyRuleRateLimitOptionsBanThresholdOutputReference = exports.computeSecurityPolicyRuleRateLimitOptionsBanThresholdToHclTerraform = exports.computeSecurityPolicyRuleRateLimitOptionsBanThresholdToTerraform = exports.ComputeSecurityPolicyRuleMatchOutputReference = exports.computeSecurityPolicyRuleMatchToHclTerraform = exports.computeSecurityPolicyRuleMatchToTerraform = exports.ComputeSecurityPolicyRuleMatchExprOptionsOutputReference = exports.computeSecurityPolicyRuleMatchExprOptionsToHclTerraform = exports.computeSecurityPolicyRuleMatchExprOptionsToTerraform = exports.ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference = exports.computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToHclTerraform = exports.computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToTerraform = exports.ComputeSecurityPolicyRuleMatchExprOutputReference = exports.computeSecurityPolicyRuleMatchExprToHclTerraform = exports.computeSecurityPolicyRuleMatchExprToTerraform = exports.ComputeSecurityPolicyRuleMatchConfigOutputReference = exports.computeSecurityPolicyRuleMatchConfigToHclTerraform = exports.computeSecurityPolicyRuleMatchConfigToTerraform = exports.ComputeSecurityPolicyRuleHeaderActionOutputReference = exports.computeSecurityPolicyRuleHeaderActionToHclTerraform = exports.computeSecurityPolicyRuleHeaderActionToTerraform = exports.ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList = exports.ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference = exports.computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToHclTerraform = exports.computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToTerraform = exports.ComputeSecurityPolicyRecaptchaOptionsConfigOutputReference = exports.computeSecurityPolicyRecaptchaOptionsConfigToHclTerraform = exports.computeSecurityPolicyRecaptchaOptionsConfigToTerraform = exports.ComputeSecurityPolicyAdvancedOptionsConfigOutputReference = exports.computeSecurityPolicyAdvancedOptionsConfigToHclTerraform = exports.computeSecurityPolicyAdvancedOptionsConfigToTerraform = exports.ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference = exports.computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToHclTerraform = exports.computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToTerraform = exports.ComputeSecurityPolicyAdaptiveProtectionConfigOutputReference = exports.computeSecurityPolicyAdaptiveProtectionConfigToHclTerraform = exports.computeSecurityPolicyAdaptiveProtectionConfigToTerraform = exports.ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference = exports.computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToHclTerraform = exports.computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToTerraform = void 0; exports.ComputeSecurityPolicy = exports.ComputeSecurityPolicyTimeoutsOutputReference = exports.computeSecurityPolicyTimeoutsToHclTerraform = exports.computeSecurityPolicyTimeoutsToTerraform = exports.ComputeSecurityPolicyRuleList = exports.ComputeSecurityPolicyRuleOutputReference = exports.computeSecurityPolicyRuleToHclTerraform = exports.computeSecurityPolicyRuleToTerraform = exports.ComputeSecurityPolicyRuleRedirectOptionsOutputReference = exports.computeSecurityPolicyRuleRedirectOptionsToHclTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToTerraform(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 { enable: cdktf.booleanToTerraform(struct.enable), rule_visibility: cdktf.stringToTerraform(struct.ruleVisibility), }; } exports.computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToTerraform = computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToTerraform; function computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToHclTerraform(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 = { enable: { value: cdktf.booleanToHclTerraform(struct.enable), isBlock: false, type: "simple", storageClassType: "boolean", }, rule_visibility: { value: cdktf.stringToHclTerraform(struct.ruleVisibility), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToHclTerraform = computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToHclTerraform; class ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference 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._enable !== undefined) { hasAnyValues = true; internalValueResult.enable = this._enable; } if (this._ruleVisibility !== undefined) { hasAnyValues = true; internalValueResult.ruleVisibility = this._ruleVisibility; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enable = undefined; this._ruleVisibility = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enable = value.enable; this._ruleVisibility = value.ruleVisibility; } } get enable() { return this.getBooleanAttribute('enable'); } set enable(value) { this._enable = value; } resetEnable() { this._enable = undefined; } // Temporarily expose input value. Use with caution. get enableInput() { return this._enable; } get ruleVisibility() { return this.getStringAttribute('rule_visibility'); } set ruleVisibility(value) { this._ruleVisibility = value; } resetRuleVisibility() { this._ruleVisibility = undefined; } // Temporarily expose input value. Use with caution. get ruleVisibilityInput() { return this._ruleVisibility; } } exports.ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference = ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference[_a] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference", version: "14.3.0" }; function computeSecurityPolicyAdaptiveProtectionConfigToTerraform(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 { layer_7_ddos_defense_config: computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToTerraform(struct.layer7DdosDefenseConfig), }; } exports.computeSecurityPolicyAdaptiveProtectionConfigToTerraform = computeSecurityPolicyAdaptiveProtectionConfigToTerraform; function computeSecurityPolicyAdaptiveProtectionConfigToHclTerraform(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 = { layer_7_ddos_defense_config: { value: computeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigToHclTerraform(struct.layer7DdosDefenseConfig), isBlock: true, type: "list", storageClassType: "ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyAdaptiveProtectionConfigToHclTerraform = computeSecurityPolicyAdaptiveProtectionConfigToHclTerraform; class ComputeSecurityPolicyAdaptiveProtectionConfigOutputReference 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; // layer_7_ddos_defense_config - computed: false, optional: true, required: false this._layer7DdosDefenseConfig = new ComputeSecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigOutputReference(this, "layer_7_ddos_defense_config"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._layer7DdosDefenseConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.layer7DdosDefenseConfig = this._layer7DdosDefenseConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._layer7DdosDefenseConfig.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._layer7DdosDefenseConfig.internalValue = value.layer7DdosDefenseConfig; } } get layer7DdosDefenseConfig() { return this._layer7DdosDefenseConfig; } putLayer7DdosDefenseConfig(value) { this._layer7DdosDefenseConfig.internalValue = value; } resetLayer7DdosDefenseConfig() { this._layer7DdosDefenseConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get layer7DdosDefenseConfigInput() { return this._layer7DdosDefenseConfig.internalValue; } } exports.ComputeSecurityPolicyAdaptiveProtectionConfigOutputReference = ComputeSecurityPolicyAdaptiveProtectionConfigOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyAdaptiveProtectionConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyAdaptiveProtectionConfigOutputReference", version: "14.3.0" }; function computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToTerraform(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 { content_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.contentTypes), }; } exports.computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToTerraform = computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToTerraform; function computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToHclTerraform(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 = { content_types: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.contentTypes), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToHclTerraform = computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToHclTerraform; class ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference 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._contentTypes !== undefined) { hasAnyValues = true; internalValueResult.contentTypes = this._contentTypes; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._contentTypes = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._contentTypes = value.contentTypes; } } get contentTypes() { return cdktf.Fn.tolist(this.getListAttribute('content_types')); } set contentTypes(value) { this._contentTypes = value; } // Temporarily expose input value. Use with caution. get contentTypesInput() { return this._contentTypes; } } exports.ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference = ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference[_c] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference", version: "14.3.0" }; function computeSecurityPolicyAdvancedOptionsConfigToTerraform(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 { json_parsing: cdktf.stringToTerraform(struct.jsonParsing), log_level: cdktf.stringToTerraform(struct.logLevel), user_ip_request_headers: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.userIpRequestHeaders), json_custom_config: computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToTerraform(struct.jsonCustomConfig), }; } exports.computeSecurityPolicyAdvancedOptionsConfigToTerraform = computeSecurityPolicyAdvancedOptionsConfigToTerraform; function computeSecurityPolicyAdvancedOptionsConfigToHclTerraform(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 = { json_parsing: { value: cdktf.stringToHclTerraform(struct.jsonParsing), isBlock: false, type: "simple", storageClassType: "string", }, log_level: { value: cdktf.stringToHclTerraform(struct.logLevel), isBlock: false, type: "simple", storageClassType: "string", }, user_ip_request_headers: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.userIpRequestHeaders), isBlock: false, type: "set", storageClassType: "stringList", }, json_custom_config: { value: computeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigToHclTerraform(struct.jsonCustomConfig), isBlock: true, type: "list", storageClassType: "ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyAdvancedOptionsConfigToHclTerraform = computeSecurityPolicyAdvancedOptionsConfigToHclTerraform; class ComputeSecurityPolicyAdvancedOptionsConfigOutputReference 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; // json_custom_config - computed: false, optional: true, required: false this._jsonCustomConfig = new ComputeSecurityPolicyAdvancedOptionsConfigJsonCustomConfigOutputReference(this, "json_custom_config"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._jsonParsing !== undefined) { hasAnyValues = true; internalValueResult.jsonParsing = this._jsonParsing; } if (this._logLevel !== undefined) { hasAnyValues = true; internalValueResult.logLevel = this._logLevel; } if (this._userIpRequestHeaders !== undefined) { hasAnyValues = true; internalValueResult.userIpRequestHeaders = this._userIpRequestHeaders; } if (this._jsonCustomConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.jsonCustomConfig = this._jsonCustomConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._jsonParsing = undefined; this._logLevel = undefined; this._userIpRequestHeaders = undefined; this._jsonCustomConfig.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._jsonParsing = value.jsonParsing; this._logLevel = value.logLevel; this._userIpRequestHeaders = value.userIpRequestHeaders; this._jsonCustomConfig.internalValue = value.jsonCustomConfig; } } get jsonParsing() { return this.getStringAttribute('json_parsing'); } set jsonParsing(value) { this._jsonParsing = value; } resetJsonParsing() { this._jsonParsing = undefined; } // Temporarily expose input value. Use with caution. get jsonParsingInput() { return this._jsonParsing; } get logLevel() { return this.getStringAttribute('log_level'); } set logLevel(value) { this._logLevel = value; } resetLogLevel() { this._logLevel = undefined; } // Temporarily expose input value. Use with caution. get logLevelInput() { return this._logLevel; } get userIpRequestHeaders() { return cdktf.Fn.tolist(this.getListAttribute('user_ip_request_headers')); } set userIpRequestHeaders(value) { this._userIpRequestHeaders = value; } resetUserIpRequestHeaders() { this._userIpRequestHeaders = undefined; } // Temporarily expose input value. Use with caution. get userIpRequestHeadersInput() { return this._userIpRequestHeaders; } get jsonCustomConfig() { return this._jsonCustomConfig; } putJsonCustomConfig(value) { this._jsonCustomConfig.internalValue = value; } resetJsonCustomConfig() { this._jsonCustomConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get jsonCustomConfigInput() { return this._jsonCustomConfig.internalValue; } } exports.ComputeSecurityPolicyAdvancedOptionsConfigOutputReference = ComputeSecurityPolicyAdvancedOptionsConfigOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyAdvancedOptionsConfigOutputReference[_d] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyAdvancedOptionsConfigOutputReference", version: "14.3.0" }; function computeSecurityPolicyRecaptchaOptionsConfigToTerraform(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 { redirect_site_key: cdktf.stringToTerraform(struct.redirectSiteKey), }; } exports.computeSecurityPolicyRecaptchaOptionsConfigToTerraform = computeSecurityPolicyRecaptchaOptionsConfigToTerraform; function computeSecurityPolicyRecaptchaOptionsConfigToHclTerraform(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 = { redirect_site_key: { value: cdktf.stringToHclTerraform(struct.redirectSiteKey), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyRecaptchaOptionsConfigToHclTerraform = computeSecurityPolicyRecaptchaOptionsConfigToHclTerraform; class ComputeSecurityPolicyRecaptchaOptionsConfigOutputReference 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._redirectSiteKey !== undefined) { hasAnyValues = true; internalValueResult.redirectSiteKey = this._redirectSiteKey; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._redirectSiteKey = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._redirectSiteKey = value.redirectSiteKey; } } get redirectSiteKey() { return this.getStringAttribute('redirect_site_key'); } set redirectSiteKey(value) { this._redirectSiteKey = value; } // Temporarily expose input value. Use with caution. get redirectSiteKeyInput() { return this._redirectSiteKey; } } exports.ComputeSecurityPolicyRecaptchaOptionsConfigOutputReference = ComputeSecurityPolicyRecaptchaOptionsConfigOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRecaptchaOptionsConfigOutputReference[_e] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRecaptchaOptionsConfigOutputReference", version: "14.3.0" }; function computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToTerraform(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 { header_name: cdktf.stringToTerraform(struct.headerName), header_value: cdktf.stringToTerraform(struct.headerValue), }; } exports.computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToTerraform = computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToTerraform; function computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToHclTerraform(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 = { header_name: { value: cdktf.stringToHclTerraform(struct.headerName), isBlock: false, type: "simple", storageClassType: "string", }, header_value: { value: cdktf.stringToHclTerraform(struct.headerValue), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToHclTerraform = computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToHclTerraform; class ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference 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._headerName !== undefined) { hasAnyValues = true; internalValueResult.headerName = this._headerName; } if (this._headerValue !== undefined) { hasAnyValues = true; internalValueResult.headerValue = this._headerValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._headerName = undefined; this._headerValue = 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._headerName = value.headerName; this._headerValue = value.headerValue; } } get headerName() { return this.getStringAttribute('header_name'); } set headerName(value) { this._headerName = value; } // Temporarily expose input value. Use with caution. get headerNameInput() { return this._headerName; } get headerValue() { return this.getStringAttribute('header_value'); } set headerValue(value) { this._headerValue = value; } resetHeaderValue() { this._headerValue = undefined; } // Temporarily expose input value. Use with caution. get headerValueInput() { return this._headerValue; } } exports.ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference = ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference[_f] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference", version: "14.3.0" }; class ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList 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 ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList = ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList; _g = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList[_g] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList", version: "14.3.0" }; function computeSecurityPolicyRuleHeaderActionToTerraform(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 { request_headers_to_adds: cdktf.listMapper(computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToTerraform, true)(struct.requestHeadersToAdds), }; } exports.computeSecurityPolicyRuleHeaderActionToTerraform = computeSecurityPolicyRuleHeaderActionToTerraform; function computeSecurityPolicyRuleHeaderActionToHclTerraform(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 = { request_headers_to_adds: { value: cdktf.listMapperHcl(computeSecurityPolicyRuleHeaderActionRequestHeadersToAddsToHclTerraform, true)(struct.requestHeadersToAdds), isBlock: true, type: "list", storageClassType: "ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyRuleHeaderActionToHclTerraform = computeSecurityPolicyRuleHeaderActionToHclTerraform; class ComputeSecurityPolicyRuleHeaderActionOutputReference 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; // request_headers_to_adds - computed: false, optional: false, required: true this._requestHeadersToAdds = new ComputeSecurityPolicyRuleHeaderActionRequestHeadersToAddsList(this, "request_headers_to_adds", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._requestHeadersToAdds?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.requestHeadersToAdds = this._requestHeadersToAdds?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._requestHeadersToAdds.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._requestHeadersToAdds.internalValue = value.requestHeadersToAdds; } } get requestHeadersToAdds() { return this._requestHeadersToAdds; } putRequestHeadersToAdds(value) { this._requestHeadersToAdds.internalValue = value; } // Temporarily expose input value. Use with caution. get requestHeadersToAddsInput() { return this._requestHeadersToAdds.internalValue; } } exports.ComputeSecurityPolicyRuleHeaderActionOutputReference = ComputeSecurityPolicyRuleHeaderActionOutputReference; _h = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRuleHeaderActionOutputReference[_h] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRuleHeaderActionOutputReference", version: "14.3.0" }; function computeSecurityPolicyRuleMatchConfigToTerraform(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), }; } exports.computeSecurityPolicyRuleMatchConfigToTerraform = computeSecurityPolicyRuleMatchConfigToTerraform; function computeSecurityPolicyRuleMatchConfigToHclTerraform(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: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyRuleMatchConfigToHclTerraform = computeSecurityPolicyRuleMatchConfigToHclTerraform; class ComputeSecurityPolicyRuleMatchConfigOutputReference 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 cdktf.Fn.tolist(this.getListAttribute('src_ip_ranges')); } set srcIpRanges(value) { this._srcIpRanges = value; } // Temporarily expose input value. Use with caution. get srcIpRangesInput() { return this._srcIpRanges; } } exports.ComputeSecurityPolicyRuleMatchConfigOutputReference = ComputeSecurityPolicyRuleMatchConfigOutputReference; _j = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRuleMatchConfigOutputReference[_j] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRuleMatchConfigOutputReference", version: "14.3.0" }; function computeSecurityPolicyRuleMatchExprToTerraform(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), }; } exports.computeSecurityPolicyRuleMatchExprToTerraform = computeSecurityPolicyRuleMatchExprToTerraform; function computeSecurityPolicyRuleMatchExprToHclTerraform(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)); } exports.computeSecurityPolicyRuleMatchExprToHclTerraform = computeSecurityPolicyRuleMatchExprToHclTerraform; class ComputeSecurityPolicyRuleMatchExprOutputReference 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.ComputeSecurityPolicyRuleMatchExprOutputReference = ComputeSecurityPolicyRuleMatchExprOutputReference; _k = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRuleMatchExprOutputReference[_k] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRuleMatchExprOutputReference", version: "14.3.0" }; function computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToTerraform(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 { action_token_site_keys: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.actionTokenSiteKeys), session_token_site_keys: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.sessionTokenSiteKeys), }; } exports.computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToTerraform = computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToTerraform; function computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToHclTerraform(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 = { action_token_site_keys: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.actionTokenSiteKeys), isBlock: false, type: "list", storageClassType: "stringList", }, session_token_site_keys: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.sessionTokenSiteKeys), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToHclTerraform = computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToHclTerraform; class ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference 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._actionTokenSiteKeys !== undefined) { hasAnyValues = true; internalValueResult.actionTokenSiteKeys = this._actionTokenSiteKeys; } if (this._sessionTokenSiteKeys !== undefined) { hasAnyValues = true; internalValueResult.sessionTokenSiteKeys = this._sessionTokenSiteKeys; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._actionTokenSiteKeys = undefined; this._sessionTokenSiteKeys = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._actionTokenSiteKeys = value.actionTokenSiteKeys; this._sessionTokenSiteKeys = value.sessionTokenSiteKeys; } } get actionTokenSiteKeys() { return this.getListAttribute('action_token_site_keys'); } set actionTokenSiteKeys(value) { this._actionTokenSiteKeys = value; } resetActionTokenSiteKeys() { this._actionTokenSiteKeys = undefined; } // Temporarily expose input value. Use with caution. get actionTokenSiteKeysInput() { return this._actionTokenSiteKeys; } get sessionTokenSiteKeys() { return this.getListAttribute('session_token_site_keys'); } set sessionTokenSiteKeys(value) { this._sessionTokenSiteKeys = value; } resetSessionTokenSiteKeys() { this._sessionTokenSiteKeys = undefined; } // Temporarily expose input value. Use with caution. get sessionTokenSiteKeysInput() { return this._sessionTokenSiteKeys; } } exports.ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference = ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference; _l = JSII_RTTI_SYMBOL_1; ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference[_l] = { fqn: "@cdktf/provider-google.computeSecurityPolicy.ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference", version: "14.3.0" }; function computeSecurityPolicyRuleMatchExprOptionsToTerraform(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 { recaptcha_options: computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToTerraform(struct.recaptchaOptions), }; } exports.computeSecurityPolicyRuleMatchExprOptionsToTerraform = computeSecurityPolicyRuleMatchExprOptionsToTerraform; function computeSecurityPolicyRuleMatchExprOptionsToHclTerraform(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 = { recaptcha_options: { value: computeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsToHclTerraform(struct.recaptchaOptions), isBlock: true, type: "list", storageClassType: "ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeSecurityPolicyRuleMatchExprOptionsToHclTerraform = computeSecurityPolicyRuleMatchExprOptionsToHclTerraform; class ComputeSecurityPolicyRuleMatchExprOptionsOutputReference 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; // recaptcha_options - computed: false, optional: false, required: true this._recaptchaOptions = new ComputeSecurityPolicyRuleMatchExprOptionsRecaptchaOptionsOutputReference(this, "recaptcha_options"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._recaptchaOptions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.recaptchaOptions = this._recaptchaOptions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._recaptchaOptions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._recaptchaOptions.internalValue = value.recaptchaOptions; } } get recaptchaOptions() { return this._recaptchaOptions; } putRecaptchaOptions(value) { this._recaptchaOptions.internalValue = value; } // Temporarily expose input value. Use with caution. get recaptchaOptionsInput() { return this._recaptchaOptions.internalValue; } } e