@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,053 lines • 224 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MskReplicator = exports.MskReplicatorTimeoutsOutputReference = exports.MskReplicatorReplicationInfoListStructOutputReference = exports.MskReplicatorReplicationInfoListTopicReplicationList = exports.MskReplicatorReplicationInfoListTopicReplicationOutputReference = exports.MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference = exports.MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference = exports.MskReplicatorReplicationInfoListConsumerGroupReplicationList = exports.MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference = exports.MskReplicatorKafkaClusterList = exports.MskReplicatorKafkaClusterOutputReference = exports.MskReplicatorKafkaClusterVpcConfigOutputReference = exports.MskReplicatorKafkaClusterAmazonMskClusterOutputReference = void 0;
exports.mskReplicatorKafkaClusterAmazonMskClusterToTerraform = mskReplicatorKafkaClusterAmazonMskClusterToTerraform;
exports.mskReplicatorKafkaClusterAmazonMskClusterToHclTerraform = mskReplicatorKafkaClusterAmazonMskClusterToHclTerraform;
exports.mskReplicatorKafkaClusterVpcConfigToTerraform = mskReplicatorKafkaClusterVpcConfigToTerraform;
exports.mskReplicatorKafkaClusterVpcConfigToHclTerraform = mskReplicatorKafkaClusterVpcConfigToHclTerraform;
exports.mskReplicatorKafkaClusterToTerraform = mskReplicatorKafkaClusterToTerraform;
exports.mskReplicatorKafkaClusterToHclTerraform = mskReplicatorKafkaClusterToHclTerraform;
exports.mskReplicatorReplicationInfoListConsumerGroupReplicationToTerraform = mskReplicatorReplicationInfoListConsumerGroupReplicationToTerraform;
exports.mskReplicatorReplicationInfoListConsumerGroupReplicationToHclTerraform = mskReplicatorReplicationInfoListConsumerGroupReplicationToHclTerraform;
exports.mskReplicatorReplicationInfoListTopicReplicationStartingPositionToTerraform = mskReplicatorReplicationInfoListTopicReplicationStartingPositionToTerraform;
exports.mskReplicatorReplicationInfoListTopicReplicationStartingPositionToHclTerraform = mskReplicatorReplicationInfoListTopicReplicationStartingPositionToHclTerraform;
exports.mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToTerraform = mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToTerraform;
exports.mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToHclTerraform = mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToHclTerraform;
exports.mskReplicatorReplicationInfoListTopicReplicationToTerraform = mskReplicatorReplicationInfoListTopicReplicationToTerraform;
exports.mskReplicatorReplicationInfoListTopicReplicationToHclTerraform = mskReplicatorReplicationInfoListTopicReplicationToHclTerraform;
exports.mskReplicatorReplicationInfoListStructToTerraform = mskReplicatorReplicationInfoListStructToTerraform;
exports.mskReplicatorReplicationInfoListStructToHclTerraform = mskReplicatorReplicationInfoListStructToHclTerraform;
exports.mskReplicatorTimeoutsToTerraform = mskReplicatorTimeoutsToTerraform;
exports.mskReplicatorTimeoutsToHclTerraform = mskReplicatorTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function mskReplicatorKafkaClusterAmazonMskClusterToTerraform(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 {
msk_cluster_arn: cdktf.stringToTerraform(struct.mskClusterArn),
};
}
function mskReplicatorKafkaClusterAmazonMskClusterToHclTerraform(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 = {
msk_cluster_arn: {
value: cdktf.stringToHclTerraform(struct.mskClusterArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorKafkaClusterAmazonMskClusterOutputReference 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._mskClusterArn !== undefined) {
hasAnyValues = true;
internalValueResult.mskClusterArn = this._mskClusterArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._mskClusterArn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._mskClusterArn = value.mskClusterArn;
}
}
get mskClusterArn() {
return this.getStringAttribute('msk_cluster_arn');
}
set mskClusterArn(value) {
this._mskClusterArn = value;
}
// Temporarily expose input value. Use with caution.
get mskClusterArnInput() {
return this._mskClusterArn;
}
}
exports.MskReplicatorKafkaClusterAmazonMskClusterOutputReference = MskReplicatorKafkaClusterAmazonMskClusterOutputReference;
_a = JSII_RTTI_SYMBOL_1;
MskReplicatorKafkaClusterAmazonMskClusterOutputReference[_a] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorKafkaClusterAmazonMskClusterOutputReference", version: "21.22.1" };
function mskReplicatorKafkaClusterVpcConfigToTerraform(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 {
security_groups_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupsIds),
subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnetIds),
};
}
function mskReplicatorKafkaClusterVpcConfigToHclTerraform(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 = {
security_groups_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.securityGroupsIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
subnet_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subnetIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorKafkaClusterVpcConfigOutputReference 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._securityGroupsIds !== undefined) {
hasAnyValues = true;
internalValueResult.securityGroupsIds = this._securityGroupsIds;
}
if (this._subnetIds !== undefined) {
hasAnyValues = true;
internalValueResult.subnetIds = this._subnetIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._securityGroupsIds = undefined;
this._subnetIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._securityGroupsIds = value.securityGroupsIds;
this._subnetIds = value.subnetIds;
}
}
get securityGroupsIds() {
return cdktf.Fn.tolist(this.getListAttribute('security_groups_ids'));
}
set securityGroupsIds(value) {
this._securityGroupsIds = value;
}
resetSecurityGroupsIds() {
this._securityGroupsIds = undefined;
}
// Temporarily expose input value. Use with caution.
get securityGroupsIdsInput() {
return this._securityGroupsIds;
}
get subnetIds() {
return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
}
set subnetIds(value) {
this._subnetIds = value;
}
// Temporarily expose input value. Use with caution.
get subnetIdsInput() {
return this._subnetIds;
}
}
exports.MskReplicatorKafkaClusterVpcConfigOutputReference = MskReplicatorKafkaClusterVpcConfigOutputReference;
_b = JSII_RTTI_SYMBOL_1;
MskReplicatorKafkaClusterVpcConfigOutputReference[_b] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorKafkaClusterVpcConfigOutputReference", version: "21.22.1" };
function mskReplicatorKafkaClusterToTerraform(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 {
amazon_msk_cluster: mskReplicatorKafkaClusterAmazonMskClusterToTerraform(struct.amazonMskCluster),
vpc_config: mskReplicatorKafkaClusterVpcConfigToTerraform(struct.vpcConfig),
};
}
function mskReplicatorKafkaClusterToHclTerraform(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 = {
amazon_msk_cluster: {
value: mskReplicatorKafkaClusterAmazonMskClusterToHclTerraform(struct.amazonMskCluster),
isBlock: true,
type: "list",
storageClassType: "MskReplicatorKafkaClusterAmazonMskClusterList",
},
vpc_config: {
value: mskReplicatorKafkaClusterVpcConfigToHclTerraform(struct.vpcConfig),
isBlock: true,
type: "list",
storageClassType: "MskReplicatorKafkaClusterVpcConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorKafkaClusterOutputReference 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;
// amazon_msk_cluster - computed: false, optional: false, required: true
this._amazonMskCluster = new MskReplicatorKafkaClusterAmazonMskClusterOutputReference(this, "amazon_msk_cluster");
// vpc_config - computed: false, optional: false, required: true
this._vpcConfig = new MskReplicatorKafkaClusterVpcConfigOutputReference(this, "vpc_config");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._amazonMskCluster?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.amazonMskCluster = this._amazonMskCluster?.internalValue;
}
if (this._vpcConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.vpcConfig = this._vpcConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._amazonMskCluster.internalValue = undefined;
this._vpcConfig.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._amazonMskCluster.internalValue = value.amazonMskCluster;
this._vpcConfig.internalValue = value.vpcConfig;
}
}
get amazonMskCluster() {
return this._amazonMskCluster;
}
putAmazonMskCluster(value) {
this._amazonMskCluster.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get amazonMskClusterInput() {
return this._amazonMskCluster.internalValue;
}
get vpcConfig() {
return this._vpcConfig;
}
putVpcConfig(value) {
this._vpcConfig.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get vpcConfigInput() {
return this._vpcConfig.internalValue;
}
}
exports.MskReplicatorKafkaClusterOutputReference = MskReplicatorKafkaClusterOutputReference;
_c = JSII_RTTI_SYMBOL_1;
MskReplicatorKafkaClusterOutputReference[_c] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorKafkaClusterOutputReference", version: "21.22.1" };
class MskReplicatorKafkaClusterList 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 MskReplicatorKafkaClusterOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MskReplicatorKafkaClusterList = MskReplicatorKafkaClusterList;
_d = JSII_RTTI_SYMBOL_1;
MskReplicatorKafkaClusterList[_d] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorKafkaClusterList", version: "21.22.1" };
function mskReplicatorReplicationInfoListConsumerGroupReplicationToTerraform(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 {
consumer_groups_to_exclude: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.consumerGroupsToExclude),
consumer_groups_to_replicate: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.consumerGroupsToReplicate),
detect_and_copy_new_consumer_groups: cdktf.booleanToTerraform(struct.detectAndCopyNewConsumerGroups),
synchronise_consumer_group_offsets: cdktf.booleanToTerraform(struct.synchroniseConsumerGroupOffsets),
};
}
function mskReplicatorReplicationInfoListConsumerGroupReplicationToHclTerraform(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 = {
consumer_groups_to_exclude: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.consumerGroupsToExclude),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
consumer_groups_to_replicate: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.consumerGroupsToReplicate),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
detect_and_copy_new_consumer_groups: {
value: cdktf.booleanToHclTerraform(struct.detectAndCopyNewConsumerGroups),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
synchronise_consumer_group_offsets: {
value: cdktf.booleanToHclTerraform(struct.synchroniseConsumerGroupOffsets),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._consumerGroupsToExclude !== undefined) {
hasAnyValues = true;
internalValueResult.consumerGroupsToExclude = this._consumerGroupsToExclude;
}
if (this._consumerGroupsToReplicate !== undefined) {
hasAnyValues = true;
internalValueResult.consumerGroupsToReplicate = this._consumerGroupsToReplicate;
}
if (this._detectAndCopyNewConsumerGroups !== undefined) {
hasAnyValues = true;
internalValueResult.detectAndCopyNewConsumerGroups = this._detectAndCopyNewConsumerGroups;
}
if (this._synchroniseConsumerGroupOffsets !== undefined) {
hasAnyValues = true;
internalValueResult.synchroniseConsumerGroupOffsets = this._synchroniseConsumerGroupOffsets;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._consumerGroupsToExclude = undefined;
this._consumerGroupsToReplicate = undefined;
this._detectAndCopyNewConsumerGroups = undefined;
this._synchroniseConsumerGroupOffsets = 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._consumerGroupsToExclude = value.consumerGroupsToExclude;
this._consumerGroupsToReplicate = value.consumerGroupsToReplicate;
this._detectAndCopyNewConsumerGroups = value.detectAndCopyNewConsumerGroups;
this._synchroniseConsumerGroupOffsets = value.synchroniseConsumerGroupOffsets;
}
}
get consumerGroupsToExclude() {
return cdktf.Fn.tolist(this.getListAttribute('consumer_groups_to_exclude'));
}
set consumerGroupsToExclude(value) {
this._consumerGroupsToExclude = value;
}
resetConsumerGroupsToExclude() {
this._consumerGroupsToExclude = undefined;
}
// Temporarily expose input value. Use with caution.
get consumerGroupsToExcludeInput() {
return this._consumerGroupsToExclude;
}
get consumerGroupsToReplicate() {
return cdktf.Fn.tolist(this.getListAttribute('consumer_groups_to_replicate'));
}
set consumerGroupsToReplicate(value) {
this._consumerGroupsToReplicate = value;
}
// Temporarily expose input value. Use with caution.
get consumerGroupsToReplicateInput() {
return this._consumerGroupsToReplicate;
}
get detectAndCopyNewConsumerGroups() {
return this.getBooleanAttribute('detect_and_copy_new_consumer_groups');
}
set detectAndCopyNewConsumerGroups(value) {
this._detectAndCopyNewConsumerGroups = value;
}
resetDetectAndCopyNewConsumerGroups() {
this._detectAndCopyNewConsumerGroups = undefined;
}
// Temporarily expose input value. Use with caution.
get detectAndCopyNewConsumerGroupsInput() {
return this._detectAndCopyNewConsumerGroups;
}
get synchroniseConsumerGroupOffsets() {
return this.getBooleanAttribute('synchronise_consumer_group_offsets');
}
set synchroniseConsumerGroupOffsets(value) {
this._synchroniseConsumerGroupOffsets = value;
}
resetSynchroniseConsumerGroupOffsets() {
this._synchroniseConsumerGroupOffsets = undefined;
}
// Temporarily expose input value. Use with caution.
get synchroniseConsumerGroupOffsetsInput() {
return this._synchroniseConsumerGroupOffsets;
}
}
exports.MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference = MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference;
_e = JSII_RTTI_SYMBOL_1;
MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference[_e] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference", version: "21.22.1" };
class MskReplicatorReplicationInfoListConsumerGroupReplicationList 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 MskReplicatorReplicationInfoListConsumerGroupReplicationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MskReplicatorReplicationInfoListConsumerGroupReplicationList = MskReplicatorReplicationInfoListConsumerGroupReplicationList;
_f = JSII_RTTI_SYMBOL_1;
MskReplicatorReplicationInfoListConsumerGroupReplicationList[_f] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorReplicationInfoListConsumerGroupReplicationList", version: "21.22.1" };
function mskReplicatorReplicationInfoListTopicReplicationStartingPositionToTerraform(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 {
type: cdktf.stringToTerraform(struct.type),
};
}
function mskReplicatorReplicationInfoListTopicReplicationStartingPositionToHclTerraform(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 = {
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference 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._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._type = value.type;
}
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
resetType() {
this._type = undefined;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference = MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference;
_g = JSII_RTTI_SYMBOL_1;
MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference[_g] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference", version: "21.22.1" };
function mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToTerraform(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 {
type: cdktf.stringToTerraform(struct.type),
};
}
function mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToHclTerraform(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 = {
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference 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._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._type = value.type;
}
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
resetType() {
this._type = undefined;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference = MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference;
_h = JSII_RTTI_SYMBOL_1;
MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference[_h] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference", version: "21.22.1" };
function mskReplicatorReplicationInfoListTopicReplicationToTerraform(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 {
copy_access_control_lists_for_topics: cdktf.booleanToTerraform(struct.copyAccessControlListsForTopics),
copy_topic_configurations: cdktf.booleanToTerraform(struct.copyTopicConfigurations),
detect_and_copy_new_topics: cdktf.booleanToTerraform(struct.detectAndCopyNewTopics),
topics_to_exclude: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.topicsToExclude),
topics_to_replicate: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.topicsToReplicate),
starting_position: mskReplicatorReplicationInfoListTopicReplicationStartingPositionToTerraform(struct.startingPosition),
topic_name_configuration: mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToTerraform(struct.topicNameConfiguration),
};
}
function mskReplicatorReplicationInfoListTopicReplicationToHclTerraform(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 = {
copy_access_control_lists_for_topics: {
value: cdktf.booleanToHclTerraform(struct.copyAccessControlListsForTopics),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
copy_topic_configurations: {
value: cdktf.booleanToHclTerraform(struct.copyTopicConfigurations),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
detect_and_copy_new_topics: {
value: cdktf.booleanToHclTerraform(struct.detectAndCopyNewTopics),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
topics_to_exclude: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.topicsToExclude),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
topics_to_replicate: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.topicsToReplicate),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
starting_position: {
value: mskReplicatorReplicationInfoListTopicReplicationStartingPositionToHclTerraform(struct.startingPosition),
isBlock: true,
type: "list",
storageClassType: "MskReplicatorReplicationInfoListTopicReplicationStartingPositionList",
},
topic_name_configuration: {
value: mskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationToHclTerraform(struct.topicNameConfiguration),
isBlock: true,
type: "list",
storageClassType: "MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorReplicationInfoListTopicReplicationOutputReference 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;
// starting_position - computed: false, optional: true, required: false
this._startingPosition = new MskReplicatorReplicationInfoListTopicReplicationStartingPositionOutputReference(this, "starting_position");
// topic_name_configuration - computed: false, optional: true, required: false
this._topicNameConfiguration = new MskReplicatorReplicationInfoListTopicReplicationTopicNameConfigurationOutputReference(this, "topic_name_configuration");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._copyAccessControlListsForTopics !== undefined) {
hasAnyValues = true;
internalValueResult.copyAccessControlListsForTopics = this._copyAccessControlListsForTopics;
}
if (this._copyTopicConfigurations !== undefined) {
hasAnyValues = true;
internalValueResult.copyTopicConfigurations = this._copyTopicConfigurations;
}
if (this._detectAndCopyNewTopics !== undefined) {
hasAnyValues = true;
internalValueResult.detectAndCopyNewTopics = this._detectAndCopyNewTopics;
}
if (this._topicsToExclude !== undefined) {
hasAnyValues = true;
internalValueResult.topicsToExclude = this._topicsToExclude;
}
if (this._topicsToReplicate !== undefined) {
hasAnyValues = true;
internalValueResult.topicsToReplicate = this._topicsToReplicate;
}
if (this._startingPosition?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.startingPosition = this._startingPosition?.internalValue;
}
if (this._topicNameConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.topicNameConfiguration = this._topicNameConfiguration?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._copyAccessControlListsForTopics = undefined;
this._copyTopicConfigurations = undefined;
this._detectAndCopyNewTopics = undefined;
this._topicsToExclude = undefined;
this._topicsToReplicate = undefined;
this._startingPosition.internalValue = undefined;
this._topicNameConfiguration.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._copyAccessControlListsForTopics = value.copyAccessControlListsForTopics;
this._copyTopicConfigurations = value.copyTopicConfigurations;
this._detectAndCopyNewTopics = value.detectAndCopyNewTopics;
this._topicsToExclude = value.topicsToExclude;
this._topicsToReplicate = value.topicsToReplicate;
this._startingPosition.internalValue = value.startingPosition;
this._topicNameConfiguration.internalValue = value.topicNameConfiguration;
}
}
get copyAccessControlListsForTopics() {
return this.getBooleanAttribute('copy_access_control_lists_for_topics');
}
set copyAccessControlListsForTopics(value) {
this._copyAccessControlListsForTopics = value;
}
resetCopyAccessControlListsForTopics() {
this._copyAccessControlListsForTopics = undefined;
}
// Temporarily expose input value. Use with caution.
get copyAccessControlListsForTopicsInput() {
return this._copyAccessControlListsForTopics;
}
get copyTopicConfigurations() {
return this.getBooleanAttribute('copy_topic_configurations');
}
set copyTopicConfigurations(value) {
this._copyTopicConfigurations = value;
}
resetCopyTopicConfigurations() {
this._copyTopicConfigurations = undefined;
}
// Temporarily expose input value. Use with caution.
get copyTopicConfigurationsInput() {
return this._copyTopicConfigurations;
}
get detectAndCopyNewTopics() {
return this.getBooleanAttribute('detect_and_copy_new_topics');
}
set detectAndCopyNewTopics(value) {
this._detectAndCopyNewTopics = value;
}
resetDetectAndCopyNewTopics() {
this._detectAndCopyNewTopics = undefined;
}
// Temporarily expose input value. Use with caution.
get detectAndCopyNewTopicsInput() {
return this._detectAndCopyNewTopics;
}
get topicsToExclude() {
return cdktf.Fn.tolist(this.getListAttribute('topics_to_exclude'));
}
set topicsToExclude(value) {
this._topicsToExclude = value;
}
resetTopicsToExclude() {
this._topicsToExclude = undefined;
}
// Temporarily expose input value. Use with caution.
get topicsToExcludeInput() {
return this._topicsToExclude;
}
get topicsToReplicate() {
return cdktf.Fn.tolist(this.getListAttribute('topics_to_replicate'));
}
set topicsToReplicate(value) {
this._topicsToReplicate = value;
}
// Temporarily expose input value. Use with caution.
get topicsToReplicateInput() {
return this._topicsToReplicate;
}
get startingPosition() {
return this._startingPosition;
}
putStartingPosition(value) {
this._startingPosition.internalValue = value;
}
resetStartingPosition() {
this._startingPosition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get startingPositionInput() {
return this._startingPosition.internalValue;
}
get topicNameConfiguration() {
return this._topicNameConfiguration;
}
putTopicNameConfiguration(value) {
this._topicNameConfiguration.internalValue = value;
}
resetTopicNameConfiguration() {
this._topicNameConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get topicNameConfigurationInput() {
return this._topicNameConfiguration.internalValue;
}
}
exports.MskReplicatorReplicationInfoListTopicReplicationOutputReference = MskReplicatorReplicationInfoListTopicReplicationOutputReference;
_j = JSII_RTTI_SYMBOL_1;
MskReplicatorReplicationInfoListTopicReplicationOutputReference[_j] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorReplicationInfoListTopicReplicationOutputReference", version: "21.22.1" };
class MskReplicatorReplicationInfoListTopicReplicationList 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 MskReplicatorReplicationInfoListTopicReplicationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MskReplicatorReplicationInfoListTopicReplicationList = MskReplicatorReplicationInfoListTopicReplicationList;
_k = JSII_RTTI_SYMBOL_1;
MskReplicatorReplicationInfoListTopicReplicationList[_k] = { fqn: "@cdktf/provider-aws.mskReplicator.MskReplicatorReplicationInfoListTopicReplicationList", version: "21.22.1" };
function mskReplicatorReplicationInfoListStructToTerraform(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 {
source_kafka_cluster_arn: cdktf.stringToTerraform(struct.sourceKafkaClusterArn),
target_compression_type: cdktf.stringToTerraform(struct.targetCompressionType),
target_kafka_cluster_arn: cdktf.stringToTerraform(struct.targetKafkaClusterArn),
consumer_group_replication: cdktf.listMapper(mskReplicatorReplicationInfoListConsumerGroupReplicationToTerraform, true)(struct.consumerGroupReplication),
topic_replication: cdktf.listMapper(mskReplicatorReplicationInfoListTopicReplicationToTerraform, true)(struct.topicReplication),
};
}
function mskReplicatorReplicationInfoListStructToHclTerraform(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 = {
source_kafka_cluster_arn: {
value: cdktf.stringToHclTerraform(struct.sourceKafkaClusterArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
target_compression_type: {
value: cdktf.stringToHclTerraform(struct.targetCompressionType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
target_kafka_cluster_arn: {
value: cdktf.stringToHclTerraform(struct.targetKafkaClusterArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
consumer_group_replication: {
value: cdktf.listMapperHcl(mskReplicatorReplicationInfoListConsumerGroupReplicationToHclTerraform, true)(struct.consumerGroupReplication),
isBlock: true,
type: "list",
storageClassType: "MskReplicatorReplicationInfoListConsumerGroupReplicationList",
},
topic_replication: {
value: cdktf.listMapperHcl(mskReplicatorReplicationInfoListTopicReplicationToHclTerraform, true)(struct.topicReplication),
isBlock: true,
type: "list",
storageClassType: "MskReplicatorReplicationInfoListTopicReplicationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class MskReplicatorReplicationInfoListStructOutputReference 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;
// consumer_group_replication - computed: false, optional: false, required: true
this._consumerGroupReplication = new MskReplicatorReplicationInfoListConsumerGroupReplicationList(this, "consumer_group_replication", false);
// topic_replication - computed: false, optional: false, required: true
this._topicReplication = new MskReplicatorReplicationInfoListTopicReplicationList(this, "topic_replication", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._sourceKafkaClusterArn !== undefined) {
hasAnyValues = true;
internalValueResult.sourceKafkaClusterArn = this._sourceKafkaClusterArn;
}
if (this._targetCompressionType !== undefined) {
hasAnyValues = true;
internalValueResult.targetCompressionType = this._targetCompressionType;
}
if (this._targetKafkaClusterArn !== undefined) {
hasAnyValues = true;
internalValueResult.targetKafkaClusterArn = this._targetKafkaClusterArn;
}
if (this._consumerGroupReplication?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.consumerGroupReplication = this._consumerGroupReplication?.internalValue;
}
if (this._topicReplication?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.topicReplication = this._topicReplication?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._sourceKafkaClusterArn = undefined;
this._targetCompressionType = undefined;
this._targetKafkaClusterArn = undefined;
this._consumerGroupReplication.internalValue = undefined;
this._topicReplication.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._sourceKafkaClusterArn = value.sourceKafkaClusterArn;
this._targetCompressionType = value.targetCompressionType;
this._targetKafkaClusterArn = value.targetKafkaClusterArn;
this._consumerGroupReplication.internalValue = value.consumerGroupReplication;
this._topicReplication.internalValue = value.topicReplication;
}
}
// source_kafka_cluster_alias - computed: true, optional: false, required: false
get sourceKafkaClusterAlias() {
return this.getStringAttribute('source_kafka_cluster_alias');
}
get sourceKafkaClusterArn() {
return this.getStringAttribute('source_kafka_cluster_arn');
}
set sourceKafkaClusterArn(value) {
this._sourceKafkaClusterArn = value;
}
// Temporarily expose input value. Use with caution.
get sourceKafkaClusterArnInput() {
return this._sourceKafkaClusterArn;
}
get targetCompressionType() {
return this.getStringAttribute('target_compression_type');
}
set targetCompressionType(value) {
this._targetCompressionType = value;
}
// Temporarily expose input value. Use with caution.
get targetCompressionTypeInput() {
return this._