@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,208 lines • 304 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PubsubSubscription = exports.PubsubSubscriptionTimeoutsOutputReference = exports.PubsubSubscriptionRetryPolicyOutputReference = exports.PubsubSubscriptionPushConfigOutputReference = exports.PubsubSubscriptionPushConfigOidcTokenOutputReference = exports.PubsubSubscriptionPushConfigNoWrapperOutputReference = exports.PubsubSubscriptionMessageTransformsList = exports.PubsubSubscriptionMessageTransformsOutputReference = exports.PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference = exports.PubsubSubscriptionExpirationPolicyOutputReference = exports.PubsubSubscriptionDeadLetterPolicyOutputReference = exports.PubsubSubscriptionCloudStorageConfigOutputReference = exports.PubsubSubscriptionCloudStorageConfigAvroConfigOutputReference = exports.PubsubSubscriptionBigqueryConfigOutputReference = void 0;
exports.pubsubSubscriptionBigqueryConfigToTerraform = pubsubSubscriptionBigqueryConfigToTerraform;
exports.pubsubSubscriptionBigqueryConfigToHclTerraform = pubsubSubscriptionBigqueryConfigToHclTerraform;
exports.pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform = pubsubSubscriptionCloudStorageConfigAvroConfigToTerraform;
exports.pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform = pubsubSubscriptionCloudStorageConfigAvroConfigToHclTerraform;
exports.pubsubSubscriptionCloudStorageConfigToTerraform = pubsubSubscriptionCloudStorageConfigToTerraform;
exports.pubsubSubscriptionCloudStorageConfigToHclTerraform = pubsubSubscriptionCloudStorageConfigToHclTerraform;
exports.pubsubSubscriptionDeadLetterPolicyToTerraform = pubsubSubscriptionDeadLetterPolicyToTerraform;
exports.pubsubSubscriptionDeadLetterPolicyToHclTerraform = pubsubSubscriptionDeadLetterPolicyToHclTerraform;
exports.pubsubSubscriptionExpirationPolicyToTerraform = pubsubSubscriptionExpirationPolicyToTerraform;
exports.pubsubSubscriptionExpirationPolicyToHclTerraform = pubsubSubscriptionExpirationPolicyToHclTerraform;
exports.pubsubSubscriptionMessageTransformsJavascriptUdfToTerraform = pubsubSubscriptionMessageTransformsJavascriptUdfToTerraform;
exports.pubsubSubscriptionMessageTransformsJavascriptUdfToHclTerraform = pubsubSubscriptionMessageTransformsJavascriptUdfToHclTerraform;
exports.pubsubSubscriptionMessageTransformsToTerraform = pubsubSubscriptionMessageTransformsToTerraform;
exports.pubsubSubscriptionMessageTransformsToHclTerraform = pubsubSubscriptionMessageTransformsToHclTerraform;
exports.pubsubSubscriptionPushConfigNoWrapperToTerraform = pubsubSubscriptionPushConfigNoWrapperToTerraform;
exports.pubsubSubscriptionPushConfigNoWrapperToHclTerraform = pubsubSubscriptionPushConfigNoWrapperToHclTerraform;
exports.pubsubSubscriptionPushConfigOidcTokenToTerraform = pubsubSubscriptionPushConfigOidcTokenToTerraform;
exports.pubsubSubscriptionPushConfigOidcTokenToHclTerraform = pubsubSubscriptionPushConfigOidcTokenToHclTerraform;
exports.pubsubSubscriptionPushConfigToTerraform = pubsubSubscriptionPushConfigToTerraform;
exports.pubsubSubscriptionPushConfigToHclTerraform = pubsubSubscriptionPushConfigToHclTerraform;
exports.pubsubSubscriptionRetryPolicyToTerraform = pubsubSubscriptionRetryPolicyToTerraform;
exports.pubsubSubscriptionRetryPolicyToHclTerraform = pubsubSubscriptionRetryPolicyToHclTerraform;
exports.pubsubSubscriptionTimeoutsToTerraform = pubsubSubscriptionTimeoutsToTerraform;
exports.pubsubSubscriptionTimeoutsToHclTerraform = pubsubSubscriptionTimeoutsToHclTerraform;
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),
};
}
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));
}
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: "16.3.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),
};
}
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));
}
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: "16.3.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),
};
}
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));
}
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: "16.3.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),
};
}
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));
}
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: "16.3.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),
};
}
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));
}
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: "16.3.0" };
function pubsubSubscriptionMessageTransformsJavascriptUdfToTerraform(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.stringToTerraform(struct.code),
function_name: cdktf.stringToTerraform(struct.functionName),
};
}
function pubsubSubscriptionMessageTransformsJavascriptUdfToHclTerraform(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.stringToHclTerraform(struct.code),
isBlock: false,
type: "simple",
storageClassType: "string",
},
function_name: {
value: cdktf.stringToHclTerraform(struct.functionName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference 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._code !== undefined) {
hasAnyValues = true;
internalValueResult.code = this._code;
}
if (this._functionName !== undefined) {
hasAnyValues = true;
internalValueResult.functionName = this._functionName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._code = undefined;
this._functionName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._code = value.code;
this._functionName = value.functionName;
}
}
get code() {
return this.getStringAttribute('code');
}
set code(value) {
this._code = value;
}
// Temporarily expose input value. Use with caution.
get codeInput() {
return this._code;
}
get functionName() {
return this.getStringAttribute('function_name');
}
set functionName(value) {
this._functionName = value;
}
// Temporarily expose input value. Use with caution.
get functionNameInput() {
return this._functionName;
}
}
exports.PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference = PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference;
_f = JSII_RTTI_SYMBOL_1;
PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference[_f] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference", version: "16.3.0" };
function pubsubSubscriptionMessageTransformsToTerraform(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 {
disabled: cdktf.booleanToTerraform(struct.disabled),
javascript_udf: pubsubSubscriptionMessageTransformsJavascriptUdfToTerraform(struct.javascriptUdf),
};
}
function pubsubSubscriptionMessageTransformsToHclTerraform(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 = {
disabled: {
value: cdktf.booleanToHclTerraform(struct.disabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
javascript_udf: {
value: pubsubSubscriptionMessageTransformsJavascriptUdfToHclTerraform(struct.javascriptUdf),
isBlock: true,
type: "list",
storageClassType: "PubsubSubscriptionMessageTransformsJavascriptUdfList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PubsubSubscriptionMessageTransformsOutputReference 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;
// javascript_udf - computed: false, optional: true, required: false
this._javascriptUdf = new PubsubSubscriptionMessageTransformsJavascriptUdfOutputReference(this, "javascript_udf");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._disabled !== undefined) {
hasAnyValues = true;
internalValueResult.disabled = this._disabled;
}
if (this._javascriptUdf?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.javascriptUdf = this._javascriptUdf?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._disabled = undefined;
this._javascriptUdf.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._disabled = value.disabled;
this._javascriptUdf.internalValue = value.javascriptUdf;
}
}
get disabled() {
return this.getBooleanAttribute('disabled');
}
set disabled(value) {
this._disabled = value;
}
resetDisabled() {
this._disabled = undefined;
}
// Temporarily expose input value. Use with caution.
get disabledInput() {
return this._disabled;
}
get javascriptUdf() {
return this._javascriptUdf;
}
putJavascriptUdf(value) {
this._javascriptUdf.internalValue = value;
}
resetJavascriptUdf() {
this._javascriptUdf.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get javascriptUdfInput() {
return this._javascriptUdf.internalValue;
}
}
exports.PubsubSubscriptionMessageTransformsOutputReference = PubsubSubscriptionMessageTransformsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
PubsubSubscriptionMessageTransformsOutputReference[_g] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionMessageTransformsOutputReference", version: "16.3.0" };
class PubsubSubscriptionMessageTransformsList 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 PubsubSubscriptionMessageTransformsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PubsubSubscriptionMessageTransformsList = PubsubSubscriptionMessageTransformsList;
_h = JSII_RTTI_SYMBOL_1;
PubsubSubscriptionMessageTransformsList[_h] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionMessageTransformsList", version: "16.3.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),
};
}
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));
}
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;
_j = JSII_RTTI_SYMBOL_1;
PubsubSubscriptionPushConfigNoWrapperOutputReference[_j] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionPushConfigNoWrapperOutputReference", version: "16.3.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),
};
}
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));
}
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;
_k = JSII_RTTI_SYMBOL_1;
PubsubSubscriptionPushConfigOidcTokenOutputReference[_k] = { fqn: "@cdktf/provider-google.pubsubSubscription.PubsubSubscriptionPushConfigOidcTokenOutputReference", version: "16.3.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),
};
}
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.str