@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,202 lines • 186 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemcacheInstance = exports.MemcacheInstanceTimeoutsOutputReference = exports.memcacheInstanceTimeoutsToHclTerraform = exports.memcacheInstanceTimeoutsToTerraform = exports.MemcacheInstanceNodeConfigOutputReference = exports.memcacheInstanceNodeConfigToHclTerraform = exports.memcacheInstanceNodeConfigToTerraform = exports.MemcacheInstanceMemcacheParametersOutputReference = exports.memcacheInstanceMemcacheParametersToHclTerraform = exports.memcacheInstanceMemcacheParametersToTerraform = exports.MemcacheInstanceMaintenancePolicyOutputReference = exports.memcacheInstanceMaintenancePolicyToHclTerraform = exports.memcacheInstanceMaintenancePolicyToTerraform = exports.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList = exports.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference = exports.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform = exports.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform = exports.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference = exports.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform = exports.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform = exports.MemcacheInstanceMemcacheNodesList = exports.MemcacheInstanceMemcacheNodesOutputReference = exports.memcacheInstanceMemcacheNodesToHclTerraform = exports.memcacheInstanceMemcacheNodesToTerraform = exports.MemcacheInstanceMaintenanceScheduleList = exports.MemcacheInstanceMaintenanceScheduleOutputReference = exports.memcacheInstanceMaintenanceScheduleToHclTerraform = exports.memcacheInstanceMaintenanceScheduleToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function memcacheInstanceMaintenanceScheduleToTerraform(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.memcacheInstanceMaintenanceScheduleToTerraform = memcacheInstanceMaintenanceScheduleToTerraform;
function memcacheInstanceMaintenanceScheduleToHclTerraform(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.memcacheInstanceMaintenanceScheduleToHclTerraform = memcacheInstanceMaintenanceScheduleToHclTerraform;
class MemcacheInstanceMaintenanceScheduleOutputReference 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.MemcacheInstanceMaintenanceScheduleOutputReference = MemcacheInstanceMaintenanceScheduleOutputReference;
_a = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMaintenanceScheduleOutputReference[_a] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMaintenanceScheduleOutputReference", version: "14.12.0" };
class MemcacheInstanceMaintenanceScheduleList 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 MemcacheInstanceMaintenanceScheduleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MemcacheInstanceMaintenanceScheduleList = MemcacheInstanceMaintenanceScheduleList;
_b = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMaintenanceScheduleList[_b] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMaintenanceScheduleList", version: "14.12.0" };
function memcacheInstanceMemcacheNodesToTerraform(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.memcacheInstanceMemcacheNodesToTerraform = memcacheInstanceMemcacheNodesToTerraform;
function memcacheInstanceMemcacheNodesToHclTerraform(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.memcacheInstanceMemcacheNodesToHclTerraform = memcacheInstanceMemcacheNodesToHclTerraform;
class MemcacheInstanceMemcacheNodesOutputReference 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;
}
}
// host - computed: true, optional: false, required: false
get host() {
return this.getStringAttribute('host');
}
// node_id - computed: true, optional: false, required: false
get nodeId() {
return this.getStringAttribute('node_id');
}
// port - computed: true, optional: false, required: false
get port() {
return this.getNumberAttribute('port');
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
// zone - computed: true, optional: false, required: false
get zone() {
return this.getStringAttribute('zone');
}
}
exports.MemcacheInstanceMemcacheNodesOutputReference = MemcacheInstanceMemcacheNodesOutputReference;
_c = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMemcacheNodesOutputReference[_c] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMemcacheNodesOutputReference", version: "14.12.0" };
class MemcacheInstanceMemcacheNodesList 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 MemcacheInstanceMemcacheNodesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MemcacheInstanceMemcacheNodesList = MemcacheInstanceMemcacheNodesList;
_d = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMemcacheNodesList[_d] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMemcacheNodesList", version: "14.12.0" };
function memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform(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.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform = memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform;
function memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform(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.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform = memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform;
class MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference 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.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference = MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference;
_e = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference[_e] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference", version: "14.12.0" };
function memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform(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),
duration: cdktf.stringToTerraform(struct.duration),
start_time: memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToTerraform(struct.startTime),
};
}
exports.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform = memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform;
function memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform(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",
},
duration: {
value: cdktf.stringToHclTerraform(struct.duration),
isBlock: false,
type: "simple",
storageClassType: "string",
},
start_time: {
value: memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeToHclTerraform(struct.startTime),
isBlock: true,
type: "list",
storageClassType: "MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform = memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform;
class MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference 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 MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeOutputReference(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._duration !== undefined) {
hasAnyValues = true;
internalValueResult.duration = this._duration;
}
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._duration = 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._duration = value.duration;
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;
}
get duration() {
return this.getStringAttribute('duration');
}
set duration(value) {
this._duration = value;
}
// Temporarily expose input value. Use with caution.
get durationInput() {
return this._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.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference = MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference;
_f = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference[_f] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference", version: "14.12.0" };
class MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList 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 MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList = MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList;
_g = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList[_g] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList", version: "14.12.0" };
function memcacheInstanceMaintenancePolicyToTerraform(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(memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToTerraform, true)(struct.weeklyMaintenanceWindow),
};
}
exports.memcacheInstanceMaintenancePolicyToTerraform = memcacheInstanceMaintenancePolicyToTerraform;
function memcacheInstanceMaintenancePolicyToHclTerraform(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(memcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowToHclTerraform, true)(struct.weeklyMaintenanceWindow),
isBlock: true,
type: "list",
storageClassType: "MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.memcacheInstanceMaintenancePolicyToHclTerraform = memcacheInstanceMaintenancePolicyToHclTerraform;
class MemcacheInstanceMaintenancePolicyOutputReference 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: false, required: true
this._weeklyMaintenanceWindow = new MemcacheInstanceMaintenancePolicyWeeklyMaintenanceWindowList(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;
}
// Temporarily expose input value. Use with caution.
get weeklyMaintenanceWindowInput() {
return this._weeklyMaintenanceWindow.internalValue;
}
}
exports.MemcacheInstanceMaintenancePolicyOutputReference = MemcacheInstanceMaintenancePolicyOutputReference;
_h = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMaintenancePolicyOutputReference[_h] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMaintenancePolicyOutputReference", version: "14.12.0" };
function memcacheInstanceMemcacheParametersToTerraform(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 {
params: cdktf.hashMapper(cdktf.stringToTerraform)(struct.params),
};
}
exports.memcacheInstanceMemcacheParametersToTerraform = memcacheInstanceMemcacheParametersToTerraform;
function memcacheInstanceMemcacheParametersToHclTerraform(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 = {
params: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.params),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.memcacheInstanceMemcacheParametersToHclTerraform = memcacheInstanceMemcacheParametersToHclTerraform;
class MemcacheInstanceMemcacheParametersOutputReference 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._params !== undefined) {
hasAnyValues = true;
internalValueResult.params = this._params;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._params = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._params = value.params;
}
}
// id - computed: true, optional: false, required: false
get id() {
return this.getStringAttribute('id');
}
get params() {
return this.getStringMapAttribute('params');
}
set params(value) {
this._params = value;
}
resetParams() {
this._params = undefined;
}
// Temporarily expose input value. Use with caution.
get paramsInput() {
return this._params;
}
}
exports.MemcacheInstanceMemcacheParametersOutputReference = MemcacheInstanceMemcacheParametersOutputReference;
_j = JSII_RTTI_SYMBOL_1;
MemcacheInstanceMemcacheParametersOutputReference[_j] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceMemcacheParametersOutputReference", version: "14.12.0" };
function memcacheInstanceNodeConfigToTerraform(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 {
cpu_count: cdktf.numberToTerraform(struct.cpuCount),
memory_size_mb: cdktf.numberToTerraform(struct.memorySizeMb),
};
}
exports.memcacheInstanceNodeConfigToTerraform = memcacheInstanceNodeConfigToTerraform;
function memcacheInstanceNodeConfigToHclTerraform(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 = {
cpu_count: {
value: cdktf.numberToHclTerraform(struct.cpuCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
memory_size_mb: {
value: cdktf.numberToHclTerraform(struct.memorySizeMb),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.memcacheInstanceNodeConfigToHclTerraform = memcacheInstanceNodeConfigToHclTerraform;
class MemcacheInstanceNodeConfigOutputReference 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._cpuCount !== undefined) {
hasAnyValues = true;
internalValueResult.cpuCount = this._cpuCount;
}
if (this._memorySizeMb !== undefined) {
hasAnyValues = true;
internalValueResult.memorySizeMb = this._memorySizeMb;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._cpuCount = undefined;
this._memorySizeMb = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._cpuCount = value.cpuCount;
this._memorySizeMb = value.memorySizeMb;
}
}
get cpuCount() {
return this.getNumberAttribute('cpu_count');
}
set cpuCount(value) {
this._cpuCount = value;
}
// Temporarily expose input value. Use with caution.
get cpuCountInput() {
return this._cpuCount;
}
get memorySizeMb() {
return this.getNumberAttribute('memory_size_mb');
}
set memorySizeMb(value) {
this._memorySizeMb = value;
}
// Temporarily expose input value. Use with caution.
get memorySizeMbInput() {
return this._memorySizeMb;
}
}
exports.MemcacheInstanceNodeConfigOutputReference = MemcacheInstanceNodeConfigOutputReference;
_k = JSII_RTTI_SYMBOL_1;
MemcacheInstanceNodeConfigOutputReference[_k] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceNodeConfigOutputReference", version: "14.12.0" };
function memcacheInstanceTimeoutsToTerraform(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.memcacheInstanceTimeoutsToTerraform = memcacheInstanceTimeoutsToTerraform;
function memcacheInstanceTimeoutsToHclTerraform(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.memcacheInstanceTimeoutsToHclTerraform = memcacheInstanceTimeoutsToHclTerraform;
class MemcacheInstanceTimeoutsOutputReference 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.MemcacheInstanceTimeoutsOutputReference = MemcacheInstanceTimeoutsOutputReference;
_l = JSII_RTTI_SYMBOL_1;
MemcacheInstanceTimeoutsOutputReference[_l] = { fqn: "@cdktf/provider-google.memcacheInstance.MemcacheInstanceTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/memcache_instance google_memcache_instance}
*/
class MemcacheInstance extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a MemcacheInstance 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 MemcacheInstance to import
* @param importFromId The id of the existing MemcacheInstance that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/memcache_instance#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the MemcacheInstance to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_memcache_instance", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/memcache_instance google_memcache_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 MemcacheInstanceConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_memcache_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 MemcacheInstanceMaintenanceScheduleList(this, "maintenance_schedule", false);
// memcache_nodes - computed: true, optional: false, required: false
this._memcacheNodes = new MemcacheInstanceMemcacheNodesList(this, "memcache_nodes", 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 MemcacheInstanceMaintenancePolicyOutputReference(this, "maintenance_policy");
// memcache_parameters - computed: false, optional: true, required: false
this._memcacheParameters = new MemcacheInstanceMemcacheParametersOutputReference(this, "memcache_parameters");
// node_config - computed: false, optional: false, required: true
this._nodeConfig = new MemcacheInstanceNodeConfigOutputReference(this, "node_config");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new MemcacheInstanceTimeoutsOutputReference(this, "timeouts");
this._authorizedNetwork = config.authorizedNetwork;
this._displayName = config.displayName;
this._id = config.id;
this._labels = config.labels;
this._memcacheVersion = config.memcacheVersion;
this._name = config.name;
this._nodeCount = config.nodeCount;
this._project = config.project;
this._region = config.region;
this._reservedIpRangeId = config.reservedIpRangeId;
this._zones = config.zones;
this._maintenancePolicy.internalValue = config.maintenancePolicy;
this._memcacheParameters.internalValue = config.memcacheParameters;
this._nodeConfig.internalValue = config.nodeConfig;
this._timeouts.internalValue = config.timeouts;
}
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;
}
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
// discovery_endpoint - computed: true, optional: false, required: false
get discoveryEndpoint() {
return this.getStringAttribute('discovery_endpoint');
}
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;
}
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 maintenanceSchedule() {
return this._maintenanceSchedule;
}
// memcache_full_version - computed: true, optional: false, required: false
get memcacheFullVersion() {
return this.getStringAttribute('memcache_full_version');
}
get memcacheNodes() {
return this._memcacheNodes;
}
get memcacheVersion() {
return this.getStringAttribute('memcache_version');
}
set memcacheVersion(value) {
this._memcacheVersion = value;
}
resetMemcacheVersion() {
this._memcacheVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get memcacheVersionInput() {
return this._memcacheVersion;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get nodeCount() {
return this.getNumberAttribute('node_count');
}
set nodeCount(value) {
this._nodeCount = value;
}
// Temporarily expose input value. Use with caution.
get nodeCountInput() {
return this._nodeCount;
}
get project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
resetProject() {
this._project = undefined;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
resetRegion() {
this._region = undefined;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
get reservedIpRangeId() {
return this.getListAttribute('reserved_ip_range_id');
}
set reservedIpRangeId(value) {
this._reservedIpRangeId = value;
}
resetReservedIpRangeId() {
this._reservedIpRangeId = undefined;
}
// Temporarily expose input value. Use with caution.
get reservedIpRangeIdInput() {
return this._reservedIpRangeId;
}
get terraformLabels() {
return this._terraformLabels;
}
get zones() {
return cdktf.Fn.tolist(this.getListAttribute('zones'));
}
set zones(value) {
this._zones = value;
}
resetZones() {
this._zones = undefined;
}
// Temporarily expose input value. Use with caution.
get zonesInput() {
return this._zones;
}
get maintenancePolicy() {
return this._maintenancePolicy;
}
putMaintenancePolicy(value) {
this._maintenancePolicy.internalValue = value;
}
resetMaintenancePolicy() {
this._maintenancePolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get maintenancePolicyInput() {
return this._maintenancePolicy.internalValue;
}
get memcacheParameters() {
return this._memcacheParameters;
}
putMemcacheParameters(value) {
this._memcacheParameters.internalValue = value;
}
resetMemcacheParameters() {
this._memcacheParameters.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get memcacheParametersInput() {
return this._memcacheParameters.internalValue;
}
get nodeConfig() {
return this._nodeConfig;
}
putNodeConfig(value) {
this._nodeConfig.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get nodeConfigInput() {
return this._nodeConfig.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
authorized_network: cdktf.stringToTerraform(this._authorizedNetwork),
display_name: cdktf.stringToTerraform(t