UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,168 lines 224 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; Object.defineProperty(exports, "__esModule", { value: true }); exports.RedisInstance = exports.RedisInstanceTimeoutsOutputReference = exports.redisInstanceTimeoutsToHclTerraform = exports.redisInstanceTimeoutsToTerraform = exports.RedisInstancePersistenceConfigOutputReference = exports.redisInstancePersistenceConfigToHclTerraform = exports.redisInstancePersistenceConfigToTerraform = exports.RedisInstanceMaintenancePolicyOutputReference = exports.redisInstanceMaintenancePolicyToHclTerraform = exports.redisInstanceMaintenancePolicyToTerraform = exports.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList = exports.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference = exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform = exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform = exports.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference = exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform = exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform = exports.RedisInstanceServerCaCertsList = exports.RedisInstanceServerCaCertsOutputReference = exports.redisInstanceServerCaCertsToHclTerraform = exports.redisInstanceServerCaCertsToTerraform = exports.RedisInstanceNodesList = exports.RedisInstanceNodesOutputReference = exports.redisInstanceNodesToHclTerraform = exports.redisInstanceNodesToTerraform = exports.RedisInstanceMaintenanceScheduleList = exports.RedisInstanceMaintenanceScheduleOutputReference = exports.redisInstanceMaintenanceScheduleToHclTerraform = exports.redisInstanceMaintenanceScheduleToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function redisInstanceMaintenanceScheduleToTerraform(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.redisInstanceMaintenanceScheduleToTerraform = redisInstanceMaintenanceScheduleToTerraform; function redisInstanceMaintenanceScheduleToHclTerraform(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.redisInstanceMaintenanceScheduleToHclTerraform = redisInstanceMaintenanceScheduleToHclTerraform; class RedisInstanceMaintenanceScheduleOutputReference 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() { 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; } } // end_time - computed: true, optional: false, required: false get endTime() { return this.getStringAttribute('end_time'); } // schedule_deadline_time - computed: true, optional: false, required: false get scheduleDeadlineTime() { return this.getStringAttribute('schedule_deadline_time'); } // start_time - computed: true, optional: false, required: false get startTime() { return this.getStringAttribute('start_time'); } } exports.RedisInstanceMaintenanceScheduleOutputReference = RedisInstanceMaintenanceScheduleOutputReference; _a = JSII_RTTI_SYMBOL_1; RedisInstanceMaintenanceScheduleOutputReference[_a] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceMaintenanceScheduleOutputReference", version: "14.12.0" }; class RedisInstanceMaintenanceScheduleList 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 RedisInstanceMaintenanceScheduleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.RedisInstanceMaintenanceScheduleList = RedisInstanceMaintenanceScheduleList; _b = JSII_RTTI_SYMBOL_1; RedisInstanceMaintenanceScheduleList[_b] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceMaintenanceScheduleList", version: "14.12.0" }; function redisInstanceNodesToTerraform(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.redisInstanceNodesToTerraform = redisInstanceNodesToTerraform; function redisInstanceNodesToHclTerraform(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.redisInstanceNodesToHclTerraform = redisInstanceNodesToHclTerraform; class RedisInstanceNodesOutputReference 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() { 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; } } // id - computed: true, optional: false, required: false get id() { return this.getStringAttribute('id'); } // zone - computed: true, optional: false, required: false get zone() { return this.getStringAttribute('zone'); } } exports.RedisInstanceNodesOutputReference = RedisInstanceNodesOutputReference; _c = JSII_RTTI_SYMBOL_1; RedisInstanceNodesOutputReference[_c] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceNodesOutputReference", version: "14.12.0" }; class RedisInstanceNodesList 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 RedisInstanceNodesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.RedisInstanceNodesList = RedisInstanceNodesList; _d = JSII_RTTI_SYMBOL_1; RedisInstanceNodesList[_d] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceNodesList", version: "14.12.0" }; function redisInstanceServerCaCertsToTerraform(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.redisInstanceServerCaCertsToTerraform = redisInstanceServerCaCertsToTerraform; function redisInstanceServerCaCertsToHclTerraform(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.redisInstanceServerCaCertsToHclTerraform = redisInstanceServerCaCertsToHclTerraform; class RedisInstanceServerCaCertsOutputReference 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() { 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; } } // cert - computed: true, optional: false, required: false get cert() { return this.getStringAttribute('cert'); } // create_time - computed: true, optional: false, required: false get createTime() { return this.getStringAttribute('create_time'); } // expire_time - computed: true, optional: false, required: false get expireTime() { return this.getStringAttribute('expire_time'); } // serial_number - computed: true, optional: false, required: false get serialNumber() { return this.getStringAttribute('serial_number'); } // sha1_fingerprint - computed: true, optional: false, required: false get sha1Fingerprint() { return this.getStringAttribute('sha1_fingerprint'); } } exports.RedisInstanceServerCaCertsOutputReference = RedisInstanceServerCaCertsOutputReference; _e = JSII_RTTI_SYMBOL_1; RedisInstanceServerCaCertsOutputReference[_e] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceServerCaCertsOutputReference", version: "14.12.0" }; class RedisInstanceServerCaCertsList 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 RedisInstanceServerCaCertsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.RedisInstanceServerCaCertsList = RedisInstanceServerCaCertsList; _f = JSII_RTTI_SYMBOL_1; RedisInstanceServerCaCertsList[_f] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceServerCaCertsList", version: "14.12.0" }; function redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform(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 { hours: cdktf.numberToTerraform(struct.hours), minutes: cdktf.numberToTerraform(struct.minutes), nanos: cdktf.numberToTerraform(struct.nanos), seconds: cdktf.numberToTerraform(struct.seconds), }; } exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform = redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform; function redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform(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 = { hours: { value: cdktf.numberToHclTerraform(struct.hours), isBlock: false, type: "simple", storageClassType: "number", }, minutes: { value: cdktf.numberToHclTerraform(struct.minutes), isBlock: false, type: "simple", storageClassType: "number", }, nanos: { value: cdktf.numberToHclTerraform(struct.nanos), isBlock: false, type: "simple", storageClassType: "number", }, seconds: { value: cdktf.numberToHclTerraform(struct.seconds), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform = redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform; class RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference 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._hours !== undefined) { hasAnyValues = true; internalValueResult.hours = this._hours; } if (this._minutes !== undefined) { hasAnyValues = true; internalValueResult.minutes = this._minutes; } if (this._nanos !== undefined) { hasAnyValues = true; internalValueResult.nanos = this._nanos; } if (this._seconds !== undefined) { hasAnyValues = true; internalValueResult.seconds = this._seconds; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._hours = undefined; this._minutes = undefined; this._nanos = undefined; this._seconds = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._hours = value.hours; this._minutes = value.minutes; this._nanos = value.nanos; this._seconds = value.seconds; } } get hours() { return this.getNumberAttribute('hours'); } set hours(value) { this._hours = value; } resetHours() { this._hours = undefined; } // Temporarily expose input value. Use with caution. get hoursInput() { return this._hours; } get minutes() { return this.getNumberAttribute('minutes'); } set minutes(value) { this._minutes = value; } resetMinutes() { this._minutes = undefined; } // Temporarily expose input value. Use with caution. get minutesInput() { return this._minutes; } get nanos() { return this.getNumberAttribute('nanos'); } set nanos(value) { this._nanos = value; } resetNanos() { this._nanos = undefined; } // Temporarily expose input value. Use with caution. get nanosInput() { return this._nanos; } get seconds() { return this.getNumberAttribute('seconds'); } set seconds(value) { this._seconds = value; } resetSeconds() { this._seconds = undefined; } // Temporarily expose input value. Use with caution. get secondsInput() { return this._seconds; } } exports.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference = RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference; _g = JSII_RTTI_SYMBOL_1; RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference[_g] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference", version: "14.12.0" }; function redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform(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 { day: cdktf.stringToTerraform(struct.day), start_time: redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform(struct.startTime), }; } exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform = redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform; function redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform(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 = { day: { value: cdktf.stringToHclTerraform(struct.day), isBlock: false, type: "simple", storageClassType: "string", }, start_time: { value: redisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform(struct.startTime), isBlock: true, type: "list", storageClassType: "RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform = redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform; class RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference 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; // start_time - computed: false, optional: false, required: true this._startTime = new RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference(this, "start_time"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._day !== undefined) { hasAnyValues = true; internalValueResult.day = this._day; } if (this._startTime?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.startTime = this._startTime?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._day = undefined; this._startTime.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._day = value.day; this._startTime.internalValue = value.startTime; } } get day() { return this.getStringAttribute('day'); } set day(value) { this._day = value; } // Temporarily expose input value. Use with caution. get dayInput() { return this._day; } // duration - computed: true, optional: false, required: false get duration() { return this.getStringAttribute('duration'); } get startTime() { return this._startTime; } putStartTime(value) { this._startTime.internalValue = value; } // Temporarily expose input value. Use with caution. get startTimeInput() { return this._startTime.internalValue; } } exports.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference = RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference; _h = JSII_RTTI_SYMBOL_1; RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference[_h] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference", version: "14.12.0" }; class RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList 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 RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList = RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList; _j = JSII_RTTI_SYMBOL_1; RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList[_j] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList", version: "14.12.0" }; function redisInstanceMaintenancePolicyToTerraform(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 { description: cdktf.stringToTerraform(struct.description), weekly_maintenance_window: cdktf.listMapper(redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform, true)(struct.weeklyMaintenanceWindow), }; } exports.redisInstanceMaintenancePolicyToTerraform = redisInstanceMaintenancePolicyToTerraform; function redisInstanceMaintenancePolicyToHclTerraform(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 = { description: { value: cdktf.stringToHclTerraform(struct.description), isBlock: false, type: "simple", storageClassType: "string", }, weekly_maintenance_window: { value: cdktf.listMapperHcl(redisInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform, true)(struct.weeklyMaintenanceWindow), isBlock: true, type: "list", storageClassType: "RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisInstanceMaintenancePolicyToHclTerraform = redisInstanceMaintenancePolicyToHclTerraform; class RedisInstanceMaintenancePolicyOutputReference 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; // weekly_maintenance_window - computed: false, optional: true, required: false this._weeklyMaintenanceWindow = new RedisInstanceMaintenancePolicyWeeklyMaintenanceWindowList(this, "weekly_maintenance_window", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._description !== undefined) { hasAnyValues = true; internalValueResult.description = this._description; } if (this._weeklyMaintenanceWindow?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.weeklyMaintenanceWindow = this._weeklyMaintenanceWindow?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._description = undefined; this._weeklyMaintenanceWindow.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._description = value.description; this._weeklyMaintenanceWindow.internalValue = value.weeklyMaintenanceWindow; } } // create_time - computed: true, optional: false, required: false get createTime() { return this.getStringAttribute('create_time'); } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } // update_time - computed: true, optional: false, required: false get updateTime() { return this.getStringAttribute('update_time'); } get weeklyMaintenanceWindow() { return this._weeklyMaintenanceWindow; } putWeeklyMaintenanceWindow(value) { this._weeklyMaintenanceWindow.internalValue = value; } resetWeeklyMaintenanceWindow() { this._weeklyMaintenanceWindow.internalValue = undefined; } // Temporarily expose input value. Use with caution. get weeklyMaintenanceWindowInput() { return this._weeklyMaintenanceWindow.internalValue; } } exports.RedisInstanceMaintenancePolicyOutputReference = RedisInstanceMaintenancePolicyOutputReference; _k = JSII_RTTI_SYMBOL_1; RedisInstanceMaintenancePolicyOutputReference[_k] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceMaintenancePolicyOutputReference", version: "14.12.0" }; function redisInstancePersistenceConfigToTerraform(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 { persistence_mode: cdktf.stringToTerraform(struct.persistenceMode), rdb_snapshot_period: cdktf.stringToTerraform(struct.rdbSnapshotPeriod), rdb_snapshot_start_time: cdktf.stringToTerraform(struct.rdbSnapshotStartTime), }; } exports.redisInstancePersistenceConfigToTerraform = redisInstancePersistenceConfigToTerraform; function redisInstancePersistenceConfigToHclTerraform(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 = { persistence_mode: { value: cdktf.stringToHclTerraform(struct.persistenceMode), isBlock: false, type: "simple", storageClassType: "string", }, rdb_snapshot_period: { value: cdktf.stringToHclTerraform(struct.rdbSnapshotPeriod), isBlock: false, type: "simple", storageClassType: "string", }, rdb_snapshot_start_time: { value: cdktf.stringToHclTerraform(struct.rdbSnapshotStartTime), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisInstancePersistenceConfigToHclTerraform = redisInstancePersistenceConfigToHclTerraform; class RedisInstancePersistenceConfigOutputReference 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._persistenceMode !== undefined) { hasAnyValues = true; internalValueResult.persistenceMode = this._persistenceMode; } if (this._rdbSnapshotPeriod !== undefined) { hasAnyValues = true; internalValueResult.rdbSnapshotPeriod = this._rdbSnapshotPeriod; } if (this._rdbSnapshotStartTime !== undefined) { hasAnyValues = true; internalValueResult.rdbSnapshotStartTime = this._rdbSnapshotStartTime; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._persistenceMode = undefined; this._rdbSnapshotPeriod = undefined; this._rdbSnapshotStartTime = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._persistenceMode = value.persistenceMode; this._rdbSnapshotPeriod = value.rdbSnapshotPeriod; this._rdbSnapshotStartTime = value.rdbSnapshotStartTime; } } get persistenceMode() { return this.getStringAttribute('persistence_mode'); } set persistenceMode(value) { this._persistenceMode = value; } resetPersistenceMode() { this._persistenceMode = undefined; } // Temporarily expose input value. Use with caution. get persistenceModeInput() { return this._persistenceMode; } // rdb_next_snapshot_time - computed: true, optional: false, required: false get rdbNextSnapshotTime() { return this.getStringAttribute('rdb_next_snapshot_time'); } get rdbSnapshotPeriod() { return this.getStringAttribute('rdb_snapshot_period'); } set rdbSnapshotPeriod(value) { this._rdbSnapshotPeriod = value; } resetRdbSnapshotPeriod() { this._rdbSnapshotPeriod = undefined; } // Temporarily expose input value. Use with caution. get rdbSnapshotPeriodInput() { return this._rdbSnapshotPeriod; } get rdbSnapshotStartTime() { return this.getStringAttribute('rdb_snapshot_start_time'); } set rdbSnapshotStartTime(value) { this._rdbSnapshotStartTime = value; } resetRdbSnapshotStartTime() { this._rdbSnapshotStartTime = undefined; } // Temporarily expose input value. Use with caution. get rdbSnapshotStartTimeInput() { return this._rdbSnapshotStartTime; } } exports.RedisInstancePersistenceConfigOutputReference = RedisInstancePersistenceConfigOutputReference; _l = JSII_RTTI_SYMBOL_1; RedisInstancePersistenceConfigOutputReference[_l] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstancePersistenceConfigOutputReference", version: "14.12.0" }; function redisInstanceTimeoutsToTerraform(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.redisInstanceTimeoutsToTerraform = redisInstanceTimeoutsToTerraform; function redisInstanceTimeoutsToHclTerraform(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.redisInstanceTimeoutsToHclTerraform = redisInstanceTimeoutsToHclTerraform; class RedisInstanceTimeoutsOutputReference 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.RedisInstanceTimeoutsOutputReference = RedisInstanceTimeoutsOutputReference; _m = JSII_RTTI_SYMBOL_1; RedisInstanceTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-google.redisInstance.RedisInstanceTimeoutsOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/redis_instance google_redis_instance} */ class RedisInstance extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a RedisInstance 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 RedisInstance to import * @param importFromId The id of the existing RedisInstance that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/redis_instance#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the RedisInstance to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_redis_instance", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/redis_instance google_redis_instance} 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 RedisInstanceConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_redis_instance', 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 }); // effective_labels - computed: true, optional: false, required: false this._effectiveLabels = new cdktf.StringMap(this, "effective_labels"); // maintenance_schedule - computed: true, optional: false, required: false this._maintenanceSchedule = new RedisInstanceMaintenanceScheduleList(this, "maintenance_schedule", false); // nodes - computed: true, optional: false, required: false this._nodes = new RedisInstanceNodesList(this, "nodes", false); // server_ca_certs - computed: true, optional: false, required: false this._serverCaCerts = new RedisInstanceServerCaCertsList(this, "server_ca_certs", false); // terraform_labels - computed: true, optional: false, required: false this._terraformLabels = new cdktf.StringMap(this, "terraform_labels"); // maintenance_policy - computed: false, optional: true, required: false this._maintenancePolicy = new RedisInstanceMaintenancePolicyOutputReference(this, "maintenance_policy"); // persistence_config - computed: false, optional: true, required: false this._persistenceConfig = new RedisInstancePersistenceConfigOutputReference(this, "persistence_config"); // timeouts - computed: false, optional: true, required: false this._timeouts = new RedisInstanceTimeoutsOutputReference(this, "timeouts"); this._alternativeLocationId = config.alternativeLocationId; this._authEnabled = config.authEnabled; this._authorizedNetwork = config.authorizedNetwork; this._connectMode = config.connectMode; this._customerManagedKey = config.customerManagedKey; this._displayName = config.displayName; this._id = config.id; this._labels = config.labels; this._locationId = config.locationId; this._maintenanceVersion = config.maintenanceVersion; this._memorySizeGb = config.memorySizeGb; this._name = config.name; this._project = config.project; this._readReplicasMode = config.readReplicasMode; this._redisConfigs = config.redisConfigs; this._redisVersion = config.redisVersion; this._region = config.region; this._replicaCount = config.replicaCount; this._reservedIpRange = config.reservedIpRange; this._secondaryIpRange = config.secondaryIpRange; this._tier = config.tier; this._transitEncryptionMode = config.transitEncryptionMode; this._maintenancePolicy.internalValue = config.maintenancePolicy; this._persistenceConfig.internalValue = config.persistenceConfig; this._timeouts.internalValue = config.timeouts; } get alternativeLocationId() { return this.getStringAttribute('alternative_location_id'); } set alternativeLocationId(value) { this._alternativeLocationId = value; } resetAlternativeLocationId() { this._alternativeLocationId = undefined; } // Temporarily expose input value. Use with caution. get alternativeLocationIdInput() { return this._alternativeLocationId; } get authEnabled() { return this.getBooleanAttribute('auth_enabled'); } set authEnabled(value) { this._authEnabled = value; } resetAuthEnabled() { this._authEnabled = undefined; } // Temporarily expose input value. Use with caution. get authEnabledInput() { return this._authEnabled; } // auth_string - computed: true, optional: false, required: false get authString() { return this.getStringAttribute('auth_string'); } get authorizedNetwork() { return this.getStringAttribute('authorized_network'); } set authorizedNetwork(value) { this._authorizedNetwork = value; } resetAuthorizedNetwork() { this._authorizedNetwork = undefined; } // Temporarily expose input value. Use with caution. get authorizedNetworkInput() { return this._authorizedNetwork; } get connectMode() { return this.getStringAttribute('connect_mode'); } set connectMode(value) { this._connectMode = value; } resetConnectMode() { this._connectMode = undefined; } // Temporarily expose input value. Use with caution. get connectModeInput() { return this._connectMode; } // create_time - computed: true, optional: false, required: false get createTime() { return this.getStringAttribute('create_time'); } // current_location_id - computed: true, optional: false, required: false get currentLocationId() { return this.getStringAttribute('current_location_id'); } get customerManagedKey() { return this.getStringAttribute('customer_managed_key'); } set customerManagedKey(value) { this._customerManagedKey = value; } resetCustomerManagedKey() { this._customerManagedKey = undefined; } // Temporarily expose input value. Use with caution. get customerManagedKeyInput() { return this._customerManagedKey; } get displayName() { return this.getStringAttribute('display_name'); } set displayName(value) { this._displayName = value; } resetDisplayName() { this._displayName = undefined; } // Temporarily expose input value. Use with caution. get displayNameInput() { return this._displayName; } get effectiveLabels() { return this._effectiveLabels; } // host - computed: true, optional: false, required: false get host() { return this.getStringAttribute('host'); } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get labels() { return this.getStringMapAttribute('labels'); } set labels(value) { this._labels = value; } resetLabels() { this._labels = undefined; } // Temporarily expose input value. Use with caution. get labelsInput() { return this._labels; } get locationId() { return this.getStringAttribute('location_id'); } set locationId(value) { this._locationId = value; } resetLocationId() { this._locationId = undefined; } // Temporarily expose input value. Use with caution. get locationIdInput() { return this._locationId; } get maintenanceSchedule() { return this._maintenanceSchedule; } get maintenanceVersion() { return this.getStringAttribute('maintenance_version'); } set maintenanceVersion(value) { this._maintenanceVersion = value; } resetMaintenanceVersion() { this._maintenanceVersion = undefined; } // Temporarily expose input value. Use with caution. get maintenanceVersionInput() { return this._maintenanceVersion; } get memorySizeGb() { return this.getNumberAttribute('memory_si