UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,165 lines 182 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputePerInstanceConfig = exports.ComputePerInstanceConfigTimeoutsOutputReference = exports.computePerInstanceConfigTimeoutsToHclTerraform = exports.computePerInstanceConfigTimeoutsToTerraform = exports.ComputePerInstanceConfigPreservedStateOutputReference = exports.computePerInstanceConfigPreservedStateToHclTerraform = exports.computePerInstanceConfigPreservedStateToTerraform = exports.ComputePerInstanceConfigPreservedStateInternalIpList = exports.ComputePerInstanceConfigPreservedStateInternalIpOutputReference = exports.computePerInstanceConfigPreservedStateInternalIpToHclTerraform = exports.computePerInstanceConfigPreservedStateInternalIpToTerraform = exports.ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference = exports.computePerInstanceConfigPreservedStateInternalIpIpAddressToHclTerraform = exports.computePerInstanceConfigPreservedStateInternalIpIpAddressToTerraform = exports.ComputePerInstanceConfigPreservedStateExternalIpList = exports.ComputePerInstanceConfigPreservedStateExternalIpOutputReference = exports.computePerInstanceConfigPreservedStateExternalIpToHclTerraform = exports.computePerInstanceConfigPreservedStateExternalIpToTerraform = exports.ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference = exports.computePerInstanceConfigPreservedStateExternalIpIpAddressToHclTerraform = exports.computePerInstanceConfigPreservedStateExternalIpIpAddressToTerraform = exports.ComputePerInstanceConfigPreservedStateDiskList = exports.ComputePerInstanceConfigPreservedStateDiskOutputReference = exports.computePerInstanceConfigPreservedStateDiskToHclTerraform = exports.computePerInstanceConfigPreservedStateDiskToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computePerInstanceConfigPreservedStateDiskToTerraform(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 { delete_rule: cdktf.stringToTerraform(struct.deleteRule), device_name: cdktf.stringToTerraform(struct.deviceName), mode: cdktf.stringToTerraform(struct.mode), source: cdktf.stringToTerraform(struct.source), }; } exports.computePerInstanceConfigPreservedStateDiskToTerraform = computePerInstanceConfigPreservedStateDiskToTerraform; function computePerInstanceConfigPreservedStateDiskToHclTerraform(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 = { delete_rule: { value: cdktf.stringToHclTerraform(struct.deleteRule), isBlock: false, type: "simple", storageClassType: "string", }, device_name: { value: cdktf.stringToHclTerraform(struct.deviceName), isBlock: false, type: "simple", storageClassType: "string", }, mode: { value: cdktf.stringToHclTerraform(struct.mode), isBlock: false, type: "simple", storageClassType: "string", }, source: { value: cdktf.stringToHclTerraform(struct.source), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computePerInstanceConfigPreservedStateDiskToHclTerraform = computePerInstanceConfigPreservedStateDiskToHclTerraform; class ComputePerInstanceConfigPreservedStateDiskOutputReference 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._deleteRule !== undefined) { hasAnyValues = true; internalValueResult.deleteRule = this._deleteRule; } if (this._deviceName !== undefined) { hasAnyValues = true; internalValueResult.deviceName = this._deviceName; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._source !== undefined) { hasAnyValues = true; internalValueResult.source = this._source; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._deleteRule = undefined; this._deviceName = undefined; this._mode = undefined; this._source = 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._deleteRule = value.deleteRule; this._deviceName = value.deviceName; this._mode = value.mode; this._source = value.source; } } get deleteRule() { return this.getStringAttribute('delete_rule'); } set deleteRule(value) { this._deleteRule = value; } resetDeleteRule() { this._deleteRule = undefined; } // Temporarily expose input value. Use with caution. get deleteRuleInput() { return this._deleteRule; } get deviceName() { return this.getStringAttribute('device_name'); } set deviceName(value) { this._deviceName = value; } // Temporarily expose input value. Use with caution. get deviceNameInput() { return this._deviceName; } get mode() { return this.getStringAttribute('mode'); } set mode(value) { this._mode = value; } resetMode() { this._mode = undefined; } // Temporarily expose input value. Use with caution. get modeInput() { return this._mode; } get source() { return this.getStringAttribute('source'); } set source(value) { this._source = value; } // Temporarily expose input value. Use with caution. get sourceInput() { return this._source; } } exports.ComputePerInstanceConfigPreservedStateDiskOutputReference = ComputePerInstanceConfigPreservedStateDiskOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateDiskOutputReference[_a] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateDiskOutputReference", version: "14.12.0" }; class ComputePerInstanceConfigPreservedStateDiskList 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 ComputePerInstanceConfigPreservedStateDiskOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputePerInstanceConfigPreservedStateDiskList = ComputePerInstanceConfigPreservedStateDiskList; _b = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateDiskList[_b] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateDiskList", version: "14.12.0" }; function computePerInstanceConfigPreservedStateExternalIpIpAddressToTerraform(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 { address: cdktf.stringToTerraform(struct.address), }; } exports.computePerInstanceConfigPreservedStateExternalIpIpAddressToTerraform = computePerInstanceConfigPreservedStateExternalIpIpAddressToTerraform; function computePerInstanceConfigPreservedStateExternalIpIpAddressToHclTerraform(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 = { address: { value: cdktf.stringToHclTerraform(struct.address), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computePerInstanceConfigPreservedStateExternalIpIpAddressToHclTerraform = computePerInstanceConfigPreservedStateExternalIpIpAddressToHclTerraform; class ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference 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._address !== undefined) { hasAnyValues = true; internalValueResult.address = this._address; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._address = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._address = value.address; } } get address() { return this.getStringAttribute('address'); } set address(value) { this._address = value; } resetAddress() { this._address = undefined; } // Temporarily expose input value. Use with caution. get addressInput() { return this._address; } } exports.ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference = ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference[_c] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference", version: "14.12.0" }; function computePerInstanceConfigPreservedStateExternalIpToTerraform(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 { auto_delete: cdktf.stringToTerraform(struct.autoDelete), interface_name: cdktf.stringToTerraform(struct.interfaceName), ip_address: computePerInstanceConfigPreservedStateExternalIpIpAddressToTerraform(struct.ipAddress), }; } exports.computePerInstanceConfigPreservedStateExternalIpToTerraform = computePerInstanceConfigPreservedStateExternalIpToTerraform; function computePerInstanceConfigPreservedStateExternalIpToHclTerraform(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 = { auto_delete: { value: cdktf.stringToHclTerraform(struct.autoDelete), isBlock: false, type: "simple", storageClassType: "string", }, interface_name: { value: cdktf.stringToHclTerraform(struct.interfaceName), isBlock: false, type: "simple", storageClassType: "string", }, ip_address: { value: computePerInstanceConfigPreservedStateExternalIpIpAddressToHclTerraform(struct.ipAddress), isBlock: true, type: "list", storageClassType: "ComputePerInstanceConfigPreservedStateExternalIpIpAddressList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computePerInstanceConfigPreservedStateExternalIpToHclTerraform = computePerInstanceConfigPreservedStateExternalIpToHclTerraform; class ComputePerInstanceConfigPreservedStateExternalIpOutputReference 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; // ip_address - computed: false, optional: true, required: false this._ipAddress = new ComputePerInstanceConfigPreservedStateExternalIpIpAddressOutputReference(this, "ip_address"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._autoDelete !== undefined) { hasAnyValues = true; internalValueResult.autoDelete = this._autoDelete; } if (this._interfaceName !== undefined) { hasAnyValues = true; internalValueResult.interfaceName = this._interfaceName; } if (this._ipAddress?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.ipAddress = this._ipAddress?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._autoDelete = undefined; this._interfaceName = undefined; this._ipAddress.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._autoDelete = value.autoDelete; this._interfaceName = value.interfaceName; this._ipAddress.internalValue = value.ipAddress; } } get autoDelete() { return this.getStringAttribute('auto_delete'); } set autoDelete(value) { this._autoDelete = value; } resetAutoDelete() { this._autoDelete = undefined; } // Temporarily expose input value. Use with caution. get autoDeleteInput() { return this._autoDelete; } get interfaceName() { return this.getStringAttribute('interface_name'); } set interfaceName(value) { this._interfaceName = value; } // Temporarily expose input value. Use with caution. get interfaceNameInput() { return this._interfaceName; } get ipAddress() { return this._ipAddress; } putIpAddress(value) { this._ipAddress.internalValue = value; } resetIpAddress() { this._ipAddress.internalValue = undefined; } // Temporarily expose input value. Use with caution. get ipAddressInput() { return this._ipAddress.internalValue; } } exports.ComputePerInstanceConfigPreservedStateExternalIpOutputReference = ComputePerInstanceConfigPreservedStateExternalIpOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateExternalIpOutputReference[_d] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateExternalIpOutputReference", version: "14.12.0" }; class ComputePerInstanceConfigPreservedStateExternalIpList 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 ComputePerInstanceConfigPreservedStateExternalIpOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputePerInstanceConfigPreservedStateExternalIpList = ComputePerInstanceConfigPreservedStateExternalIpList; _e = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateExternalIpList[_e] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateExternalIpList", version: "14.12.0" }; function computePerInstanceConfigPreservedStateInternalIpIpAddressToTerraform(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 { address: cdktf.stringToTerraform(struct.address), }; } exports.computePerInstanceConfigPreservedStateInternalIpIpAddressToTerraform = computePerInstanceConfigPreservedStateInternalIpIpAddressToTerraform; function computePerInstanceConfigPreservedStateInternalIpIpAddressToHclTerraform(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 = { address: { value: cdktf.stringToHclTerraform(struct.address), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computePerInstanceConfigPreservedStateInternalIpIpAddressToHclTerraform = computePerInstanceConfigPreservedStateInternalIpIpAddressToHclTerraform; class ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference 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._address !== undefined) { hasAnyValues = true; internalValueResult.address = this._address; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._address = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._address = value.address; } } get address() { return this.getStringAttribute('address'); } set address(value) { this._address = value; } resetAddress() { this._address = undefined; } // Temporarily expose input value. Use with caution. get addressInput() { return this._address; } } exports.ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference = ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference[_f] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference", version: "14.12.0" }; function computePerInstanceConfigPreservedStateInternalIpToTerraform(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 { auto_delete: cdktf.stringToTerraform(struct.autoDelete), interface_name: cdktf.stringToTerraform(struct.interfaceName), ip_address: computePerInstanceConfigPreservedStateInternalIpIpAddressToTerraform(struct.ipAddress), }; } exports.computePerInstanceConfigPreservedStateInternalIpToTerraform = computePerInstanceConfigPreservedStateInternalIpToTerraform; function computePerInstanceConfigPreservedStateInternalIpToHclTerraform(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 = { auto_delete: { value: cdktf.stringToHclTerraform(struct.autoDelete), isBlock: false, type: "simple", storageClassType: "string", }, interface_name: { value: cdktf.stringToHclTerraform(struct.interfaceName), isBlock: false, type: "simple", storageClassType: "string", }, ip_address: { value: computePerInstanceConfigPreservedStateInternalIpIpAddressToHclTerraform(struct.ipAddress), isBlock: true, type: "list", storageClassType: "ComputePerInstanceConfigPreservedStateInternalIpIpAddressList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computePerInstanceConfigPreservedStateInternalIpToHclTerraform = computePerInstanceConfigPreservedStateInternalIpToHclTerraform; class ComputePerInstanceConfigPreservedStateInternalIpOutputReference 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; // ip_address - computed: false, optional: true, required: false this._ipAddress = new ComputePerInstanceConfigPreservedStateInternalIpIpAddressOutputReference(this, "ip_address"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._autoDelete !== undefined) { hasAnyValues = true; internalValueResult.autoDelete = this._autoDelete; } if (this._interfaceName !== undefined) { hasAnyValues = true; internalValueResult.interfaceName = this._interfaceName; } if (this._ipAddress?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.ipAddress = this._ipAddress?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._autoDelete = undefined; this._interfaceName = undefined; this._ipAddress.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._autoDelete = value.autoDelete; this._interfaceName = value.interfaceName; this._ipAddress.internalValue = value.ipAddress; } } get autoDelete() { return this.getStringAttribute('auto_delete'); } set autoDelete(value) { this._autoDelete = value; } resetAutoDelete() { this._autoDelete = undefined; } // Temporarily expose input value. Use with caution. get autoDeleteInput() { return this._autoDelete; } get interfaceName() { return this.getStringAttribute('interface_name'); } set interfaceName(value) { this._interfaceName = value; } // Temporarily expose input value. Use with caution. get interfaceNameInput() { return this._interfaceName; } get ipAddress() { return this._ipAddress; } putIpAddress(value) { this._ipAddress.internalValue = value; } resetIpAddress() { this._ipAddress.internalValue = undefined; } // Temporarily expose input value. Use with caution. get ipAddressInput() { return this._ipAddress.internalValue; } } exports.ComputePerInstanceConfigPreservedStateInternalIpOutputReference = ComputePerInstanceConfigPreservedStateInternalIpOutputReference; _g = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateInternalIpOutputReference[_g] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateInternalIpOutputReference", version: "14.12.0" }; class ComputePerInstanceConfigPreservedStateInternalIpList 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 ComputePerInstanceConfigPreservedStateInternalIpOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputePerInstanceConfigPreservedStateInternalIpList = ComputePerInstanceConfigPreservedStateInternalIpList; _h = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateInternalIpList[_h] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateInternalIpList", version: "14.12.0" }; function computePerInstanceConfigPreservedStateToTerraform(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 { metadata: cdktf.hashMapper(cdktf.stringToTerraform)(struct.metadata), disk: cdktf.listMapper(computePerInstanceConfigPreservedStateDiskToTerraform, true)(struct.disk), external_ip: cdktf.listMapper(computePerInstanceConfigPreservedStateExternalIpToTerraform, true)(struct.externalIp), internal_ip: cdktf.listMapper(computePerInstanceConfigPreservedStateInternalIpToTerraform, true)(struct.internalIp), }; } exports.computePerInstanceConfigPreservedStateToTerraform = computePerInstanceConfigPreservedStateToTerraform; function computePerInstanceConfigPreservedStateToHclTerraform(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 = { metadata: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.metadata), isBlock: false, type: "map", storageClassType: "stringMap", }, disk: { value: cdktf.listMapperHcl(computePerInstanceConfigPreservedStateDiskToHclTerraform, true)(struct.disk), isBlock: true, type: "set", storageClassType: "ComputePerInstanceConfigPreservedStateDiskList", }, external_ip: { value: cdktf.listMapperHcl(computePerInstanceConfigPreservedStateExternalIpToHclTerraform, true)(struct.externalIp), isBlock: true, type: "set", storageClassType: "ComputePerInstanceConfigPreservedStateExternalIpList", }, internal_ip: { value: cdktf.listMapperHcl(computePerInstanceConfigPreservedStateInternalIpToHclTerraform, true)(struct.internalIp), isBlock: true, type: "set", storageClassType: "ComputePerInstanceConfigPreservedStateInternalIpList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computePerInstanceConfigPreservedStateToHclTerraform = computePerInstanceConfigPreservedStateToHclTerraform; class ComputePerInstanceConfigPreservedStateOutputReference 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; // disk - computed: false, optional: true, required: false this._disk = new ComputePerInstanceConfigPreservedStateDiskList(this, "disk", true); // external_ip - computed: false, optional: true, required: false this._externalIp = new ComputePerInstanceConfigPreservedStateExternalIpList(this, "external_ip", true); // internal_ip - computed: false, optional: true, required: false this._internalIp = new ComputePerInstanceConfigPreservedStateInternalIpList(this, "internal_ip", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._metadata !== undefined) { hasAnyValues = true; internalValueResult.metadata = this._metadata; } if (this._disk?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.disk = this._disk?.internalValue; } if (this._externalIp?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.externalIp = this._externalIp?.internalValue; } if (this._internalIp?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.internalIp = this._internalIp?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._metadata = undefined; this._disk.internalValue = undefined; this._externalIp.internalValue = undefined; this._internalIp.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._metadata = value.metadata; this._disk.internalValue = value.disk; this._externalIp.internalValue = value.externalIp; this._internalIp.internalValue = value.internalIp; } } get metadata() { return this.getStringMapAttribute('metadata'); } set metadata(value) { this._metadata = value; } resetMetadata() { this._metadata = undefined; } // Temporarily expose input value. Use with caution. get metadataInput() { return this._metadata; } get disk() { return this._disk; } putDisk(value) { this._disk.internalValue = value; } resetDisk() { this._disk.internalValue = undefined; } // Temporarily expose input value. Use with caution. get diskInput() { return this._disk.internalValue; } get externalIp() { return this._externalIp; } putExternalIp(value) { this._externalIp.internalValue = value; } resetExternalIp() { this._externalIp.internalValue = undefined; } // Temporarily expose input value. Use with caution. get externalIpInput() { return this._externalIp.internalValue; } get internalIp() { return this._internalIp; } putInternalIp(value) { this._internalIp.internalValue = value; } resetInternalIp() { this._internalIp.internalValue = undefined; } // Temporarily expose input value. Use with caution. get internalIpInput() { return this._internalIp.internalValue; } } exports.ComputePerInstanceConfigPreservedStateOutputReference = ComputePerInstanceConfigPreservedStateOutputReference; _j = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigPreservedStateOutputReference[_j] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigPreservedStateOutputReference", version: "14.12.0" }; function computePerInstanceConfigTimeoutsToTerraform(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.computePerInstanceConfigTimeoutsToTerraform = computePerInstanceConfigTimeoutsToTerraform; function computePerInstanceConfigTimeoutsToHclTerraform(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.computePerInstanceConfigTimeoutsToHclTerraform = computePerInstanceConfigTimeoutsToHclTerraform; class ComputePerInstanceConfigTimeoutsOutputReference 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.ComputePerInstanceConfigTimeoutsOutputReference = ComputePerInstanceConfigTimeoutsOutputReference; _k = JSII_RTTI_SYMBOL_1; ComputePerInstanceConfigTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-google.computePerInstanceConfig.ComputePerInstanceConfigTimeoutsOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_per_instance_config google_compute_per_instance_config} */ class ComputePerInstanceConfig extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a ComputePerInstanceConfig 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 ComputePerInstanceConfig to import * @param importFromId The id of the existing ComputePerInstanceConfig that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_per_instance_config#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ComputePerInstanceConfig to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_compute_per_instance_config", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/compute_per_instance_config google_compute_per_instance_config} 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 ComputePerInstanceConfigConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_compute_per_instance_config', 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 }); // preserved_state - computed: false, optional: true, required: false this._preservedState = new ComputePerInstanceConfigPreservedStateOutputReference(this, "preserved_state"); // timeouts - computed: false, optional: true, required: false this._timeouts = new ComputePerInstanceConfigTimeoutsOutputReference(this, "timeouts"); this._id = config.id; this._instanceGroupManager = config.instanceGroupManager; this._minimalAction = config.minimalAction; this._mostDisruptiveAllowedAction = config.mostDisruptiveAllowedAction; this._name = config.name; this._project = config.project; this._removeInstanceOnDestroy = config.removeInstanceOnDestroy; this._removeInstanceStateOnDestroy = config.removeInstanceStateOnDestroy; this._zone = config.zone; this._preservedState.internalValue = config.preservedState; this._timeouts.internalValue = config.timeouts; } 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 instanceGroupManager() { return this.getStringAttribute('instance_group_manager'); } set instanceGroupManager(value) { this._instanceGroupManager = value; } // Temporarily expose input value. Use with caution. get instanceGroupManagerInput() { return this._instanceGroupManager; } get minimalAction() { return this.getStringAttribute('minimal_action'); } set minimalAction(value) { this._minimalAction = value; } resetMinimalAction() { this._minimalAction = undefined; } // Temporarily expose input value. Use with caution. get minimalActionInput() { return this._minimalAction; } get mostDisruptiveAllowedAction() { return this.getStringAttribute('most_disruptive_allowed_action'); } set mostDisruptiveAllowedAction(value) { this._mostDisruptiveAllowedAction = value; } resetMostDisruptiveAllowedAction() { this._mostDisruptiveAllowedAction = undefined; } // Temporarily expose input value. Use with caution. get mostDisruptiveAllowedActionInput() { return this._mostDisruptiveAllowedAction; } 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 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 removeInstanceOnDestroy() { return this.getBooleanAttribute('remove_instance_on_destroy'); } set removeInstanceOnDestroy(value) { this._removeInstanceOnDestroy = value; } resetRemoveInstanceOnDestroy() { this._removeInstanceOnDestroy = undefined; } // Temporarily expose input value. Use with caution. get removeInstanceOnDestroyInput() { return this._removeInstanceOnDestroy; } get removeInstanceStateOnDestroy() { return this.getBooleanAttribute('remove_instance_state_on_destroy'); } set removeInstanceStateOnDestroy(value) { this._removeInstanceStateOnDestroy = value; } resetRemoveInstanceStateOnDestroy() { this._removeInstanceStateOnDestroy = undefined; } // Temporarily expose input value. Use with caution. get removeInstanceStateOnDestroyInput() { return this._removeInstanceStateOnDestroy; } get zone() { return this.getStringAttribute('zone'); } set zone(value) { this._zone = value; } resetZone() { this._zone = undefined; } // Temporarily expose input value. Use with caution. get zoneInput() { return this._zone; } get preservedState() { return this._preservedState; } putPreservedState(value) { this._preservedState.internalValue = value; } resetPreservedState() { this._preservedState.internalValue = undefined; } // Temporarily expose input value. Use with caution. get preservedStateInput() { return this._preservedState.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 { id: cdktf.stringToTerraform(this._id), instance_group_manager: cdktf.stringToTerraform(this._instanceGroupManager), minimal_action: cdktf.stringToTerraform(this._minimalAction), most_disruptive_allowed_action: cdktf.stringToTerraform(this._mostDisruptiveAllowedAction), name: cdktf.stringToTerraform(this._name), project: cdktf.stringToTerraform(this._project), remove_instance_on_destroy: cdktf.booleanToTerraform(this._removeInstanceOnDestroy), remove_instance_state_on_destroy: cdkt