UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,213 lines 266 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; Object.defineProperty(exports, "__esModule", { value: true }); exports.PubsubSubscription = exports.PubsubSubscriptionTimeoutsOutputReference = exports.pubsubSubscriptionTimeoutsToHclTerraform = exports.pubsubSubscriptionTimeoutsToTerraform = exports.PubsubSubscriptionRetryPolicyOutputReference = exports.pubsubSubscriptionRetryPolicyToHclTerraform = exports.pubsubSubscriptionRetryPolicyToTerraform = exports.PubsubSubscriptionPushConfigOutputReference = exports.pubsubSubscriptionPushConfigToHclTerraform = exports.pubsubSubscriptionPushConfigToTerraform = exports.PubsubSubscriptionPushConfigOidcTokenOutputReference = exports.pubsubSubscriptionPushConfigOidcTokenToHclTerraform = exports.pubsubSubscriptionPushConfigOidcTokenToTerraform = exports.PubsubSubscriptionPushConfigNoWrapperOutputReference = exports.pubsubSubscriptionPushConfigNoWrapperToHclTerraform = exports.pubsubSubscriptionPushConfigNoWrapperToTerraform = exports.PubsubSubscriptionExpirationPolicyOutputReference = exports.pubsubSubscriptionExpirationPolicyToHclTerraform = exports.pubsubSubscriptionExpirationPolicyToTerraform = exports.PubsubSubscriptionDeadLetterPolicyOutputReference = exports.pubsubSubscriptionDeadLetterPolicyToHclTerraform = exports.pubsubSubscriptionDeadLetterPolicyToTerraform = exports.PubsubSubscriptionCloudStorageConfigOutputReference = exports.pubsubSubscriptionCloudStorageConfigToHclTerraform = exports.pubsubSubscriptionCloudStorageConfigToTerraform = exports.PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference = exports.pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform = exports.pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform = exports.PubsubSubscriptionBigqueryConfigOutputReference = exports.pubsubSubscriptionBigqueryConfigToHclTerraform = exports.pubsubSubscriptionBigqueryConfigToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function pubsubSubscriptionBigqueryConfigToTerraform(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 { drop_unknown_fields: cdktf.booleanToTerraform(struct.dropUnknownFields), service_account_email: cdktf.stringToTerraform(struct.serviceAccountEmail), table: cdktf.stringToTerraform(struct.table), use_table_schema: cdktf.booleanToTerraform(struct.useTableSchema), use_topic_schema: cdktf.booleanToTerraform(struct.useTopicSchema), write_metadata: cdktf.booleanToTerraform(struct.writeMetadata), }; } exports.pubsubSubscriptionBigqueryConfigToTerraform = pubsubSubscriptionBigqueryConfigToTerraform; function pubsubSubscriptionBigqueryConfigToHclTerraform(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 = { drop_unknown_fields: { value: cdktf.booleanToHclTerraform(struct.dropUnknownFields), isBlock: false, type: "simple", storageClassType: "boolean", }, service_account_email: { value: cdktf.stringToHclTerraform(struct.serviceAccountEmail), isBlock: false, type: "simple", storageClassType: "string", }, table: { value: cdktf.stringToHclTerraform(struct.table), isBlock: false, type: "simple", storageClassType: "string", }, use_table_schema: { value: cdktf.booleanToHclTerraform(struct.useTableSchema), isBlock: false, type: "simple", storageClassType: "boolean", }, use_topic_schema: { value: cdktf.booleanToHclTerraform(struct.useTopicSchema), isBlock: false, type: "simple", storageClassType: "boolean", }, write_metadata: { value: cdktf.booleanToHclTerraform(struct.writeMetadata), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionBigqueryConfigToHclTerraform = pubsubSubscriptionBigqueryConfigToHclTerraform; class PubsubSubscriptionBigqueryConfigOutputReference 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._dropUnknownFields !== undefined) { hasAnyValues = true; internalValueResult.dropUnknownFields = this._dropUnknownFields; } if (this._serviceAccountEmail !== undefined) { hasAnyValues = true; internalValueResult.serviceAccountEmail = this._serviceAccountEmail; } if (this._table !== undefined) { hasAnyValues = true; internalValueResult.table = this._table; } if (this._useTableSchema !== undefined) { hasAnyValues = true; internalValueResult.useTableSchema = this._useTableSchema; } if (this._useTopicSchema !== undefined) { hasAnyValues = true; internalValueResult.useTopicSchema = this._useTopicSchema; } if (this._writeMetadata !== undefined) { hasAnyValues = true; internalValueResult.writeMetadata = this._writeMetadata; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._dropUnknownFields = undefined; this._serviceAccountEmail = undefined; this._table = undefined; this._useTableSchema = undefined; this._useTopicSchema = undefined; this._writeMetadata = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._dropUnknownFields = value.dropUnknownFields; this._serviceAccountEmail = value.serviceAccountEmail; this._table = value.table; this._useTableSchema = value.useTableSchema; this._useTopicSchema = value.useTopicSchema; this._writeMetadata = value.writeMetadata; } } get dropUnknownFields() { return this.getBooleanAttribute('drop_unknown_fields'); } set dropUnknownFields(value) { this._dropUnknownFields = value; } resetDropUnknownFields() { this._dropUnknownFields = undefined; } // Temporarily expose input value. Use with caution. get dropUnknownFieldsInput() { return this._dropUnknownFields; } get serviceAccountEmail() { return this.getStringAttribute('service_account_email'); } set serviceAccountEmail(value) { this._serviceAccountEmail = value; } resetServiceAccountEmail() { this._serviceAccountEmail = undefined; } // Temporarily expose input value. Use with caution. get serviceAccountEmailInput() { return this._serviceAccountEmail; } get table() { return this.getStringAttribute('table'); } set table(value) { this._table = value; } // Temporarily expose input value. Use with caution. get tableInput() { return this._table; } get useTableSchema() { return this.getBooleanAttribute('use_table_schema'); } set useTableSchema(value) { this._useTableSchema = value; } resetUseTableSchema() { this._useTableSchema = undefined; } // Temporarily expose input value. Use with caution. get useTableSchemaInput() { return this._useTableSchema; } get useTopicSchema() { return this.getBooleanAttribute('use_topic_schema'); } set useTopicSchema(value) { this._useTopicSchema = value; } resetUseTopicSchema() { this._useTopicSchema = undefined; } // Temporarily expose input value. Use with caution. get useTopicSchemaInput() { return this._useTopicSchema; } get writeMetadata() { return this.getBooleanAttribute('write_metadata'); } set writeMetadata(value) { this._writeMetadata = value; } resetWriteMetadata() { this._writeMetadata = undefined; } // Temporarily expose input value. Use with caution. get writeMetadataInput() { return this._writeMetadata; } } exports.PubsubSubscriptionBigqueryConfigOutputReference = PubsubSubscriptionBigqueryConfigOutputReference; _a = JSII_RTTI_SYMBOL_1; PubsubSubscriptionBigqueryConfigOutputReference[_a] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionBigqueryConfigOutputReference", version: "14.12.0" }; function pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform(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 { use_topic_schema: cdktf.booleanToTerraform(struct.useTopicSchema), write_metadata: cdktf.booleanToTerraform(struct.writeMetadata), }; } exports.pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform = pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform; function pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform(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 = { use_topic_schema: { value: cdktf.booleanToHclTerraform(struct.useTopicSchema), isBlock: false, type: "simple", storageClassType: "boolean", }, write_metadata: { value: cdktf.booleanToHclTerraform(struct.writeMetadata), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform = pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform; class PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference 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._useTopicSchema !== undefined) { hasAnyValues = true; internalValueResult.useTopicSchema = this._useTopicSchema; } if (this._writeMetadata !== undefined) { hasAnyValues = true; internalValueResult.writeMetadata = this._writeMetadata; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._useTopicSchema = undefined; this._writeMetadata = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._useTopicSchema = value.useTopicSchema; this._writeMetadata = value.writeMetadata; } } get useTopicSchema() { return this.getBooleanAttribute('use_topic_schema'); } set useTopicSchema(value) { this._useTopicSchema = value; } resetUseTopicSchema() { this._useTopicSchema = undefined; } // Temporarily expose input value. Use with caution. get useTopicSchemaInput() { return this._useTopicSchema; } get writeMetadata() { return this.getBooleanAttribute('write_metadata'); } set writeMetadata(value) { this._writeMetadata = value; } resetWriteMetadata() { this._writeMetadata = undefined; } // Temporarily expose input value. Use with caution. get writeMetadataInput() { return this._writeMetadata; } } exports.PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference = PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference; _b = JSII_RTTI_SYMBOL_1; PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference", version: "14.12.0" }; function pubsubSubscriptionCloudStorageConfigToTerraform(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 { bucket: cdktf.stringToTerraform(struct.bucket), filename_datetime_format: cdktf.stringToTerraform(struct.filenameDatetimeFormat), filename_prefix: cdktf.stringToTerraform(struct.filenamePrefix), filename_suffix: cdktf.stringToTerraform(struct.filenameSuffix), max_bytes: cdktf.numberToTerraform(struct.maxBytes), max_duration: cdktf.stringToTerraform(struct.maxDuration), max_messages: cdktf.numberToTerraform(struct.maxMessages), service_account_email: cdktf.stringToTerraform(struct.serviceAccountEmail), avro_config: pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform(struct.avroConfig), }; } exports.pubsubSubscriptionCloudStorageConfigToTerraform = pubsubSubscriptionCloudStorageConfigToTerraform; function pubsubSubscriptionCloudStorageConfigToHclTerraform(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 = { bucket: { value: cdktf.stringToHclTerraform(struct.bucket), isBlock: false, type: "simple", storageClassType: "string", }, filename_datetime_format: { value: cdktf.stringToHclTerraform(struct.filenameDatetimeFormat), isBlock: false, type: "simple", storageClassType: "string", }, filename_prefix: { value: cdktf.stringToHclTerraform(struct.filenamePrefix), isBlock: false, type: "simple", storageClassType: "string", }, filename_suffix: { value: cdktf.stringToHclTerraform(struct.filenameSuffix), isBlock: false, type: "simple", storageClassType: "string", }, max_bytes: { value: cdktf.numberToHclTerraform(struct.maxBytes), isBlock: false, type: "simple", storageClassType: "number", }, max_duration: { value: cdktf.stringToHclTerraform(struct.maxDuration), isBlock: false, type: "simple", storageClassType: "string", }, max_messages: { value: cdktf.numberToHclTerraform(struct.maxMessages), isBlock: false, type: "simple", storageClassType: "number", }, service_account_email: { value: cdktf.stringToHclTerraform(struct.serviceAccountEmail), isBlock: false, type: "simple", storageClassType: "string", }, avro_config: { value: pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform(struct.avroConfig), isBlock: true, type: "list", storageClassType: "PubsubSubscriptionCloudStorageConfigAvroConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionCloudStorageConfigToHclTerraform = pubsubSubscriptionCloudStorageConfigToHclTerraform; class PubsubSubscriptionCloudStorageConfigOutputReference 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; // avro_config - computed: false, optional: true, required: false this._avroConfig = new PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference(this, "avro_config"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } if (this._filenameDatetimeFormat !== undefined) { hasAnyValues = true; internalValueResult.filenameDatetimeFormat = this._filenameDatetimeFormat; } if (this._filenamePrefix !== undefined) { hasAnyValues = true; internalValueResult.filenamePrefix = this._filenamePrefix; } if (this._filenameSuffix !== undefined) { hasAnyValues = true; internalValueResult.filenameSuffix = this._filenameSuffix; } if (this._maxBytes !== undefined) { hasAnyValues = true; internalValueResult.maxBytes = this._maxBytes; } if (this._maxDuration !== undefined) { hasAnyValues = true; internalValueResult.maxDuration = this._maxDuration; } if (this._maxMessages !== undefined) { hasAnyValues = true; internalValueResult.maxMessages = this._maxMessages; } if (this._serviceAccountEmail !== undefined) { hasAnyValues = true; internalValueResult.serviceAccountEmail = this._serviceAccountEmail; } if (this._avroConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.avroConfig = this._avroConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._bucket = undefined; this._filenameDatetimeFormat = undefined; this._filenamePrefix = undefined; this._filenameSuffix = undefined; this._maxBytes = undefined; this._maxDuration = undefined; this._maxMessages = undefined; this._serviceAccountEmail = undefined; this._avroConfig.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucket = value.bucket; this._filenameDatetimeFormat = value.filenameDatetimeFormat; this._filenamePrefix = value.filenamePrefix; this._filenameSuffix = value.filenameSuffix; this._maxBytes = value.maxBytes; this._maxDuration = value.maxDuration; this._maxMessages = value.maxMessages; this._serviceAccountEmail = value.serviceAccountEmail; this._avroConfig.internalValue = value.avroConfig; } } get bucket() { return this.getStringAttribute('bucket'); } set bucket(value) { this._bucket = value; } // Temporarily expose input value. Use with caution. get bucketInput() { return this._bucket; } get filenameDatetimeFormat() { return this.getStringAttribute('filename_datetime_format'); } set filenameDatetimeFormat(value) { this._filenameDatetimeFormat = value; } resetFilenameDatetimeFormat() { this._filenameDatetimeFormat = undefined; } // Temporarily expose input value. Use with caution. get filenameDatetimeFormatInput() { return this._filenameDatetimeFormat; } get filenamePrefix() { return this.getStringAttribute('filename_prefix'); } set filenamePrefix(value) { this._filenamePrefix = value; } resetFilenamePrefix() { this._filenamePrefix = undefined; } // Temporarily expose input value. Use with caution. get filenamePrefixInput() { return this._filenamePrefix; } get filenameSuffix() { return this.getStringAttribute('filename_suffix'); } set filenameSuffix(value) { this._filenameSuffix = value; } resetFilenameSuffix() { this._filenameSuffix = undefined; } // Temporarily expose input value. Use with caution. get filenameSuffixInput() { return this._filenameSuffix; } get maxBytes() { return this.getNumberAttribute('max_bytes'); } set maxBytes(value) { this._maxBytes = value; } resetMaxBytes() { this._maxBytes = undefined; } // Temporarily expose input value. Use with caution. get maxBytesInput() { return this._maxBytes; } get maxDuration() { return this.getStringAttribute('max_duration'); } set maxDuration(value) { this._maxDuration = value; } resetMaxDuration() { this._maxDuration = undefined; } // Temporarily expose input value. Use with caution. get maxDurationInput() { return this._maxDuration; } get maxMessages() { return this.getNumberAttribute('max_messages'); } set maxMessages(value) { this._maxMessages = value; } resetMaxMessages() { this._maxMessages = undefined; } // Temporarily expose input value. Use with caution. get maxMessagesInput() { return this._maxMessages; } get serviceAccountEmail() { return this.getStringAttribute('service_account_email'); } set serviceAccountEmail(value) { this._serviceAccountEmail = value; } resetServiceAccountEmail() { this._serviceAccountEmail = undefined; } // Temporarily expose input value. Use with caution. get serviceAccountEmailInput() { return this._serviceAccountEmail; } // state - computed: true, optional: false, required: false get state() { return this.getStringAttribute('state'); } get avroConfig() { return this._avroConfig; } putAvroConfig(value) { this._avroConfig.internalValue = value; } resetAvroConfig() { this._avroConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get avroConfigInput() { return this._avroConfig.internalValue; } } exports.PubsubSubscriptionCloudStorageConfigOutputReference = PubsubSubscriptionCloudStorageConfigOutputReference; _c = JSII_RTTI_SYMBOL_1; PubsubSubscriptionCloudStorageConfigOutputReference[_c] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionCloudStorageConfigOutputReference", version: "14.12.0" }; function pubsubSubscriptionDeadLetterPolicyToTerraform(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 { dead_letter_topic: cdktf.stringToTerraform(struct.deadLetterTopic), max_delivery_attempts: cdktf.numberToTerraform(struct.maxDeliveryAttempts), }; } exports.pubsubSubscriptionDeadLetterPolicyToTerraform = pubsubSubscriptionDeadLetterPolicyToTerraform; function pubsubSubscriptionDeadLetterPolicyToHclTerraform(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 = { dead_letter_topic: { value: cdktf.stringToHclTerraform(struct.deadLetterTopic), isBlock: false, type: "simple", storageClassType: "string", }, max_delivery_attempts: { value: cdktf.numberToHclTerraform(struct.maxDeliveryAttempts), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionDeadLetterPolicyToHclTerraform = pubsubSubscriptionDeadLetterPolicyToHclTerraform; class PubsubSubscriptionDeadLetterPolicyOutputReference 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._deadLetterTopic !== undefined) { hasAnyValues = true; internalValueResult.deadLetterTopic = this._deadLetterTopic; } if (this._maxDeliveryAttempts !== undefined) { hasAnyValues = true; internalValueResult.maxDeliveryAttempts = this._maxDeliveryAttempts; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._deadLetterTopic = undefined; this._maxDeliveryAttempts = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._deadLetterTopic = value.deadLetterTopic; this._maxDeliveryAttempts = value.maxDeliveryAttempts; } } get deadLetterTopic() { return this.getStringAttribute('dead_letter_topic'); } set deadLetterTopic(value) { this._deadLetterTopic = value; } resetDeadLetterTopic() { this._deadLetterTopic = undefined; } // Temporarily expose input value. Use with caution. get deadLetterTopicInput() { return this._deadLetterTopic; } get maxDeliveryAttempts() { return this.getNumberAttribute('max_delivery_attempts'); } set maxDeliveryAttempts(value) { this._maxDeliveryAttempts = value; } resetMaxDeliveryAttempts() { this._maxDeliveryAttempts = undefined; } // Temporarily expose input value. Use with caution. get maxDeliveryAttemptsInput() { return this._maxDeliveryAttempts; } } exports.PubsubSubscriptionDeadLetterPolicyOutputReference = PubsubSubscriptionDeadLetterPolicyOutputReference; _d = JSII_RTTI_SYMBOL_1; PubsubSubscriptionDeadLetterPolicyOutputReference[_d] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionDeadLetterPolicyOutputReference", version: "14.12.0" }; function pubsubSubscriptionExpirationPolicyToTerraform(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 { ttl: cdktf.stringToTerraform(struct.ttl), }; } exports.pubsubSubscriptionExpirationPolicyToTerraform = pubsubSubscriptionExpirationPolicyToTerraform; function pubsubSubscriptionExpirationPolicyToHclTerraform(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 = { ttl: { value: cdktf.stringToHclTerraform(struct.ttl), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionExpirationPolicyToHclTerraform = pubsubSubscriptionExpirationPolicyToHclTerraform; class PubsubSubscriptionExpirationPolicyOutputReference 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._ttl !== undefined) { hasAnyValues = true; internalValueResult.ttl = this._ttl; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._ttl = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._ttl = value.ttl; } } get ttl() { return this.getStringAttribute('ttl'); } set ttl(value) { this._ttl = value; } // Temporarily expose input value. Use with caution. get ttlInput() { return this._ttl; } } exports.PubsubSubscriptionExpirationPolicyOutputReference = PubsubSubscriptionExpirationPolicyOutputReference; _e = JSII_RTTI_SYMBOL_1; PubsubSubscriptionExpirationPolicyOutputReference[_e] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionExpirationPolicyOutputReference", version: "14.12.0" }; function pubsubSubscriptionPushConfigNoWrapperToTerraform(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 { write_metadata: cdktf.booleanToTerraform(struct.writeMetadata), }; } exports.pubsubSubscriptionPushConfigNoWrapperToTerraform = pubsubSubscriptionPushConfigNoWrapperToTerraform; function pubsubSubscriptionPushConfigNoWrapperToHclTerraform(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 = { write_metadata: { value: cdktf.booleanToHclTerraform(struct.writeMetadata), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionPushConfigNoWrapperToHclTerraform = pubsubSubscriptionPushConfigNoWrapperToHclTerraform; class PubsubSubscriptionPushConfigNoWrapperOutputReference 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._writeMetadata !== undefined) { hasAnyValues = true; internalValueResult.writeMetadata = this._writeMetadata; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._writeMetadata = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._writeMetadata = value.writeMetadata; } } get writeMetadata() { return this.getBooleanAttribute('write_metadata'); } set writeMetadata(value) { this._writeMetadata = value; } // Temporarily expose input value. Use with caution. get writeMetadataInput() { return this._writeMetadata; } } exports.PubsubSubscriptionPushConfigNoWrapperOutputReference = PubsubSubscriptionPushConfigNoWrapperOutputReference; _f = JSII_RTTI_SYMBOL_1; PubsubSubscriptionPushConfigNoWrapperOutputReference[_f] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionPushConfigNoWrapperOutputReference", version: "14.12.0" }; function pubsubSubscriptionPushConfigOidcTokenToTerraform(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 { audience: cdktf.stringToTerraform(struct.audience), service_account_email: cdktf.stringToTerraform(struct.serviceAccountEmail), }; } exports.pubsubSubscriptionPushConfigOidcTokenToTerraform = pubsubSubscriptionPushConfigOidcTokenToTerraform; function pubsubSubscriptionPushConfigOidcTokenToHclTerraform(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 = { audience: { value: cdktf.stringToHclTerraform(struct.audience), isBlock: false, type: "simple", storageClassType: "string", }, service_account_email: { value: cdktf.stringToHclTerraform(struct.serviceAccountEmail), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionPushConfigOidcTokenToHclTerraform = pubsubSubscriptionPushConfigOidcTokenToHclTerraform; class PubsubSubscriptionPushConfigOidcTokenOutputReference 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._audience !== undefined) { hasAnyValues = true; internalValueResult.audience = this._audience; } if (this._serviceAccountEmail !== undefined) { hasAnyValues = true; internalValueResult.serviceAccountEmail = this._serviceAccountEmail; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._audience = undefined; this._serviceAccountEmail = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._audience = value.audience; this._serviceAccountEmail = value.serviceAccountEmail; } } get audience() { return this.getStringAttribute('audience'); } set audience(value) { this._audience = value; } resetAudience() { this._audience = undefined; } // Temporarily expose input value. Use with caution. get audienceInput() { return this._audience; } get serviceAccountEmail() { return this.getStringAttribute('service_account_email'); } set serviceAccountEmail(value) { this._serviceAccountEmail = value; } // Temporarily expose input value. Use with caution. get serviceAccountEmailInput() { return this._serviceAccountEmail; } } exports.PubsubSubscriptionPushConfigOidcTokenOutputReference = PubsubSubscriptionPushConfigOidcTokenOutputReference; _g = JSII_RTTI_SYMBOL_1; PubsubSubscriptionPushConfigOidcTokenOutputReference[_g] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionPushConfigOidcTokenOutputReference", version: "14.12.0" }; function pubsubSubscriptionPushConfigToTerraform(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 { attributes: cdktf.hashMapper(cdktf.stringToTerraform)(struct.attributes), push_endpoint: cdktf.stringToTerraform(struct.pushEndpoint), no_wrapper: pubsubSubscriptionPushConfigNoWrapperToTerraform(struct.noWrapper), oidc_token: pubsubSubscriptionPushConfigOidcTokenToTerraform(struct.oidcToken), }; } exports.pubsubSubscriptionPushConfigToTerraform = pubsubSubscriptionPushConfigToTerraform; function pubsubSubscriptionPushConfigToHclTerraform(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 = { attributes: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.attributes), isBlock: false, type: "map", storageClassType: "stringMap", }, push_endpoint: { value: cdktf.stringToHclTerraform(struct.pushEndpoint), isBlock: false, type: "simple", storageClassType: "string", }, no_wrapper: { value: pubsubSubscriptionPushConfigNoWrapperToHclTerraform(struct.noWrapper), isBlock: true, type: "list", storageClassType: "PubsubSubscriptionPushConfigNoWrapperList", }, oidc_token: { value: pubsubSubscriptionPushConfigOidcTokenToHclTerraform(struct.oidcToken), isBlock: true, type: "list", storageClassType: "PubsubSubscriptionPushConfigOidcTokenList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionPushConfigToHclTerraform = pubsubSubscriptionPushConfigToHclTerraform; class PubsubSubscriptionPushConfigOutputReference 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; // no_wrapper - computed: false, optional: true, required: false this._noWrapper = new PubsubSubscriptionPushConfigNoWrapperOutputReference(this, "no_wrapper"); // oidc_token - computed: false, optional: true, required: false this._oidcToken = new PubsubSubscriptionPushConfigOidcTokenOutputReference(this, "oidc_token"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._attributes !== undefined) { hasAnyValues = true; internalValueResult.attributes = this._attributes; } if (this._pushEndpoint !== undefined) { hasAnyValues = true; internalValueResult.pushEndpoint = this._pushEndpoint; } if (this._noWrapper?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.noWrapper = this._noWrapper?.internalValue; } if (this._oidcToken?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.oidcToken = this._oidcToken?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._attributes = undefined; this._pushEndpoint = undefined; this._noWrapper.internalValue = undefined; this._oidcToken.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._attributes = value.attributes; this._pushEndpoint = value.pushEndpoint; this._noWrapper.internalValue = value.noWrapper; this._oidcToken.internalValue = value.oidcToken; } } get attributes() { return this.getStringMapAttribute('attributes'); } set attributes(value) { this._attributes = value; } resetAttributes() { this._attributes = undefined; } // Temporarily expose input value. Use with caution. get attributesInput() { return this._attributes; } get pushEndpoint() { return this.getStringAttribute('push_endpoint'); } set pushEndpoint(value) { this._pushEndpoint = value; } // Temporarily expose input value. Use with caution. get pushEndpointInput() { return this._pushEndpoint; } get noWrapper() { return this._noWrapper; } putNoWrapper(value) { this._noWrapper.internalValue = value; } resetNoWrapper() { this._noWrapper.internalValue = undefined; } // Temporarily expose input value. Use with caution. get noWrapperInput() { return this._noWrapper.internalValue; } get oidcToken() { return this._oidcToken; } putOidcToken(value) { this._oidcToken.internalValue = value; } resetOidcToken() { this._oidcToken.internalValue = undefined; } // Temporarily expose input value. Use with caution. get oidcTokenInput() { return this._oidcToken.internalValue; } } exports.PubsubSubscriptionPushConfigOutputReference = PubsubSubscriptionPushConfigOutputReference; _h = JSII_RTTI_SYMBOL_1; PubsubSubscriptionPushConfigOutputReference[_h] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionPushConfigOutputReference", version: "14.12.0" }; function pubsubSubscriptionRetryPolicyToTerraform(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 { maximum_backoff: cdktf.stringToTerraform(struct.maximumBackoff), minimum_backoff: cdktf.stringToTerraform(struct.minimumBackoff), }; } exports.pubsubSubscriptionRetryPolicyToTerraform = pubsubSubscriptionRetryPolicyToTerraform; function pubsubSubscriptionRetryPolicyToHclTerraform(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 = { maximum_backoff: { value: cdktf.stringToHclTerraform(struct.maximumBackoff), isBlock: false, type: "simple", storageClassType: "string", }, minimum_backoff: { value: cdktf.stringToHclTerraform(struct.minimumBackoff), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.pubsubSubscriptionRetryPolicyToHclTerraform = pubsubSubscriptionRetryPolicyToHclTerraform; class PubsubSubscriptionRetryPolicyOutputReference 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._maximumBackoff !== undefined) { hasAnyValues = true; internalValueResult.maximumBackoff = this._maximumBackoff; } if (this._minimumBackoff !== undefined) { hasAnyValues = true; internalValueResult.minimumBackoff = this._minimumBackoff; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._maximumBackoff = undefined; this._minimumBackoff = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maximumBackoff = value.maximumBackoff; this._minimumBackoff = value.minimumBackoff; } } get maximumBackoff() { return this.getStringAttribute('maximum_backoff'); } set maximumBackoff(value) { this._maximumBackoff = value; } resetMaximumBackoff() { this._maximumBackoff = undefined; } // Temporarily expose input value. Use with caution. get maximumBackoffInput() { return this._maximumBackoff; } get minimumBackoff() { return this.getStringAttribute('minimum_backoff'); } set minimumBackoff(value) { this._minimumBackoff = value; } resetMinimumBackoff() { this._minimumBackoff = undefined; } // Temporarily expose input value. Use with caution. get minimumBackoffInput() { return this._minimumBackoff; } } exports.PubsubSubscriptionRetryPolicyOutputReference = PubsubSubscriptionRetryPolicyOutputReference; _j = JSII_RTTI_SYMBOL_1; PubsubSubscriptionRetryPolicyOutputReference[_j] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionRetryPolicyOutputReference", version: "14.12.0" }; function pubsubSubscriptionTimeoutsToTerraform(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(