@cdktf/provider-vsphere
Version:
Prebuilt vsphere Provider for Terraform CDK (cdktf)
1,263 lines • 668 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualMachine = exports.VirtualMachineVtpmOutputReference = exports.VirtualMachineVappOutputReference = exports.VirtualMachineOvfDeployOutputReference = exports.VirtualMachineNetworkInterfaceList = exports.VirtualMachineNetworkInterfaceOutputReference = exports.VirtualMachineDiskList = exports.VirtualMachineDiskOutputReference = exports.VirtualMachineCloneOutputReference = exports.VirtualMachineCloneCustomizeOutputReference = exports.VirtualMachineCloneCustomizeWindowsOptionsOutputReference = exports.VirtualMachineCloneCustomizeNetworkInterfaceList = exports.VirtualMachineCloneCustomizeNetworkInterfaceOutputReference = exports.VirtualMachineCloneCustomizeLinuxOptionsOutputReference = exports.VirtualMachineCloneCustomizationSpecOutputReference = exports.VirtualMachineCdromList = exports.VirtualMachineCdromOutputReference = void 0;
exports.virtualMachineCdromToTerraform = virtualMachineCdromToTerraform;
exports.virtualMachineCdromToHclTerraform = virtualMachineCdromToHclTerraform;
exports.virtualMachineCloneCustomizationSpecToTerraform = virtualMachineCloneCustomizationSpecToTerraform;
exports.virtualMachineCloneCustomizationSpecToHclTerraform = virtualMachineCloneCustomizationSpecToHclTerraform;
exports.virtualMachineCloneCustomizeLinuxOptionsToTerraform = virtualMachineCloneCustomizeLinuxOptionsToTerraform;
exports.virtualMachineCloneCustomizeLinuxOptionsToHclTerraform = virtualMachineCloneCustomizeLinuxOptionsToHclTerraform;
exports.virtualMachineCloneCustomizeNetworkInterfaceToTerraform = virtualMachineCloneCustomizeNetworkInterfaceToTerraform;
exports.virtualMachineCloneCustomizeNetworkInterfaceToHclTerraform = virtualMachineCloneCustomizeNetworkInterfaceToHclTerraform;
exports.virtualMachineCloneCustomizeWindowsOptionsToTerraform = virtualMachineCloneCustomizeWindowsOptionsToTerraform;
exports.virtualMachineCloneCustomizeWindowsOptionsToHclTerraform = virtualMachineCloneCustomizeWindowsOptionsToHclTerraform;
exports.virtualMachineCloneCustomizeToTerraform = virtualMachineCloneCustomizeToTerraform;
exports.virtualMachineCloneCustomizeToHclTerraform = virtualMachineCloneCustomizeToHclTerraform;
exports.virtualMachineCloneToTerraform = virtualMachineCloneToTerraform;
exports.virtualMachineCloneToHclTerraform = virtualMachineCloneToHclTerraform;
exports.virtualMachineDiskToTerraform = virtualMachineDiskToTerraform;
exports.virtualMachineDiskToHclTerraform = virtualMachineDiskToHclTerraform;
exports.virtualMachineNetworkInterfaceToTerraform = virtualMachineNetworkInterfaceToTerraform;
exports.virtualMachineNetworkInterfaceToHclTerraform = virtualMachineNetworkInterfaceToHclTerraform;
exports.virtualMachineOvfDeployToTerraform = virtualMachineOvfDeployToTerraform;
exports.virtualMachineOvfDeployToHclTerraform = virtualMachineOvfDeployToHclTerraform;
exports.virtualMachineVappToTerraform = virtualMachineVappToTerraform;
exports.virtualMachineVappToHclTerraform = virtualMachineVappToHclTerraform;
exports.virtualMachineVtpmToTerraform = virtualMachineVtpmToTerraform;
exports.virtualMachineVtpmToHclTerraform = virtualMachineVtpmToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function virtualMachineCdromToTerraform(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 {
client_device: cdktf.booleanToTerraform(struct.clientDevice),
datastore_id: cdktf.stringToTerraform(struct.datastoreId),
path: cdktf.stringToTerraform(struct.path),
};
}
function virtualMachineCdromToHclTerraform(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 = {
client_device: {
value: cdktf.booleanToHclTerraform(struct.clientDevice),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
datastore_id: {
value: cdktf.stringToHclTerraform(struct.datastoreId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
path: {
value: cdktf.stringToHclTerraform(struct.path),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class VirtualMachineCdromOutputReference 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._clientDevice !== undefined) {
hasAnyValues = true;
internalValueResult.clientDevice = this._clientDevice;
}
if (this._datastoreId !== undefined) {
hasAnyValues = true;
internalValueResult.datastoreId = this._datastoreId;
}
if (this._path !== undefined) {
hasAnyValues = true;
internalValueResult.path = this._path;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._clientDevice = undefined;
this._datastoreId = undefined;
this._path = 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._clientDevice = value.clientDevice;
this._datastoreId = value.datastoreId;
this._path = value.path;
}
}
get clientDevice() {
return this.getBooleanAttribute('client_device');
}
set clientDevice(value) {
this._clientDevice = value;
}
resetClientDevice() {
this._clientDevice = undefined;
}
// Temporarily expose input value. Use with caution.
get clientDeviceInput() {
return this._clientDevice;
}
get datastoreId() {
return this.getStringAttribute('datastore_id');
}
set datastoreId(value) {
this._datastoreId = value;
}
resetDatastoreId() {
this._datastoreId = undefined;
}
// Temporarily expose input value. Use with caution.
get datastoreIdInput() {
return this._datastoreId;
}
// device_address - computed: true, optional: false, required: false
get deviceAddress() {
return this.getStringAttribute('device_address');
}
// key - computed: true, optional: false, required: false
get key() {
return this.getNumberAttribute('key');
}
get path() {
return this.getStringAttribute('path');
}
set path(value) {
this._path = value;
}
resetPath() {
this._path = undefined;
}
// Temporarily expose input value. Use with caution.
get pathInput() {
return this._path;
}
}
exports.VirtualMachineCdromOutputReference = VirtualMachineCdromOutputReference;
_a = JSII_RTTI_SYMBOL_1;
VirtualMachineCdromOutputReference[_a] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCdromOutputReference", version: "11.1.0" };
class VirtualMachineCdromList 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 VirtualMachineCdromOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VirtualMachineCdromList = VirtualMachineCdromList;
_b = JSII_RTTI_SYMBOL_1;
VirtualMachineCdromList[_b] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCdromList", version: "11.1.0" };
function virtualMachineCloneCustomizationSpecToTerraform(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 {
id: cdktf.stringToTerraform(struct.id),
timeout: cdktf.numberToTerraform(struct.timeout),
};
}
function virtualMachineCloneCustomizationSpecToHclTerraform(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 = {
id: {
value: cdktf.stringToHclTerraform(struct.id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
timeout: {
value: cdktf.numberToHclTerraform(struct.timeout),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class VirtualMachineCloneCustomizationSpecOutputReference 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._id !== undefined) {
hasAnyValues = true;
internalValueResult.id = this._id;
}
if (this._timeout !== undefined) {
hasAnyValues = true;
internalValueResult.timeout = this._timeout;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._id = undefined;
this._timeout = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._id = value.id;
this._timeout = value.timeout;
}
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get timeout() {
return this.getNumberAttribute('timeout');
}
set timeout(value) {
this._timeout = value;
}
resetTimeout() {
this._timeout = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutInput() {
return this._timeout;
}
}
exports.VirtualMachineCloneCustomizationSpecOutputReference = VirtualMachineCloneCustomizationSpecOutputReference;
_c = JSII_RTTI_SYMBOL_1;
VirtualMachineCloneCustomizationSpecOutputReference[_c] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCloneCustomizationSpecOutputReference", version: "11.1.0" };
function virtualMachineCloneCustomizeLinuxOptionsToTerraform(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),
host_name: cdktf.stringToTerraform(struct.hostName),
hw_clock_utc: cdktf.booleanToTerraform(struct.hwClockUtc),
script_text: cdktf.stringToTerraform(struct.scriptText),
time_zone: cdktf.stringToTerraform(struct.timeZone),
};
}
function virtualMachineCloneCustomizeLinuxOptionsToHclTerraform(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 = {
domain: {
value: cdktf.stringToHclTerraform(struct.domain),
isBlock: false,
type: "simple",
storageClassType: "string",
},
host_name: {
value: cdktf.stringToHclTerraform(struct.hostName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
hw_clock_utc: {
value: cdktf.booleanToHclTerraform(struct.hwClockUtc),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
script_text: {
value: cdktf.stringToHclTerraform(struct.scriptText),
isBlock: false,
type: "simple",
storageClassType: "string",
},
time_zone: {
value: cdktf.stringToHclTerraform(struct.timeZone),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class VirtualMachineCloneCustomizeLinuxOptionsOutputReference 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._domain !== undefined) {
hasAnyValues = true;
internalValueResult.domain = this._domain;
}
if (this._hostName !== undefined) {
hasAnyValues = true;
internalValueResult.hostName = this._hostName;
}
if (this._hwClockUtc !== undefined) {
hasAnyValues = true;
internalValueResult.hwClockUtc = this._hwClockUtc;
}
if (this._scriptText !== undefined) {
hasAnyValues = true;
internalValueResult.scriptText = this._scriptText;
}
if (this._timeZone !== undefined) {
hasAnyValues = true;
internalValueResult.timeZone = this._timeZone;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._domain = undefined;
this._hostName = undefined;
this._hwClockUtc = undefined;
this._scriptText = undefined;
this._timeZone = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._domain = value.domain;
this._hostName = value.hostName;
this._hwClockUtc = value.hwClockUtc;
this._scriptText = value.scriptText;
this._timeZone = value.timeZone;
}
}
get domain() {
return this.getStringAttribute('domain');
}
set domain(value) {
this._domain = value;
}
// Temporarily expose input value. Use with caution.
get domainInput() {
return this._domain;
}
get hostName() {
return this.getStringAttribute('host_name');
}
set hostName(value) {
this._hostName = value;
}
// Temporarily expose input value. Use with caution.
get hostNameInput() {
return this._hostName;
}
get hwClockUtc() {
return this.getBooleanAttribute('hw_clock_utc');
}
set hwClockUtc(value) {
this._hwClockUtc = value;
}
resetHwClockUtc() {
this._hwClockUtc = undefined;
}
// Temporarily expose input value. Use with caution.
get hwClockUtcInput() {
return this._hwClockUtc;
}
get scriptText() {
return this.getStringAttribute('script_text');
}
set scriptText(value) {
this._scriptText = value;
}
resetScriptText() {
this._scriptText = undefined;
}
// Temporarily expose input value. Use with caution.
get scriptTextInput() {
return this._scriptText;
}
get timeZone() {
return this.getStringAttribute('time_zone');
}
set timeZone(value) {
this._timeZone = value;
}
resetTimeZone() {
this._timeZone = undefined;
}
// Temporarily expose input value. Use with caution.
get timeZoneInput() {
return this._timeZone;
}
}
exports.VirtualMachineCloneCustomizeLinuxOptionsOutputReference = VirtualMachineCloneCustomizeLinuxOptionsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
VirtualMachineCloneCustomizeLinuxOptionsOutputReference[_d] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCloneCustomizeLinuxOptionsOutputReference", version: "11.1.0" };
function virtualMachineCloneCustomizeNetworkInterfaceToTerraform(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_domain: cdktf.stringToTerraform(struct.dnsDomain),
dns_server_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.dnsServerList),
ipv4_address: cdktf.stringToTerraform(struct.ipv4Address),
ipv4_netmask: cdktf.numberToTerraform(struct.ipv4Netmask),
ipv6_address: cdktf.stringToTerraform(struct.ipv6Address),
ipv6_netmask: cdktf.numberToTerraform(struct.ipv6Netmask),
};
}
function virtualMachineCloneCustomizeNetworkInterfaceToHclTerraform(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 = {
dns_domain: {
value: cdktf.stringToHclTerraform(struct.dnsDomain),
isBlock: false,
type: "simple",
storageClassType: "string",
},
dns_server_list: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.dnsServerList),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
ipv4_address: {
value: cdktf.stringToHclTerraform(struct.ipv4Address),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ipv4_netmask: {
value: cdktf.numberToHclTerraform(struct.ipv4Netmask),
isBlock: false,
type: "simple",
storageClassType: "number",
},
ipv6_address: {
value: cdktf.stringToHclTerraform(struct.ipv6Address),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ipv6_netmask: {
value: cdktf.numberToHclTerraform(struct.ipv6Netmask),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class VirtualMachineCloneCustomizeNetworkInterfaceOutputReference 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._dnsDomain !== undefined) {
hasAnyValues = true;
internalValueResult.dnsDomain = this._dnsDomain;
}
if (this._dnsServerList !== undefined) {
hasAnyValues = true;
internalValueResult.dnsServerList = this._dnsServerList;
}
if (this._ipv4Address !== undefined) {
hasAnyValues = true;
internalValueResult.ipv4Address = this._ipv4Address;
}
if (this._ipv4Netmask !== undefined) {
hasAnyValues = true;
internalValueResult.ipv4Netmask = this._ipv4Netmask;
}
if (this._ipv6Address !== undefined) {
hasAnyValues = true;
internalValueResult.ipv6Address = this._ipv6Address;
}
if (this._ipv6Netmask !== undefined) {
hasAnyValues = true;
internalValueResult.ipv6Netmask = this._ipv6Netmask;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dnsDomain = undefined;
this._dnsServerList = undefined;
this._ipv4Address = undefined;
this._ipv4Netmask = undefined;
this._ipv6Address = undefined;
this._ipv6Netmask = 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._dnsDomain = value.dnsDomain;
this._dnsServerList = value.dnsServerList;
this._ipv4Address = value.ipv4Address;
this._ipv4Netmask = value.ipv4Netmask;
this._ipv6Address = value.ipv6Address;
this._ipv6Netmask = value.ipv6Netmask;
}
}
get dnsDomain() {
return this.getStringAttribute('dns_domain');
}
set dnsDomain(value) {
this._dnsDomain = value;
}
resetDnsDomain() {
this._dnsDomain = undefined;
}
// Temporarily expose input value. Use with caution.
get dnsDomainInput() {
return this._dnsDomain;
}
get dnsServerList() {
return this.getListAttribute('dns_server_list');
}
set dnsServerList(value) {
this._dnsServerList = value;
}
resetDnsServerList() {
this._dnsServerList = undefined;
}
// Temporarily expose input value. Use with caution.
get dnsServerListInput() {
return this._dnsServerList;
}
get ipv4Address() {
return this.getStringAttribute('ipv4_address');
}
set ipv4Address(value) {
this._ipv4Address = value;
}
resetIpv4Address() {
this._ipv4Address = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv4AddressInput() {
return this._ipv4Address;
}
get ipv4Netmask() {
return this.getNumberAttribute('ipv4_netmask');
}
set ipv4Netmask(value) {
this._ipv4Netmask = value;
}
resetIpv4Netmask() {
this._ipv4Netmask = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv4NetmaskInput() {
return this._ipv4Netmask;
}
get ipv6Address() {
return this.getStringAttribute('ipv6_address');
}
set ipv6Address(value) {
this._ipv6Address = value;
}
resetIpv6Address() {
this._ipv6Address = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv6AddressInput() {
return this._ipv6Address;
}
get ipv6Netmask() {
return this.getNumberAttribute('ipv6_netmask');
}
set ipv6Netmask(value) {
this._ipv6Netmask = value;
}
resetIpv6Netmask() {
this._ipv6Netmask = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv6NetmaskInput() {
return this._ipv6Netmask;
}
}
exports.VirtualMachineCloneCustomizeNetworkInterfaceOutputReference = VirtualMachineCloneCustomizeNetworkInterfaceOutputReference;
_e = JSII_RTTI_SYMBOL_1;
VirtualMachineCloneCustomizeNetworkInterfaceOutputReference[_e] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCloneCustomizeNetworkInterfaceOutputReference", version: "11.1.0" };
class VirtualMachineCloneCustomizeNetworkInterfaceList 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 VirtualMachineCloneCustomizeNetworkInterfaceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VirtualMachineCloneCustomizeNetworkInterfaceList = VirtualMachineCloneCustomizeNetworkInterfaceList;
_f = JSII_RTTI_SYMBOL_1;
VirtualMachineCloneCustomizeNetworkInterfaceList[_f] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCloneCustomizeNetworkInterfaceList", version: "11.1.0" };
function virtualMachineCloneCustomizeWindowsOptionsToTerraform(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 {
admin_password: cdktf.stringToTerraform(struct.adminPassword),
auto_logon: cdktf.booleanToTerraform(struct.autoLogon),
auto_logon_count: cdktf.numberToTerraform(struct.autoLogonCount),
computer_name: cdktf.stringToTerraform(struct.computerName),
domain_admin_password: cdktf.stringToTerraform(struct.domainAdminPassword),
domain_admin_user: cdktf.stringToTerraform(struct.domainAdminUser),
domain_ou: cdktf.stringToTerraform(struct.domainOu),
full_name: cdktf.stringToTerraform(struct.fullName),
join_domain: cdktf.stringToTerraform(struct.joinDomain),
organization_name: cdktf.stringToTerraform(struct.organizationName),
product_key: cdktf.stringToTerraform(struct.productKey),
run_once_command_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.runOnceCommandList),
time_zone: cdktf.numberToTerraform(struct.timeZone),
workgroup: cdktf.stringToTerraform(struct.workgroup),
};
}
function virtualMachineCloneCustomizeWindowsOptionsToHclTerraform(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 = {
admin_password: {
value: cdktf.stringToHclTerraform(struct.adminPassword),
isBlock: false,
type: "simple",
storageClassType: "string",
},
auto_logon: {
value: cdktf.booleanToHclTerraform(struct.autoLogon),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
auto_logon_count: {
value: cdktf.numberToHclTerraform(struct.autoLogonCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
computer_name: {
value: cdktf.stringToHclTerraform(struct.computerName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
domain_admin_password: {
value: cdktf.stringToHclTerraform(struct.domainAdminPassword),
isBlock: false,
type: "simple",
storageClassType: "string",
},
domain_admin_user: {
value: cdktf.stringToHclTerraform(struct.domainAdminUser),
isBlock: false,
type: "simple",
storageClassType: "string",
},
domain_ou: {
value: cdktf.stringToHclTerraform(struct.domainOu),
isBlock: false,
type: "simple",
storageClassType: "string",
},
full_name: {
value: cdktf.stringToHclTerraform(struct.fullName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
join_domain: {
value: cdktf.stringToHclTerraform(struct.joinDomain),
isBlock: false,
type: "simple",
storageClassType: "string",
},
organization_name: {
value: cdktf.stringToHclTerraform(struct.organizationName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
product_key: {
value: cdktf.stringToHclTerraform(struct.productKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
run_once_command_list: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.runOnceCommandList),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
time_zone: {
value: cdktf.numberToHclTerraform(struct.timeZone),
isBlock: false,
type: "simple",
storageClassType: "number",
},
workgroup: {
value: cdktf.stringToHclTerraform(struct.workgroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class VirtualMachineCloneCustomizeWindowsOptionsOutputReference 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._adminPassword !== undefined) {
hasAnyValues = true;
internalValueResult.adminPassword = this._adminPassword;
}
if (this._autoLogon !== undefined) {
hasAnyValues = true;
internalValueResult.autoLogon = this._autoLogon;
}
if (this._autoLogonCount !== undefined) {
hasAnyValues = true;
internalValueResult.autoLogonCount = this._autoLogonCount;
}
if (this._computerName !== undefined) {
hasAnyValues = true;
internalValueResult.computerName = this._computerName;
}
if (this._domainAdminPassword !== undefined) {
hasAnyValues = true;
internalValueResult.domainAdminPassword = this._domainAdminPassword;
}
if (this._domainAdminUser !== undefined) {
hasAnyValues = true;
internalValueResult.domainAdminUser = this._domainAdminUser;
}
if (this._domainOu !== undefined) {
hasAnyValues = true;
internalValueResult.domainOu = this._domainOu;
}
if (this._fullName !== undefined) {
hasAnyValues = true;
internalValueResult.fullName = this._fullName;
}
if (this._joinDomain !== undefined) {
hasAnyValues = true;
internalValueResult.joinDomain = this._joinDomain;
}
if (this._organizationName !== undefined) {
hasAnyValues = true;
internalValueResult.organizationName = this._organizationName;
}
if (this._productKey !== undefined) {
hasAnyValues = true;
internalValueResult.productKey = this._productKey;
}
if (this._runOnceCommandList !== undefined) {
hasAnyValues = true;
internalValueResult.runOnceCommandList = this._runOnceCommandList;
}
if (this._timeZone !== undefined) {
hasAnyValues = true;
internalValueResult.timeZone = this._timeZone;
}
if (this._workgroup !== undefined) {
hasAnyValues = true;
internalValueResult.workgroup = this._workgroup;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._adminPassword = undefined;
this._autoLogon = undefined;
this._autoLogonCount = undefined;
this._computerName = undefined;
this._domainAdminPassword = undefined;
this._domainAdminUser = undefined;
this._domainOu = undefined;
this._fullName = undefined;
this._joinDomain = undefined;
this._organizationName = undefined;
this._productKey = undefined;
this._runOnceCommandList = undefined;
this._timeZone = undefined;
this._workgroup = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._adminPassword = value.adminPassword;
this._autoLogon = value.autoLogon;
this._autoLogonCount = value.autoLogonCount;
this._computerName = value.computerName;
this._domainAdminPassword = value.domainAdminPassword;
this._domainAdminUser = value.domainAdminUser;
this._domainOu = value.domainOu;
this._fullName = value.fullName;
this._joinDomain = value.joinDomain;
this._organizationName = value.organizationName;
this._productKey = value.productKey;
this._runOnceCommandList = value.runOnceCommandList;
this._timeZone = value.timeZone;
this._workgroup = value.workgroup;
}
}
get adminPassword() {
return this.getStringAttribute('admin_password');
}
set adminPassword(value) {
this._adminPassword = value;
}
resetAdminPassword() {
this._adminPassword = undefined;
}
// Temporarily expose input value. Use with caution.
get adminPasswordInput() {
return this._adminPassword;
}
get autoLogon() {
return this.getBooleanAttribute('auto_logon');
}
set autoLogon(value) {
this._autoLogon = value;
}
resetAutoLogon() {
this._autoLogon = undefined;
}
// Temporarily expose input value. Use with caution.
get autoLogonInput() {
return this._autoLogon;
}
get autoLogonCount() {
return this.getNumberAttribute('auto_logon_count');
}
set autoLogonCount(value) {
this._autoLogonCount = value;
}
resetAutoLogonCount() {
this._autoLogonCount = undefined;
}
// Temporarily expose input value. Use with caution.
get autoLogonCountInput() {
return this._autoLogonCount;
}
get computerName() {
return this.getStringAttribute('computer_name');
}
set computerName(value) {
this._computerName = value;
}
// Temporarily expose input value. Use with caution.
get computerNameInput() {
return this._computerName;
}
get domainAdminPassword() {
return this.getStringAttribute('domain_admin_password');
}
set domainAdminPassword(value) {
this._domainAdminPassword = value;
}
resetDomainAdminPassword() {
this._domainAdminPassword = undefined;
}
// Temporarily expose input value. Use with caution.
get domainAdminPasswordInput() {
return this._domainAdminPassword;
}
get domainAdminUser() {
return this.getStringAttribute('domain_admin_user');
}
set domainAdminUser(value) {
this._domainAdminUser = value;
}
resetDomainAdminUser() {
this._domainAdminUser = undefined;
}
// Temporarily expose input value. Use with caution.
get domainAdminUserInput() {
return this._domainAdminUser;
}
get domainOu() {
return this.getStringAttribute('domain_ou');
}
set domainOu(value) {
this._domainOu = value;
}
resetDomainOu() {
this._domainOu = undefined;
}
// Temporarily expose input value. Use with caution.
get domainOuInput() {
return this._domainOu;
}
get fullName() {
return this.getStringAttribute('full_name');
}
set fullName(value) {
this._fullName = value;
}
resetFullName() {
this._fullName = undefined;
}
// Temporarily expose input value. Use with caution.
get fullNameInput() {
return this._fullName;
}
get joinDomain() {
return this.getStringAttribute('join_domain');
}
set joinDomain(value) {
this._joinDomain = value;
}
resetJoinDomain() {
this._joinDomain = undefined;
}
// Temporarily expose input value. Use with caution.
get joinDomainInput() {
return this._joinDomain;
}
get organizationName() {
return this.getStringAttribute('organization_name');
}
set organizationName(value) {
this._organizationName = value;
}
resetOrganizationName() {
this._organizationName = undefined;
}
// Temporarily expose input value. Use with caution.
get organizationNameInput() {
return this._organizationName;
}
get productKey() {
return this.getStringAttribute('product_key');
}
set productKey(value) {
this._productKey = value;
}
resetProductKey() {
this._productKey = undefined;
}
// Temporarily expose input value. Use with caution.
get productKeyInput() {
return this._productKey;
}
get runOnceCommandList() {
return this.getListAttribute('run_once_command_list');
}
set runOnceCommandList(value) {
this._runOnceCommandList = value;
}
resetRunOnceCommandList() {
this._runOnceCommandList = undefined;
}
// Temporarily expose input value. Use with caution.
get runOnceCommandListInput() {
return this._runOnceCommandList;
}
get timeZone() {
return this.getNumberAttribute('time_zone');
}
set timeZone(value) {
this._timeZone = value;
}
resetTimeZone() {
this._timeZone = undefined;
}
// Temporarily expose input value. Use with caution.
get timeZoneInput() {
return this._timeZone;
}
get workgroup() {
return this.getStringAttribute('workgroup');
}
set workgroup(value) {
this._workgroup = value;
}
resetWorkgroup() {
this._workgroup = undefined;
}
// Temporarily expose input value. Use with caution.
get workgroupInput() {
return this._workgroup;
}
}
exports.VirtualMachineCloneCustomizeWindowsOptionsOutputReference = VirtualMachineCloneCustomizeWindowsOptionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
VirtualMachineCloneCustomizeWindowsOptionsOutputReference[_g] = { fqn: "@cdktf/provider-vsphere.virtualMachine.VirtualMachineCloneCustomizeWindowsOptionsOutputReference", version: "11.1.0" };
function virtualMachineCloneCustomizeToTerraform(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_server_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.dnsServerList),
dns_suffix_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.dnsSuffixList),
ipv4_gateway: cdktf.stringToTerraform(struct.ipv4Gateway),
ipv6_gateway: cdktf.stringToTerraform(struct.ipv6Gateway),
timeout: cdktf.numberToTerraform(struct.timeout),
windows_sysprep_text: cdktf.stringToTerraform(struct.windowsSysprepText),
linux_options: virtualMachineCloneCustomizeLinuxOptionsToTerraform(struct.linuxOptions),
network_interface: cdktf.listMapper(virtualMachineCloneCustomizeNetworkInterfaceToTerraform, true)(struct.networkInterface),
windows_options: virtualMachineCloneCustomizeWindowsOptionsToTerraform(struct.windowsOptions),
};
}
function virtualMachineCloneCustomizeToHclTerraform(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 = {
dns_server_list: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.dnsServerList),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
dns_suffix_list: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.dnsSuffixList),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
ipv4_gateway: {
value: cdktf.stringToHclTerraform(struct.ipv4Gateway),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ipv6_gateway: {
value: cdktf.stringToHclTerraform(struct.ipv6Gateway),
isBlock: false,
type: "simple",
storageClassType: "string",
},
timeout: {
value: cdktf.numberToHclTerraform(struct.timeout),
isBlock: false,
type: "simple",
storageClassType: "number",
},
windows_sysprep_text: {
value: cdktf.stringToHclTerraform(struct.windowsSysprepText),
isBlock: false,
type: "simple",
storageClassType: "string",
},
linux_options: {
value: virtualMachineCloneCustomizeLinuxOptionsToHclTerraform(struct.linuxOptions),
isBlock: true,
type: "list",
storageClassType: "VirtualMachineCloneCustomizeLinuxOptionsList",
},
network_interface: {
value: cdktf.listMapperHcl(virtualMachineCloneCustomizeNetworkInterfaceToHclTerraform, true)(struct.networkInterface),
isBlock: true,
type: "list",
storageClassType: "VirtualMachineCloneCustomizeNetworkInterfaceList",
},
windows_options: {
value: virtualMachineCloneCustomizeWindowsOptionsToHclTerraform(struct.windowsOptions),
isBlock: true,
type: "list",
storageClassType: "VirtualMachineCloneCustomizeWindowsOptionsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class VirtualMachineCloneCustomizeOutputReference 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;
// linux_options - computed: false, optional: true, required: false
this._linuxOptions = new VirtualMachineCloneCustomizeLinuxOptionsOutputReference(this, "linux_options");
// network_interface - computed: false, optional: true, required: false
this._networkInterface = new VirtualMachineCloneCustomizeNetworkInterfaceList(this, "network_interface", false);
// windows_options - computed: false, optional: true, required: false
this._windowsOptions = new VirtualMachineCloneCustomizeWindowsOptionsOutputReference(this, "windows_options");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dnsServerList !== undefined) {
hasAnyValues = true;
internalValueResult.dnsServerList = this._dnsServerList;
}
if (this._dnsSuffixList !== undefined) {
hasAnyValues = true;
internalValueResult.dnsSuffixList = this._dnsSuffixList;
}
if (this._ipv4Gateway !== undefined) {
hasAnyValues = true;
internalValueResult.ipv4Gateway = this._ipv4Gateway;
}
if (this._ipv6Gateway !== undefined) {
hasAnyValues = true;
internalValueResult.ipv6Gateway = this._ipv6Gateway;
}
if (this._timeout !== undefined) {
hasAnyValues = true;
internalValueResult.timeout = this._timeout;
}
if (this._windowsSysprepText !== undefined) {
hasAnyValues = true;
internalValueResult.windowsSysprepText = this._windowsSysprepText;
}
if (this._linuxOptions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.linuxOptions = this._linuxOptions?.internalValue;
}
if (this._networkInterface?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.networkInterface = this._networkInterface?.internalValue;
}
if (this._windowsOptions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.windowsOptions = this._windowsOptions?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dnsServerList = undefined;
this._dnsSuffixList = undefined;
this._ipv4Gateway = undefined;
this._ipv6Gateway = undefined;
this._timeout = undefined;
this._windowsSysprepText = undefined;
this._linuxOptions.internalValue = undefined