UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,090 lines 632 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2; Object.defineProperty(exports, "__esModule", { value: true }); exports.computeBackendServiceOutlierDetectionIntervalToTerraform = exports.ComputeBackendServiceOutlierDetectionBaseEjectionTimeOutputReference = exports.computeBackendServiceOutlierDetectionBaseEjectionTimeToHclTerraform = exports.computeBackendServiceOutlierDetectionBaseEjectionTimeToTerraform = exports.ComputeBackendServiceLogConfigOutputReference = exports.computeBackendServiceLogConfigToHclTerraform = exports.computeBackendServiceLogConfigToTerraform = exports.ComputeBackendServiceLocalityLbPoliciesList = exports.ComputeBackendServiceLocalityLbPoliciesOutputReference = exports.computeBackendServiceLocalityLbPoliciesToHclTerraform = exports.computeBackendServiceLocalityLbPoliciesToTerraform = exports.ComputeBackendServiceLocalityLbPoliciesPolicyOutputReference = exports.computeBackendServiceLocalityLbPoliciesPolicyToHclTerraform = exports.computeBackendServiceLocalityLbPoliciesPolicyToTerraform = exports.ComputeBackendServiceLocalityLbPoliciesCustomPolicyOutputReference = exports.computeBackendServiceLocalityLbPoliciesCustomPolicyToHclTerraform = exports.computeBackendServiceLocalityLbPoliciesCustomPolicyToTerraform = exports.ComputeBackendServiceIapOutputReference = exports.computeBackendServiceIapToHclTerraform = exports.computeBackendServiceIapToTerraform = exports.ComputeBackendServiceConsistentHashOutputReference = exports.computeBackendServiceConsistentHashToHclTerraform = exports.computeBackendServiceConsistentHashToTerraform = exports.ComputeBackendServiceConsistentHashHttpCookieOutputReference = exports.computeBackendServiceConsistentHashHttpCookieToHclTerraform = exports.computeBackendServiceConsistentHashHttpCookieToTerraform = exports.ComputeBackendServiceConsistentHashHttpCookieTtlOutputReference = exports.computeBackendServiceConsistentHashHttpCookieTtlToHclTerraform = exports.computeBackendServiceConsistentHashHttpCookieTtlToTerraform = exports.ComputeBackendServiceCircuitBreakersOutputReference = exports.computeBackendServiceCircuitBreakersToHclTerraform = exports.computeBackendServiceCircuitBreakersToTerraform = exports.ComputeBackendServiceCdnPolicyOutputReference = exports.computeBackendServiceCdnPolicyToHclTerraform = exports.computeBackendServiceCdnPolicyToTerraform = exports.ComputeBackendServiceCdnPolicyNegativeCachingPolicyList = exports.ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference = exports.computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform = exports.computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform = exports.ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference = exports.computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform = exports.computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform = exports.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList = exports.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference = exports.computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform = exports.computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform = exports.ComputeBackendServiceBackendList = exports.ComputeBackendServiceBackendOutputReference = exports.computeBackendServiceBackendToHclTerraform = exports.computeBackendServiceBackendToTerraform = void 0; exports.ComputeBackendService = exports.ComputeBackendServiceTimeoutsOutputReference = exports.computeBackendServiceTimeoutsToHclTerraform = exports.computeBackendServiceTimeoutsToTerraform = exports.ComputeBackendServiceStrongSessionAffinityCookieOutputReference = exports.computeBackendServiceStrongSessionAffinityCookieToHclTerraform = exports.computeBackendServiceStrongSessionAffinityCookieToTerraform = exports.ComputeBackendServiceStrongSessionAffinityCookieTtlOutputReference = exports.computeBackendServiceStrongSessionAffinityCookieTtlToHclTerraform = exports.computeBackendServiceStrongSessionAffinityCookieTtlToTerraform = exports.ComputeBackendServiceSecuritySettingsOutputReference = exports.computeBackendServiceSecuritySettingsToHclTerraform = exports.computeBackendServiceSecuritySettingsToTerraform = exports.ComputeBackendServiceSecuritySettingsAwsV4AuthenticationOutputReference = exports.computeBackendServiceSecuritySettingsAwsV4AuthenticationToHclTerraform = exports.computeBackendServiceSecuritySettingsAwsV4AuthenticationToTerraform = exports.ComputeBackendServiceOutlierDetectionOutputReference = exports.computeBackendServiceOutlierDetectionToHclTerraform = exports.computeBackendServiceOutlierDetectionToTerraform = exports.ComputeBackendServiceOutlierDetectionIntervalOutputReference = exports.computeBackendServiceOutlierDetectionIntervalToHclTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); 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), }; } exports.computeBackendServiceBackendToTerraform = computeBackendServiceBackendToTerraform; 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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeBackendServiceBackendToHclTerraform = computeBackendServiceBackendToHclTerraform; 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; } 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; } 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; } 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; } } 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; } } exports.ComputeBackendServiceBackendOutputReference = ComputeBackendServiceBackendOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeBackendServiceBackendOutputReference[_a] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceBackendOutputReference", version: "14.12.0" }; 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; _b = JSII_RTTI_SYMBOL_1; ComputeBackendServiceBackendList[_b] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceBackendList", version: "14.12.0" }; 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), }; } exports.computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform = computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform; 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)); } exports.computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform = computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform; 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; _c = JSII_RTTI_SYMBOL_1; ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference[_c] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersOutputReference", version: "14.12.0" }; 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; _d = JSII_RTTI_SYMBOL_1; ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList[_d] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList", version: "14.12.0" }; 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), }; } exports.computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform = computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform; 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)); } exports.computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform = computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform; 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; _e = JSII_RTTI_SYMBOL_1; ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference[_e] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference", version: "14.12.0" }; 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), }; } exports.computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform = computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform; 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)); } exports.computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform = computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform; 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; _f = JSII_RTTI_SYMBOL_1; ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference[_f] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference", version: "14.12.0" }; 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 ComputeBackendServiceCdnPolicyNegativeCachingPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeBackendServiceCdnPolicyNegativeCachingPolicyList = ComputeBackendServiceCdnPolicyNegativeCachingPolicyList; _g = JSII_RTTI_SYMBOL_1; ComputeBackendServiceCdnPolicyNegativeCachingPolicyList[_g] = { fqn: "@cdktf/provider-google.computeBackendService.ComputeBackendServiceCdnPolicyNegativeCachingPolicyList", version: "14.12.0" }; function computeBackendServiceCdnPolicyToTerraform(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), bypass_cache_on_request_headers: cdktf.listMapper(computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToTerraform, true)(struct.bypassCacheOnRequestHeaders), cache_key_policy: computeBackendServiceCdnPolicyCacheKeyPolicyToTerraform(struct.cacheKeyPolicy), negative_caching_policy: cdktf.listMapper(computeBackendServiceCdnPolicyNegativeCachingPolicyToTerraform, true)(struct.negativeCachingPolicy), }; } exports.computeBackendServiceCdnPolicyToTerraform = computeBackendServiceCdnPolicyToTerraform; function computeBackendServiceCdnPolicyToHclTerraform(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", }, bypass_cache_on_request_headers: { value: cdktf.listMapperHcl(computeBackendServiceCdnPolicyBypassCacheOnRequestHeadersToHclTerraform, true)(struct.bypassCacheOnRequestHeaders), isBlock: true, type: "list", storageClassType: "ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList", }, cache_key_policy: { value: computeBackendServiceCdnPolicyCacheKeyPolicyToHclTerraform(struct.cacheKeyPolicy), isBlock: true, type: "list", storageClassType: "ComputeBackendServiceCdnPolicyCacheKeyPolicyList", }, negative_caching_policy: { value: cdktf.listMapperHcl(computeBackendServiceCdnPolicyNegativeCachingPolicyToHclTerraform, true)(struct.negativeCachingPolicy), isBlock: true, type: "list", storageClassType: "ComputeBackendServiceCdnPolicyNegativeCachingPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeBackendServiceCdnPolicyToHclTerraform = computeBackendServiceCdnPolicyToHclTerraform; class ComputeBackendServiceCdnPolicyOutputReference 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; // bypass_cache_on_request_headers - computed: false, optional: true, required: false this._bypassCacheOnRequestHeaders = new ComputeBackendServiceCdnPolicyBypassCacheOnRequestHeadersList(this, "bypass_cache_on_request_headers", false); // cache_key_policy - computed: false, optional: true, required: false this._cacheKeyPolicy = new ComputeBackendServiceCdnPolicyCacheKeyPolicyOutputReference(this, "cache_key_policy"); // negative_caching_policy - computed: false, optional: true, required: false this._negativeCachingPolicy = new ComputeBackendServiceCdnPolicyNegativeCachingPolicyList(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._bypassCacheOnRequestHeaders?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.bypassCacheOnRequestHeaders = this._bypassCacheOnRequestHeaders?.internalValue; } 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._bypassCacheOnRequestHeaders.internalValue = 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._bypassCacheOnRequestHeaders.internalValue = value.bypassCacheOnRequestHeaders; this._cacheKeyPolicy.internalValue = value.cacheKeyPolicy; this._negativeCachingPolicy.internalValue = value.negativeCachingPolicy; } } get cacheMode() { return this.getStringAttribute('cache_mode'); } set cacheMode(value) { this._cacheMode = value; } resetCacheMode() { this._cacheMode = undefined; } // Temporarily expose input value. Use with caution. get cacheModeInput() { return this._cacheMode; } get clientTtl() { return this.getNumberAttribute('client_ttl'); } set clientTtl(value) { this._clientTtl = value; } resetClientTtl() { this._clientTtl = undefined; } // Temporarily expose input value. Use with caution. get clientTtlInput() { return this._clientTtl; } get defaultTtl() { return this.getNumberAttribute('default_ttl'); } set defaultTtl(value) { this._defaultTtl = value; } resetDefaultTtl() { this._defaultTtl = undefined; } // Temporarily expose input value. Use with caution. get defaultTtlInput() { return this._defaultTtl; } get maxTtl() { return this.getNumberAttribute('max_ttl'); } set maxTtl(value) { this._maxTtl = value; } resetMaxTtl() { this._maxTtl = undefined; } // Temporarily expose input value. Use with caution. get maxTtlInput() { return this._maxTtl; } get negativeCaching() { return this.getBooleanAttribute('negative_caching'); } set negativeCaching(value) { this._negativeCaching = value; } resetNegativeCaching() { this._negativeCaching = undefined; } // Tem