@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,103 lines • 198 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PubsubTopic = exports.PubsubTopicTimeoutsOutputReference = exports.pubsubTopicTimeoutsToHclTerraform = exports.pubsubTopicTimeoutsToTerraform = exports.PubsubTopicSchemaSettingsOutputReference = exports.pubsubTopicSchemaSettingsToHclTerraform = exports.pubsubTopicSchemaSettingsToTerraform = exports.PubsubTopicMessageStoragePolicyOutputReference = exports.pubsubTopicMessageStoragePolicyToHclTerraform = exports.pubsubTopicMessageStoragePolicyToTerraform = exports.PubsubTopicIngestionDataSourceSettingsOutputReference = exports.pubsubTopicIngestionDataSourceSettingsToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsToTerraform = exports.PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference = exports.pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToTerraform = exports.PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference = exports.pubsubTopicIngestionDataSourceSettingsCloudStorageToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsCloudStorageToTerraform = exports.PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference = exports.pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToTerraform = exports.PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference = exports.pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToTerraform = exports.PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference = exports.pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToTerraform = exports.PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference = exports.pubsubTopicIngestionDataSourceSettingsAwsKinesisToHclTerraform = exports.pubsubTopicIngestionDataSourceSettingsAwsKinesisToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function pubsubTopicIngestionDataSourceSettingsAwsKinesisToTerraform(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 {
aws_role_arn: cdktf.stringToTerraform(struct.awsRoleArn),
consumer_arn: cdktf.stringToTerraform(struct.consumerArn),
gcp_service_account: cdktf.stringToTerraform(struct.gcpServiceAccount),
stream_arn: cdktf.stringToTerraform(struct.streamArn),
};
}
exports.pubsubTopicIngestionDataSourceSettingsAwsKinesisToTerraform = pubsubTopicIngestionDataSourceSettingsAwsKinesisToTerraform;
function pubsubTopicIngestionDataSourceSettingsAwsKinesisToHclTerraform(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 = {
aws_role_arn: {
value: cdktf.stringToHclTerraform(struct.awsRoleArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
consumer_arn: {
value: cdktf.stringToHclTerraform(struct.consumerArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
gcp_service_account: {
value: cdktf.stringToHclTerraform(struct.gcpServiceAccount),
isBlock: false,
type: "simple",
storageClassType: "string",
},
stream_arn: {
value: cdktf.stringToHclTerraform(struct.streamArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicIngestionDataSourceSettingsAwsKinesisToHclTerraform = pubsubTopicIngestionDataSourceSettingsAwsKinesisToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference 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._awsRoleArn !== undefined) {
hasAnyValues = true;
internalValueResult.awsRoleArn = this._awsRoleArn;
}
if (this._consumerArn !== undefined) {
hasAnyValues = true;
internalValueResult.consumerArn = this._consumerArn;
}
if (this._gcpServiceAccount !== undefined) {
hasAnyValues = true;
internalValueResult.gcpServiceAccount = this._gcpServiceAccount;
}
if (this._streamArn !== undefined) {
hasAnyValues = true;
internalValueResult.streamArn = this._streamArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._awsRoleArn = undefined;
this._consumerArn = undefined;
this._gcpServiceAccount = undefined;
this._streamArn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._awsRoleArn = value.awsRoleArn;
this._consumerArn = value.consumerArn;
this._gcpServiceAccount = value.gcpServiceAccount;
this._streamArn = value.streamArn;
}
}
get awsRoleArn() {
return this.getStringAttribute('aws_role_arn');
}
set awsRoleArn(value) {
this._awsRoleArn = value;
}
// Temporarily expose input value. Use with caution.
get awsRoleArnInput() {
return this._awsRoleArn;
}
get consumerArn() {
return this.getStringAttribute('consumer_arn');
}
set consumerArn(value) {
this._consumerArn = value;
}
// Temporarily expose input value. Use with caution.
get consumerArnInput() {
return this._consumerArn;
}
get gcpServiceAccount() {
return this.getStringAttribute('gcp_service_account');
}
set gcpServiceAccount(value) {
this._gcpServiceAccount = value;
}
// Temporarily expose input value. Use with caution.
get gcpServiceAccountInput() {
return this._gcpServiceAccount;
}
get streamArn() {
return this.getStringAttribute('stream_arn');
}
set streamArn(value) {
this._streamArn = value;
}
// Temporarily expose input value. Use with caution.
get streamArnInput() {
return this._streamArn;
}
}
exports.PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference = PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference;
_a = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference[_a] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference", version: "14.12.0" };
function pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToTerraform(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 {};
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToTerraform = pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToTerraform;
function pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToHclTerraform(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 = {};
return attrs;
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToHclTerraform = pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference 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 = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
}
exports.PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference = PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference;
_b = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference[_b] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference", version: "14.12.0" };
function pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToTerraform(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 {};
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToTerraform = pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToTerraform;
function pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToHclTerraform(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 = {};
return attrs;
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToHclTerraform = pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference 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 = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
}
exports.PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference = PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference;
_c = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference[_c] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference", version: "14.12.0" };
function pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToTerraform(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 {
delimiter: cdktf.stringToTerraform(struct.delimiter),
};
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToTerraform = pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToTerraform;
function pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToHclTerraform(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 = {
delimiter: {
value: cdktf.stringToHclTerraform(struct.delimiter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToHclTerraform = pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference 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._delimiter !== undefined) {
hasAnyValues = true;
internalValueResult.delimiter = this._delimiter;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._delimiter = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._delimiter = value.delimiter;
}
}
get delimiter() {
return this.getStringAttribute('delimiter');
}
set delimiter(value) {
this._delimiter = value;
}
resetDelimiter() {
this._delimiter = undefined;
}
// Temporarily expose input value. Use with caution.
get delimiterInput() {
return this._delimiter;
}
}
exports.PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference = PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference;
_d = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference[_d] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference", version: "14.12.0" };
function pubsubTopicIngestionDataSourceSettingsCloudStorageToTerraform(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),
match_glob: cdktf.stringToTerraform(struct.matchGlob),
minimum_object_create_time: cdktf.stringToTerraform(struct.minimumObjectCreateTime),
avro_format: pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToTerraform(struct.avroFormat),
pubsub_avro_format: pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToTerraform(struct.pubsubAvroFormat),
text_format: pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToTerraform(struct.textFormat),
};
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStorageToTerraform = pubsubTopicIngestionDataSourceSettingsCloudStorageToTerraform;
function pubsubTopicIngestionDataSourceSettingsCloudStorageToHclTerraform(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",
},
match_glob: {
value: cdktf.stringToHclTerraform(struct.matchGlob),
isBlock: false,
type: "simple",
storageClassType: "string",
},
minimum_object_create_time: {
value: cdktf.stringToHclTerraform(struct.minimumObjectCreateTime),
isBlock: false,
type: "simple",
storageClassType: "string",
},
avro_format: {
value: pubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatToHclTerraform(struct.avroFormat),
isBlock: true,
type: "list",
storageClassType: "PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatList",
},
pubsub_avro_format: {
value: pubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatToHclTerraform(struct.pubsubAvroFormat),
isBlock: true,
type: "list",
storageClassType: "PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatList",
},
text_format: {
value: pubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatToHclTerraform(struct.textFormat),
isBlock: true,
type: "list",
storageClassType: "PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicIngestionDataSourceSettingsCloudStorageToHclTerraform = pubsubTopicIngestionDataSourceSettingsCloudStorageToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference 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_format - computed: false, optional: true, required: false
this._avroFormat = new PubsubTopicIngestionDataSourceSettingsCloudStorageAvroFormatOutputReference(this, "avro_format");
// pubsub_avro_format - computed: false, optional: true, required: false
this._pubsubAvroFormat = new PubsubTopicIngestionDataSourceSettingsCloudStoragePubsubAvroFormatOutputReference(this, "pubsub_avro_format");
// text_format - computed: false, optional: true, required: false
this._textFormat = new PubsubTopicIngestionDataSourceSettingsCloudStorageTextFormatOutputReference(this, "text_format");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._bucket !== undefined) {
hasAnyValues = true;
internalValueResult.bucket = this._bucket;
}
if (this._matchGlob !== undefined) {
hasAnyValues = true;
internalValueResult.matchGlob = this._matchGlob;
}
if (this._minimumObjectCreateTime !== undefined) {
hasAnyValues = true;
internalValueResult.minimumObjectCreateTime = this._minimumObjectCreateTime;
}
if (this._avroFormat?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.avroFormat = this._avroFormat?.internalValue;
}
if (this._pubsubAvroFormat?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.pubsubAvroFormat = this._pubsubAvroFormat?.internalValue;
}
if (this._textFormat?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.textFormat = this._textFormat?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bucket = undefined;
this._matchGlob = undefined;
this._minimumObjectCreateTime = undefined;
this._avroFormat.internalValue = undefined;
this._pubsubAvroFormat.internalValue = undefined;
this._textFormat.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bucket = value.bucket;
this._matchGlob = value.matchGlob;
this._minimumObjectCreateTime = value.minimumObjectCreateTime;
this._avroFormat.internalValue = value.avroFormat;
this._pubsubAvroFormat.internalValue = value.pubsubAvroFormat;
this._textFormat.internalValue = value.textFormat;
}
}
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 matchGlob() {
return this.getStringAttribute('match_glob');
}
set matchGlob(value) {
this._matchGlob = value;
}
resetMatchGlob() {
this._matchGlob = undefined;
}
// Temporarily expose input value. Use with caution.
get matchGlobInput() {
return this._matchGlob;
}
get minimumObjectCreateTime() {
return this.getStringAttribute('minimum_object_create_time');
}
set minimumObjectCreateTime(value) {
this._minimumObjectCreateTime = value;
}
resetMinimumObjectCreateTime() {
this._minimumObjectCreateTime = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumObjectCreateTimeInput() {
return this._minimumObjectCreateTime;
}
get avroFormat() {
return this._avroFormat;
}
putAvroFormat(value) {
this._avroFormat.internalValue = value;
}
resetAvroFormat() {
this._avroFormat.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get avroFormatInput() {
return this._avroFormat.internalValue;
}
get pubsubAvroFormat() {
return this._pubsubAvroFormat;
}
putPubsubAvroFormat(value) {
this._pubsubAvroFormat.internalValue = value;
}
resetPubsubAvroFormat() {
this._pubsubAvroFormat.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get pubsubAvroFormatInput() {
return this._pubsubAvroFormat.internalValue;
}
get textFormat() {
return this._textFormat;
}
putTextFormat(value) {
this._textFormat.internalValue = value;
}
resetTextFormat() {
this._textFormat.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get textFormatInput() {
return this._textFormat.internalValue;
}
}
exports.PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference = PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference;
_e = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference[_e] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference", version: "14.12.0" };
function pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToTerraform(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 {
severity: cdktf.stringToTerraform(struct.severity),
};
}
exports.pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToTerraform = pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToTerraform;
function pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToHclTerraform(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 = {
severity: {
value: cdktf.stringToHclTerraform(struct.severity),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToHclTerraform = pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference 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._severity !== undefined) {
hasAnyValues = true;
internalValueResult.severity = this._severity;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._severity = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._severity = value.severity;
}
}
get severity() {
return this.getStringAttribute('severity');
}
set severity(value) {
this._severity = value;
}
resetSeverity() {
this._severity = undefined;
}
// Temporarily expose input value. Use with caution.
get severityInput() {
return this._severity;
}
}
exports.PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference = PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference[_f] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference", version: "14.12.0" };
function pubsubTopicIngestionDataSourceSettingsToTerraform(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 {
aws_kinesis: pubsubTopicIngestionDataSourceSettingsAwsKinesisToTerraform(struct.awsKinesis),
cloud_storage: pubsubTopicIngestionDataSourceSettingsCloudStorageToTerraform(struct.cloudStorage),
platform_logs_settings: pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToTerraform(struct.platformLogsSettings),
};
}
exports.pubsubTopicIngestionDataSourceSettingsToTerraform = pubsubTopicIngestionDataSourceSettingsToTerraform;
function pubsubTopicIngestionDataSourceSettingsToHclTerraform(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 = {
aws_kinesis: {
value: pubsubTopicIngestionDataSourceSettingsAwsKinesisToHclTerraform(struct.awsKinesis),
isBlock: true,
type: "list",
storageClassType: "PubsubTopicIngestionDataSourceSettingsAwsKinesisList",
},
cloud_storage: {
value: pubsubTopicIngestionDataSourceSettingsCloudStorageToHclTerraform(struct.cloudStorage),
isBlock: true,
type: "list",
storageClassType: "PubsubTopicIngestionDataSourceSettingsCloudStorageList",
},
platform_logs_settings: {
value: pubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsToHclTerraform(struct.platformLogsSettings),
isBlock: true,
type: "list",
storageClassType: "PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicIngestionDataSourceSettingsToHclTerraform = pubsubTopicIngestionDataSourceSettingsToHclTerraform;
class PubsubTopicIngestionDataSourceSettingsOutputReference 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;
// aws_kinesis - computed: false, optional: true, required: false
this._awsKinesis = new PubsubTopicIngestionDataSourceSettingsAwsKinesisOutputReference(this, "aws_kinesis");
// cloud_storage - computed: false, optional: true, required: false
this._cloudStorage = new PubsubTopicIngestionDataSourceSettingsCloudStorageOutputReference(this, "cloud_storage");
// platform_logs_settings - computed: false, optional: true, required: false
this._platformLogsSettings = new PubsubTopicIngestionDataSourceSettingsPlatformLogsSettingsOutputReference(this, "platform_logs_settings");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._awsKinesis?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.awsKinesis = this._awsKinesis?.internalValue;
}
if (this._cloudStorage?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.cloudStorage = this._cloudStorage?.internalValue;
}
if (this._platformLogsSettings?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.platformLogsSettings = this._platformLogsSettings?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._awsKinesis.internalValue = undefined;
this._cloudStorage.internalValue = undefined;
this._platformLogsSettings.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._awsKinesis.internalValue = value.awsKinesis;
this._cloudStorage.internalValue = value.cloudStorage;
this._platformLogsSettings.internalValue = value.platformLogsSettings;
}
}
get awsKinesis() {
return this._awsKinesis;
}
putAwsKinesis(value) {
this._awsKinesis.internalValue = value;
}
resetAwsKinesis() {
this._awsKinesis.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get awsKinesisInput() {
return this._awsKinesis.internalValue;
}
get cloudStorage() {
return this._cloudStorage;
}
putCloudStorage(value) {
this._cloudStorage.internalValue = value;
}
resetCloudStorage() {
this._cloudStorage.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get cloudStorageInput() {
return this._cloudStorage.internalValue;
}
get platformLogsSettings() {
return this._platformLogsSettings;
}
putPlatformLogsSettings(value) {
this._platformLogsSettings.internalValue = value;
}
resetPlatformLogsSettings() {
this._platformLogsSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get platformLogsSettingsInput() {
return this._platformLogsSettings.internalValue;
}
}
exports.PubsubTopicIngestionDataSourceSettingsOutputReference = PubsubTopicIngestionDataSourceSettingsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
PubsubTopicIngestionDataSourceSettingsOutputReference[_g] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicIngestionDataSourceSettingsOutputReference", version: "14.12.0" };
function pubsubTopicMessageStoragePolicyToTerraform(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 {
allowed_persistence_regions: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedPersistenceRegions),
};
}
exports.pubsubTopicMessageStoragePolicyToTerraform = pubsubTopicMessageStoragePolicyToTerraform;
function pubsubTopicMessageStoragePolicyToHclTerraform(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 = {
allowed_persistence_regions: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedPersistenceRegions),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicMessageStoragePolicyToHclTerraform = pubsubTopicMessageStoragePolicyToHclTerraform;
class PubsubTopicMessageStoragePolicyOutputReference 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._allowedPersistenceRegions !== undefined) {
hasAnyValues = true;
internalValueResult.allowedPersistenceRegions = this._allowedPersistenceRegions;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedPersistenceRegions = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedPersistenceRegions = value.allowedPersistenceRegions;
}
}
get allowedPersistenceRegions() {
return this.getListAttribute('allowed_persistence_regions');
}
set allowedPersistenceRegions(value) {
this._allowedPersistenceRegions = value;
}
// Temporarily expose input value. Use with caution.
get allowedPersistenceRegionsInput() {
return this._allowedPersistenceRegions;
}
}
exports.PubsubTopicMessageStoragePolicyOutputReference = PubsubTopicMessageStoragePolicyOutputReference;
_h = JSII_RTTI_SYMBOL_1;
PubsubTopicMessageStoragePolicyOutputReference[_h] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicMessageStoragePolicyOutputReference", version: "14.12.0" };
function pubsubTopicSchemaSettingsToTerraform(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 {
encoding: cdktf.stringToTerraform(struct.encoding),
schema: cdktf.stringToTerraform(struct.schema),
};
}
exports.pubsubTopicSchemaSettingsToTerraform = pubsubTopicSchemaSettingsToTerraform;
function pubsubTopicSchemaSettingsToHclTerraform(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 = {
encoding: {
value: cdktf.stringToHclTerraform(struct.encoding),
isBlock: false,
type: "simple",
storageClassType: "string",
},
schema: {
value: cdktf.stringToHclTerraform(struct.schema),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.pubsubTopicSchemaSettingsToHclTerraform = pubsubTopicSchemaSettingsToHclTerraform;
class PubsubTopicSchemaSettingsOutputReference 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._encoding !== undefined) {
hasAnyValues = true;
internalValueResult.encoding = this._encoding;
}
if (this._schema !== undefined) {
hasAnyValues = true;
internalValueResult.schema = this._schema;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._encoding = undefined;
this._schema = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._encoding = value.encoding;
this._schema = value.schema;
}
}
get encoding() {
return this.getStringAttribute('encoding');
}
set encoding(value) {
this._encoding = value;
}
resetEncoding() {
this._encoding = undefined;
}
// Temporarily expose input value. Use with caution.
get encodingInput() {
return this._encoding;
}
get schema() {
return this.getStringAttribute('schema');
}
set schema(value) {
this._schema = value;
}
// Temporarily expose input value. Use with caution.
get schemaInput() {
return this._schema;
}
}
exports.PubsubTopicSchemaSettingsOutputReference = PubsubTopicSchemaSettingsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
PubsubTopicSchemaSettingsOutputReference[_j] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicSchemaSettingsOutputReference", version: "14.12.0" };
function pubsubTopicTimeoutsToTerraform(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.pubsubTopicTimeoutsToTerraform = pubsubTopicTimeoutsToTerraform;
function pubsubTopicTimeoutsToHclTerraform(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.pubsubTopicTimeoutsToHclTerraform = pubsubTopicTimeoutsToHclTerraform;
class PubsubTopicTimeoutsOutputReference 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.PubsubTopicTimeoutsOutputReference = PubsubTopicTimeoutsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
PubsubTopicTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-google.pubsubTopic.PubsubTopicTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/pubsub_topic google_pubsub_topic}
*/
class PubsubTopic extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a PubsubTopic 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 PubsubTopic to import
* @param importFromId The id of the existing PubsubTopic that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/pubsub_topic#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the PubsubTopic to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_pubsub_topic", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/pubsub_topic google_pubsub_topic} 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 PubsubTopicConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_pubsub_topic',
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
});
// ==========
// ATTRIBUTES
// ==========
// effective_labels - computed: true, optional: false, required: false
this._effectiveLabels = new cdktf.StringMap(this, "effective_labels");
// terraform_labels - computed: true, optional: false, required: false
this._terraformLabels = new cdktf.StringMap(this, "terraform_labels");
// ingestion_data_source_settings - computed: false, optional: true, required: false
this._ingestionDataSourceSettings = new PubsubTopicIngestionDataSourceSettingsOutputReference(this, "ingestion_data_source_settings");
// message_storage_policy - computed: false, optional: true, required: false
this._messageStoragePolicy = new PubsubTopicMessageStoragePolicyOutputReference(this, "message_storage_policy");
// schema_settings - computed: false, optional: true, required: false
this._schemaSettings = new PubsubTopicSchemaSettingsOutputReference(this, "schema_settings");
// timeouts - computed: false, optional: true