UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,134 lines 165 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeBackendBucket = exports.ComputeBackendBucketTimeoutsOutputReference = exports.computeBackendBucketTimeoutsToHclTerraform = exports.computeBackendBucketTimeoutsToTerraform = exports.ComputeBackendBucketCdnPolicyOutputReference = exports.computeBackendBucketCdnPolicyToHclTerraform = exports.computeBackendBucketCdnPolicyToTerraform = exports.ComputeBackendBucketCdnPolicyNegativeCachingPolicyList = exports.ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference = exports.computeBackendBucketCdnPolicyNegativeCachingPolicyToHclTerraform = exports.computeBackendBucketCdnPolicyNegativeCachingPolicyToTerraform = exports.ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference = exports.computeBackendBucketCdnPolicyCacheKeyPolicyToHclTerraform = exports.computeBackendBucketCdnPolicyCacheKeyPolicyToTerraform = exports.ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList = exports.ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference = exports.computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToHclTerraform = exports.computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToTerraform(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.computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToTerraform = computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToTerraform; function computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToHclTerraform(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.computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToHclTerraform = computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToHclTerraform; class ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference 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; } resetHeaderName() { this._headerName = undefined; } // Temporarily expose input value. Use with caution. get headerNameInput() { return this._headerName; } } exports.ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference = ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference[_a] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference", version: "14.12.0" }; class ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList 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 ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList = ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList; _b = JSII_RTTI_SYMBOL_1; ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList[_b] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList", version: "14.12.0" }; function computeBackendBucketCdnPolicyCacheKeyPolicyToTerraform(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_http_headers: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.includeHttpHeaders), query_string_whitelist: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.queryStringWhitelist), }; } exports.computeBackendBucketCdnPolicyCacheKeyPolicyToTerraform = computeBackendBucketCdnPolicyCacheKeyPolicyToTerraform; function computeBackendBucketCdnPolicyCacheKeyPolicyToHclTerraform(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_http_headers: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.includeHttpHeaders), isBlock: false, type: "list", storageClassType: "stringList", }, query_string_whitelist: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.queryStringWhitelist), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeBackendBucketCdnPolicyCacheKeyPolicyToHclTerraform = computeBackendBucketCdnPolicyCacheKeyPolicyToHclTerraform; class ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference 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._includeHttpHeaders !== undefined) { hasAnyValues = true; internalValueResult.includeHttpHeaders = this._includeHttpHeaders; } if (this._queryStringWhitelist !== undefined) { hasAnyValues = true; internalValueResult.queryStringWhitelist = this._queryStringWhitelist; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._includeHttpHeaders = undefined; this._queryStringWhitelist = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._includeHttpHeaders = value.includeHttpHeaders; this._queryStringWhitelist = value.queryStringWhitelist; } } 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 queryStringWhitelist() { return 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.ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference = ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference[_c] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference", version: "14.12.0" }; function computeBackendBucketCdnPolicyNegativeCachingPolicyToTerraform(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.computeBackendBucketCdnPolicyNegativeCachingPolicyToTerraform = computeBackendBucketCdnPolicyNegativeCachingPolicyToTerraform; function computeBackendBucketCdnPolicyNegativeCachingPolicyToHclTerraform(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.computeBackendBucketCdnPolicyNegativeCachingPolicyToHclTerraform = computeBackendBucketCdnPolicyNegativeCachingPolicyToHclTerraform; class ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference 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.ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference = ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference[_d] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference", version: "14.12.0" }; class ComputeBackendBucketCdnPolicyNegativeCachingPolicyList 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 ComputeBackendBucketCdnPolicyNegativeCachingPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeBackendBucketCdnPolicyNegativeCachingPolicyList = ComputeBackendBucketCdnPolicyNegativeCachingPolicyList; _e = JSII_RTTI_SYMBOL_1; ComputeBackendBucketCdnPolicyNegativeCachingPolicyList[_e] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketCdnPolicyNegativeCachingPolicyList", version: "14.12.0" }; function computeBackendBucketCdnPolicyToTerraform(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), request_coalescing: cdktf.booleanToTerraform(struct.requestCoalescing), serve_while_stale: cdktf.numberToTerraform(struct.serveWhileStale), signed_url_cache_max_age_sec: cdktf.numberToTerraform(struct.signedUrlCacheMaxAgeSec), bypass_cache_on_request_headers: cdktf.listMapper(computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToTerraform, true)(struct.bypassCacheOnRequestHeaders), cache_key_policy: computeBackendBucketCdnPolicyCacheKeyPolicyToTerraform(struct.cacheKeyPolicy), negative_caching_policy: cdktf.listMapper(computeBackendBucketCdnPolicyNegativeCachingPolicyToTerraform, true)(struct.negativeCachingPolicy), }; } exports.computeBackendBucketCdnPolicyToTerraform = computeBackendBucketCdnPolicyToTerraform; function computeBackendBucketCdnPolicyToHclTerraform(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", }, request_coalescing: { value: cdktf.booleanToHclTerraform(struct.requestCoalescing), 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(computeBackendBucketCdnPolicyBypassCacheOnRequestHeadersToHclTerraform, true)(struct.bypassCacheOnRequestHeaders), isBlock: true, type: "list", storageClassType: "ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList", }, cache_key_policy: { value: computeBackendBucketCdnPolicyCacheKeyPolicyToHclTerraform(struct.cacheKeyPolicy), isBlock: true, type: "list", storageClassType: "ComputeBackendBucketCdnPolicyCacheKeyPolicyList", }, negative_caching_policy: { value: cdktf.listMapperHcl(computeBackendBucketCdnPolicyNegativeCachingPolicyToHclTerraform, true)(struct.negativeCachingPolicy), isBlock: true, type: "list", storageClassType: "ComputeBackendBucketCdnPolicyNegativeCachingPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeBackendBucketCdnPolicyToHclTerraform = computeBackendBucketCdnPolicyToHclTerraform; class ComputeBackendBucketCdnPolicyOutputReference 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 ComputeBackendBucketCdnPolicyBypassCacheOnRequestHeadersList(this, "bypass_cache_on_request_headers", false); // cache_key_policy - computed: false, optional: true, required: false this._cacheKeyPolicy = new ComputeBackendBucketCdnPolicyCacheKeyPolicyOutputReference(this, "cache_key_policy"); // negative_caching_policy - computed: false, optional: true, required: false this._negativeCachingPolicy = new ComputeBackendBucketCdnPolicyNegativeCachingPolicyList(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._requestCoalescing !== undefined) { hasAnyValues = true; internalValueResult.requestCoalescing = this._requestCoalescing; } 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._requestCoalescing = 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._requestCoalescing = value.requestCoalescing; 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; } // Temporarily expose input value. Use with caution. get negativeCachingInput() { return this._negativeCaching; } get requestCoalescing() { return this.getBooleanAttribute('request_coalescing'); } set requestCoalescing(value) { this._requestCoalescing = value; } resetRequestCoalescing() { this._requestCoalescing = undefined; } // Temporarily expose input value. Use with caution. get requestCoalescingInput() { return this._requestCoalescing; } get serveWhileStale() { return this.getNumberAttribute('serve_while_stale'); } set serveWhileStale(value) { this._serveWhileStale = value; } resetServeWhileStale() { this._serveWhileStale = undefined; } // Temporarily expose input value. Use with caution. get serveWhileStaleInput() { return this._serveWhileStale; } get signedUrlCacheMaxAgeSec() { return this.getNumberAttribute('signed_url_cache_max_age_sec'); } set signedUrlCacheMaxAgeSec(value) { this._signedUrlCacheMaxAgeSec = value; } resetSignedUrlCacheMaxAgeSec() { this._signedUrlCacheMaxAgeSec = undefined; } // Temporarily expose input value. Use with caution. get signedUrlCacheMaxAgeSecInput() { return this._signedUrlCacheMaxAgeSec; } get bypassCacheOnRequestHeaders() { return this._bypassCacheOnRequestHeaders; } putBypassCacheOnRequestHeaders(value) { this._bypassCacheOnRequestHeaders.internalValue = value; } resetBypassCacheOnRequestHeaders() { this._bypassCacheOnRequestHeaders.internalValue = undefined; } // Temporarily expose input value. Use with caution. get bypassCacheOnRequestHeadersInput() { return this._bypassCacheOnRequestHeaders.internalValue; } get cacheKeyPolicy() { return this._cacheKeyPolicy; } putCacheKeyPolicy(value) { this._cacheKeyPolicy.internalValue = value; } resetCacheKeyPolicy() { this._cacheKeyPolicy.internalValue = undefined; } // Temporarily expose input value. Use with caution. get cacheKeyPolicyInput() { return this._cacheKeyPolicy.internalValue; } get negativeCachingPolicy() { return this._negativeCachingPolicy; } putNegativeCachingPolicy(value) { this._negativeCachingPolicy.internalValue = value; } resetNegativeCachingPolicy() { this._negativeCachingPolicy.internalValue = undefined; } // Temporarily expose input value. Use with caution. get negativeCachingPolicyInput() { return this._negativeCachingPolicy.internalValue; } } exports.ComputeBackendBucketCdnPolicyOutputReference = ComputeBackendBucketCdnPolicyOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeBackendBucketCdnPolicyOutputReference[_f] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketCdnPolicyOutputReference", version: "14.12.0" }; function computeBackendBucketTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } exports.computeBackendBucketTimeoutsToTerraform = computeBackendBucketTimeoutsToTerraform; function computeBackendBucketTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeBackendBucketTimeoutsToHclTerraform = computeBackendBucketTimeoutsToHclTerraform; class ComputeBackendBucketTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.ComputeBackendBucketTimeoutsOutputReference = ComputeBackendBucketTimeoutsOutputReference; _g = JSII_RTTI_SYMBOL_1; ComputeBackendBucketTimeoutsOutputReference[_g] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucketTimeoutsOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_backend_bucket google_compute_backend_bucket} */ class ComputeBackendBucket extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a ComputeBackendBucket resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the ComputeBackendBucket to import * @param importFromId The id of the existing ComputeBackendBucket that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_backend_bucket#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ComputeBackendBucket to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_compute_backend_bucket", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_backend_bucket google_compute_backend_bucket} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options ComputeBackendBucketConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_compute_backend_bucket', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.13.0', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // cdn_policy - computed: false, optional: true, required: false this._cdnPolicy = new ComputeBackendBucketCdnPolicyOutputReference(this, "cdn_policy"); // timeouts - computed: false, optional: true, required: false this._timeouts = new ComputeBackendBucketTimeoutsOutputReference(this, "timeouts"); this._bucketName = config.bucketName; this._compressionMode = config.compressionMode; this._customResponseHeaders = config.customResponseHeaders; this._description = config.description; this._edgeSecurityPolicy = config.edgeSecurityPolicy; this._enableCdn = config.enableCdn; this._id = config.id; this._name = config.name; this._project = config.project; this._cdnPolicy.internalValue = config.cdnPolicy; this._timeouts.internalValue = config.timeouts; } get bucketName() { return this.getStringAttribute('bucket_name'); } set bucketName(value) { this._bucketName = value; } // Temporarily expose input value. Use with caution. get bucketNameInput() { return this._bucketName; } get compressionMode() { return this.getStringAttribute('compression_mode'); } set compressionMode(value) { this._compressionMode = value; } resetCompressionMode() { this._compressionMode = undefined; } // Temporarily expose input value. Use with caution. get compressionModeInput() { return this._compressionMode; } // creation_timestamp - computed: true, optional: false, required: false get creationTimestamp() { return this.getStringAttribute('creation_timestamp'); } get customResponseHeaders() { return this.getListAttribute('custom_response_headers'); } set customResponseHeaders(value) { this._customResponseHeaders = value; } resetCustomResponseHeaders() { this._customResponseHeaders = undefined; } // Temporarily expose input value. Use with caution. get customResponseHeadersInput() { return this._customResponseHeaders; } 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 edgeSecurityPolicy() { return this.getStringAttribute('edge_security_policy'); } set edgeSecurityPolicy(value) { this._edgeSecurityPolicy = value; } resetEdgeSecurityPolicy() { this._edgeSecurityPolicy = undefined; } // Temporarily expose input value. Use with caution. get edgeSecurityPolicyInput() { return this._edgeSecurityPolicy; } get enableCdn() { return this.getBooleanAttribute('enable_cdn'); } set enableCdn(value) { this._enableCdn = value; } resetEnableCdn() { this._enableCdn = undefined; } // Temporarily expose input value. Use with caution. get enableCdnInput() { return this._enableCdn; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get project() { return this.getStringAttribute('project'); } set project(value) { this._project = value; } resetProject() { this._project = undefined; } // Temporarily expose input value. Use with caution. get projectInput() { return this._project; } // self_link - computed: true, optional: false, required: false get selfLink() { return this.getStringAttribute('self_link'); } get cdnPolicy() { return this._cdnPolicy; } putCdnPolicy(value) { this._cdnPolicy.internalValue = value; } resetCdnPolicy() { this._cdnPolicy.internalValue = undefined; } // Temporarily expose input value. Use with caution. get cdnPolicyInput() { return this._cdnPolicy.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { bucket_name: cdktf.stringToTerraform(this._bucketName), compression_mode: cdktf.stringToTerraform(this._compressionMode), custom_response_headers: cdktf.listMapper(cdktf.stringToTerraform, false)(this._customResponseHeaders), description: cdktf.stringToTerraform(this._description), edge_security_policy: cdktf.stringToTerraform(this._edgeSecurityPolicy), enable_cdn: cdktf.booleanToTerraform(this._enableCdn), id: cdktf.stringToTerraform(this._id), name: cdktf.stringToTerraform(this._name), project: cdktf.stringToTerraform(this._project), cdn_policy: computeBackendBucketCdnPolicyToTerraform(this._cdnPolicy.internalValue), timeouts: computeBackendBucketTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { bucket_name: { value: cdktf.stringToHclTerraform(this._bucketName), isBlock: false, type: "simple", storageClassType: "string", }, compression_mode: { value: cdktf.stringToHclTerraform(this._compressionMode), isBlock: false, type: "simple", storageClassType: "string", }, custom_response_headers: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._customResponseHeaders), isBlock: false, type: "list", storageClassType: "stringList", }, description: { value: cdktf.stringToHclTerraform(this._description), isBlock: false, type: "simple", storageClassType: "string", }, edge_security_policy: { value: cdktf.stringToHclTerraform(this._edgeSecurityPolicy), isBlock: false, type: "simple", storageClassType: "string", }, enable_cdn: { value: cdktf.booleanToHclTerraform(this._enableCdn), isBlock: false, type: "simple", storageClassType: "boolean", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, project: { value: cdktf.stringToHclTerraform(this._project), isBlock: false, type: "simple", storageClassType: "string", }, cdn_policy: { value: computeBackendBucketCdnPolicyToHclTerraform(this._cdnPolicy.internalValue), isBlock: true, type: "list", storageClassType: "ComputeBackendBucketCdnPolicyList", }, timeouts: { value: computeBackendBucketTimeoutsToHclTerraform(this._timeouts.internalValue), isBlock: true, type: "struct", storageClassType: "ComputeBackendBucketTimeouts", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } } exports.ComputeBackendBucket = ComputeBackendBucket; _h = JSII_RTTI_SYMBOL_1; ComputeBackendBucket[_h] = { fqn: "@cdktf/provider-google.computeBackendBucket.ComputeBackendBucket", version: "14.12.0" }; // ================= // STATIC PROPERTIES // ================= ComputeBackendBucket.tfResourceType = "google_compute_backend_bucket"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tcHV0ZS1iYWNrZW5kLWJ1Y2tldC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQVNBLCtCQUErQjtBQXVGL0IsU0FBZ0IsbUVBQW1FLENBQUMsTUFBcUY7SUFDdkssSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUFBTSxDQUFDO0lBQUMsQ0FBQztJQUM1RixJQUFJLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQ25DLE1BQU0sSUFBSSxLQUFLLENBQUMsb0hBQW9ILENBQUMsQ0FBQztJQUN4SSxDQUFDO0lBQ0QsT0FBTztRQUNMLFdBQVcsRUFBRSxLQUFLLENBQUMsaUJBQWlCLENBQUMsTUFBTyxDQUFDLFVBQVUsQ0FBQztLQUN6RCxDQUFBO0FBQ0gsQ0FBQztBQVJELGtKQVFDO0FBR0QsU0FBZ0Isc0VBQXNFLENBQUMsTUFBcUY7SUFDMUssSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQzt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