public static final class VMTypes.ComputePlacementSpec.Builder
extends java.lang.Object
VMTypes.ComputePlacementSpec
.Constructor and Description |
---|
Builder()
Constructor with parameters for the required properties of
VMTypes.ComputePlacementSpec . |
Modifier and Type | Method and Description |
---|---|
VMTypes.ComputePlacementSpec |
build() |
VMTypes.ComputePlacementSpec.Builder |
setCluster(java.lang.String cluster)
Cluster into which the virtual machine should be placed.
|
VMTypes.ComputePlacementSpec.Builder |
setHost(java.lang.String host)
Host onto which the virtual machine should be placed.
|
VMTypes.ComputePlacementSpec.Builder |
setResourcePool(java.lang.String resourcePool)
Resource pool into which the virtual machine should be placed.
|
public Builder()
VMTypes.ComputePlacementSpec
.public VMTypes.ComputePlacementSpec.Builder setResourcePool(java.lang.String resourcePool)
getHost()
and getCluster()
are null
. In the future, if this property is null
,
the system will attempt to choose a suitable resource pool for the virtual
machine; if a resource pool cannot be chosen, the virtual machine creation
operation will fail.resourcePool
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: ResourcePool
. When methods return a
value of this class as a return value, the property will be an identifier for
the resource type: ResourcePool
.public VMTypes.ComputePlacementSpec.Builder setHost(java.lang.String host)
If getHost()
and getResourcePool()
are both specified, getResourcePool()
must
belong to getHost()
.
If getHost()
and getCluster()
are both specified, getHost()
must be a member of getCluster()
.
null
if getResourcePool()
or getCluster()
is specified. If null
, the system will attempt to choose a
suitable host for the virtual machine; if a host cannot be chosen, the virtual
machine creation operation will fail.host
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: HostSystem
. When methods return a
value of this class as a return value, the property will be an identifier for
the resource type: HostSystem
.public VMTypes.ComputePlacementSpec.Builder setCluster(java.lang.String cluster)
If getCluster()
and getResourcePool()
are both specified, getResourcePool()
must belong to getCluster()
.
If getCluster()
and getHost()
are both specified, getHost()
must
be a member of getCluster()
.
getResourcePool()
or getHost()
is specified, it is
recommended that this property be null
.cluster
- New value for the property.
When clients pass a value of this class as a parameter, the property must be an
identifier for the resource type: ClusterComputeResource
. When methods
return a value of this class as a return value, the property will be an
identifier for the resource type: ClusterComputeResource
.public VMTypes.ComputePlacementSpec build()