UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,183 lines (1,182 loc) 192 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeRegionNetworkFirewallPolicyRule = exports.ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference = exports.computeRegionNetworkFirewallPolicyRuleTimeoutsToHclTerraform = exports.computeRegionNetworkFirewallPolicyRuleTimeoutsToTerraform = exports.ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList = exports.ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference = exports.computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform = exports.computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToTerraform = exports.ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference = exports.computeRegionNetworkFirewallPolicyRuleMatchToHclTerraform = exports.computeRegionNetworkFirewallPolicyRuleMatchToTerraform = exports.ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList = exports.ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference = exports.computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform = exports.computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform = exports.ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList = exports.ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference = exports.computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform = exports.computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform(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 { ip_protocol: cdktf.stringToTerraform(struct.ipProtocol), ports: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.ports), }; } exports.computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform = computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform; function computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform(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 = { ip_protocol: { value: cdktf.stringToHclTerraform(struct.ipProtocol), isBlock: false, type: "simple", storageClassType: "string", }, ports: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.ports), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform = computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform; class ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference 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._ipProtocol !== undefined) { hasAnyValues = true; internalValueResult.ipProtocol = this._ipProtocol; } if (this._ports !== undefined) { hasAnyValues = true; internalValueResult.ports = this._ports; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._ipProtocol = undefined; this._ports = 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._ipProtocol = value.ipProtocol; this._ports = value.ports; } } get ipProtocol() { return this.getStringAttribute('ip_protocol'); } set ipProtocol(value) { this._ipProtocol = value; } // Temporarily expose input value. Use with caution. get ipProtocolInput() { return this._ipProtocol; } get ports() { return this.getListAttribute('ports'); } set ports(value) { this._ports = value; } resetPorts() { this._ports = undefined; } // Temporarily expose input value. Use with caution. get portsInput() { return this._ports; } } exports.ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference = ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference[_a] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference", version: "14.12.0" }; class ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList 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 ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList = ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList; _b = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList[_b] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList", version: "14.12.0" }; function computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform(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), }; } exports.computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform = computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform; function computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform(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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform = computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform; class ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference 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; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._name = 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; } } 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; } // state - computed: true, optional: false, required: false get state() { return this.getStringAttribute('state'); } } exports.ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference = ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference[_c] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference", version: "14.12.0" }; class ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList 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 ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList = ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList; _d = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList[_d] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList", version: "14.12.0" }; function computeRegionNetworkFirewallPolicyRuleMatchToTerraform(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_address_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destAddressGroups), dest_fqdns: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destFqdns), dest_ip_ranges: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destIpRanges), dest_region_codes: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destRegionCodes), dest_threat_intelligences: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.destThreatIntelligences), src_address_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcAddressGroups), src_fqdns: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcFqdns), src_ip_ranges: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcIpRanges), src_region_codes: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcRegionCodes), src_threat_intelligences: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.srcThreatIntelligences), layer4_configs: cdktf.listMapper(computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform, true)(struct.layer4Configs), src_secure_tags: cdktf.listMapper(computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform, true)(struct.srcSecureTags), }; } exports.computeRegionNetworkFirewallPolicyRuleMatchToTerraform = computeRegionNetworkFirewallPolicyRuleMatchToTerraform; function computeRegionNetworkFirewallPolicyRuleMatchToHclTerraform(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_address_groups: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destAddressGroups), isBlock: false, type: "list", storageClassType: "stringList", }, dest_fqdns: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destFqdns), isBlock: false, type: "list", storageClassType: "stringList", }, dest_ip_ranges: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destIpRanges), isBlock: false, type: "list", storageClassType: "stringList", }, dest_region_codes: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destRegionCodes), isBlock: false, type: "list", storageClassType: "stringList", }, dest_threat_intelligences: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.destThreatIntelligences), isBlock: false, type: "list", storageClassType: "stringList", }, src_address_groups: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcAddressGroups), isBlock: false, type: "list", storageClassType: "stringList", }, src_fqdns: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcFqdns), isBlock: false, type: "list", storageClassType: "stringList", }, src_ip_ranges: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcIpRanges), isBlock: false, type: "list", storageClassType: "stringList", }, src_region_codes: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcRegionCodes), isBlock: false, type: "list", storageClassType: "stringList", }, src_threat_intelligences: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.srcThreatIntelligences), isBlock: false, type: "list", storageClassType: "stringList", }, layer4_configs: { value: cdktf.listMapperHcl(computeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform, true)(struct.layer4Configs), isBlock: true, type: "list", storageClassType: "ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList", }, src_secure_tags: { value: cdktf.listMapperHcl(computeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform, true)(struct.srcSecureTags), isBlock: true, type: "list", storageClassType: "ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionNetworkFirewallPolicyRuleMatchToHclTerraform = computeRegionNetworkFirewallPolicyRuleMatchToHclTerraform; class ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference 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; // layer4_configs - computed: false, optional: false, required: true this._layer4Configs = new ComputeRegionNetworkFirewallPolicyRuleMatchLayer4ConfigsList(this, "layer4_configs", false); // src_secure_tags - computed: false, optional: true, required: false this._srcSecureTags = new ComputeRegionNetworkFirewallPolicyRuleMatchSrcSecureTagsList(this, "src_secure_tags", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._destAddressGroups !== undefined) { hasAnyValues = true; internalValueResult.destAddressGroups = this._destAddressGroups; } if (this._destFqdns !== undefined) { hasAnyValues = true; internalValueResult.destFqdns = this._destFqdns; } if (this._destIpRanges !== undefined) { hasAnyValues = true; internalValueResult.destIpRanges = this._destIpRanges; } if (this._destRegionCodes !== undefined) { hasAnyValues = true; internalValueResult.destRegionCodes = this._destRegionCodes; } if (this._destThreatIntelligences !== undefined) { hasAnyValues = true; internalValueResult.destThreatIntelligences = this._destThreatIntelligences; } if (this._srcAddressGroups !== undefined) { hasAnyValues = true; internalValueResult.srcAddressGroups = this._srcAddressGroups; } if (this._srcFqdns !== undefined) { hasAnyValues = true; internalValueResult.srcFqdns = this._srcFqdns; } if (this._srcIpRanges !== undefined) { hasAnyValues = true; internalValueResult.srcIpRanges = this._srcIpRanges; } if (this._srcRegionCodes !== undefined) { hasAnyValues = true; internalValueResult.srcRegionCodes = this._srcRegionCodes; } if (this._srcThreatIntelligences !== undefined) { hasAnyValues = true; internalValueResult.srcThreatIntelligences = this._srcThreatIntelligences; } if (this._layer4Configs?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.layer4Configs = this._layer4Configs?.internalValue; } if (this._srcSecureTags?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.srcSecureTags = this._srcSecureTags?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._destAddressGroups = undefined; this._destFqdns = undefined; this._destIpRanges = undefined; this._destRegionCodes = undefined; this._destThreatIntelligences = undefined; this._srcAddressGroups = undefined; this._srcFqdns = undefined; this._srcIpRanges = undefined; this._srcRegionCodes = undefined; this._srcThreatIntelligences = undefined; this._layer4Configs.internalValue = undefined; this._srcSecureTags.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._destAddressGroups = value.destAddressGroups; this._destFqdns = value.destFqdns; this._destIpRanges = value.destIpRanges; this._destRegionCodes = value.destRegionCodes; this._destThreatIntelligences = value.destThreatIntelligences; this._srcAddressGroups = value.srcAddressGroups; this._srcFqdns = value.srcFqdns; this._srcIpRanges = value.srcIpRanges; this._srcRegionCodes = value.srcRegionCodes; this._srcThreatIntelligences = value.srcThreatIntelligences; this._layer4Configs.internalValue = value.layer4Configs; this._srcSecureTags.internalValue = value.srcSecureTags; } } get destAddressGroups() { return this.getListAttribute('dest_address_groups'); } set destAddressGroups(value) { this._destAddressGroups = value; } resetDestAddressGroups() { this._destAddressGroups = undefined; } // Temporarily expose input value. Use with caution. get destAddressGroupsInput() { return this._destAddressGroups; } get destFqdns() { return this.getListAttribute('dest_fqdns'); } set destFqdns(value) { this._destFqdns = value; } resetDestFqdns() { this._destFqdns = undefined; } // Temporarily expose input value. Use with caution. get destFqdnsInput() { return this._destFqdns; } 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 destRegionCodes() { return this.getListAttribute('dest_region_codes'); } set destRegionCodes(value) { this._destRegionCodes = value; } resetDestRegionCodes() { this._destRegionCodes = undefined; } // Temporarily expose input value. Use with caution. get destRegionCodesInput() { return this._destRegionCodes; } get destThreatIntelligences() { return this.getListAttribute('dest_threat_intelligences'); } set destThreatIntelligences(value) { this._destThreatIntelligences = value; } resetDestThreatIntelligences() { this._destThreatIntelligences = undefined; } // Temporarily expose input value. Use with caution. get destThreatIntelligencesInput() { return this._destThreatIntelligences; } get srcAddressGroups() { return this.getListAttribute('src_address_groups'); } set srcAddressGroups(value) { this._srcAddressGroups = value; } resetSrcAddressGroups() { this._srcAddressGroups = undefined; } // Temporarily expose input value. Use with caution. get srcAddressGroupsInput() { return this._srcAddressGroups; } get srcFqdns() { return this.getListAttribute('src_fqdns'); } set srcFqdns(value) { this._srcFqdns = value; } resetSrcFqdns() { this._srcFqdns = undefined; } // Temporarily expose input value. Use with caution. get srcFqdnsInput() { return this._srcFqdns; } 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 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 srcThreatIntelligences() { return this.getListAttribute('src_threat_intelligences'); } set srcThreatIntelligences(value) { this._srcThreatIntelligences = value; } resetSrcThreatIntelligences() { this._srcThreatIntelligences = undefined; } // Temporarily expose input value. Use with caution. get srcThreatIntelligencesInput() { return this._srcThreatIntelligences; } get layer4Configs() { return this._layer4Configs; } putLayer4Configs(value) { this._layer4Configs.internalValue = value; } // Temporarily expose input value. Use with caution. get layer4ConfigsInput() { return this._layer4Configs.internalValue; } get srcSecureTags() { return this._srcSecureTags; } putSrcSecureTags(value) { this._srcSecureTags.internalValue = value; } resetSrcSecureTags() { this._srcSecureTags.internalValue = undefined; } // Temporarily expose input value. Use with caution. get srcSecureTagsInput() { return this._srcSecureTags.internalValue; } } exports.ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference = ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference[_e] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference", version: "14.12.0" }; function computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToTerraform(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), }; } exports.computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToTerraform = computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToTerraform; function computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform(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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform = computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform; class ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference 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; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._name = 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; } } 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; } // state - computed: true, optional: false, required: false get state() { return this.getStringAttribute('state'); } } exports.ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference = ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference[_f] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference", version: "14.12.0" }; class ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList 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 ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList = ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList; _g = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList[_g] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList", version: "14.12.0" }; function computeRegionNetworkFirewallPolicyRuleTimeoutsToTerraform(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 { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } exports.computeRegionNetworkFirewallPolicyRuleTimeoutsToTerraform = computeRegionNetworkFirewallPolicyRuleTimeoutsToTerraform; function computeRegionNetworkFirewallPolicyRuleTimeoutsToHclTerraform(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 = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeRegionNetworkFirewallPolicyRuleTimeoutsToHclTerraform = computeRegionNetworkFirewallPolicyRuleTimeoutsToHclTerraform; class ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference 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); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = 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._create = value.create; this._delete = value.delete; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference = ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference; _h = JSII_RTTI_SYMBOL_1; ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.computeRegionNetworkFirewallPolicyRule.ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_region_network_firewall_policy_rule google_compute_region_network_firewall_policy_rule} */ class ComputeRegionNetworkFirewallPolicyRule extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a ComputeRegionNetworkFirewallPolicyRule resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the ComputeRegionNetworkFirewallPolicyRule to import * @param importFromId The id of the existing ComputeRegionNetworkFirewallPolicyRule that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_region_network_firewall_policy_rule#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ComputeRegionNetworkFirewallPolicyRule to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_compute_region_network_firewall_policy_rule", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_region_network_firewall_policy_rule google_compute_region_network_firewall_policy_rule} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options ComputeRegionNetworkFirewallPolicyRuleConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_compute_region_network_firewall_policy_rule', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.13.0', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // match - computed: false, optional: false, required: true this._match = new ComputeRegionNetworkFirewallPolicyRuleMatchOutputReference(this, "match"); // target_secure_tags - computed: false, optional: true, required: false this._targetSecureTags = new ComputeRegionNetworkFirewallPolicyRuleTargetSecureTagsList(this, "target_secure_tags", false); // timeouts - computed: false, optional: true, required: false this._timeouts = new ComputeRegionNetworkFirewallPolicyRuleTimeoutsOutputReference(this, "timeouts"); this._action = config.action; this._description = config.description; this._direction = config.direction; this._disabled = config.disabled; this._enableLogging = config.enableLogging; this._firewallPolicy = config.firewallPolicy; this._id = config.id; this._priority = config.priority; this._project = config.project; this._region = config.region; this._ruleName = config.ruleName; this._securityProfileGroup = config.securityProfileGroup; this._targetServiceAccounts = config.targetServiceAccounts; this._tlsInspect = config.tlsInspect; this._match.internalValue = config.match; this._targetSecureTags.internalValue = config.targetSecureTags; this._timeouts.internalValue = config.timeouts; } get action() { return this.getStringAttribute('action'); } set action(value) { this._action = value; } // Temporarily expose input value. Use with caution. get actionInput() { return this._action; } // creation_timestamp - computed: true, optional: false, required: false get creationTimestamp() { return this.getStringAttribute('creation_timestamp'); } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } get direction() { return this.getStringAttribute('direction'); } set direction(value) { this._direction = value; } // Temporarily expose input value. Use with caution. get directionInput() { return this._direction; } get disabled() { return this.getBooleanAttribute('disabled'); } set disabled(value) { this._disabled = value; } resetDisabled() { this._disabled = undefined; } // Temporarily expose input value. Use with caution. get disabledInput() { return this._disabled; } get enableLogging() { return this.getBooleanAttribute('enable_logging'); } set enableLogging(value) { this._enableLogging = value; } resetEnableLogging() { this._enableLogging = undefined; } // Temporarily expose input value. Use with caution. get enableLoggingInput() { return this._enableLogging; } get firewallPolicy() { return this.getStringAttribute('firewall_policy'); } set firewallPolicy(value) { this._firewallPolicy = value; } // Temporarily expose input value. Use with caution. get firewallPolicyInput() { return this._firewallPolicy; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } // kind - computed: true, optional: false, required: false get kind() { return this.getStringAttribute('kind'); } get priority() { return this.getNumberAttribute('priority'); } set priority(value) { this._priority = value; } // Temporarily expose input value. Use with caution. get priorityInput() { return this._priority; } get project() { return this.getStringAttribute('project'); } set project(value) { this._project = value; } resetProject() { this._project = undefined; } // Temporarily expose input value. Use with caution. get projectInput() { return this._project; } get region() { return this.getStringAttribute('region'); } set region(value) { this._region = value; } resetRegion() { this._region = undefined; } // Temporarily expose input value. Use with caution. get regionInput() { return this._region; } get ruleName() { return this.getStringAttribute('rule_name'); } set ruleName(value) { this._ruleName = value; } resetRuleName() { this._ruleName = undefined; } // Temporarily expose input value. Use with caution. get ruleNameInput() { return this._ruleName; } // rule_tuple_count - computed: true, optional: false, required: false get ruleTupleCount() { return this.getNumberAttribute('rule_tuple_count'); } get securityProfileGroup() { return this.getStringAttribute('security_profile_group'); } set securityProfileGroup(value) { this._securityProfileGroup = value; } resetSecurityProfileGroup() { this._securityProfileGroup = undefined; } // Temporarily expose input value. Use with caution. get securityProfileGroupInput() { return this._securityProfileGroup; } get targetServiceAccounts() { return this.getListAttribute('target_service_accounts'); } set targetServiceAccounts(value) { this._targetServiceAccounts = value; } resetTargetServiceAccounts() { this._targetServiceAccounts = undefined; } // Temporarily expose input value. Use with caution. get targetServiceAccountsInput() { return this._targetServiceAccounts; } get tlsInspect() { return this.getBooleanAttribute('tls_inspect'); } set tlsInspect(value) { this._tlsInspect = value; } resetTlsInspect() { this._tlsInspect = undefined; } // Temporarily expose input value. Use with caution. get tlsInspectInput() { return this._tlsInspect; } get match() { return this._match; } putMatch(value) { this._match.internalValue = value; } // Temporarily expose input value. Use with caution. get matchInput() { return this._match.internalValue; } get targetSecureTags() { return this._targetSecureTags; } putTargetSecureTags(value) { this._targetSecureTags.internalValue = value; } resetTargetSecureTags() { this._targetSecureTags.internalValue = undefined; } // Temporarily expose input value. Use with caution. get targetSecureTagsInput() { return this._targetSecureTags.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { action: cdktf.stringToTerraform(this._action), description: cdktf.stringToTerraform(this._description), direction: cdktf.stringToTerraform(this._direction), disabled: cdktf.booleanToTerraform(this._disabled), enable_logging: cdktf.booleanToTerraform(this._enableLogging), firewall_policy: cdktf.stringToTerraform(this._firewallPolicy), id: cdktf.stringToTerraform(this._id), priority: cdktf.numberToTerraform(this._priority), project: cdktf.stringToTerraform(this._project), region: cdktf.stringToTerraform(this._region), rule_name: cdktf.stringToTerraform(this._ruleName), security_profile_group: cdktf.stringToTerraform(this._securityProfileGroup), target_service_accounts: cdktf.listMapper(cdktf.stringToTerraform, false)(this._targetServiceAccounts), tls_inspect: cdktf.booleanToTerraform(this._tlsInspect), match: computeRegionNetworkFirewallPolicyRuleMatchToTerraform(this._match.internalValue), target_secure_tags: cdktf.listMapper(computeRegionNetworkFirewallPolicyRuleTargetSecureTagsToTerraform, true)(this._targetSecureTags.internalValue), timeouts: computeRegionNetworkFirewallPolicyRuleTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { action: { value: cdktf.stringToHclTerraform(this._action), isBlock: false, type: "simple", storageClassType: "string", }, description: {