@cdktf/provider-vsphere
Version:
Prebuilt vsphere Provider for Terraform CDK (cdktf)
1,269 lines • 176 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GuestOsCustomization = exports.GuestOsCustomizationSpecOutputReference = exports.GuestOsCustomizationSpecWindowsOptionsOutputReference = exports.GuestOsCustomizationSpecNetworkInterfaceList = exports.GuestOsCustomizationSpecNetworkInterfaceOutputReference = exports.GuestOsCustomizationSpecLinuxOptionsOutputReference = void 0;
exports.guestOsCustomizationSpecLinuxOptionsToTerraform = guestOsCustomizationSpecLinuxOptionsToTerraform;
exports.guestOsCustomizationSpecLinuxOptionsToHclTerraform = guestOsCustomizationSpecLinuxOptionsToHclTerraform;
exports.guestOsCustomizationSpecNetworkInterfaceToTerraform = guestOsCustomizationSpecNetworkInterfaceToTerraform;
exports.guestOsCustomizationSpecNetworkInterfaceToHclTerraform = guestOsCustomizationSpecNetworkInterfaceToHclTerraform;
exports.guestOsCustomizationSpecWindowsOptionsToTerraform = guestOsCustomizationSpecWindowsOptionsToTerraform;
exports.guestOsCustomizationSpecWindowsOptionsToHclTerraform = guestOsCustomizationSpecWindowsOptionsToHclTerraform;
exports.guestOsCustomizationSpecToTerraform = guestOsCustomizationSpecToTerraform;
exports.guestOsCustomizationSpecToHclTerraform = guestOsCustomizationSpecToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function guestOsCustomizationSpecLinuxOptionsToTerraform(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 guestOsCustomizationSpecLinuxOptionsToHclTerraform(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 GuestOsCustomizationSpecLinuxOptionsOutputReference 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.GuestOsCustomizationSpecLinuxOptionsOutputReference = GuestOsCustomizationSpecLinuxOptionsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
GuestOsCustomizationSpecLinuxOptionsOutputReference[_a] = { fqn: "@cdktf/provider-vsphere.guestOsCustomization.GuestOsCustomizationSpecLinuxOptionsOutputReference", version: "11.1.0" };
function guestOsCustomizationSpecNetworkInterfaceToTerraform(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 guestOsCustomizationSpecNetworkInterfaceToHclTerraform(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 GuestOsCustomizationSpecNetworkInterfaceOutputReference 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.GuestOsCustomizationSpecNetworkInterfaceOutputReference = GuestOsCustomizationSpecNetworkInterfaceOutputReference;
_b = JSII_RTTI_SYMBOL_1;
GuestOsCustomizationSpecNetworkInterfaceOutputReference[_b] = { fqn: "@cdktf/provider-vsphere.guestOsCustomization.GuestOsCustomizationSpecNetworkInterfaceOutputReference", version: "11.1.0" };
class GuestOsCustomizationSpecNetworkInterfaceList 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 GuestOsCustomizationSpecNetworkInterfaceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GuestOsCustomizationSpecNetworkInterfaceList = GuestOsCustomizationSpecNetworkInterfaceList;
_c = JSII_RTTI_SYMBOL_1;
GuestOsCustomizationSpecNetworkInterfaceList[_c] = { fqn: "@cdktf/provider-vsphere.guestOsCustomization.GuestOsCustomizationSpecNetworkInterfaceList", version: "11.1.0" };
function guestOsCustomizationSpecWindowsOptionsToTerraform(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 guestOsCustomizationSpecWindowsOptionsToHclTerraform(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 GuestOsCustomizationSpecWindowsOptionsOutputReference 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.GuestOsCustomizationSpecWindowsOptionsOutputReference = GuestOsCustomizationSpecWindowsOptionsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
GuestOsCustomizationSpecWindowsOptionsOutputReference[_d] = { fqn: "@cdktf/provider-vsphere.guestOsCustomization.GuestOsCustomizationSpecWindowsOptionsOutputReference", version: "11.1.0" };
function guestOsCustomizationSpecToTerraform(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),
windows_sysprep_text: cdktf.stringToTerraform(struct.windowsSysprepText),
linux_options: guestOsCustomizationSpecLinuxOptionsToTerraform(struct.linuxOptions),
network_interface: cdktf.listMapper(guestOsCustomizationSpecNetworkInterfaceToTerraform, true)(struct.networkInterface),
windows_options: guestOsCustomizationSpecWindowsOptionsToTerraform(struct.windowsOptions),
};
}
function guestOsCustomizationSpecToHclTerraform(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",
},
windows_sysprep_text: {
value: cdktf.stringToHclTerraform(struct.windowsSysprepText),
isBlock: false,
type: "simple",
storageClassType: "string",
},
linux_options: {
value: guestOsCustomizationSpecLinuxOptionsToHclTerraform(struct.linuxOptions),
isBlock: true,
type: "list",
storageClassType: "GuestOsCustomizationSpecLinuxOptionsList",
},
network_interface: {
value: cdktf.listMapperHcl(guestOsCustomizationSpecNetworkInterfaceToHclTerraform, true)(struct.networkInterface),
isBlock: true,
type: "list",
storageClassType: "GuestOsCustomizationSpecNetworkInterfaceList",
},
windows_options: {
value: guestOsCustomizationSpecWindowsOptionsToHclTerraform(struct.windowsOptions),
isBlock: true,
type: "list",
storageClassType: "GuestOsCustomizationSpecWindowsOptionsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class GuestOsCustomizationSpecOutputReference 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 GuestOsCustomizationSpecLinuxOptionsOutputReference(this, "linux_options");
// network_interface - computed: false, optional: true, required: false
this._networkInterface = new GuestOsCustomizationSpecNetworkInterfaceList(this, "network_interface", false);
// windows_options - computed: false, optional: true, required: false
this._windowsOptions = new GuestOsCustomizationSpecWindowsOptionsOutputReference(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._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._windowsSysprepText = undefined;
this._linuxOptions.internalValue = undefined;
this._networkInterface.internalValue = undefined;
this._windowsOptions.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dnsServerList = value.dnsServerList;
this._dnsSuffixList = value.dnsSuffixList;
this._ipv4Gateway = value.ipv4Gateway;
this._ipv6Gateway = value.ipv6Gateway;
this._windowsSysprepText = value.windowsSysprepText;
this._linuxOptions.internalValue = value.linuxOptions;
this._networkInterface.internalValue = value.networkInterface;
this._windowsOptions.internalValue = value.windowsOptions;
}
}
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 dnsSuffixList() {
return this.getListAttribute('dns_suffix_list');
}
set dnsSuffixList(value) {
this._dnsSuffixList = value;
}
resetDnsSuffixList() {
this._dnsSuffixList = undefined;
}
// Temporarily expose input value. Use with caution.
get dnsSuffixListInput() {
return this._dnsSuffixList;
}
get ipv4Gateway() {
return this.getStringAttribute('ipv4_gateway');
}
set ipv4Gateway(value) {
this._ipv4Gateway = value;
}
resetIpv4Gateway() {
this._ipv4Gateway = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv4GatewayInput() {
return this._ipv4Gateway;
}
get ipv6Gateway() {
return this.getStringAttribute('ipv6_gateway');
}
set ipv6Gateway(value) {
this._ipv6Gateway = value;
}
resetIpv6Gateway() {
this._ipv6Gateway = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv6GatewayInput() {
return this._ipv6Gateway;
}
get windowsSysprepText() {
return this.getStringAttribute('windows_sysprep_text');
}
set windowsSysprepText(value) {
this._windowsSysprepText = value;
}
resetWindowsSysprepText() {
this._windowsSysprepText = undefined;
}
// Temporarily expose input value. Use with caution.
get windowsSysprepTextInput() {
return this._windowsSysprepText;
}
get linuxOptions() {
return this._linuxOptions;
}
putLinuxOptions(value) {
this._linuxOptions.internalValue = value;
}
resetLinuxOptions() {
this._linuxOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get linuxOptionsInput() {
return this._linuxOptions.internalValue;
}
get networkInterface() {
return this._networkInterface;
}
putNetworkInterface(value) {
this._networkInterface.internalValue = value;
}
resetNetworkInterface() {
this._networkInterface.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get networkInterfaceInput() {
return this._networkInterface.internalValue;
}
get windowsOptions() {
return this._windowsOptions;
}
putWindowsOptions(value) {
this._windowsOptions.internalValue = value;
}
resetWindowsOptions() {
this._windowsOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get windowsOptionsInput() {
return this._windowsOptions.internalValue;
}
}
exports.GuestOsCustomizationSpecOutputReference = GuestOsCustomizationSpecOutputReference;
_e = JSII_RTTI_SYMBOL_1;
GuestOsCustomizationSpecOutputReference[_e] = { fqn: "@cdktf/provider-vsphere.guestOsCustomization.GuestOsCustomizationSpecOutputReference", version: "11.1.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/vmware/vsphere/2.14.0/docs/resources/guest_os_customization vsphere_guest_os_customization}
*/
class GuestOsCustomization extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a GuestOsCustomization 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 GuestOsCustomization to import
* @param importFromId The id of the existing GuestOsCustomization that should be imported. Refer to the {@link https://registry.terraform.io/providers/vmware/vsphere/2.14.0/docs/resources/guest_os_customization#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the GuestOsCustomization to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "vsphere_guest_os_customization", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/vmware/vsphere/2.14.0/docs/resources/guest_os_customization vsphere_guest_os_customization} 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 GuestOsCustomizationConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'vsphere_guest_os_customization',
terraformGeneratorMetadata: {
providerName: 'vsphere',
providerVersion: '2.14.0',
providerVersionConstraint: '~> 2.13'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// spec - computed: false, optional: false, required: true
this._spec = new GuestOsCustomizationSpecOutputReference(this, "spec");
this._description = config.description;
this._id = config.id;
this._name = config.name;
this._type = config.type;
this._spec.internalValue = config.spec;
}
// ==========
// ATTRIBUTES
// ==========
// change_version - computed: true, optional: false, required: false
get changeVersion() {
return this.getStringAttribute('change_version');
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
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;
}
// last_update_time - computed: true, optional: false, required: false
get lastUpdateTime() {
return this.getStringAttribute('last_update_time');
}
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 type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get spec() {
return this._spec;
}
putSpec(value) {
this._spec.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get specInput() {
return this._spec.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
description: cdktf.stringToTerraform(this._description),
id: cdktf.stringToTerraform(this._id),
name: cdktf.stringToTerraform(this._name),
type: cdktf.stringToTerraform(this._type),
spec: guestOsCustomizationSpecToTerraform(this._spec.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
type: {
value: cdktf.stringToHclTerraform(this._type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
spec: {
value: guestOsCustomizationSpecToHclTerraform(this._spec.internalValue),
isBlock: true,
type: "list",
storageClassType: "GuestOsCustomizationSpecList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.GuestOsCustomization = GuestOsCustomization;
_f = JSII_RTTI_SYMBOL_1;
GuestOsCustomization[_f] = { fqn: "@cdktf/provider-vsphere.guestOsCustomization.GuestOsCustomization", version: "11.1.0" };
// =================
// STATIC PROPERTIES
// =================
GuestOsCustomization.tfResourceType = "vsphere_guest_os_customization";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ3Vlc3Qtb3MtY3VzdG9taXphdGlvbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBK0VBLDBHQVlDO0FBR0QsZ0hBd0NDO0FBMktELGtIQWFDO0FBR0Qsd0hBOENDO0FBdVJELDhHQXFCQztBQUdELG9IQThGQztBQWdZRCxrRkFlQztBQUdELHdGQTBEQzs7QUEvckNELCtCQUErQjtBQXNFL0IsU0FBZ0IsK0NBQStDLENBQUMsTUFBbUc7SUFDakssSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUFBTSxDQUFDO0lBQUMsQ0FBQztJQUM1RixJQUFJLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQ25DLE1BQU0sSUFBSSxLQUFLLENBQUMsb0hBQW9ILENBQUMsQ0FBQztJQUN4SSxDQUFDO0lBQ0QsT0FBTztRQUNMLE1BQU0sRUFBRSxLQUFLLENBQUMsaUJBQWlCLENBQUMsTUFBTyxDQUFDLE1BQU0sQ0FBQztRQUMvQyxTQUFTLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxRQUFRLENBQUM7UUFDcEQsWUFBWSxFQUFFLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFPLENBQUMsVUFBVSxDQUFDO1FBQzFELFdBQVcsRUFBRSxLQUFLLENBQUMsaUJBQWlCLENBQUMsTUFBTyxDQUFDLFVBQVUsQ0FBQztRQUN4RCxTQUFTLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxRQUFRLENBQUM7S0FDckQsQ0FBQTtBQUNILENBQUM7QUFHRCxTQUFnQixrREFBa0QsQ0FBQyxNQUFtRztJQUNwSyxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxNQUFNLEtBQUssR0FBRztRQUNaLE1BQU0sRUFBRTtZQUNOLEtBQUssRUFBRSxLQUFLLENBQUMsb0JBQW9CLENBQUMsTUFBTyxDQUFDLE1BQU0sQ0FBQztZQUNqRCxPQUFPLEVBQUUsS0FBSztZQUNkLElBQUksRUFBRSxRQUFRO1lBQ2QsZ0JBQWdCLEVBQUUsUUFBUTtTQUMzQjtRQUNELFNBQVMsRUFBRTtZQUNULEtBQUssRUFBRSxLQUFLLENBQUMsb0JBQW9CLENBQUMsTUFBTyxDQUFDLFFBQVEsQ0FBQztZQUNuRCxPQUFPLEVBQUUsS0FBSztZQUNkLElBQUksRUFBRSxRQUFRO1lBQ2QsZ0JBQWdCLEVBQUUsUUFBUTtTQUMzQjtRQUNELFlBQVksR