UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,104 lines 401 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v; Object.defineProperty(exports, "__esModule", { value: true }); exports.ElasticsearchDomain = exports.ElasticsearchDomainVpcOptionsOutputReference = exports.ElasticsearchDomainTimeoutsOutputReference = exports.ElasticsearchDomainSnapshotOptionsOutputReference = exports.ElasticsearchDomainNodeToNodeEncryptionOutputReference = exports.ElasticsearchDomainLogPublishingOptionsList = exports.ElasticsearchDomainLogPublishingOptionsOutputReference = exports.ElasticsearchDomainEncryptAtRestOutputReference = exports.ElasticsearchDomainEbsOptionsOutputReference = exports.ElasticsearchDomainDomainEndpointOptionsOutputReference = exports.ElasticsearchDomainCognitoOptionsOutputReference = exports.ElasticsearchDomainClusterConfigOutputReference = exports.ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference = exports.ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference = exports.ElasticsearchDomainAutoTuneOptionsOutputReference = exports.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList = exports.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference = exports.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference = exports.ElasticsearchDomainAdvancedSecurityOptionsOutputReference = exports.ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference = void 0; exports.elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform = elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform; exports.elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform = elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform; exports.elasticsearchDomainAdvancedSecurityOptionsToTerraform = elasticsearchDomainAdvancedSecurityOptionsToTerraform; exports.elasticsearchDomainAdvancedSecurityOptionsToHclTerraform = elasticsearchDomainAdvancedSecurityOptionsToHclTerraform; exports.elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform = elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform; exports.elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform = elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform; exports.elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform = elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform; exports.elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform = elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform; exports.elasticsearchDomainAutoTuneOptionsToTerraform = elasticsearchDomainAutoTuneOptionsToTerraform; exports.elasticsearchDomainAutoTuneOptionsToHclTerraform = elasticsearchDomainAutoTuneOptionsToHclTerraform; exports.elasticsearchDomainClusterConfigColdStorageOptionsToTerraform = elasticsearchDomainClusterConfigColdStorageOptionsToTerraform; exports.elasticsearchDomainClusterConfigColdStorageOptionsToHclTerraform = elasticsearchDomainClusterConfigColdStorageOptionsToHclTerraform; exports.elasticsearchDomainClusterConfigZoneAwarenessConfigToTerraform = elasticsearchDomainClusterConfigZoneAwarenessConfigToTerraform; exports.elasticsearchDomainClusterConfigZoneAwarenessConfigToHclTerraform = elasticsearchDomainClusterConfigZoneAwarenessConfigToHclTerraform; exports.elasticsearchDomainClusterConfigToTerraform = elasticsearchDomainClusterConfigToTerraform; exports.elasticsearchDomainClusterConfigToHclTerraform = elasticsearchDomainClusterConfigToHclTerraform; exports.elasticsearchDomainCognitoOptionsToTerraform = elasticsearchDomainCognitoOptionsToTerraform; exports.elasticsearchDomainCognitoOptionsToHclTerraform = elasticsearchDomainCognitoOptionsToHclTerraform; exports.elasticsearchDomainDomainEndpointOptionsToTerraform = elasticsearchDomainDomainEndpointOptionsToTerraform; exports.elasticsearchDomainDomainEndpointOptionsToHclTerraform = elasticsearchDomainDomainEndpointOptionsToHclTerraform; exports.elasticsearchDomainEbsOptionsToTerraform = elasticsearchDomainEbsOptionsToTerraform; exports.elasticsearchDomainEbsOptionsToHclTerraform = elasticsearchDomainEbsOptionsToHclTerraform; exports.elasticsearchDomainEncryptAtRestToTerraform = elasticsearchDomainEncryptAtRestToTerraform; exports.elasticsearchDomainEncryptAtRestToHclTerraform = elasticsearchDomainEncryptAtRestToHclTerraform; exports.elasticsearchDomainLogPublishingOptionsToTerraform = elasticsearchDomainLogPublishingOptionsToTerraform; exports.elasticsearchDomainLogPublishingOptionsToHclTerraform = elasticsearchDomainLogPublishingOptionsToHclTerraform; exports.elasticsearchDomainNodeToNodeEncryptionToTerraform = elasticsearchDomainNodeToNodeEncryptionToTerraform; exports.elasticsearchDomainNodeToNodeEncryptionToHclTerraform = elasticsearchDomainNodeToNodeEncryptionToHclTerraform; exports.elasticsearchDomainSnapshotOptionsToTerraform = elasticsearchDomainSnapshotOptionsToTerraform; exports.elasticsearchDomainSnapshotOptionsToHclTerraform = elasticsearchDomainSnapshotOptionsToHclTerraform; exports.elasticsearchDomainTimeoutsToTerraform = elasticsearchDomainTimeoutsToTerraform; exports.elasticsearchDomainTimeoutsToHclTerraform = elasticsearchDomainTimeoutsToHclTerraform; exports.elasticsearchDomainVpcOptionsToTerraform = elasticsearchDomainVpcOptionsToTerraform; exports.elasticsearchDomainVpcOptionsToHclTerraform = elasticsearchDomainVpcOptionsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform(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 { master_user_arn: cdktf.stringToTerraform(struct.masterUserArn), master_user_name: cdktf.stringToTerraform(struct.masterUserName), master_user_password: cdktf.stringToTerraform(struct.masterUserPassword), }; } function elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform(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 = { master_user_arn: { value: cdktf.stringToHclTerraform(struct.masterUserArn), isBlock: false, type: "simple", storageClassType: "string", }, master_user_name: { value: cdktf.stringToHclTerraform(struct.masterUserName), isBlock: false, type: "simple", storageClassType: "string", }, master_user_password: { value: cdktf.stringToHclTerraform(struct.masterUserPassword), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference 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._masterUserArn !== undefined) { hasAnyValues = true; internalValueResult.masterUserArn = this._masterUserArn; } if (this._masterUserName !== undefined) { hasAnyValues = true; internalValueResult.masterUserName = this._masterUserName; } if (this._masterUserPassword !== undefined) { hasAnyValues = true; internalValueResult.masterUserPassword = this._masterUserPassword; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._masterUserArn = undefined; this._masterUserName = undefined; this._masterUserPassword = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._masterUserArn = value.masterUserArn; this._masterUserName = value.masterUserName; this._masterUserPassword = value.masterUserPassword; } } get masterUserArn() { return this.getStringAttribute('master_user_arn'); } set masterUserArn(value) { this._masterUserArn = value; } resetMasterUserArn() { this._masterUserArn = undefined; } // Temporarily expose input value. Use with caution. get masterUserArnInput() { return this._masterUserArn; } get masterUserName() { return this.getStringAttribute('master_user_name'); } set masterUserName(value) { this._masterUserName = value; } resetMasterUserName() { this._masterUserName = undefined; } // Temporarily expose input value. Use with caution. get masterUserNameInput() { return this._masterUserName; } get masterUserPassword() { return this.getStringAttribute('master_user_password'); } set masterUserPassword(value) { this._masterUserPassword = value; } resetMasterUserPassword() { this._masterUserPassword = undefined; } // Temporarily expose input value. Use with caution. get masterUserPasswordInput() { return this._masterUserPassword; } } exports.ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference = ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference; _a = JSII_RTTI_SYMBOL_1; ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference[_a] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference", version: "21.22.1" }; function elasticsearchDomainAdvancedSecurityOptionsToTerraform(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 { enabled: cdktf.booleanToTerraform(struct.enabled), internal_user_database_enabled: cdktf.booleanToTerraform(struct.internalUserDatabaseEnabled), master_user_options: elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToTerraform(struct.masterUserOptions), }; } function elasticsearchDomainAdvancedSecurityOptionsToHclTerraform(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 = { enabled: { value: cdktf.booleanToHclTerraform(struct.enabled), isBlock: false, type: "simple", storageClassType: "boolean", }, internal_user_database_enabled: { value: cdktf.booleanToHclTerraform(struct.internalUserDatabaseEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, master_user_options: { value: elasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsToHclTerraform(struct.masterUserOptions), isBlock: true, type: "list", storageClassType: "ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainAdvancedSecurityOptionsOutputReference 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; // master_user_options - computed: false, optional: true, required: false this._masterUserOptions = new ElasticsearchDomainAdvancedSecurityOptionsMasterUserOptionsOutputReference(this, "master_user_options"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._internalUserDatabaseEnabled !== undefined) { hasAnyValues = true; internalValueResult.internalUserDatabaseEnabled = this._internalUserDatabaseEnabled; } if (this._masterUserOptions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.masterUserOptions = this._masterUserOptions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; this._internalUserDatabaseEnabled = undefined; this._masterUserOptions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; this._internalUserDatabaseEnabled = value.internalUserDatabaseEnabled; this._masterUserOptions.internalValue = value.masterUserOptions; } } get enabled() { return this.getBooleanAttribute('enabled'); } set enabled(value) { this._enabled = value; } // Temporarily expose input value. Use with caution. get enabledInput() { return this._enabled; } get internalUserDatabaseEnabled() { return this.getBooleanAttribute('internal_user_database_enabled'); } set internalUserDatabaseEnabled(value) { this._internalUserDatabaseEnabled = value; } resetInternalUserDatabaseEnabled() { this._internalUserDatabaseEnabled = undefined; } // Temporarily expose input value. Use with caution. get internalUserDatabaseEnabledInput() { return this._internalUserDatabaseEnabled; } get masterUserOptions() { return this._masterUserOptions; } putMasterUserOptions(value) { this._masterUserOptions.internalValue = value; } resetMasterUserOptions() { this._masterUserOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get masterUserOptionsInput() { return this._masterUserOptions.internalValue; } } exports.ElasticsearchDomainAdvancedSecurityOptionsOutputReference = ElasticsearchDomainAdvancedSecurityOptionsOutputReference; _b = JSII_RTTI_SYMBOL_1; ElasticsearchDomainAdvancedSecurityOptionsOutputReference[_b] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainAdvancedSecurityOptionsOutputReference", version: "21.22.1" }; function elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform(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 { unit: cdktf.stringToTerraform(struct.unit), value: cdktf.numberToTerraform(struct.value), }; } function elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform(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 = { unit: { value: cdktf.stringToHclTerraform(struct.unit), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.numberToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference 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._unit !== undefined) { hasAnyValues = true; internalValueResult.unit = this._unit; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._unit = undefined; this._value = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._unit = value.unit; this._value = value.value; } } get unit() { return this.getStringAttribute('unit'); } set unit(value) { this._unit = value; } // Temporarily expose input value. Use with caution. get unitInput() { return this._unit; } get value() { return this.getNumberAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference = ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference; _c = JSII_RTTI_SYMBOL_1; ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference", version: "21.22.1" }; function elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform(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 { cron_expression_for_recurrence: cdktf.stringToTerraform(struct.cronExpressionForRecurrence), start_at: cdktf.stringToTerraform(struct.startAt), duration: elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToTerraform(struct.duration), }; } function elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform(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 = { cron_expression_for_recurrence: { value: cdktf.stringToHclTerraform(struct.cronExpressionForRecurrence), isBlock: false, type: "simple", storageClassType: "string", }, start_at: { value: cdktf.stringToHclTerraform(struct.startAt), isBlock: false, type: "simple", storageClassType: "string", }, duration: { value: elasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationToHclTerraform(struct.duration), isBlock: true, type: "list", storageClassType: "ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference 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; // duration - computed: false, optional: false, required: true this._duration = new ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleDurationOutputReference(this, "duration"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._cronExpressionForRecurrence !== undefined) { hasAnyValues = true; internalValueResult.cronExpressionForRecurrence = this._cronExpressionForRecurrence; } if (this._startAt !== undefined) { hasAnyValues = true; internalValueResult.startAt = this._startAt; } if (this._duration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.duration = this._duration?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._cronExpressionForRecurrence = undefined; this._startAt = undefined; this._duration.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._cronExpressionForRecurrence = value.cronExpressionForRecurrence; this._startAt = value.startAt; this._duration.internalValue = value.duration; } } get cronExpressionForRecurrence() { return this.getStringAttribute('cron_expression_for_recurrence'); } set cronExpressionForRecurrence(value) { this._cronExpressionForRecurrence = value; } // Temporarily expose input value. Use with caution. get cronExpressionForRecurrenceInput() { return this._cronExpressionForRecurrence; } get startAt() { return this.getStringAttribute('start_at'); } set startAt(value) { this._startAt = value; } // Temporarily expose input value. Use with caution. get startAtInput() { return this._startAt; } get duration() { return this._duration; } putDuration(value) { this._duration.internalValue = value; } // Temporarily expose input value. Use with caution. get durationInput() { return this._duration.internalValue; } } exports.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference = ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference; _d = JSII_RTTI_SYMBOL_1; ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference[_d] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference", version: "21.22.1" }; class ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList 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 ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList = ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList; _e = JSII_RTTI_SYMBOL_1; ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList[_e] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList", version: "21.22.1" }; function elasticsearchDomainAutoTuneOptionsToTerraform(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 { desired_state: cdktf.stringToTerraform(struct.desiredState), rollback_on_disable: cdktf.stringToTerraform(struct.rollbackOnDisable), maintenance_schedule: cdktf.listMapper(elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToTerraform, true)(struct.maintenanceSchedule), }; } function elasticsearchDomainAutoTuneOptionsToHclTerraform(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 = { desired_state: { value: cdktf.stringToHclTerraform(struct.desiredState), isBlock: false, type: "simple", storageClassType: "string", }, rollback_on_disable: { value: cdktf.stringToHclTerraform(struct.rollbackOnDisable), isBlock: false, type: "simple", storageClassType: "string", }, maintenance_schedule: { value: cdktf.listMapperHcl(elasticsearchDomainAutoTuneOptionsMaintenanceScheduleToHclTerraform, true)(struct.maintenanceSchedule), isBlock: true, type: "set", storageClassType: "ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainAutoTuneOptionsOutputReference 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; // maintenance_schedule - computed: false, optional: true, required: false this._maintenanceSchedule = new ElasticsearchDomainAutoTuneOptionsMaintenanceScheduleList(this, "maintenance_schedule", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._desiredState !== undefined) { hasAnyValues = true; internalValueResult.desiredState = this._desiredState; } if (this._rollbackOnDisable !== undefined) { hasAnyValues = true; internalValueResult.rollbackOnDisable = this._rollbackOnDisable; } if (this._maintenanceSchedule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.maintenanceSchedule = this._maintenanceSchedule?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._desiredState = undefined; this._rollbackOnDisable = undefined; this._maintenanceSchedule.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._desiredState = value.desiredState; this._rollbackOnDisable = value.rollbackOnDisable; this._maintenanceSchedule.internalValue = value.maintenanceSchedule; } } get desiredState() { return this.getStringAttribute('desired_state'); } set desiredState(value) { this._desiredState = value; } // Temporarily expose input value. Use with caution. get desiredStateInput() { return this._desiredState; } get rollbackOnDisable() { return this.getStringAttribute('rollback_on_disable'); } set rollbackOnDisable(value) { this._rollbackOnDisable = value; } resetRollbackOnDisable() { this._rollbackOnDisable = undefined; } // Temporarily expose input value. Use with caution. get rollbackOnDisableInput() { return this._rollbackOnDisable; } get maintenanceSchedule() { return this._maintenanceSchedule; } putMaintenanceSchedule(value) { this._maintenanceSchedule.internalValue = value; } resetMaintenanceSchedule() { this._maintenanceSchedule.internalValue = undefined; } // Temporarily expose input value. Use with caution. get maintenanceScheduleInput() { return this._maintenanceSchedule.internalValue; } } exports.ElasticsearchDomainAutoTuneOptionsOutputReference = ElasticsearchDomainAutoTuneOptionsOutputReference; _f = JSII_RTTI_SYMBOL_1; ElasticsearchDomainAutoTuneOptionsOutputReference[_f] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainAutoTuneOptionsOutputReference", version: "21.22.1" }; function elasticsearchDomainClusterConfigColdStorageOptionsToTerraform(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 { enabled: cdktf.booleanToTerraform(struct.enabled), }; } function elasticsearchDomainClusterConfigColdStorageOptionsToHclTerraform(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 = { enabled: { value: cdktf.booleanToHclTerraform(struct.enabled), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference 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._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; } } get enabled() { return this.getBooleanAttribute('enabled'); } set enabled(value) { this._enabled = value; } resetEnabled() { this._enabled = undefined; } // Temporarily expose input value. Use with caution. get enabledInput() { return this._enabled; } } exports.ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference = ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference; _g = JSII_RTTI_SYMBOL_1; ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference[_g] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference", version: "21.22.1" }; function elasticsearchDomainClusterConfigZoneAwarenessConfigToTerraform(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 { availability_zone_count: cdktf.numberToTerraform(struct.availabilityZoneCount), }; } function elasticsearchDomainClusterConfigZoneAwarenessConfigToHclTerraform(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 = { availability_zone_count: { value: cdktf.numberToHclTerraform(struct.availabilityZoneCount), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference 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._availabilityZoneCount !== undefined) { hasAnyValues = true; internalValueResult.availabilityZoneCount = this._availabilityZoneCount; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._availabilityZoneCount = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._availabilityZoneCount = value.availabilityZoneCount; } } get availabilityZoneCount() { return this.getNumberAttribute('availability_zone_count'); } set availabilityZoneCount(value) { this._availabilityZoneCount = value; } resetAvailabilityZoneCount() { this._availabilityZoneCount = undefined; } // Temporarily expose input value. Use with caution. get availabilityZoneCountInput() { return this._availabilityZoneCount; } } exports.ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference = ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference; _h = JSII_RTTI_SYMBOL_1; ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference[_h] = { fqn: "@cdktf/provider-aws.elasticsearchDomain.ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference", version: "21.22.1" }; function elasticsearchDomainClusterConfigToTerraform(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 { dedicated_master_count: cdktf.numberToTerraform(struct.dedicatedMasterCount), dedicated_master_enabled: cdktf.booleanToTerraform(struct.dedicatedMasterEnabled), dedicated_master_type: cdktf.stringToTerraform(struct.dedicatedMasterType), instance_count: cdktf.numberToTerraform(struct.instanceCount), instance_type: cdktf.stringToTerraform(struct.instanceType), warm_count: cdktf.numberToTerraform(struct.warmCount), warm_enabled: cdktf.booleanToTerraform(struct.warmEnabled), warm_type: cdktf.stringToTerraform(struct.warmType), zone_awareness_enabled: cdktf.booleanToTerraform(struct.zoneAwarenessEnabled), cold_storage_options: elasticsearchDomainClusterConfigColdStorageOptionsToTerraform(struct.coldStorageOptions), zone_awareness_config: elasticsearchDomainClusterConfigZoneAwarenessConfigToTerraform(struct.zoneAwarenessConfig), }; } function elasticsearchDomainClusterConfigToHclTerraform(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 = { dedicated_master_count: { value: cdktf.numberToHclTerraform(struct.dedicatedMasterCount), isBlock: false, type: "simple", storageClassType: "number", }, dedicated_master_enabled: { value: cdktf.booleanToHclTerraform(struct.dedicatedMasterEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, dedicated_master_type: { value: cdktf.stringToHclTerraform(struct.dedicatedMasterType), isBlock: false, type: "simple", storageClassType: "string", }, instance_count: { value: cdktf.numberToHclTerraform(struct.instanceCount), isBlock: false, type: "simple", storageClassType: "number", }, instance_type: { value: cdktf.stringToHclTerraform(struct.instanceType), isBlock: false, type: "simple", storageClassType: "string", }, warm_count: { value: cdktf.numberToHclTerraform(struct.warmCount), isBlock: false, type: "simple", storageClassType: "number", }, warm_enabled: { value: cdktf.booleanToHclTerraform(struct.warmEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, warm_type: { value: cdktf.stringToHclTerraform(struct.warmType), isBlock: false, type: "simple", storageClassType: "string", }, zone_awareness_enabled: { value: cdktf.booleanToHclTerraform(struct.zoneAwarenessEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, cold_storage_options: { value: elasticsearchDomainClusterConfigColdStorageOptionsToHclTerraform(struct.coldStorageOptions), isBlock: true, type: "list", storageClassType: "ElasticsearchDomainClusterConfigColdStorageOptionsList", }, zone_awareness_config: { value: elasticsearchDomainClusterConfigZoneAwarenessConfigToHclTerraform(struct.zoneAwarenessConfig), isBlock: true, type: "list", storageClassType: "ElasticsearchDomainClusterConfigZoneAwarenessConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ElasticsearchDomainClusterConfigOutputReference 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; // cold_storage_options - computed: false, optional: true, required: false this._coldStorageOptions = new ElasticsearchDomainClusterConfigColdStorageOptionsOutputReference(this, "cold_storage_options"); // zone_awareness_config - computed: false, optional: true, required: false this._zoneAwarenessConfig = new ElasticsearchDomainClusterConfigZoneAwarenessConfigOutputReference(this, "zone_awareness_config"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._dedicatedMasterCount !== undefined) { hasAnyValues = true; internalValueResult.dedicatedMasterCount = this._dedicatedMasterCount; } if (this._dedicatedMasterEnabled !== undefined) { hasAnyValues = true; internalValueResult.dedicatedMasterEnabled = this._dedicatedMasterEnabled; } if (this._dedicatedMasterType !== undefined) { hasAnyValues = true; internalValueResult.dedicatedMasterType = this._dedicatedMasterType; } if (this._instanceCount !== undefined) { hasAnyValues = true; internalValueResult.instanceCount = this._instanceCount; } if (this._instanceType !== undefined) { hasAnyValues = true; internalValueResult.instanceType = this._instanceType; } if (this._warmCount !== undefined) { hasAnyValues = true; internalValueResult.warmCount = this._warmCount; } if (this._warmEnabled !== undefined) { hasAnyValues = true; internalValueResult.warmEnabled = this._warmEnabled; } if (this._warmType !== undefined) { hasAnyValues = true; internalValueResult.warmType = this._warmType; } if (this._zoneAwarenessEnabled !== undefined) { hasAnyValues = true; internalValueResult.zoneAwarenessEnabled = this._zoneAwarenessEnabled; } if (this._coldStorageOptions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.coldStorageOptions = this._coldStorageOptions?.internalValue; } if (this._zoneAwarenessConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.zoneAwarenessConfig = this._zoneAwarenessConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._dedicatedMasterCount = undefined; this._dedicatedMasterEnabled = undefined; this._dedicatedMasterType = undefined; this._instanceCount = undefined; this._instanceType = undefined; this._warmCount = undefined; this._warmEnabled = undefined; this._warmType = undefined; this._zoneAwarenessEnabled = undefined; this._coldStorageOptions.internalValue = undefined; this._zoneAwarenessConfig.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._dedicatedMasterCount = value.dedicatedMasterCount; this._dedicatedMasterEnabled = value.dedicatedMasterEnabled; this._dedicatedMasterType = value.dedicatedMasterType; this._instanceCount = value.instanceCount; this._instanceType = value.instanceType; this._warmCount = value.warmCount; this._warmEnabled = value.warmEnabled; this._warmType = value.warmType; this._zoneAwarenessEnabled = value.zoneAwarenessEnabled; this._coldStorageOptions.internalValue = value.coldStorageOptions; this._zoneAwarenessConfig.internalValue = value.zoneAwarenessConfig; } } get dedicatedMasterCount() { return this.getNumberAttribute('dedicated_master_count'); } set dedicatedMasterCount(value) { this._dedicatedMasterCount = value; } resetDedicatedMasterCount() { this._dedicatedMasterCount = undefined; } // Temporarily expose input value. Use with caution. get dedicatedMasterCountInput() { return this._dedicatedMasterCount; } get dedicatedMasterEnabled() { return this.getBooleanAttribute('dedicated_master_enabled'); } set dedicatedMasterEnabled(value) { this._dedicatedMasterEnabled = value; } resetDedicatedMasterEnabled() { this._dedicatedMasterEnabled = undefined; } // Temporarily expose input value. Use with caution. get dedicatedMasterEnabledInput() { return this._dedicatedMasterEnabled; } get dedicatedMasterType() { return this.getStringAttribute('dedicated_master_type'); } set dedicatedMasterType(value) { this._dedicatedMasterType = value; } resetDedicatedMasterType() { this._dedicatedMasterType = undefined; } // Temporarily expose input value. Use with caution. get dedicatedMasterTypeInput() { return this._dedicatedMasterType; } get instanceCount() { return this.getNumberAttribute('instance_count'); } set instanceCount(value) { this._instanceCount = value; } resetInstanceCount() { this._instanceCount = undefined; } // Temporarily expose input value. Use with caution. get instanceCountInput() { return this._instanceCount; } get instanceType() { return this.getStringAttribute('instance_type'); } set instanceType(value) { this._instanceType = value; } resetInstanceType() { this._instanceType = undefined; } // Temporarily expose input value. Use with caution. get instanceTypeInput() { return this._instanceType; } get warmCount() { return this.getNumberAttribute('warm_count'); } set warmCount(value) { this._warmCount = value; } resetWarmCount() { this._warmCount = undefined; } // Temporarily expose input value. Use with caution. get warmCountInput() { return this._warmCount; } get warmEnabled() { return this.getBooleanAttribute('warm_enabled'); } set warmEnabled(value) { this._warmEnabled = value; } resetWarmEnabled() { this._warmEnabled = undefined; } // Temporarily expose input value. Use with caution. get warmEnabledInput() { return this._warmEnabled; } get warmType() { return this.getStringAttribute('warm_type'); } set warmType(value) { this._warmType = value; } resetWarmType() { this._warmType = undefined; } // Temporarily expose input value. Use with caution. get warmTypeInput() { return this._warmTyp