@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,089 lines • 722 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComputeBackendService = exports.ComputeBackendServiceTimeoutsOutputReference = exports.ComputeBackendServiceStrongSessionAffinityCookieOutputReference = exports.ComputeBackendServiceStrongSessionAffinityCookieTtlOutputReference = exports.ComputeBackendServiceSecuritySettingsOutputReference = exports.ComputeBackendServiceSecuritySettingsAwsV4AuthenticationOutputReference = exports.ComputeBackendServiceOutlierDetectionOutputReference = exports.ComputeBackendServiceOutlierDetectionIntervalOutputReference = exports.ComputeBackendServiceOutlierDetectionBaseEjectionTimeOutputReference = exports.ComputeBackendServiceMaxStreamDurationOutputReference = exports.ComputeBackendServiceLogConfigOutputReference = exports.ComputeBackendServiceLocalityLbPoliciesList = exports.ComputeBackendServiceLocalityLbPoliciesOutputReference = exports.ComputeBackendServiceLocalityLbPoliciesPolicyOutputReference = exports.ComputeBackendServiceLocalityLbPoliciesCustomPolicyOutputReference = exports.ComputeBackendServiceIapOutputReference = exports.ComputeBackendServiceCustomMetricsList = exports.ComputeBackendServiceCustomMetricsOutputReference = exports.ComputeBackendServiceConsistentHashOutputReference = exports.ComputeBackendServiceConsistentHashHttpCookieOutputReference = exports.ComputeBackendServiceConsistentHashHttpCookieTtlOutputReference = exports.ComputeBackendServiceCircuitBreakersOutputReference = exports.ComputeBackendServiceCdnPolicyOutputReference = exports.ComputeBackendServiceCdnPolicyNegativeCachingPolicyList = exports.ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference = exports.ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference = exports.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList = exports.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference = exports.ComputeBackendServiceBackendList = exports.ComputeBackendServiceBackendOutputReference = exports.ComputeBackendServiceBackendCustomMetricsList = exports.ComputeBackendServiceBackendCustomMetricsOutputReference = void 0;
exports.computeBackendServiceBackendCustomMetricsToTerraform = computeBackendServiceBackendCustomMetricsToTerraform;
exports.computeBackendServiceBackendCustomMetricsToHclTerraform = computeBackendServiceBackendCustomMetricsToHclTerraform;
exports.computeBackendServiceBackendToTerraform = computeBackendServiceBackendToTerraform;
exports.computeBackendServiceBackendToHclTerraform = computeBackendServiceBackendToHclTerraform;
exports.computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform = computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform;
exports.computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform = computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform;
exports.computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform = computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform;
exports.computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform = computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform;
exports.computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform = computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform;
exports.computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform = computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform;
exports.computeBackendServiceCdnPolicyToTerraform = computeBackendServiceCdnPolicyToTerraform;
exports.computeBackendServiceCdnPolicyToHclTerraform = computeBackendServiceCdnPolicyToHclTerraform;
exports.computeBackendServiceCircuitBreakersToTerraform = computeBackendServiceCircuitBreakersToTerraform;
exports.computeBackendServiceCircuitBreakersToHclTerraform = computeBackendServiceCircuitBreakersToHclTerraform;
exports.computeBackendServiceConsistentHashHttpCookieTtlToTerraform = computeBackendServiceConsistentHashHttpCookieTtlToTerraform;
exports.computeBackendServiceConsistentHashHttpCookieTtlToHclTerraform = computeBackendServiceConsistentHashHttpCookieTtlToHclTerraform;
exports.computeBackendServiceConsistentHashHttpCookieToTerraform = computeBackendServiceConsistentHashHttpCookieToTerraform;
exports.computeBackendServiceConsistentHashHttpCookieToHclTerraform = computeBackendServiceConsistentHashHttpCookieToHclTerraform;
exports.computeBackendServiceConsistentHashToTerraform = computeBackendServiceConsistentHashToTerraform;
exports.computeBackendServiceConsistentHashToHclTerraform = computeBackendServiceConsistentHashToHclTerraform;
exports.computeBackendServiceCustomMetricsToTerraform = computeBackendServiceCustomMetricsToTerraform;
exports.computeBackendServiceCustomMetricsToHclTerraform = computeBackendServiceCustomMetricsToHclTerraform;
exports.computeBackendServiceIapToTerraform = computeBackendServiceIapToTerraform;
exports.computeBackendServiceIapToHclTerraform = computeBackendServiceIapToHclTerraform;
exports.computeBackendServiceLocalityLbPoliciesCustomPolicyToTerraform = computeBackendServiceLocalityLbPoliciesCustomPolicyToTerraform;
exports.computeBackendServiceLocalityLbPoliciesCustomPolicyToHclTerraform = computeBackendServiceLocalityLbPoliciesCustomPolicyToHclTerraform;
exports.computeBackendServiceLocalityLbPoliciesPolicyToTerraform = computeBackendServiceLocalityLbPoliciesPolicyToTerraform;
exports.computeBackendServiceLocalityLbPoliciesPolicyToHclTerraform = computeBackendServiceLocalityLbPoliciesPolicyToHclTerraform;
exports.computeBackendServiceLocalityLbPoliciesToTerraform = computeBackendServiceLocalityLbPoliciesToTerraform;
exports.computeBackendServiceLocalityLbPoliciesToHclTerraform = computeBackendServiceLocalityLbPoliciesToHclTerraform;
exports.computeBackendServiceLogConfigToTerraform = computeBackendServiceLogConfigToTerraform;
exports.computeBackendServiceLogConfigToHclTerraform = computeBackendServiceLogConfigToHclTerraform;
exports.computeBackendServiceMaxStreamDurationToTerraform = computeBackendServiceMaxStreamDurationToTerraform;
exports.computeBackendServiceMaxStreamDurationToHclTerraform = computeBackendServiceMaxStreamDurationToHclTerraform;
exports.computeBackendServiceOutlierDetectionBaseEjectionTimeToTerraform = computeBackendServiceOutlierDetectionBaseEjectionTimeToTerraform;
exports.computeBackendServiceOutlierDetectionBaseEjectionTimeToHclTerraform = computeBackendServiceOutlierDetectionBaseEjectionTimeToHclTerraform;
exports.computeBackendServiceOutlierDetectionIntervalToTerraform = computeBackendServiceOutlierDetectionIntervalToTerraform;
exports.computeBackendServiceOutlierDetectionIntervalToHclTerraform = computeBackendServiceOutlierDetectionIntervalToHclTerraform;
exports.computeBackendServiceOutlierDetectionToTerraform = computeBackendServiceOutlierDetectionToTerraform;
exports.computeBackendServiceOutlierDetectionToHclTerraform = computeBackendServiceOutlierDetectionToHclTerraform;
exports.computeBackendServiceSecuritySettingsAwsV4AuthenticationToTerraform = computeBackendServiceSecuritySettingsAwsV4AuthenticationToTerraform;
exports.computeBackendServiceSecuritySettingsAwsV4AuthenticationToHclTerraform = computeBackendServiceSecuritySettingsAwsV4AuthenticationToHclTerraform;
exports.computeBackendServiceSecuritySettingsToTerraform = computeBackendServiceSecuritySettingsToTerraform;
exports.computeBackendServiceSecuritySettingsToHclTerraform = computeBackendServiceSecuritySettingsToHclTerraform;
exports.computeBackendServiceStrongSessionAffinityCookieTtlToTerraform = computeBackendServiceStrongSessionAffinityCookieTtlToTerraform;
exports.computeBackendServiceStrongSessionAffinityCookieTtlToHclTerraform = computeBackendServiceStrongSessionAffinityCookieTtlToHclTerraform;
exports.computeBackendServiceStrongSessionAffinityCookieToTerraform = computeBackendServiceStrongSessionAffinityCookieToTerraform;
exports.computeBackendServiceStrongSessionAffinityCookieToHclTerraform = computeBackendServiceStrongSessionAffinityCookieToHclTerraform;
exports.computeBackendServiceTimeoutsToTerraform = computeBackendServiceTimeoutsToTerraform;
exports.computeBackendServiceTimeoutsToHclTerraform = computeBackendServiceTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function computeBackendServiceBackendCustomMetricsToTerraform(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 computeBackendServiceBackendCustomMetricsToHclTerraform(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 ComputeBackendServiceBackendCustomMetricsOutputReference 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.ComputeBackendServiceBackendCustomMetricsOutputReference = ComputeBackendServiceBackendCustomMetricsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceBackendCustomMetricsOutputReference[_a] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceBackendCustomMetricsOutputReference", version: "14.35.1" };
class ComputeBackendServiceBackendCustomMetricsList 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 ComputeBackendServiceBackendCustomMetricsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ComputeBackendServiceBackendCustomMetricsList = ComputeBackendServiceBackendCustomMetricsList;
_b = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceBackendCustomMetricsList[_b] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceBackendCustomMetricsList", version: "14.35.1" };
function computeBackendServiceBackendToTerraform(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),
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),
preference: cdktf.stringToTerraform(struct.preference),
custom_metrics: cdktf.listMapper(computeBackendServiceBackendCustomMetricsToTerraform, true)(struct.customMetrics),
};
}
function computeBackendServiceBackendToHclTerraform(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",
},
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",
},
preference: {
value: cdktf.stringToHclTerraform(struct.preference),
isBlock: false,
type: "simple",
storageClassType: "string",
},
custom_metrics: {
value: cdktf.listMapperHcl(computeBackendServiceBackendCustomMetricsToHclTerraform, true)(struct.customMetrics),
isBlock: true,
type: "list",
storageClassType: "ComputeBackendServiceBackendCustomMetricsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ComputeBackendServiceBackendOutputReference 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 ComputeBackendServiceBackendCustomMetricsList(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._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._preference !== undefined) {
hasAnyValues = true;
internalValueResult.preference = this._preference;
}
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._group = undefined;
this._maxConnections = undefined;
this._maxConnectionsPerEndpoint = undefined;
this._maxConnectionsPerInstance = undefined;
this._maxRate = undefined;
this._maxRatePerEndpoint = undefined;
this._maxRatePerInstance = undefined;
this._maxUtilization = undefined;
this._preference = 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._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._preference = value.preference;
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 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 preference() {
return this.getStringAttribute('preference');
}
set preference(value) {
this._preference = value;
}
resetPreference() {
this._preference = undefined;
}
// Temporarily expose input value. Use with caution.
get preferenceInput() {
return this._preference;
}
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.ComputeBackendServiceBackendOutputReference = ComputeBackendServiceBackendOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceBackendOutputReference[_c] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceBackendOutputReference", version: "14.35.1" };
class ComputeBackendServiceBackendList 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 ComputeBackendServiceBackendOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ComputeBackendServiceBackendList = ComputeBackendServiceBackendList;
_d = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceBackendList[_d] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceBackendList", version: "14.35.1" };
function computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
header_name: cdktf.stringToTerraform(struct.headerName),
};
}
function computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
header_name: {
value: cdktf.stringToHclTerraform(struct.headerName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._headerName !== undefined) {
hasAnyValues = true;
internalValueResult.headerName = this._headerName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._headerName = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._headerName = value.headerName;
}
}
get headerName() {
return this.getStringAttribute('header_name');
}
set headerName(value) {
this._headerName = value;
}
// Temporarily expose input value. Use with caution.
get headerNameInput() {
return this._headerName;
}
}
exports.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference = ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference[_e] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference", version: "14.35.1" };
class ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList 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 ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList = ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList;
_f = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList[_f] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList", version: "14.35.1" };
function computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform(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_http_headers: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.includeHttpHeaders),
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 computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform(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_http_headers: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.includeHttpHeaders),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
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 ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference 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._includeHttpHeaders !== undefined) {
hasAnyValues = true;
internalValueResult.includeHttpHeaders = this._includeHttpHeaders;
}
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._includeHttpHeaders = 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._includeHttpHeaders = value.includeHttpHeaders;
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 includeHttpHeaders() {
return this.getListAttribute('include_http_headers');
}
set includeHttpHeaders(value) {
this._includeHttpHeaders = value;
}
resetIncludeHttpHeaders() {
this._includeHttpHeaders = undefined;
}
// Temporarily expose input value. Use with caution.
get includeHttpHeadersInput() {
return this._includeHttpHeaders;
}
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.ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference = ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference[_g] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference", version: "14.35.1" };
function computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform(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),
ttl: cdktf.numberToTerraform(struct.ttl),
};
}
function computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform(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",
},
ttl: {
value: cdktf.numberToHclTerraform(struct.ttl),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference 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;
}
if (this._ttl !== undefined) {
hasAnyValues = true;
internalValueResult.ttl = this._ttl;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._code = undefined;
this._ttl = 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;
this._ttl = value.ttl;
}
}
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;
}
get ttl() {
return this.getNumberAttribute('ttl');
}
set ttl(value) {
this._ttl = value;
}
resetTtl() {
this._ttl = undefined;
}
// Temporarily expose input value. Use with caution.
get ttlInput() {
return this._ttl;
}
}
exports.ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference = ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference[_h] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference", version: "14.35.1" };
class ComputeBackendServiceCdnPolicyNegativeCachingPolicyList 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 ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReferen