@awlsring/cdktf-proxmox
Version:
A package that vends generated constructs from the Proxmox Terraform provider
1,301 lines • 462 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualMachine = exports.VirtualMachineTimeoutsOutputReference = exports.virtualMachineTimeoutsToTerraform = exports.VirtualMachinePciDevicesList = exports.VirtualMachinePciDevicesOutputReference = exports.virtualMachinePciDevicesToTerraform = exports.VirtualMachineNetworkInterfacesList = exports.VirtualMachineNetworkInterfacesOutputReference = exports.virtualMachineNetworkInterfacesToTerraform = exports.VirtualMachineMemoryOutputReference = exports.virtualMachineMemoryToTerraform = exports.VirtualMachineIsoOutputReference = exports.virtualMachineIsoToTerraform = exports.VirtualMachineDisksList = exports.VirtualMachineDisksOutputReference = exports.virtualMachineDisksToTerraform = exports.VirtualMachineDisksSpeedLimitsOutputReference = exports.virtualMachineDisksSpeedLimitsToTerraform = exports.VirtualMachineCpuOutputReference = exports.virtualMachineCpuToTerraform = exports.VirtualMachineComputedPciDevicesList = exports.VirtualMachineComputedPciDevicesOutputReference = exports.virtualMachineComputedPciDevicesToTerraform = exports.VirtualMachineComputedNetworkInterfacesList = exports.VirtualMachineComputedNetworkInterfacesOutputReference = exports.virtualMachineComputedNetworkInterfacesToTerraform = exports.VirtualMachineComputedDisksList = exports.VirtualMachineComputedDisksOutputReference = exports.virtualMachineComputedDisksToTerraform = exports.VirtualMachineComputedDisksSpeedLimitsOutputReference = exports.virtualMachineComputedDisksSpeedLimitsToTerraform = exports.VirtualMachineCloudInitOutputReference = exports.virtualMachineCloudInitToTerraform = exports.VirtualMachineCloudInitUserOutputReference = exports.virtualMachineCloudInitUserToTerraform = exports.VirtualMachineCloudInitIpList = exports.VirtualMachineCloudInitIpOutputReference = exports.virtualMachineCloudInitIpToTerraform = exports.VirtualMachineCloudInitIpV6OutputReference = exports.virtualMachineCloudInitIpV6ToTerraform = exports.VirtualMachineCloudInitIpV4OutputReference = exports.virtualMachineCloudInitIpV4ToTerraform = exports.VirtualMachineCloudInitDnsOutputReference = exports.virtualMachineCloudInitDnsToTerraform = exports.VirtualMachineCloneOutputReference = exports.virtualMachineCloneToTerraform = exports.VirtualMachineAgentOutputReference = exports.virtualMachineAgentToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function virtualMachineAgentToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
enabled: cdktf.booleanToTerraform(struct.enabled),
type: cdktf.stringToTerraform(struct.type),
use_fstrim: cdktf.booleanToTerraform(struct.useFstrim),
};
}
exports.virtualMachineAgentToTerraform = virtualMachineAgentToTerraform;
class VirtualMachineAgentOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
if (this._useFstrim !== undefined) {
hasAnyValues = true;
internalValueResult.useFstrim = this._useFstrim;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._enabled = undefined;
this._type = undefined;
this._useFstrim = 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._enabled = value.enabled;
this._type = value.type;
this._useFstrim = value.useFstrim;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
resetType() {
this._type = undefined;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get useFstrim() {
return this.getBooleanAttribute('use_fstrim');
}
set useFstrim(value) {
this._useFstrim = value;
}
resetUseFstrim() {
this._useFstrim = undefined;
}
// Temporarily expose input value. Use with caution.
get useFstrimInput() {
return this._useFstrim;
}
}
exports.VirtualMachineAgentOutputReference = VirtualMachineAgentOutputReference;
_a = JSII_RTTI_SYMBOL_1;
VirtualMachineAgentOutputReference[_a] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineAgentOutputReference", version: "0.0.318" };
function virtualMachineCloneToTerraform(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 {
full_clone: cdktf.booleanToTerraform(struct.fullClone),
source: cdktf.numberToTerraform(struct.source),
storage: cdktf.stringToTerraform(struct.storage),
};
}
exports.virtualMachineCloneToTerraform = virtualMachineCloneToTerraform;
class VirtualMachineCloneOutputReference 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._fullClone !== undefined) {
hasAnyValues = true;
internalValueResult.fullClone = this._fullClone;
}
if (this._source !== undefined) {
hasAnyValues = true;
internalValueResult.source = this._source;
}
if (this._storage !== undefined) {
hasAnyValues = true;
internalValueResult.storage = this._storage;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._fullClone = undefined;
this._source = undefined;
this._storage = 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._fullClone = value.fullClone;
this._source = value.source;
this._storage = value.storage;
}
}
get fullClone() {
return this.getBooleanAttribute('full_clone');
}
set fullClone(value) {
this._fullClone = value;
}
resetFullClone() {
this._fullClone = undefined;
}
// Temporarily expose input value. Use with caution.
get fullCloneInput() {
return this._fullClone;
}
get source() {
return this.getNumberAttribute('source');
}
set source(value) {
this._source = value;
}
// Temporarily expose input value. Use with caution.
get sourceInput() {
return this._source;
}
get storage() {
return this.getStringAttribute('storage');
}
set storage(value) {
this._storage = value;
}
resetStorage() {
this._storage = undefined;
}
// Temporarily expose input value. Use with caution.
get storageInput() {
return this._storage;
}
}
exports.VirtualMachineCloneOutputReference = VirtualMachineCloneOutputReference;
_b = JSII_RTTI_SYMBOL_1;
VirtualMachineCloneOutputReference[_b] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloneOutputReference", version: "0.0.318" };
function virtualMachineCloudInitDnsToTerraform(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 {
domain: cdktf.stringToTerraform(struct.domain),
nameserver: cdktf.stringToTerraform(struct.nameserver),
};
}
exports.virtualMachineCloudInitDnsToTerraform = virtualMachineCloudInitDnsToTerraform;
class VirtualMachineCloudInitDnsOutputReference 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._domain !== undefined) {
hasAnyValues = true;
internalValueResult.domain = this._domain;
}
if (this._nameserver !== undefined) {
hasAnyValues = true;
internalValueResult.nameserver = this._nameserver;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._domain = undefined;
this._nameserver = 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._domain = value.domain;
this._nameserver = value.nameserver;
}
}
get domain() {
return this.getStringAttribute('domain');
}
set domain(value) {
this._domain = value;
}
resetDomain() {
this._domain = undefined;
}
// Temporarily expose input value. Use with caution.
get domainInput() {
return this._domain;
}
get nameserver() {
return this.getStringAttribute('nameserver');
}
set nameserver(value) {
this._nameserver = value;
}
resetNameserver() {
this._nameserver = undefined;
}
// Temporarily expose input value. Use with caution.
get nameserverInput() {
return this._nameserver;
}
}
exports.VirtualMachineCloudInitDnsOutputReference = VirtualMachineCloudInitDnsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitDnsOutputReference[_c] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitDnsOutputReference", version: "0.0.318" };
function virtualMachineCloudInitIpV4ToTerraform(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),
dhcp: cdktf.booleanToTerraform(struct.dhcp),
gateway: cdktf.stringToTerraform(struct.gateway),
netmask: cdktf.stringToTerraform(struct.netmask),
};
}
exports.virtualMachineCloudInitIpV4ToTerraform = virtualMachineCloudInitIpV4ToTerraform;
class VirtualMachineCloudInitIpV4OutputReference 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._address !== undefined) {
hasAnyValues = true;
internalValueResult.address = this._address;
}
if (this._dhcp !== undefined) {
hasAnyValues = true;
internalValueResult.dhcp = this._dhcp;
}
if (this._gateway !== undefined) {
hasAnyValues = true;
internalValueResult.gateway = this._gateway;
}
if (this._netmask !== undefined) {
hasAnyValues = true;
internalValueResult.netmask = this._netmask;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._address = undefined;
this._dhcp = undefined;
this._gateway = undefined;
this._netmask = 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._address = value.address;
this._dhcp = value.dhcp;
this._gateway = value.gateway;
this._netmask = value.netmask;
}
}
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;
}
get dhcp() {
return this.getBooleanAttribute('dhcp');
}
set dhcp(value) {
this._dhcp = value;
}
resetDhcp() {
this._dhcp = undefined;
}
// Temporarily expose input value. Use with caution.
get dhcpInput() {
return this._dhcp;
}
get gateway() {
return this.getStringAttribute('gateway');
}
set gateway(value) {
this._gateway = value;
}
resetGateway() {
this._gateway = undefined;
}
// Temporarily expose input value. Use with caution.
get gatewayInput() {
return this._gateway;
}
get netmask() {
return this.getStringAttribute('netmask');
}
set netmask(value) {
this._netmask = value;
}
resetNetmask() {
this._netmask = undefined;
}
// Temporarily expose input value. Use with caution.
get netmaskInput() {
return this._netmask;
}
}
exports.VirtualMachineCloudInitIpV4OutputReference = VirtualMachineCloudInitIpV4OutputReference;
_d = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitIpV4OutputReference[_d] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitIpV4OutputReference", version: "0.0.318" };
function virtualMachineCloudInitIpV6ToTerraform(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),
dhcp: cdktf.booleanToTerraform(struct.dhcp),
gateway: cdktf.stringToTerraform(struct.gateway),
netmask: cdktf.stringToTerraform(struct.netmask),
};
}
exports.virtualMachineCloudInitIpV6ToTerraform = virtualMachineCloudInitIpV6ToTerraform;
class VirtualMachineCloudInitIpV6OutputReference 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._address !== undefined) {
hasAnyValues = true;
internalValueResult.address = this._address;
}
if (this._dhcp !== undefined) {
hasAnyValues = true;
internalValueResult.dhcp = this._dhcp;
}
if (this._gateway !== undefined) {
hasAnyValues = true;
internalValueResult.gateway = this._gateway;
}
if (this._netmask !== undefined) {
hasAnyValues = true;
internalValueResult.netmask = this._netmask;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._address = undefined;
this._dhcp = undefined;
this._gateway = undefined;
this._netmask = 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._address = value.address;
this._dhcp = value.dhcp;
this._gateway = value.gateway;
this._netmask = value.netmask;
}
}
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;
}
get dhcp() {
return this.getBooleanAttribute('dhcp');
}
set dhcp(value) {
this._dhcp = value;
}
resetDhcp() {
this._dhcp = undefined;
}
// Temporarily expose input value. Use with caution.
get dhcpInput() {
return this._dhcp;
}
get gateway() {
return this.getStringAttribute('gateway');
}
set gateway(value) {
this._gateway = value;
}
resetGateway() {
this._gateway = undefined;
}
// Temporarily expose input value. Use with caution.
get gatewayInput() {
return this._gateway;
}
get netmask() {
return this.getStringAttribute('netmask');
}
set netmask(value) {
this._netmask = value;
}
resetNetmask() {
this._netmask = undefined;
}
// Temporarily expose input value. Use with caution.
get netmaskInput() {
return this._netmask;
}
}
exports.VirtualMachineCloudInitIpV6OutputReference = VirtualMachineCloudInitIpV6OutputReference;
_e = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitIpV6OutputReference[_e] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitIpV6OutputReference", version: "0.0.318" };
function virtualMachineCloudInitIpToTerraform(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 {
position: cdktf.numberToTerraform(struct.position),
v4: virtualMachineCloudInitIpV4ToTerraform(struct.v4),
v6: virtualMachineCloudInitIpV6ToTerraform(struct.v6),
};
}
exports.virtualMachineCloudInitIpToTerraform = virtualMachineCloudInitIpToTerraform;
class VirtualMachineCloudInitIpOutputReference 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;
// v4 - computed: false, optional: true, required: false
this._v4 = new VirtualMachineCloudInitIpV4OutputReference(this, "v4");
// v6 - computed: false, optional: true, required: false
this._v6 = new VirtualMachineCloudInitIpV6OutputReference(this, "v6");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._position !== undefined) {
hasAnyValues = true;
internalValueResult.position = this._position;
}
if (this._v4?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.v4 = this._v4?.internalValue;
}
if (this._v6?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.v6 = this._v6?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._position = undefined;
this._v4.internalValue = undefined;
this._v6.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._position = value.position;
this._v4.internalValue = value.v4;
this._v6.internalValue = value.v6;
}
}
get position() {
return this.getNumberAttribute('position');
}
set position(value) {
this._position = value;
}
// Temporarily expose input value. Use with caution.
get positionInput() {
return this._position;
}
get v4() {
return this._v4;
}
putV4(value) {
this._v4.internalValue = value;
}
resetV4() {
this._v4.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get v4Input() {
return this._v4.internalValue;
}
get v6() {
return this._v6;
}
putV6(value) {
this._v6.internalValue = value;
}
resetV6() {
this._v6.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get v6Input() {
return this._v6.internalValue;
}
}
exports.VirtualMachineCloudInitIpOutputReference = VirtualMachineCloudInitIpOutputReference;
_f = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitIpOutputReference[_f] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitIpOutputReference", version: "0.0.318" };
class VirtualMachineCloudInitIpList 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 VirtualMachineCloudInitIpOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VirtualMachineCloudInitIpList = VirtualMachineCloudInitIpList;
_g = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitIpList[_g] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitIpList", version: "0.0.318" };
function virtualMachineCloudInitUserToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
password: cdktf.stringToTerraform(struct.password),
public_keys: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.publicKeys),
};
}
exports.virtualMachineCloudInitUserToTerraform = virtualMachineCloudInitUserToTerraform;
class VirtualMachineCloudInitUserOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._password !== undefined) {
hasAnyValues = true;
internalValueResult.password = this._password;
}
if (this._publicKeys !== undefined) {
hasAnyValues = true;
internalValueResult.publicKeys = this._publicKeys;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._password = undefined;
this._publicKeys = 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._name = value.name;
this._password = value.password;
this._publicKeys = value.publicKeys;
}
}
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 password() {
return this.getStringAttribute('password');
}
set password(value) {
this._password = value;
}
resetPassword() {
this._password = undefined;
}
// Temporarily expose input value. Use with caution.
get passwordInput() {
return this._password;
}
get publicKeys() {
return cdktf.Fn.tolist(this.getListAttribute('public_keys'));
}
set publicKeys(value) {
this._publicKeys = value;
}
resetPublicKeys() {
this._publicKeys = undefined;
}
// Temporarily expose input value. Use with caution.
get publicKeysInput() {
return this._publicKeys;
}
}
exports.VirtualMachineCloudInitUserOutputReference = VirtualMachineCloudInitUserOutputReference;
_h = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitUserOutputReference[_h] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitUserOutputReference", version: "0.0.318" };
function virtualMachineCloudInitToTerraform(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 {
dns: virtualMachineCloudInitDnsToTerraform(struct.dns),
ip: cdktf.listMapper(virtualMachineCloudInitIpToTerraform, false)(struct.ip),
user: virtualMachineCloudInitUserToTerraform(struct.user),
};
}
exports.virtualMachineCloudInitToTerraform = virtualMachineCloudInitToTerraform;
class VirtualMachineCloudInitOutputReference 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;
// dns - computed: false, optional: true, required: false
this._dns = new VirtualMachineCloudInitDnsOutputReference(this, "dns");
// ip - computed: false, optional: true, required: false
this._ip = new VirtualMachineCloudInitIpList(this, "ip", true);
// user - computed: false, optional: true, required: false
this._user = new VirtualMachineCloudInitUserOutputReference(this, "user");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dns?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.dns = this._dns?.internalValue;
}
if (this._ip?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ip = this._ip?.internalValue;
}
if (this._user?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.user = this._user?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dns.internalValue = undefined;
this._ip.internalValue = undefined;
this._user.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._dns.internalValue = value.dns;
this._ip.internalValue = value.ip;
this._user.internalValue = value.user;
}
}
get dns() {
return this._dns;
}
putDns(value) {
this._dns.internalValue = value;
}
resetDns() {
this._dns.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dnsInput() {
return this._dns.internalValue;
}
get ip() {
return this._ip;
}
putIp(value) {
this._ip.internalValue = value;
}
resetIp() {
this._ip.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ipInput() {
return this._ip.internalValue;
}
get user() {
return this._user;
}
putUser(value) {
this._user.internalValue = value;
}
resetUser() {
this._user.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get userInput() {
return this._user.internalValue;
}
}
exports.VirtualMachineCloudInitOutputReference = VirtualMachineCloudInitOutputReference;
_j = JSII_RTTI_SYMBOL_1;
VirtualMachineCloudInitOutputReference[_j] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineCloudInitOutputReference", version: "0.0.318" };
function virtualMachineComputedDisksSpeedLimitsToTerraform(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 {
read: cdktf.numberToTerraform(struct.read),
read_burstable: cdktf.numberToTerraform(struct.readBurstable),
write: cdktf.numberToTerraform(struct.write),
write_burstable: cdktf.numberToTerraform(struct.writeBurstable),
};
}
exports.virtualMachineComputedDisksSpeedLimitsToTerraform = virtualMachineComputedDisksSpeedLimitsToTerraform;
class VirtualMachineComputedDisksSpeedLimitsOutputReference 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._read !== undefined) {
hasAnyValues = true;
internalValueResult.read = this._read;
}
if (this._readBurstable !== undefined) {
hasAnyValues = true;
internalValueResult.readBurstable = this._readBurstable;
}
if (this._write !== undefined) {
hasAnyValues = true;
internalValueResult.write = this._write;
}
if (this._writeBurstable !== undefined) {
hasAnyValues = true;
internalValueResult.writeBurstable = this._writeBurstable;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._read = undefined;
this._readBurstable = undefined;
this._write = undefined;
this._writeBurstable = 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._read = value.read;
this._readBurstable = value.readBurstable;
this._write = value.write;
this._writeBurstable = value.writeBurstable;
}
}
get read() {
return this.getNumberAttribute('read');
}
set read(value) {
this._read = value;
}
resetRead() {
this._read = undefined;
}
// Temporarily expose input value. Use with caution.
get readInput() {
return this._read;
}
get readBurstable() {
return this.getNumberAttribute('read_burstable');
}
set readBurstable(value) {
this._readBurstable = value;
}
resetReadBurstable() {
this._readBurstable = undefined;
}
// Temporarily expose input value. Use with caution.
get readBurstableInput() {
return this._readBurstable;
}
get write() {
return this.getNumberAttribute('write');
}
set write(value) {
this._write = value;
}
resetWrite() {
this._write = undefined;
}
// Temporarily expose input value. Use with caution.
get writeInput() {
return this._write;
}
get writeBurstable() {
return this.getNumberAttribute('write_burstable');
}
set writeBurstable(value) {
this._writeBurstable = value;
}
resetWriteBurstable() {
this._writeBurstable = undefined;
}
// Temporarily expose input value. Use with caution.
get writeBurstableInput() {
return this._writeBurstable;
}
}
exports.VirtualMachineComputedDisksSpeedLimitsOutputReference = VirtualMachineComputedDisksSpeedLimitsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
VirtualMachineComputedDisksSpeedLimitsOutputReference[_k] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineComputedDisksSpeedLimitsOutputReference", version: "0.0.318" };
function virtualMachineComputedDisksToTerraform(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 {
discard: cdktf.booleanToTerraform(struct.discard),
file_format: cdktf.stringToTerraform(struct.fileFormat),
interface_type: cdktf.stringToTerraform(struct.interfaceType),
position: cdktf.numberToTerraform(struct.position),
size: cdktf.numberToTerraform(struct.size),
speed_limits: virtualMachineComputedDisksSpeedLimitsToTerraform(struct.speedLimits),
ssd_emulation: cdktf.booleanToTerraform(struct.ssdEmulation),
storage: cdktf.stringToTerraform(struct.storage),
use_iothread: cdktf.booleanToTerraform(struct.useIothread),
};
}
exports.virtualMachineComputedDisksToTerraform = virtualMachineComputedDisksToTerraform;
class VirtualMachineComputedDisksOutputReference 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;
// speed_limits - computed: true, optional: true, required: false
this._speedLimits = new VirtualMachineComputedDisksSpeedLimitsOutputReference(this, "speed_limits");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._discard !== undefined) {
hasAnyValues = true;
internalValueResult.discard = this._discard;
}
if (this._fileFormat !== undefined) {
hasAnyValues = true;
internalValueResult.fileFormat = this._fileFormat;
}
if (this._interfaceType !== undefined) {
hasAnyValues = true;
internalValueResult.interfaceType = this._interfaceType;
}
if (this._position !== undefined) {
hasAnyValues = true;
internalValueResult.position = this._position;
}
if (this._size !== undefined) {
hasAnyValues = true;
internalValueResult.size = this._size;
}
if (this._speedLimits?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.speedLimits = this._speedLimits?.internalValue;
}
if (this._ssdEmulation !== undefined) {
hasAnyValues = true;
internalValueResult.ssdEmulation = this._ssdEmulation;
}
if (this._storage !== undefined) {
hasAnyValues = true;
internalValueResult.storage = this._storage;
}
if (this._useIothread !== undefined) {
hasAnyValues = true;
internalValueResult.useIothread = this._useIothread;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._discard = undefined;
this._fileFormat = undefined;
this._interfaceType = undefined;
this._position = undefined;
this._size = undefined;
this._speedLimits.internalValue = undefined;
this._ssdEmulation = undefined;
this._storage = undefined;
this._useIothread = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._discard = value.discard;
this._fileFormat = value.fileFormat;
this._interfaceType = value.interfaceType;
this._position = value.position;
this._size = value.size;
this._speedLimits.internalValue = value.speedLimits;
this._ssdEmulation = value.ssdEmulation;
this._storage = value.storage;
this._useIothread = value.useIothread;
}
}
get discard() {
return this.getBooleanAttribute('discard');
}
set discard(value) {
this._discard = value;
}
resetDiscard() {
this._discard = undefined;
}
// Temporarily expose input value. Use with caution.
get discardInput() {
return this._discard;
}
get fileFormat() {
return this.getStringAttribute('file_format');
}
set fileFormat(value) {
this._fileFormat = value;
}
resetFileFormat() {
this._fileFormat = undefined;
}
// Temporarily expose input value. Use with caution.
get fileFormatInput() {
return this._fileFormat;
}
get interfaceType() {
return this.getStringAttribute('interface_type');
}
set interfaceType(value) {
this._interfaceType = value;
}
// Temporarily expose input value. Use with caution.
get interfaceTypeInput() {
return this._interfaceType;
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
get position() {
return this.getNumberAttribute('position');
}
set position(value) {
this._position = value;
}
// Temporarily expose input value. Use with caution.
get positionInput() {
return this._position;
}
get size() {
return this.getNumberAttribute('size');
}
set size(value) {
this._size = value;
}
// Temporarily expose input value. Use with caution.
get sizeInput() {
return this._size;
}
get speedLimits() {
return this._speedLimits;
}
putSpeedLimits(value) {
this._speedLimits.internalValue = value;
}
resetSpeedLimits() {
this._speedLimits.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get speedLimitsInput() {
return this._speedLimits.internalValue;
}
get ssdEmulation() {
return this.getBooleanAttribute('ssd_emulation');
}
set ssdEmulation(value) {
this._ssdEmulation = value;
}
resetSsdEmulation() {
this._ssdEmulation = undefined;
}
// Temporarily expose input value. Use with caution.
get ssdEmulationInput() {
return this._ssdEmulation;
}
get storage() {
return this.getStringAttribute('storage');
}
set storage(value) {
this._storage = value;
}
// Temporarily expose input value. Use with caution.
get storageInput() {
return this._storage;
}
get useIothread() {
return this.getBooleanAttribute('use_iothread');
}
set useIothread(value) {
this._useIothread = value;
}
resetUseIothread() {
this._useIothread = undefined;
}
// Temporarily expose input value. Use with caution.
get useIothreadInput() {
return this._useIothread;
}
}
exports.VirtualMachineComputedDisksOutputReference = VirtualMachineComputedDisksOutputReference;
_l = JSII_RTTI_SYMBOL_1;
VirtualMachineComputedDisksOutputReference[_l] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineComputedDisksOutputReference", version: "0.0.318" };
class VirtualMachineComputedDisksList 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 VirtualMachineComputedDisksOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VirtualMachineComputedDisksList = VirtualMachineComputedDisksList;
_m = JSII_RTTI_SYMBOL_1;
VirtualMachineComputedDisksList[_m] = { fqn: "@awlsring/cdktf-proxmox.virtualMachine.VirtualMachineComputedDisksList", version: "0.0.318" };
function virtualMachineComputedNetworkInterfacesToTerraform(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 {
bridge: cdktf.stringToTerraform(struct.bridge),
enabled: cdktf.booleanToTerraform(struct.enabled),
mac_address: cdktf.stringToTerraform(struct.macAddress),
model: cdktf.stringToTerraform(struct.model),
mtu: cdktf.numberToTerraform(struct.mtu),
position: cdktf.numberToTerraform(struct.position),
rate_limit: cdktf.numberToTerraform(struct.rateLimit),
use_firewall: cdktf.booleanToTerraform(struct.useFirewall),
vlan: cdktf.numberToTerraform(struct.vlan),
};
}
exports.virtualMachineComputedNetworkInterfacesToTerraform = virtualMachineComputedNetworkInterfacesToTerraform;
class VirtualMachineComputedNetworkInterfacesOutputReference 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 = {};
if (this._bridge !== undefined) {
hasAnyValues = true;
internalValueResult.bridge = this._bridge;
}
if (this._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enab