@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,186 lines • 201 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GkeonpremVmwareNodePool = exports.GkeonpremVmwareNodePoolTimeoutsOutputReference = exports.gkeonpremVmwareNodePoolTimeoutsToHclTerraform = exports.gkeonpremVmwareNodePoolTimeoutsToTerraform = exports.GkeonpremVmwareNodePoolNodePoolAutoscalingOutputReference = exports.gkeonpremVmwareNodePoolNodePoolAutoscalingToHclTerraform = exports.gkeonpremVmwareNodePoolNodePoolAutoscalingToTerraform = exports.GkeonpremVmwareNodePoolConfigAOutputReference = exports.gkeonpremVmwareNodePoolConfigAToHclTerraform = exports.gkeonpremVmwareNodePoolConfigAToTerraform = exports.GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference = exports.gkeonpremVmwareNodePoolConfigVsphereConfigToHclTerraform = exports.gkeonpremVmwareNodePoolConfigVsphereConfigToTerraform = exports.GkeonpremVmwareNodePoolConfigVsphereConfigTagsList = exports.GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference = exports.gkeonpremVmwareNodePoolConfigVsphereConfigTagsToHclTerraform = exports.gkeonpremVmwareNodePoolConfigVsphereConfigTagsToTerraform = exports.GkeonpremVmwareNodePoolConfigTaintsList = exports.GkeonpremVmwareNodePoolConfigTaintsOutputReference = exports.gkeonpremVmwareNodePoolConfigTaintsToHclTerraform = exports.gkeonpremVmwareNodePoolConfigTaintsToTerraform = exports.GkeonpremVmwareNodePoolStatusList = exports.GkeonpremVmwareNodePoolStatusOutputReference = exports.gkeonpremVmwareNodePoolStatusToHclTerraform = exports.gkeonpremVmwareNodePoolStatusToTerraform = exports.GkeonpremVmwareNodePoolStatusConditionsList = exports.GkeonpremVmwareNodePoolStatusConditionsOutputReference = exports.gkeonpremVmwareNodePoolStatusConditionsToHclTerraform = exports.gkeonpremVmwareNodePoolStatusConditionsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function gkeonpremVmwareNodePoolStatusConditionsToTerraform(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.gkeonpremVmwareNodePoolStatusConditionsToTerraform = gkeonpremVmwareNodePoolStatusConditionsToTerraform;
function gkeonpremVmwareNodePoolStatusConditionsToHclTerraform(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.gkeonpremVmwareNodePoolStatusConditionsToHclTerraform = gkeonpremVmwareNodePoolStatusConditionsToHclTerraform;
class GkeonpremVmwareNodePoolStatusConditionsOutputReference 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;
}
}
// last_transition_time - computed: true, optional: false, required: false
get lastTransitionTime() {
return this.getStringAttribute('last_transition_time');
}
// message - computed: true, optional: false, required: false
get message() {
return this.getStringAttribute('message');
}
// reason - computed: true, optional: false, required: false
get reason() {
return this.getStringAttribute('reason');
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
// type - computed: true, optional: false, required: false
get type() {
return this.getStringAttribute('type');
}
}
exports.GkeonpremVmwareNodePoolStatusConditionsOutputReference = GkeonpremVmwareNodePoolStatusConditionsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolStatusConditionsOutputReference[_a] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolStatusConditionsOutputReference", version: "14.12.0" };
class GkeonpremVmwareNodePoolStatusConditionsList 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 GkeonpremVmwareNodePoolStatusConditionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GkeonpremVmwareNodePoolStatusConditionsList = GkeonpremVmwareNodePoolStatusConditionsList;
_b = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolStatusConditionsList[_b] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolStatusConditionsList", version: "14.12.0" };
function gkeonpremVmwareNodePoolStatusToTerraform(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.gkeonpremVmwareNodePoolStatusToTerraform = gkeonpremVmwareNodePoolStatusToTerraform;
function gkeonpremVmwareNodePoolStatusToHclTerraform(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.gkeonpremVmwareNodePoolStatusToHclTerraform = gkeonpremVmwareNodePoolStatusToHclTerraform;
class GkeonpremVmwareNodePoolStatusOutputReference 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;
// conditions - computed: true, optional: false, required: false
this._conditions = new GkeonpremVmwareNodePoolStatusConditionsList(this, "conditions", 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;
}
}
get conditions() {
return this._conditions;
}
// error_message - computed: true, optional: false, required: false
get errorMessage() {
return this.getStringAttribute('error_message');
}
}
exports.GkeonpremVmwareNodePoolStatusOutputReference = GkeonpremVmwareNodePoolStatusOutputReference;
_c = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolStatusOutputReference[_c] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolStatusOutputReference", version: "14.12.0" };
class GkeonpremVmwareNodePoolStatusList 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 GkeonpremVmwareNodePoolStatusOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GkeonpremVmwareNodePoolStatusList = GkeonpremVmwareNodePoolStatusList;
_d = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolStatusList[_d] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolStatusList", version: "14.12.0" };
function gkeonpremVmwareNodePoolConfigTaintsToTerraform(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 {
effect: cdktf.stringToTerraform(struct.effect),
key: cdktf.stringToTerraform(struct.key),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.gkeonpremVmwareNodePoolConfigTaintsToTerraform = gkeonpremVmwareNodePoolConfigTaintsToTerraform;
function gkeonpremVmwareNodePoolConfigTaintsToHclTerraform(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 = {
effect: {
value: cdktf.stringToHclTerraform(struct.effect),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeonpremVmwareNodePoolConfigTaintsToHclTerraform = gkeonpremVmwareNodePoolConfigTaintsToHclTerraform;
class GkeonpremVmwareNodePoolConfigTaintsOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._effect !== undefined) {
hasAnyValues = true;
internalValueResult.effect = this._effect;
}
if (this._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._effect = undefined;
this._key = undefined;
this._value = 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._effect = value.effect;
this._key = value.key;
this._value = value.value;
}
}
get effect() {
return this.getStringAttribute('effect');
}
set effect(value) {
this._effect = value;
}
resetEffect() {
this._effect = undefined;
}
// Temporarily expose input value. Use with caution.
get effectInput() {
return this._effect;
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.GkeonpremVmwareNodePoolConfigTaintsOutputReference = GkeonpremVmwareNodePoolConfigTaintsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolConfigTaintsOutputReference[_e] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolConfigTaintsOutputReference", version: "14.12.0" };
class GkeonpremVmwareNodePoolConfigTaintsList 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 GkeonpremVmwareNodePoolConfigTaintsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GkeonpremVmwareNodePoolConfigTaintsList = GkeonpremVmwareNodePoolConfigTaintsList;
_f = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolConfigTaintsList[_f] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolConfigTaintsList", version: "14.12.0" };
function gkeonpremVmwareNodePoolConfigVsphereConfigTagsToTerraform(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 {
category: cdktf.stringToTerraform(struct.category),
tag: cdktf.stringToTerraform(struct.tag),
};
}
exports.gkeonpremVmwareNodePoolConfigVsphereConfigTagsToTerraform = gkeonpremVmwareNodePoolConfigVsphereConfigTagsToTerraform;
function gkeonpremVmwareNodePoolConfigVsphereConfigTagsToHclTerraform(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 = {
category: {
value: cdktf.stringToHclTerraform(struct.category),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tag: {
value: cdktf.stringToHclTerraform(struct.tag),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeonpremVmwareNodePoolConfigVsphereConfigTagsToHclTerraform = gkeonpremVmwareNodePoolConfigVsphereConfigTagsToHclTerraform;
class GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._category !== undefined) {
hasAnyValues = true;
internalValueResult.category = this._category;
}
if (this._tag !== undefined) {
hasAnyValues = true;
internalValueResult.tag = this._tag;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._category = undefined;
this._tag = 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._category = value.category;
this._tag = value.tag;
}
}
get category() {
return this.getStringAttribute('category');
}
set category(value) {
this._category = value;
}
resetCategory() {
this._category = undefined;
}
// Temporarily expose input value. Use with caution.
get categoryInput() {
return this._category;
}
get tag() {
return this.getStringAttribute('tag');
}
set tag(value) {
this._tag = value;
}
resetTag() {
this._tag = undefined;
}
// Temporarily expose input value. Use with caution.
get tagInput() {
return this._tag;
}
}
exports.GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference = GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference[_g] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference", version: "14.12.0" };
class GkeonpremVmwareNodePoolConfigVsphereConfigTagsList 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 GkeonpremVmwareNodePoolConfigVsphereConfigTagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GkeonpremVmwareNodePoolConfigVsphereConfigTagsList = GkeonpremVmwareNodePoolConfigVsphereConfigTagsList;
_h = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolConfigVsphereConfigTagsList[_h] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolConfigVsphereConfigTagsList", version: "14.12.0" };
function gkeonpremVmwareNodePoolConfigVsphereConfigToTerraform(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 {
datastore: cdktf.stringToTerraform(struct.datastore),
host_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.hostGroups),
tags: cdktf.listMapper(gkeonpremVmwareNodePoolConfigVsphereConfigTagsToTerraform, true)(struct.tags),
};
}
exports.gkeonpremVmwareNodePoolConfigVsphereConfigToTerraform = gkeonpremVmwareNodePoolConfigVsphereConfigToTerraform;
function gkeonpremVmwareNodePoolConfigVsphereConfigToHclTerraform(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 = {
datastore: {
value: cdktf.stringToHclTerraform(struct.datastore),
isBlock: false,
type: "simple",
storageClassType: "string",
},
host_groups: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.hostGroups),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
tags: {
value: cdktf.listMapperHcl(gkeonpremVmwareNodePoolConfigVsphereConfigTagsToHclTerraform, true)(struct.tags),
isBlock: true,
type: "list",
storageClassType: "GkeonpremVmwareNodePoolConfigVsphereConfigTagsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeonpremVmwareNodePoolConfigVsphereConfigToHclTerraform = gkeonpremVmwareNodePoolConfigVsphereConfigToHclTerraform;
class GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference 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;
// tags - computed: false, optional: true, required: false
this._tags = new GkeonpremVmwareNodePoolConfigVsphereConfigTagsList(this, "tags", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._datastore !== undefined) {
hasAnyValues = true;
internalValueResult.datastore = this._datastore;
}
if (this._hostGroups !== undefined) {
hasAnyValues = true;
internalValueResult.hostGroups = this._hostGroups;
}
if (this._tags?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.tags = this._tags?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._datastore = undefined;
this._hostGroups = undefined;
this._tags.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._datastore = value.datastore;
this._hostGroups = value.hostGroups;
this._tags.internalValue = value.tags;
}
}
get datastore() {
return this.getStringAttribute('datastore');
}
set datastore(value) {
this._datastore = value;
}
resetDatastore() {
this._datastore = undefined;
}
// Temporarily expose input value. Use with caution.
get datastoreInput() {
return this._datastore;
}
get hostGroups() {
return this.getListAttribute('host_groups');
}
set hostGroups(value) {
this._hostGroups = value;
}
resetHostGroups() {
this._hostGroups = undefined;
}
// Temporarily expose input value. Use with caution.
get hostGroupsInput() {
return this._hostGroups;
}
get tags() {
return this._tags;
}
putTags(value) {
this._tags.internalValue = value;
}
resetTags() {
this._tags.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags.internalValue;
}
}
exports.GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference = GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference;
_j = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference[_j] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference", version: "14.12.0" };
function gkeonpremVmwareNodePoolConfigAToTerraform(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 {
boot_disk_size_gb: cdktf.numberToTerraform(struct.bootDiskSizeGb),
cpus: cdktf.numberToTerraform(struct.cpus),
enable_load_balancer: cdktf.booleanToTerraform(struct.enableLoadBalancer),
image: cdktf.stringToTerraform(struct.image),
image_type: cdktf.stringToTerraform(struct.imageType),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels),
memory_mb: cdktf.numberToTerraform(struct.memoryMb),
replicas: cdktf.numberToTerraform(struct.replicas),
taints: cdktf.listMapper(gkeonpremVmwareNodePoolConfigTaintsToTerraform, true)(struct.taints),
vsphere_config: gkeonpremVmwareNodePoolConfigVsphereConfigToTerraform(struct.vsphereConfig),
};
}
exports.gkeonpremVmwareNodePoolConfigAToTerraform = gkeonpremVmwareNodePoolConfigAToTerraform;
function gkeonpremVmwareNodePoolConfigAToHclTerraform(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 = {
boot_disk_size_gb: {
value: cdktf.numberToHclTerraform(struct.bootDiskSizeGb),
isBlock: false,
type: "simple",
storageClassType: "number",
},
cpus: {
value: cdktf.numberToHclTerraform(struct.cpus),
isBlock: false,
type: "simple",
storageClassType: "number",
},
enable_load_balancer: {
value: cdktf.booleanToHclTerraform(struct.enableLoadBalancer),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
image: {
value: cdktf.stringToHclTerraform(struct.image),
isBlock: false,
type: "simple",
storageClassType: "string",
},
image_type: {
value: cdktf.stringToHclTerraform(struct.imageType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
labels: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
memory_mb: {
value: cdktf.numberToHclTerraform(struct.memoryMb),
isBlock: false,
type: "simple",
storageClassType: "number",
},
replicas: {
value: cdktf.numberToHclTerraform(struct.replicas),
isBlock: false,
type: "simple",
storageClassType: "number",
},
taints: {
value: cdktf.listMapperHcl(gkeonpremVmwareNodePoolConfigTaintsToHclTerraform, true)(struct.taints),
isBlock: true,
type: "list",
storageClassType: "GkeonpremVmwareNodePoolConfigTaintsList",
},
vsphere_config: {
value: gkeonpremVmwareNodePoolConfigVsphereConfigToHclTerraform(struct.vsphereConfig),
isBlock: true,
type: "list",
storageClassType: "GkeonpremVmwareNodePoolConfigVsphereConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeonpremVmwareNodePoolConfigAToHclTerraform = gkeonpremVmwareNodePoolConfigAToHclTerraform;
class GkeonpremVmwareNodePoolConfigAOutputReference 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;
// taints - computed: false, optional: true, required: false
this._taints = new GkeonpremVmwareNodePoolConfigTaintsList(this, "taints", false);
// vsphere_config - computed: false, optional: true, required: false
this._vsphereConfig = new GkeonpremVmwareNodePoolConfigVsphereConfigOutputReference(this, "vsphere_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._bootDiskSizeGb !== undefined) {
hasAnyValues = true;
internalValueResult.bootDiskSizeGb = this._bootDiskSizeGb;
}
if (this._cpus !== undefined) {
hasAnyValues = true;
internalValueResult.cpus = this._cpus;
}
if (this._enableLoadBalancer !== undefined) {
hasAnyValues = true;
internalValueResult.enableLoadBalancer = this._enableLoadBalancer;
}
if (this._image !== undefined) {
hasAnyValues = true;
internalValueResult.image = this._image;
}
if (this._imageType !== undefined) {
hasAnyValues = true;
internalValueResult.imageType = this._imageType;
}
if (this._labels !== undefined) {
hasAnyValues = true;
internalValueResult.labels = this._labels;
}
if (this._memoryMb !== undefined) {
hasAnyValues = true;
internalValueResult.memoryMb = this._memoryMb;
}
if (this._replicas !== undefined) {
hasAnyValues = true;
internalValueResult.replicas = this._replicas;
}
if (this._taints?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.taints = this._taints?.internalValue;
}
if (this._vsphereConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.vsphereConfig = this._vsphereConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bootDiskSizeGb = undefined;
this._cpus = undefined;
this._enableLoadBalancer = undefined;
this._image = undefined;
this._imageType = undefined;
this._labels = undefined;
this._memoryMb = undefined;
this._replicas = undefined;
this._taints.internalValue = undefined;
this._vsphereConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bootDiskSizeGb = value.bootDiskSizeGb;
this._cpus = value.cpus;
this._enableLoadBalancer = value.enableLoadBalancer;
this._image = value.image;
this._imageType = value.imageType;
this._labels = value.labels;
this._memoryMb = value.memoryMb;
this._replicas = value.replicas;
this._taints.internalValue = value.taints;
this._vsphereConfig.internalValue = value.vsphereConfig;
}
}
get bootDiskSizeGb() {
return this.getNumberAttribute('boot_disk_size_gb');
}
set bootDiskSizeGb(value) {
this._bootDiskSizeGb = value;
}
resetBootDiskSizeGb() {
this._bootDiskSizeGb = undefined;
}
// Temporarily expose input value. Use with caution.
get bootDiskSizeGbInput() {
return this._bootDiskSizeGb;
}
get cpus() {
return this.getNumberAttribute('cpus');
}
set cpus(value) {
this._cpus = value;
}
resetCpus() {
this._cpus = undefined;
}
// Temporarily expose input value. Use with caution.
get cpusInput() {
return this._cpus;
}
get enableLoadBalancer() {
return this.getBooleanAttribute('enable_load_balancer');
}
set enableLoadBalancer(value) {
this._enableLoadBalancer = value;
}
resetEnableLoadBalancer() {
this._enableLoadBalancer = undefined;
}
// Temporarily expose input value. Use with caution.
get enableLoadBalancerInput() {
return this._enableLoadBalancer;
}
get image() {
return this.getStringAttribute('image');
}
set image(value) {
this._image = value;
}
resetImage() {
this._image = undefined;
}
// Temporarily expose input value. Use with caution.
get imageInput() {
return this._image;
}
get imageType() {
return this.getStringAttribute('image_type');
}
set imageType(value) {
this._imageType = value;
}
// Temporarily expose input value. Use with caution.
get imageTypeInput() {
return this._imageType;
}
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 memoryMb() {
return this.getNumberAttribute('memory_mb');
}
set memoryMb(value) {
this._memoryMb = value;
}
resetMemoryMb() {
this._memoryMb = undefined;
}
// Temporarily expose input value. Use with caution.
get memoryMbInput() {
return this._memoryMb;
}
get replicas() {
return this.getNumberAttribute('replicas');
}
set replicas(value) {
this._replicas = value;
}
resetReplicas() {
this._replicas = undefined;
}
// Temporarily expose input value. Use with caution.
get replicasInput() {
return this._replicas;
}
get taints() {
return this._taints;
}
putTaints(value) {
this._taints.internalValue = value;
}
resetTaints() {
this._taints.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get taintsInput() {
return this._taints.internalValue;
}
get vsphereConfig() {
return this._vsphereConfig;
}
putVsphereConfig(value) {
this._vsphereConfig.internalValue = value;
}
resetVsphereConfig() {
this._vsphereConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get vsphereConfigInput() {
return this._vsphereConfig.internalValue;
}
}
exports.GkeonpremVmwareNodePoolConfigAOutputReference = GkeonpremVmwareNodePoolConfigAOutputReference;
_k = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolConfigAOutputReference[_k] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolConfigAOutputReference", version: "14.12.0" };
function gkeonpremVmwareNodePoolNodePoolAutoscalingToTerraform(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 {
max_replicas: cdktf.numberToTerraform(struct.maxReplicas),
min_replicas: cdktf.numberToTerraform(struct.minReplicas),
};
}
exports.gkeonpremVmwareNodePoolNodePoolAutoscalingToTerraform = gkeonpremVmwareNodePoolNodePoolAutoscalingToTerraform;
function gkeonpremVmwareNodePoolNodePoolAutoscalingToHclTerraform(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 = {
max_replicas: {
value: cdktf.numberToHclTerraform(struct.maxReplicas),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min_replicas: {
value: cdktf.numberToHclTerraform(struct.minReplicas),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeonpremVmwareNodePoolNodePoolAutoscalingToHclTerraform = gkeonpremVmwareNodePoolNodePoolAutoscalingToHclTerraform;
class GkeonpremVmwareNodePoolNodePoolAutoscalingOutputReference 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._maxReplicas !== undefined) {
hasAnyValues = true;
internalValueResult.maxReplicas = this._maxReplicas;
}
if (this._minReplicas !== undefined) {
hasAnyValues = true;
internalValueResult.minReplicas = this._minReplicas;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._maxReplicas = undefined;
this._minReplicas = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._maxReplicas = value.maxReplicas;
this._minReplicas = value.minReplicas;
}
}
get maxReplicas() {
return this.getNumberAttribute('max_replicas');
}
set maxReplicas(value) {
this._maxReplicas = value;
}
// Temporarily expose input value. Use with caution.
get maxReplicasInput() {
return this._maxReplicas;
}
get minReplicas() {
return this.getNumberAttribute('min_replicas');
}
set minReplicas(value) {
this._minReplicas = value;
}
// Temporarily expose input value. Use with caution.
get minReplicasInput() {
return this._minReplicas;
}
}
exports.GkeonpremVmwareNodePoolNodePoolAutoscalingOutputReference = GkeonpremVmwareNodePoolNodePoolAutoscalingOutputReference;
_l = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolNodePoolAutoscalingOutputReference[_l] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolNodePoolAutoscalingOutputReference", version: "14.12.0" };
function gkeonpremVmwareNodePoolTimeoutsToTerraform(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.gkeonpremVmwareNodePoolTimeoutsToTerraform = gkeonpremVmwareNodePoolTimeoutsToTerraform;
function gkeonpremVmwareNodePoolTimeoutsToHclTerraform(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.gkeonpremVmwareNodePoolTimeoutsToHclTerraform = gkeonpremVmwareNodePoolTimeoutsToHclTerraform;
class GkeonpremVmwareNodePoolTimeoutsOutputReference 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.GkeonpremVmwareNodePoolTimeoutsOutputReference = GkeonpremVmwareNodePoolTimeoutsOutputReference;
_m = JSII_RTTI_SYMBOL_1;
GkeonpremVmwareNodePoolTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-google.gkeonpremVmwareNodePool.GkeonpremVmwareNodePoolTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/gkeonprem_vmware_node_pool google_gkeonprem_vmware_node_pool}
*/
class GkeonpremVmwareNodePool extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a GkeonpremVmwareNodePool 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 GkeonpremVmwareNodePool to import
* @param importFromId The id of the existing GkeonpremVmwareNodePool that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/gkeonprem_vmware_node_pool#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the GkeonpremVmwareNodePool to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_gkeonprem_vmware_node_pool", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/gkeonprem_vmware_node_pool google_gkeonprem_vmware_node_pool} 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 GkeonpremVmwareNodePoolConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_gkeonprem_vmware_node_pool',
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_annotations - computed: true, optional: false, required: false
this._effectiveAnnotations = new cdktf.StringMap(this, "effective_annotatio