UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,012 lines 421 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, _5, _6, _7; Object.defineProperty(exports, "__esModule", { value: true }); exports.Wafv2RuleGroup = exports.Wafv2RuleGroupVisibilityConfigOutputReference = exports.Wafv2RuleGroupRuleList = exports.Wafv2RuleGroupRuleOutputReference = exports.Wafv2RuleGroupRuleVisibilityConfigOutputReference = exports.Wafv2RuleGroupRuleRuleLabelList = exports.Wafv2RuleGroupRuleRuleLabelOutputReference = exports.Wafv2RuleGroupRuleCaptchaConfigOutputReference = exports.Wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyOutputReference = exports.Wafv2RuleGroupRuleActionOutputReference = exports.Wafv2RuleGroupRuleActionCountOutputReference = exports.Wafv2RuleGroupRuleActionCountCustomRequestHandlingOutputReference = exports.Wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderOutputReference = exports.Wafv2RuleGroupRuleActionChallengeOutputReference = exports.Wafv2RuleGroupRuleActionChallengeCustomRequestHandlingOutputReference = exports.Wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderOutputReference = exports.Wafv2RuleGroupRuleActionCaptchaOutputReference = exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference = exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference = exports.Wafv2RuleGroupRuleActionBlockOutputReference = exports.Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference = exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList = exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference = exports.Wafv2RuleGroupRuleActionAllowOutputReference = exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference = exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList = exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference = exports.Wafv2RuleGroupCustomResponseBodyList = exports.Wafv2RuleGroupCustomResponseBodyOutputReference = void 0; exports.wafv2RuleGroupCustomResponseBodyToTerraform = wafv2RuleGroupCustomResponseBodyToTerraform; exports.wafv2RuleGroupCustomResponseBodyToHclTerraform = wafv2RuleGroupCustomResponseBodyToHclTerraform; exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform; exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform; exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform; exports.wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform = wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform; exports.wafv2RuleGroupRuleActionAllowToTerraform = wafv2RuleGroupRuleActionAllowToTerraform; exports.wafv2RuleGroupRuleActionAllowToHclTerraform = wafv2RuleGroupRuleActionAllowToHclTerraform; exports.wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform = wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform; exports.wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform = wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform; exports.wafv2RuleGroupRuleActionBlockCustomResponseToTerraform = wafv2RuleGroupRuleActionBlockCustomResponseToTerraform; exports.wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform = wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform; exports.wafv2RuleGroupRuleActionBlockToTerraform = wafv2RuleGroupRuleActionBlockToTerraform; exports.wafv2RuleGroupRuleActionBlockToHclTerraform = wafv2RuleGroupRuleActionBlockToHclTerraform; exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform; exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform; exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform; exports.wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform = wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform; exports.wafv2RuleGroupRuleActionCaptchaToTerraform = wafv2RuleGroupRuleActionCaptchaToTerraform; exports.wafv2RuleGroupRuleActionCaptchaToHclTerraform = wafv2RuleGroupRuleActionCaptchaToHclTerraform; exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderToTerraform = wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderToTerraform; exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderToHclTerraform = wafv2RuleGroupRuleActionChallengeCustomRequestHandlingInsertHeaderToHclTerraform; exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingToTerraform = wafv2RuleGroupRuleActionChallengeCustomRequestHandlingToTerraform; exports.wafv2RuleGroupRuleActionChallengeCustomRequestHandlingToHclTerraform = wafv2RuleGroupRuleActionChallengeCustomRequestHandlingToHclTerraform; exports.wafv2RuleGroupRuleActionChallengeToTerraform = wafv2RuleGroupRuleActionChallengeToTerraform; exports.wafv2RuleGroupRuleActionChallengeToHclTerraform = wafv2RuleGroupRuleActionChallengeToHclTerraform; exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderToTerraform = wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderToTerraform; exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderToHclTerraform = wafv2RuleGroupRuleActionCountCustomRequestHandlingInsertHeaderToHclTerraform; exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingToTerraform = wafv2RuleGroupRuleActionCountCustomRequestHandlingToTerraform; exports.wafv2RuleGroupRuleActionCountCustomRequestHandlingToHclTerraform = wafv2RuleGroupRuleActionCountCustomRequestHandlingToHclTerraform; exports.wafv2RuleGroupRuleActionCountToTerraform = wafv2RuleGroupRuleActionCountToTerraform; exports.wafv2RuleGroupRuleActionCountToHclTerraform = wafv2RuleGroupRuleActionCountToHclTerraform; exports.wafv2RuleGroupRuleActionToTerraform = wafv2RuleGroupRuleActionToTerraform; exports.wafv2RuleGroupRuleActionToHclTerraform = wafv2RuleGroupRuleActionToHclTerraform; exports.wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyToTerraform = wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyToTerraform; exports.wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyToHclTerraform = wafv2RuleGroupRuleCaptchaConfigImmunityTimePropertyToHclTerraform; exports.wafv2RuleGroupRuleCaptchaConfigToTerraform = wafv2RuleGroupRuleCaptchaConfigToTerraform; exports.wafv2RuleGroupRuleCaptchaConfigToHclTerraform = wafv2RuleGroupRuleCaptchaConfigToHclTerraform; exports.wafv2RuleGroupRuleRuleLabelToTerraform = wafv2RuleGroupRuleRuleLabelToTerraform; exports.wafv2RuleGroupRuleRuleLabelToHclTerraform = wafv2RuleGroupRuleRuleLabelToHclTerraform; exports.wafv2RuleGroupRuleVisibilityConfigToTerraform = wafv2RuleGroupRuleVisibilityConfigToTerraform; exports.wafv2RuleGroupRuleVisibilityConfigToHclTerraform = wafv2RuleGroupRuleVisibilityConfigToHclTerraform; exports.wafv2RuleGroupRuleToTerraform = wafv2RuleGroupRuleToTerraform; exports.wafv2RuleGroupRuleToHclTerraform = wafv2RuleGroupRuleToHclTerraform; exports.wafv2RuleGroupVisibilityConfigToTerraform = wafv2RuleGroupVisibilityConfigToTerraform; exports.wafv2RuleGroupVisibilityConfigToHclTerraform = wafv2RuleGroupVisibilityConfigToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function wafv2RuleGroupCustomResponseBodyToTerraform(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: cdktf.stringToTerraform(struct.content), content_type: cdktf.stringToTerraform(struct.contentType), key: cdktf.stringToTerraform(struct.key), }; } function wafv2RuleGroupCustomResponseBodyToHclTerraform(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: { value: cdktf.stringToHclTerraform(struct.content), isBlock: false, type: "simple", storageClassType: "string", }, content_type: { value: cdktf.stringToHclTerraform(struct.contentType), isBlock: false, type: "simple", storageClassType: "string", }, key: { value: cdktf.stringToHclTerraform(struct.key), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class Wafv2RuleGroupCustomResponseBodyOutputReference 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._content !== undefined) { hasAnyValues = true; internalValueResult.content = this._content; } if (this._contentType !== undefined) { hasAnyValues = true; internalValueResult.contentType = this._contentType; } if (this._key !== undefined) { hasAnyValues = true; internalValueResult.key = this._key; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._content = undefined; this._contentType = undefined; this._key = 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._content = value.content; this._contentType = value.contentType; this._key = value.key; } } get content() { return this.getStringAttribute('content'); } set content(value) { this._content = value; } // Temporarily expose input value. Use with caution. get contentInput() { return this._content; } get contentType() { return this.getStringAttribute('content_type'); } set contentType(value) { this._contentType = value; } // Temporarily expose input value. Use with caution. get contentTypeInput() { return this._contentType; } get key() { return this.getStringAttribute('key'); } set key(value) { this._key = value; } // Temporarily expose input value. Use with caution. get keyInput() { return this._key; } } exports.Wafv2RuleGroupCustomResponseBodyOutputReference = Wafv2RuleGroupCustomResponseBodyOutputReference; _a = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupCustomResponseBodyOutputReference[_a] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupCustomResponseBodyOutputReference", version: "21.22.1" }; class Wafv2RuleGroupCustomResponseBodyList 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 Wafv2RuleGroupCustomResponseBodyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.Wafv2RuleGroupCustomResponseBodyList = Wafv2RuleGroupCustomResponseBodyList; _b = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupCustomResponseBodyList[_b] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupCustomResponseBodyList", version: "21.22.1" }; function wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform(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), value: cdktf.stringToTerraform(struct.value), }; } function wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform(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", }, 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 Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference 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._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._name = 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._name = value.name; this._value = value.value; } } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference = Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference; _c = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference[_c] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference", version: "21.22.1" }; class Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList 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 Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList = Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList; _d = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList[_d] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList", version: "21.22.1" }; function wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform(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 { insert_header: cdktf.listMapper(wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToTerraform, true)(struct.insertHeader), }; } function wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform(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 = { insert_header: { value: cdktf.listMapperHcl(wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderToHclTerraform, true)(struct.insertHeader), isBlock: true, type: "set", storageClassType: "Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference 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; // insert_header - computed: false, optional: false, required: true this._insertHeader = new Wafv2RuleGroupRuleActionAllowCustomRequestHandlingInsertHeaderList(this, "insert_header", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._insertHeader?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.insertHeader = this._insertHeader?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._insertHeader.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._insertHeader.internalValue = value.insertHeader; } } get insertHeader() { return this._insertHeader; } putInsertHeader(value) { this._insertHeader.internalValue = value; } // Temporarily expose input value. Use with caution. get insertHeaderInput() { return this._insertHeader.internalValue; } } exports.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference = Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference; _e = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference[_e] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference", version: "21.22.1" }; function wafv2RuleGroupRuleActionAllowToTerraform(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 { custom_request_handling: wafv2RuleGroupRuleActionAllowCustomRequestHandlingToTerraform(struct.customRequestHandling), }; } function wafv2RuleGroupRuleActionAllowToHclTerraform(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 = { custom_request_handling: { value: wafv2RuleGroupRuleActionAllowCustomRequestHandlingToHclTerraform(struct.customRequestHandling), isBlock: true, type: "list", storageClassType: "Wafv2RuleGroupRuleActionAllowCustomRequestHandlingList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class Wafv2RuleGroupRuleActionAllowOutputReference 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; // custom_request_handling - computed: false, optional: true, required: false this._customRequestHandling = new Wafv2RuleGroupRuleActionAllowCustomRequestHandlingOutputReference(this, "custom_request_handling"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._customRequestHandling?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.customRequestHandling = this._customRequestHandling?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._customRequestHandling.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._customRequestHandling.internalValue = value.customRequestHandling; } } get customRequestHandling() { return this._customRequestHandling; } putCustomRequestHandling(value) { this._customRequestHandling.internalValue = value; } resetCustomRequestHandling() { this._customRequestHandling.internalValue = undefined; } // Temporarily expose input value. Use with caution. get customRequestHandlingInput() { return this._customRequestHandling.internalValue; } } exports.Wafv2RuleGroupRuleActionAllowOutputReference = Wafv2RuleGroupRuleActionAllowOutputReference; _f = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionAllowOutputReference[_f] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionAllowOutputReference", version: "21.22.1" }; function wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform(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), value: cdktf.stringToTerraform(struct.value), }; } function wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform(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", }, 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 Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference 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._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._name = 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._name = value.name; this._value = value.value; } } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference = Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference; _g = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference[_g] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference", version: "21.22.1" }; class Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList 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 Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList = Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList; _h = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList[_h] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList", version: "21.22.1" }; function wafv2RuleGroupRuleActionBlockCustomResponseToTerraform(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 { custom_response_body_key: cdktf.stringToTerraform(struct.customResponseBodyKey), response_code: cdktf.numberToTerraform(struct.responseCode), response_header: cdktf.listMapper(wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToTerraform, true)(struct.responseHeader), }; } function wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform(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 = { custom_response_body_key: { value: cdktf.stringToHclTerraform(struct.customResponseBodyKey), isBlock: false, type: "simple", storageClassType: "string", }, response_code: { value: cdktf.numberToHclTerraform(struct.responseCode), isBlock: false, type: "simple", storageClassType: "number", }, response_header: { value: cdktf.listMapperHcl(wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderToHclTerraform, true)(struct.responseHeader), isBlock: true, type: "set", storageClassType: "Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference 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; // response_header - computed: false, optional: true, required: false this._responseHeader = new Wafv2RuleGroupRuleActionBlockCustomResponseResponseHeaderList(this, "response_header", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._customResponseBodyKey !== undefined) { hasAnyValues = true; internalValueResult.customResponseBodyKey = this._customResponseBodyKey; } if (this._responseCode !== undefined) { hasAnyValues = true; internalValueResult.responseCode = this._responseCode; } if (this._responseHeader?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.responseHeader = this._responseHeader?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._customResponseBodyKey = undefined; this._responseCode = undefined; this._responseHeader.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._customResponseBodyKey = value.customResponseBodyKey; this._responseCode = value.responseCode; this._responseHeader.internalValue = value.responseHeader; } } get customResponseBodyKey() { return this.getStringAttribute('custom_response_body_key'); } set customResponseBodyKey(value) { this._customResponseBodyKey = value; } resetCustomResponseBodyKey() { this._customResponseBodyKey = undefined; } // Temporarily expose input value. Use with caution. get customResponseBodyKeyInput() { return this._customResponseBodyKey; } get responseCode() { return this.getNumberAttribute('response_code'); } set responseCode(value) { this._responseCode = value; } // Temporarily expose input value. Use with caution. get responseCodeInput() { return this._responseCode; } get responseHeader() { return this._responseHeader; } putResponseHeader(value) { this._responseHeader.internalValue = value; } resetResponseHeader() { this._responseHeader.internalValue = undefined; } // Temporarily expose input value. Use with caution. get responseHeaderInput() { return this._responseHeader.internalValue; } } exports.Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference = Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference; _j = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference[_j] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference", version: "21.22.1" }; function wafv2RuleGroupRuleActionBlockToTerraform(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 { custom_response: wafv2RuleGroupRuleActionBlockCustomResponseToTerraform(struct.customResponse), }; } function wafv2RuleGroupRuleActionBlockToHclTerraform(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 = { custom_response: { value: wafv2RuleGroupRuleActionBlockCustomResponseToHclTerraform(struct.customResponse), isBlock: true, type: "list", storageClassType: "Wafv2RuleGroupRuleActionBlockCustomResponseList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class Wafv2RuleGroupRuleActionBlockOutputReference 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; // custom_response - computed: false, optional: true, required: false this._customResponse = new Wafv2RuleGroupRuleActionBlockCustomResponseOutputReference(this, "custom_response"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._customResponse?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.customResponse = this._customResponse?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._customResponse.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._customResponse.internalValue = value.customResponse; } } get customResponse() { return this._customResponse; } putCustomResponse(value) { this._customResponse.internalValue = value; } resetCustomResponse() { this._customResponse.internalValue = undefined; } // Temporarily expose input value. Use with caution. get customResponseInput() { return this._customResponse.internalValue; } } exports.Wafv2RuleGroupRuleActionBlockOutputReference = Wafv2RuleGroupRuleActionBlockOutputReference; _k = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionBlockOutputReference[_k] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionBlockOutputReference", version: "21.22.1" }; function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform(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), value: cdktf.stringToTerraform(struct.value), }; } function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform(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", }, 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 Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference 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._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._name = 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._name = value.name; this._value = value.value; } } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference = Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference; _l = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference[_l] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference", version: "21.22.1" }; class Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList 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 Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList = Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList; _m = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList[_m] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList", version: "21.22.1" }; function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToTerraform(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 { insert_header: cdktf.listMapper(wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToTerraform, true)(struct.insertHeader), }; } function wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingToHclTerraform(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 = { insert_header: { value: cdktf.listMapperHcl(wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderToHclTerraform, true)(struct.insertHeader), isBlock: true, type: "set", storageClassType: "Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference 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; // insert_header - computed: false, optional: false, required: true this._insertHeader = new Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingInsertHeaderList(this, "insert_header", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._insertHeader?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.insertHeader = this._insertHeader?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._insertHeader.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._insertHeader.internalValue = value.insertHeader; } } get insertHeader() { return this._insertHeader; } putInsertHeader(value) { this._insertHeader.internalValue = value; } // Temporarily expose input value. Use with caution. get insertHeaderInput() { return this._insertHeader.internalValue; } } exports.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference = Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference; _o = JSII_RTTI_SYMBOL_1; Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference[_o] = { fqn: "@cdktf/provider-aws.wafv2RuleGroup.Wafv2RuleGroupRuleActionCaptchaCustomRequestHandlingOutputReference", version: "21.22.1" }; function wafv2RuleGroupRuleActionCaptchaToTerraform(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-a