public static final class VMTypes.CloneSpec.Builder
extends java.lang.Object
VMTypes.CloneSpec
.Constructor and Description |
---|
Builder(java.lang.String source,
java.lang.String name)
Constructor with parameters for the required properties of
VMTypes.CloneSpec . |
Modifier and Type | Method and Description |
---|---|
VMTypes.CloneSpec |
build() |
VMTypes.CloneSpec.Builder |
setDisksToRemove(java.util.Set<java.lang.String> disksToRemove)
Set of Disks to Remove.
|
VMTypes.CloneSpec.Builder |
setDisksToUpdate(java.util.Map<java.lang.String,VMTypes.DiskCloneSpec> disksToUpdate)
Map of Disks to Update.
|
VMTypes.CloneSpec.Builder |
setGuestCustomizationSpec(VMTypes.GuestCustomizationSpec guestCustomizationSpec)
Guest customization spec to apply to the virtual machine after the virtual
machine is deployed.
|
VMTypes.CloneSpec.Builder |
setPlacement(VMTypes.ClonePlacementSpec placement)
Virtual machine placement information.
|
VMTypes.CloneSpec.Builder |
setPowerOn(java.lang.Boolean powerOn)
Attempt to perform a
VMTypes.CloneSpec.getPowerOn()
after clone. |
public Builder(java.lang.String source, java.lang.String name)
VMTypes.CloneSpec
.public VMTypes.CloneSpec.Builder setPlacement(VMTypes.ClonePlacementSpec placement)
null
, the system will use the values from the source
virtual machine. If specified, each field will be used for placement. If the
fields result in disjoint placement the operation will fail. If the fields along
with the placement values of the source virtual machine result in disjoint
placement the operation will fail.placement
- New value for the property.public VMTypes.CloneSpec.Builder setDisksToRemove(java.util.Set<java.lang.String> disksToRemove)
null
, all disks will be copied. If the same identifier is in VMTypes.CloneSpec.getDisksToUpdate()
InvalidArgument fault
will be returned.disksToRemove
- New value for the property.
When clients pass a value of this class as a parameter, the property must
contain identifiers for the resource type: com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class
as a return value, the property will contain identifiers for the resource type:
com.vmware.vcenter.vm.hardware.Disk
.public VMTypes.CloneSpec.Builder setDisksToUpdate(java.util.Map<java.lang.String,VMTypes.DiskCloneSpec> disksToUpdate)
null
, all disks will copied to the datastore specified in the VMTypes.ClonePlacementSpec.getDatastore()
property of VMTypes.CloneSpec.getPlacement()
. If the same identifier is in
VMTypes.CloneSpec.getDisksToRemove()
InvalidArgument
fault will be thrown.disksToUpdate
- New value for the property.
When clients pass a value of this class as a parameter, the key in the property
Map
must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class
as a return value, the key in the property Map
will be an
identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk
.public VMTypes.CloneSpec.Builder setPowerOn(java.lang.Boolean powerOn)
VMTypes.CloneSpec.getPowerOn()
after clone. This property was added in vSphere API 7.0.0.0.
If null
, the virtual machine will not be powered on.powerOn
- New value for the property.public VMTypes.CloneSpec.Builder setGuestCustomizationSpec(VMTypes.GuestCustomizationSpec guestCustomizationSpec)
null
, the guest operating system is not customized after clone.guestCustomizationSpec
- New value for the property.public VMTypes.CloneSpec build()