@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,199 lines • 187 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComputeNetworkFirewallPolicyRule = exports.ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference = exports.computeNetworkFirewallPolicyRuleTimeoutsToHclTerraform = exports.computeNetworkFirewallPolicyRuleTimeoutsToTerraform = exports.ComputeNetworkFirewallPolicyRuleTargetSecureTagsList = exports.ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference = exports.computeNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform = exports.computeNetworkFirewallPolicyRuleTargetSecureTagsToTerraform = exports.ComputeNetworkFirewallPolicyRuleMatchOutputReference = exports.computeNetworkFirewallPolicyRuleMatchToHclTerraform = exports.computeNetworkFirewallPolicyRuleMatchToTerraform = exports.ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList = exports.ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference = exports.computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform = exports.computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform = exports.ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList = exports.ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference = exports.computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform = exports.computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform(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.computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform = computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform;
function computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform(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.computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform = computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform;
class ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference 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.ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference = ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference[_a] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference", version: "14.12.0" };
class ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList 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 ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList = ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList;
_b = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList[_b] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList", version: "14.12.0" };
function computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform(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.computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform = computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform;
function computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform(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.computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform = computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform;
class ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference 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.ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference = ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference[_c] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference", version: "14.12.0" };
class ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList 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 ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList = ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList;
_d = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList[_d] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList", version: "14.12.0" };
function computeNetworkFirewallPolicyRuleMatchToTerraform(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(computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToTerraform, true)(struct.layer4Configs),
src_secure_tags: cdktf.listMapper(computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToTerraform, true)(struct.srcSecureTags),
};
}
exports.computeNetworkFirewallPolicyRuleMatchToTerraform = computeNetworkFirewallPolicyRuleMatchToTerraform;
function computeNetworkFirewallPolicyRuleMatchToHclTerraform(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(computeNetworkFirewallPolicyRuleMatchLayer4ConfigsToHclTerraform, true)(struct.layer4Configs),
isBlock: true,
type: "list",
storageClassType: "ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList",
},
src_secure_tags: {
value: cdktf.listMapperHcl(computeNetworkFirewallPolicyRuleMatchSrcSecureTagsToHclTerraform, true)(struct.srcSecureTags),
isBlock: true,
type: "list",
storageClassType: "ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.computeNetworkFirewallPolicyRuleMatchToHclTerraform = computeNetworkFirewallPolicyRuleMatchToHclTerraform;
class ComputeNetworkFirewallPolicyRuleMatchOutputReference 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 ComputeNetworkFirewallPolicyRuleMatchLayer4ConfigsList(this, "layer4_configs", false);
// src_secure_tags - computed: false, optional: true, required: false
this._srcSecureTags = new ComputeNetworkFirewallPolicyRuleMatchSrcSecureTagsList(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.ComputeNetworkFirewallPolicyRuleMatchOutputReference = ComputeNetworkFirewallPolicyRuleMatchOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleMatchOutputReference[_e] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleMatchOutputReference", version: "14.12.0" };
function computeNetworkFirewallPolicyRuleTargetSecureTagsToTerraform(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.computeNetworkFirewallPolicyRuleTargetSecureTagsToTerraform = computeNetworkFirewallPolicyRuleTargetSecureTagsToTerraform;
function computeNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform(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.computeNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform = computeNetworkFirewallPolicyRuleTargetSecureTagsToHclTerraform;
class ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference 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.ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference = ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference[_f] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference", version: "14.12.0" };
class ComputeNetworkFirewallPolicyRuleTargetSecureTagsList 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 ComputeNetworkFirewallPolicyRuleTargetSecureTagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ComputeNetworkFirewallPolicyRuleTargetSecureTagsList = ComputeNetworkFirewallPolicyRuleTargetSecureTagsList;
_g = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleTargetSecureTagsList[_g] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleTargetSecureTagsList", version: "14.12.0" };
function computeNetworkFirewallPolicyRuleTimeoutsToTerraform(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.computeNetworkFirewallPolicyRuleTimeoutsToTerraform = computeNetworkFirewallPolicyRuleTimeoutsToTerraform;
function computeNetworkFirewallPolicyRuleTimeoutsToHclTerraform(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.computeNetworkFirewallPolicyRuleTimeoutsToHclTerraform = computeNetworkFirewallPolicyRuleTimeoutsToHclTerraform;
class ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference 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.ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference = ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.computeNetworkFirewallPolicyRule.ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_network_firewall_policy_rule google_compute_network_firewall_policy_rule}
*/
class ComputeNetworkFirewallPolicyRule extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ComputeNetworkFirewallPolicyRule 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 ComputeNetworkFirewallPolicyRule to import
* @param importFromId The id of the existing ComputeNetworkFirewallPolicyRule that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_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 ComputeNetworkFirewallPolicyRule to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_compute_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_network_firewall_policy_rule google_compute_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 ComputeNetworkFirewallPolicyRuleConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_compute_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 ComputeNetworkFirewallPolicyRuleMatchOutputReference(this, "match");
// target_secure_tags - computed: false, optional: true, required: false
this._targetSecureTags = new ComputeNetworkFirewallPolicyRuleTargetSecureTagsList(this, "target_secure_tags", false);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ComputeNetworkFirewallPolicyRuleTimeoutsOutputReference(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._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 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),
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: computeNetworkFirewallPolicyRuleMatchToTerraform(this._match.internalValue),
target_secure_tags: cdktf.listMapper(computeNetworkFirewallPolicyRuleTargetSecureTagsToTerraform, true)(this._targetSecureTags.internalValue),
timeouts: computeNetworkFirewallPolicyRuleTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
action: {
value: cdktf.stringToHclTerraform(this._action),
isBlock: false,
type: "simple",
storageClassType: "string",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
direction: {
value: cdktf.stringToHclTerraform(this._direction),
isBlock: false,
type: "simple",
storageClassType: "string",
},
disabled: {
value: cdktf.booleanToHclTerraform(this._disabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_logging: {
value: cdktf.booleanToHclTerraform(this._enableLogging),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
firewall_policy: {
value: cdktf.stringToHclTerraform(this._firewallPolicy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isB