UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,093 lines 582 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; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeRegionBackendService = exports.ComputeRegionBackendServiceTimeoutsOutputReference = exports.ComputeRegionBackendServiceStrongSessionAffinityCookieOutputReference = exports.ComputeRegionBackendServiceStrongSessionAffinityCookieTtlOutputReference = exports.ComputeRegionBackendServiceOutlierDetectionOutputReference = exports.ComputeRegionBackendServiceOutlierDetectionIntervalOutputReference = exports.ComputeRegionBackendServiceOutlierDetectionBaseEjectionTimeOutputReference = exports.ComputeRegionBackendServiceLogConfigOutputReference = exports.ComputeRegionBackendServiceIapOutputReference = exports.ComputeRegionBackendServiceFailoverPolicyOutputReference = exports.ComputeRegionBackendServiceCustomMetricsList = exports.ComputeRegionBackendServiceCustomMetricsOutputReference = exports.ComputeRegionBackendServiceConsistentHashOutputReference = exports.ComputeRegionBackendServiceConsistentHashHttpCookieOutputReference = exports.ComputeRegionBackendServiceConsistentHashHttpCookieTtlOutputReference = exports.ComputeRegionBackendServiceCircuitBreakersOutputReference = exports.ComputeRegionBackendServiceCdnPolicyOutputReference = exports.ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList = exports.ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference = exports.ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference = exports.ComputeRegionBackendServiceBackendList = exports.ComputeRegionBackendServiceBackendOutputReference = exports.ComputeRegionBackendServiceBackendCustomMetricsList = exports.ComputeRegionBackendServiceBackendCustomMetricsOutputReference = void 0; exports.computeRegionBackendServiceBackendCustomMetricsToTerraform = computeRegionBackendServiceBackendCustomMetricsToTerraform; exports.computeRegionBackendServiceBackendCustomMetricsToHclTerraform = computeRegionBackendServiceBackendCustomMetricsToHclTerraform; exports.computeRegionBackendServiceBackendToTerraform = computeRegionBackendServiceBackendToTerraform; exports.computeRegionBackendServiceBackendToHclTerraform = computeRegionBackendServiceBackendToHclTerraform; exports.computeRegionBackendServiceCdnPolicyCacheKeyPolicyToTerraform = computeRegionBackendServiceCdnPolicyCacheKeyPolicyToTerraform; exports.computeRegionBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform = computeRegionBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform; exports.computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToTerraform = computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToTerraform; exports.computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform = computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform; exports.computeRegionBackendServiceCdnPolicyToTerraform = computeRegionBackendServiceCdnPolicyToTerraform; exports.computeRegionBackendServiceCdnPolicyToHclTerraform = computeRegionBackendServiceCdnPolicyToHclTerraform; exports.computeRegionBackendServiceCircuitBreakersToTerraform = computeRegionBackendServiceCircuitBreakersToTerraform; exports.computeRegionBackendServiceCircuitBreakersToHclTerraform = computeRegionBackendServiceCircuitBreakersToHclTerraform; exports.computeRegionBackendServiceConsistentHashHttpCookieTtlToTerraform = computeRegionBackendServiceConsistentHashHttpCookieTtlToTerraform; exports.computeRegionBackendServiceConsistentHashHttpCookieTtlToHclTerraform = computeRegionBackendServiceConsistentHashHttpCookieTtlToHclTerraform; exports.computeRegionBackendServiceConsistentHashHttpCookieToTerraform = computeRegionBackendServiceConsistentHashHttpCookieToTerraform; exports.computeRegionBackendServiceConsistentHashHttpCookieToHclTerraform = computeRegionBackendServiceConsistentHashHttpCookieToHclTerraform; exports.computeRegionBackendServiceConsistentHashToTerraform = computeRegionBackendServiceConsistentHashToTerraform; exports.computeRegionBackendServiceConsistentHashToHclTerraform = computeRegionBackendServiceConsistentHashToHclTerraform; exports.computeRegionBackendServiceCustomMetricsToTerraform = computeRegionBackendServiceCustomMetricsToTerraform; exports.computeRegionBackendServiceCustomMetricsToHclTerraform = computeRegionBackendServiceCustomMetricsToHclTerraform; exports.computeRegionBackendServiceFailoverPolicyToTerraform = computeRegionBackendServiceFailoverPolicyToTerraform; exports.computeRegionBackendServiceFailoverPolicyToHclTerraform = computeRegionBackendServiceFailoverPolicyToHclTerraform; exports.computeRegionBackendServiceIapToTerraform = computeRegionBackendServiceIapToTerraform; exports.computeRegionBackendServiceIapToHclTerraform = computeRegionBackendServiceIapToHclTerraform; exports.computeRegionBackendServiceLogConfigToTerraform = computeRegionBackendServiceLogConfigToTerraform; exports.computeRegionBackendServiceLogConfigToHclTerraform = computeRegionBackendServiceLogConfigToHclTerraform; exports.computeRegionBackendServiceOutlierDetectionBaseEjectionTimeToTerraform = computeRegionBackendServiceOutlierDetectionBaseEjectionTimeToTerraform; exports.computeRegionBackendServiceOutlierDetectionBaseEjectionTimeToHclTerraform = computeRegionBackendServiceOutlierDetectionBaseEjectionTimeToHclTerraform; exports.computeRegionBackendServiceOutlierDetectionIntervalToTerraform = computeRegionBackendServiceOutlierDetectionIntervalToTerraform; exports.computeRegionBackendServiceOutlierDetectionIntervalToHclTerraform = computeRegionBackendServiceOutlierDetectionIntervalToHclTerraform; exports.computeRegionBackendServiceOutlierDetectionToTerraform = computeRegionBackendServiceOutlierDetectionToTerraform; exports.computeRegionBackendServiceOutlierDetectionToHclTerraform = computeRegionBackendServiceOutlierDetectionToHclTerraform; exports.computeRegionBackendServiceStrongSessionAffinityCookieTtlToTerraform = computeRegionBackendServiceStrongSessionAffinityCookieTtlToTerraform; exports.computeRegionBackendServiceStrongSessionAffinityCookieTtlToHclTerraform = computeRegionBackendServiceStrongSessionAffinityCookieTtlToHclTerraform; exports.computeRegionBackendServiceStrongSessionAffinityCookieToTerraform = computeRegionBackendServiceStrongSessionAffinityCookieToTerraform; exports.computeRegionBackendServiceStrongSessionAffinityCookieToHclTerraform = computeRegionBackendServiceStrongSessionAffinityCookieToHclTerraform; exports.computeRegionBackendServiceTimeoutsToTerraform = computeRegionBackendServiceTimeoutsToTerraform; exports.computeRegionBackendServiceTimeoutsToHclTerraform = computeRegionBackendServiceTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeRegionBackendServiceBackendCustomMetricsToTerraform(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 { dry_run: cdktf.booleanToTerraform(struct.dryRun), max_utilization: cdktf.numberToTerraform(struct.maxUtilization), name: cdktf.stringToTerraform(struct.name), }; } function computeRegionBackendServiceBackendCustomMetricsToHclTerraform(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 = { dry_run: { value: cdktf.booleanToHclTerraform(struct.dryRun), isBlock: false, type: "simple", storageClassType: "boolean", }, max_utilization: { value: cdktf.numberToHclTerraform(struct.maxUtilization), isBlock: false, type: "simple", storageClassType: "number", }, 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)); } class ComputeRegionBackendServiceBackendCustomMetricsOutputReference 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._dryRun !== undefined) { hasAnyValues = true; internalValueResult.dryRun = this._dryRun; } if (this._maxUtilization !== undefined) { hasAnyValues = true; internalValueResult.maxUtilization = this._maxUtilization; } 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._dryRun = undefined; this._maxUtilization = 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._dryRun = value.dryRun; this._maxUtilization = value.maxUtilization; this._name = value.name; } } get dryRun() { return this.getBooleanAttribute('dry_run'); } set dryRun(value) { this._dryRun = value; } // Temporarily expose input value. Use with caution. get dryRunInput() { return this._dryRun; } get maxUtilization() { return this.getNumberAttribute('max_utilization'); } set maxUtilization(value) { this._maxUtilization = value; } resetMaxUtilization() { this._maxUtilization = undefined; } // Temporarily expose input value. Use with caution. get maxUtilizationInput() { return this._maxUtilization; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } } exports.ComputeRegionBackendServiceBackendCustomMetricsOutputReference = ComputeRegionBackendServiceBackendCustomMetricsOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceBackendCustomMetricsOutputReference[_a] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceBackendCustomMetricsOutputReference", version: "14.35.0" }; class ComputeRegionBackendServiceBackendCustomMetricsList 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 ComputeRegionBackendServiceBackendCustomMetricsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionBackendServiceBackendCustomMetricsList = ComputeRegionBackendServiceBackendCustomMetricsList; _b = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceBackendCustomMetricsList[_b] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceBackendCustomMetricsList", version: "14.35.0" }; function computeRegionBackendServiceBackendToTerraform(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 { balancing_mode: cdktf.stringToTerraform(struct.balancingMode), capacity_scaler: cdktf.numberToTerraform(struct.capacityScaler), description: cdktf.stringToTerraform(struct.description), failover: cdktf.booleanToTerraform(struct.failover), group: cdktf.stringToTerraform(struct.group), max_connections: cdktf.numberToTerraform(struct.maxConnections), max_connections_per_endpoint: cdktf.numberToTerraform(struct.maxConnectionsPerEndpoint), max_connections_per_instance: cdktf.numberToTerraform(struct.maxConnectionsPerInstance), max_rate: cdktf.numberToTerraform(struct.maxRate), max_rate_per_endpoint: cdktf.numberToTerraform(struct.maxRatePerEndpoint), max_rate_per_instance: cdktf.numberToTerraform(struct.maxRatePerInstance), max_utilization: cdktf.numberToTerraform(struct.maxUtilization), custom_metrics: cdktf.listMapper(computeRegionBackendServiceBackendCustomMetricsToTerraform, true)(struct.customMetrics), }; } function computeRegionBackendServiceBackendToHclTerraform(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 = { balancing_mode: { value: cdktf.stringToHclTerraform(struct.balancingMode), isBlock: false, type: "simple", storageClassType: "string", }, capacity_scaler: { value: cdktf.numberToHclTerraform(struct.capacityScaler), isBlock: false, type: "simple", storageClassType: "number", }, description: { value: cdktf.stringToHclTerraform(struct.description), isBlock: false, type: "simple", storageClassType: "string", }, failover: { value: cdktf.booleanToHclTerraform(struct.failover), isBlock: false, type: "simple", storageClassType: "boolean", }, group: { value: cdktf.stringToHclTerraform(struct.group), isBlock: false, type: "simple", storageClassType: "string", }, max_connections: { value: cdktf.numberToHclTerraform(struct.maxConnections), isBlock: false, type: "simple", storageClassType: "number", }, max_connections_per_endpoint: { value: cdktf.numberToHclTerraform(struct.maxConnectionsPerEndpoint), isBlock: false, type: "simple", storageClassType: "number", }, max_connections_per_instance: { value: cdktf.numberToHclTerraform(struct.maxConnectionsPerInstance), isBlock: false, type: "simple", storageClassType: "number", }, max_rate: { value: cdktf.numberToHclTerraform(struct.maxRate), isBlock: false, type: "simple", storageClassType: "number", }, max_rate_per_endpoint: { value: cdktf.numberToHclTerraform(struct.maxRatePerEndpoint), isBlock: false, type: "simple", storageClassType: "number", }, max_rate_per_instance: { value: cdktf.numberToHclTerraform(struct.maxRatePerInstance), isBlock: false, type: "simple", storageClassType: "number", }, max_utilization: { value: cdktf.numberToHclTerraform(struct.maxUtilization), isBlock: false, type: "simple", storageClassType: "number", }, custom_metrics: { value: cdktf.listMapperHcl(computeRegionBackendServiceBackendCustomMetricsToHclTerraform, true)(struct.customMetrics), isBlock: true, type: "list", storageClassType: "ComputeRegionBackendServiceBackendCustomMetricsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionBackendServiceBackendOutputReference 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; // custom_metrics - computed: false, optional: true, required: false this._customMetrics = new ComputeRegionBackendServiceBackendCustomMetricsList(this, "custom_metrics", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._balancingMode !== undefined) { hasAnyValues = true; internalValueResult.balancingMode = this._balancingMode; } if (this._capacityScaler !== undefined) { hasAnyValues = true; internalValueResult.capacityScaler = this._capacityScaler; } if (this._description !== undefined) { hasAnyValues = true; internalValueResult.description = this._description; } if (this._failover !== undefined) { hasAnyValues = true; internalValueResult.failover = this._failover; } if (this._group !== undefined) { hasAnyValues = true; internalValueResult.group = this._group; } if (this._maxConnections !== undefined) { hasAnyValues = true; internalValueResult.maxConnections = this._maxConnections; } if (this._maxConnectionsPerEndpoint !== undefined) { hasAnyValues = true; internalValueResult.maxConnectionsPerEndpoint = this._maxConnectionsPerEndpoint; } if (this._maxConnectionsPerInstance !== undefined) { hasAnyValues = true; internalValueResult.maxConnectionsPerInstance = this._maxConnectionsPerInstance; } if (this._maxRate !== undefined) { hasAnyValues = true; internalValueResult.maxRate = this._maxRate; } if (this._maxRatePerEndpoint !== undefined) { hasAnyValues = true; internalValueResult.maxRatePerEndpoint = this._maxRatePerEndpoint; } if (this._maxRatePerInstance !== undefined) { hasAnyValues = true; internalValueResult.maxRatePerInstance = this._maxRatePerInstance; } if (this._maxUtilization !== undefined) { hasAnyValues = true; internalValueResult.maxUtilization = this._maxUtilization; } if (this._customMetrics?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.customMetrics = this._customMetrics?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._balancingMode = undefined; this._capacityScaler = undefined; this._description = undefined; this._failover = undefined; this._group = undefined; this._maxConnections = undefined; this._maxConnectionsPerEndpoint = undefined; this._maxConnectionsPerInstance = undefined; this._maxRate = undefined; this._maxRatePerEndpoint = undefined; this._maxRatePerInstance = undefined; this._maxUtilization = undefined; this._customMetrics.internalValue = 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._balancingMode = value.balancingMode; this._capacityScaler = value.capacityScaler; this._description = value.description; this._failover = value.failover; this._group = value.group; this._maxConnections = value.maxConnections; this._maxConnectionsPerEndpoint = value.maxConnectionsPerEndpoint; this._maxConnectionsPerInstance = value.maxConnectionsPerInstance; this._maxRate = value.maxRate; this._maxRatePerEndpoint = value.maxRatePerEndpoint; this._maxRatePerInstance = value.maxRatePerInstance; this._maxUtilization = value.maxUtilization; this._customMetrics.internalValue = value.customMetrics; } } get balancingMode() { return this.getStringAttribute('balancing_mode'); } set balancingMode(value) { this._balancingMode = value; } resetBalancingMode() { this._balancingMode = undefined; } // Temporarily expose input value. Use with caution. get balancingModeInput() { return this._balancingMode; } get capacityScaler() { return this.getNumberAttribute('capacity_scaler'); } set capacityScaler(value) { this._capacityScaler = value; } resetCapacityScaler() { this._capacityScaler = undefined; } // Temporarily expose input value. Use with caution. get capacityScalerInput() { return this._capacityScaler; } 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 failover() { return this.getBooleanAttribute('failover'); } set failover(value) { this._failover = value; } resetFailover() { this._failover = undefined; } // Temporarily expose input value. Use with caution. get failoverInput() { return this._failover; } get group() { return this.getStringAttribute('group'); } set group(value) { this._group = value; } // Temporarily expose input value. Use with caution. get groupInput() { return this._group; } get maxConnections() { return this.getNumberAttribute('max_connections'); } set maxConnections(value) { this._maxConnections = value; } resetMaxConnections() { this._maxConnections = undefined; } // Temporarily expose input value. Use with caution. get maxConnectionsInput() { return this._maxConnections; } get maxConnectionsPerEndpoint() { return this.getNumberAttribute('max_connections_per_endpoint'); } set maxConnectionsPerEndpoint(value) { this._maxConnectionsPerEndpoint = value; } resetMaxConnectionsPerEndpoint() { this._maxConnectionsPerEndpoint = undefined; } // Temporarily expose input value. Use with caution. get maxConnectionsPerEndpointInput() { return this._maxConnectionsPerEndpoint; } get maxConnectionsPerInstance() { return this.getNumberAttribute('max_connections_per_instance'); } set maxConnectionsPerInstance(value) { this._maxConnectionsPerInstance = value; } resetMaxConnectionsPerInstance() { this._maxConnectionsPerInstance = undefined; } // Temporarily expose input value. Use with caution. get maxConnectionsPerInstanceInput() { return this._maxConnectionsPerInstance; } get maxRate() { return this.getNumberAttribute('max_rate'); } set maxRate(value) { this._maxRate = value; } resetMaxRate() { this._maxRate = undefined; } // Temporarily expose input value. Use with caution. get maxRateInput() { return this._maxRate; } get maxRatePerEndpoint() { return this.getNumberAttribute('max_rate_per_endpoint'); } set maxRatePerEndpoint(value) { this._maxRatePerEndpoint = value; } resetMaxRatePerEndpoint() { this._maxRatePerEndpoint = undefined; } // Temporarily expose input value. Use with caution. get maxRatePerEndpointInput() { return this._maxRatePerEndpoint; } get maxRatePerInstance() { return this.getNumberAttribute('max_rate_per_instance'); } set maxRatePerInstance(value) { this._maxRatePerInstance = value; } resetMaxRatePerInstance() { this._maxRatePerInstance = undefined; } // Temporarily expose input value. Use with caution. get maxRatePerInstanceInput() { return this._maxRatePerInstance; } get maxUtilization() { return this.getNumberAttribute('max_utilization'); } set maxUtilization(value) { this._maxUtilization = value; } resetMaxUtilization() { this._maxUtilization = undefined; } // Temporarily expose input value. Use with caution. get maxUtilizationInput() { return this._maxUtilization; } get customMetrics() { return this._customMetrics; } putCustomMetrics(value) { this._customMetrics.internalValue = value; } resetCustomMetrics() { this._customMetrics.internalValue = undefined; } // Temporarily expose input value. Use with caution. get customMetricsInput() { return this._customMetrics.internalValue; } } exports.ComputeRegionBackendServiceBackendOutputReference = ComputeRegionBackendServiceBackendOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceBackendOutputReference[_c] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceBackendOutputReference", version: "14.35.0" }; class ComputeRegionBackendServiceBackendList 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 ComputeRegionBackendServiceBackendOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionBackendServiceBackendList = ComputeRegionBackendServiceBackendList; _d = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceBackendList[_d] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceBackendList", version: "14.35.0" }; function computeRegionBackendServiceCdnPolicyCacheKeyPolicyToTerraform(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 { include_host: cdktf.booleanToTerraform(struct.includeHost), include_named_cookies: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.includeNamedCookies), include_protocol: cdktf.booleanToTerraform(struct.includeProtocol), include_query_string: cdktf.booleanToTerraform(struct.includeQueryString), query_string_blacklist: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.queryStringBlacklist), query_string_whitelist: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.queryStringWhitelist), }; } function computeRegionBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform(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 = { include_host: { value: cdktf.booleanToHclTerraform(struct.includeHost), isBlock: false, type: "simple", storageClassType: "boolean", }, include_named_cookies: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.includeNamedCookies), isBlock: false, type: "list", storageClassType: "stringList", }, include_protocol: { value: cdktf.booleanToHclTerraform(struct.includeProtocol), isBlock: false, type: "simple", storageClassType: "boolean", }, include_query_string: { value: cdktf.booleanToHclTerraform(struct.includeQueryString), isBlock: false, type: "simple", storageClassType: "boolean", }, query_string_blacklist: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.queryStringBlacklist), isBlock: false, type: "set", storageClassType: "stringList", }, query_string_whitelist: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.queryStringWhitelist), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._includeHost !== undefined) { hasAnyValues = true; internalValueResult.includeHost = this._includeHost; } if (this._includeNamedCookies !== undefined) { hasAnyValues = true; internalValueResult.includeNamedCookies = this._includeNamedCookies; } if (this._includeProtocol !== undefined) { hasAnyValues = true; internalValueResult.includeProtocol = this._includeProtocol; } if (this._includeQueryString !== undefined) { hasAnyValues = true; internalValueResult.includeQueryString = this._includeQueryString; } if (this._queryStringBlacklist !== undefined) { hasAnyValues = true; internalValueResult.queryStringBlacklist = this._queryStringBlacklist; } if (this._queryStringWhitelist !== undefined) { hasAnyValues = true; internalValueResult.queryStringWhitelist = this._queryStringWhitelist; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._includeHost = undefined; this._includeNamedCookies = undefined; this._includeProtocol = undefined; this._includeQueryString = undefined; this._queryStringBlacklist = undefined; this._queryStringWhitelist = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._includeHost = value.includeHost; this._includeNamedCookies = value.includeNamedCookies; this._includeProtocol = value.includeProtocol; this._includeQueryString = value.includeQueryString; this._queryStringBlacklist = value.queryStringBlacklist; this._queryStringWhitelist = value.queryStringWhitelist; } } get includeHost() { return this.getBooleanAttribute('include_host'); } set includeHost(value) { this._includeHost = value; } resetIncludeHost() { this._includeHost = undefined; } // Temporarily expose input value. Use with caution. get includeHostInput() { return this._includeHost; } get includeNamedCookies() { return this.getListAttribute('include_named_cookies'); } set includeNamedCookies(value) { this._includeNamedCookies = value; } resetIncludeNamedCookies() { this._includeNamedCookies = undefined; } // Temporarily expose input value. Use with caution. get includeNamedCookiesInput() { return this._includeNamedCookies; } get includeProtocol() { return this.getBooleanAttribute('include_protocol'); } set includeProtocol(value) { this._includeProtocol = value; } resetIncludeProtocol() { this._includeProtocol = undefined; } // Temporarily expose input value. Use with caution. get includeProtocolInput() { return this._includeProtocol; } get includeQueryString() { return this.getBooleanAttribute('include_query_string'); } set includeQueryString(value) { this._includeQueryString = value; } resetIncludeQueryString() { this._includeQueryString = undefined; } // Temporarily expose input value. Use with caution. get includeQueryStringInput() { return this._includeQueryString; } get queryStringBlacklist() { return cdktf.Fn.tolist(this.getListAttribute('query_string_blacklist')); } set queryStringBlacklist(value) { this._queryStringBlacklist = value; } resetQueryStringBlacklist() { this._queryStringBlacklist = undefined; } // Temporarily expose input value. Use with caution. get queryStringBlacklistInput() { return this._queryStringBlacklist; } get queryStringWhitelist() { return cdktf.Fn.tolist(this.getListAttribute('query_string_whitelist')); } set queryStringWhitelist(value) { this._queryStringWhitelist = value; } resetQueryStringWhitelist() { this._queryStringWhitelist = undefined; } // Temporarily expose input value. Use with caution. get queryStringWhitelistInput() { return this._queryStringWhitelist; } } exports.ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference = ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference[_e] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference", version: "14.35.0" }; function computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToTerraform(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 { code: cdktf.numberToTerraform(struct.code), }; } function computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform(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 = { code: { value: cdktf.numberToHclTerraform(struct.code), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference 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._code !== undefined) { hasAnyValues = true; internalValueResult.code = this._code; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._code = 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._code = value.code; } } get code() { return this.getNumberAttribute('code'); } set code(value) { this._code = value; } resetCode() { this._code = undefined; } // Temporarily expose input value. Use with caution. get codeInput() { return this._code; } } exports.ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference = ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference[_f] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference", version: "14.35.0" }; class ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList 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 ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList = ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList; _g = JSII_RTTI_SYMBOL_1; ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList[_g] = { fqn: "@cdktf/provider-google.computeRegionBackendService.ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList", version: "14.35.0" }; function computeRegionBackendServiceCdnPolicyToTerraform(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 { cache_mode: cdktf.stringToTerraform(struct.cacheMode), client_ttl: cdktf.numberToTerraform(struct.clientTtl), default_ttl: cdktf.numberToTerraform(struct.defaultTtl), max_ttl: cdktf.numberToTerraform(struct.maxTtl), negative_caching: cdktf.booleanToTerraform(struct.negativeCaching), serve_while_stale: cdktf.numberToTerraform(struct.serveWhileStale), signed_url_cache_max_age_sec: cdktf.numberToTerraform(struct.signedUrlCacheMaxAgeSec), cache_key_policy: computeRegionBackendServiceCdnPolicyCacheKeyPolicyToTerraform(struct.cacheKeyPolicy), negative_caching_policy: cdktf.listMapper(computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToTerraform, true)(struct.negativeCachingPolicy), }; } function computeRegionBackendServiceCdnPolicyToHclTerraform(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 = { cache_mode: { value: cdktf.stringToHclTerraform(struct.cacheMode), isBlock: false, type: "simple", storageClassType: "string", }, client_ttl: { value: cdktf.numberToHclTerraform(struct.clientTtl), isBlock: false, type: "simple", storageClassType: "number", }, default_ttl: { value: cdktf.numberToHclTerraform(struct.defaultTtl), isBlock: false, type: "simple", storageClassType: "number", }, max_ttl: { value: cdktf.numberToHclTerraform(struct.maxTtl), isBlock: false, type: "simple", storageClassType: "number", }, negative_caching: { value: cdktf.booleanToHclTerraform(struct.negativeCaching), isBlock: false, type: "simple", storageClassType: "boolean", }, serve_while_stale: { value: cdktf.numberToHclTerraform(struct.serveWhileStale), isBlock: false, type: "simple", storageClassType: "number", }, signed_url_cache_max_age_sec: { value: cdktf.numberToHclTerraform(struct.signedUrlCacheMaxAgeSec), isBlock: false, type: "simple", storageClassType: "number", }, cache_key_policy: { value: computeRegionBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform(struct.cacheKeyPolicy), isBlock: true, type: "list", storageClassType: "ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyList", }, negative_caching_policy: { value: cdktf.listMapperHcl(computeRegionBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform, true)(struct.negativeCachingPolicy), isBlock: true, type: "list", storageClassType: "ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionBackendServiceCdnPolicyOutputReference 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; // cache_key_policy - computed: false, optional: true, required: false this._cacheKeyPolicy = new ComputeRegionBackendServiceCdnPolicyCacheKeyPolicyOutputReference(this, "cache_key_policy"); // negative_caching_policy - computed: false, optional: true, required: false this._negativeCachingPolicy = new ComputeRegionBackendServiceCdnPolicyNegativeCachingPolicyList(this, "negative_caching_policy", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._cacheMode !== undefined) { hasAnyValues = true; internalValueResult.cacheMode = this._cacheMode; } if (this._clientTtl !== undefined) { hasAnyValues = true; internalValueResult.clientTtl = this._clientTtl; } if (this._defaultTtl !== undefined) { hasAnyValues = true; internalValueResult.defaultTtl = this._defaultTtl; } if (this._maxTtl !== undefined) { hasAnyValues = true; internalValueResult.maxTtl = this._maxTtl; } if (this._negativeCaching !== undefined) { hasAnyValues = true; internalValueResult.negativeCaching = this._negativeCaching; } if (this._serveWhileStale !== undefined) { hasAnyValues = true; internalValueResult.serveWhileStale = this._serveWhileStale; } if (this._signedUrlCacheMaxAgeSec !== undefined) { hasAnyValues = true; internalValueResult.signedUrlCacheMaxAgeSec = this._signedUrlCacheMaxAgeSec; } if (this._cacheKeyPolicy?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.cacheKeyPolicy = this._cacheKeyPolicy?.internalValue; } if (this._negativeCachingPolicy?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.negativeCachingPolicy = this._negativeCachingPolicy?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cacheMode = undefined; this._clientTtl = undefined; this._defaultTtl = undefined; this._maxTtl = undefined; this._negativeCaching = undefined; this._serveWhileStale = undefined; this._signedUrlCacheMaxAgeSec = undefined; this._cacheKeyPolicy.internalValue = undefined; this._negativeCachingPolicy.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cacheMode = value.cacheMode; this._clientTtl = value.clientTtl; this._defaultTtl = value.defaultTtl; this._maxTtl = value.maxTtl; this._negativeCaching = value.negativeCaching; this._serveWhileStale = value.serveWhileStale; this._signedUrlCacheMaxAgeSec = value.signedUrlCacheMaxAgeSec; this._cacheKeyPolicy.internalValue = value.cacheKeyPolicy; this._negativeCachingPolicy.internalValue = value.negativeCachingPolicy; } } get cacheMode() { return th