Package com.vmware.nsx_policy.model
Class VirtualMachine.Builder
- java.lang.Object
-
- com.vmware.nsx_policy.model.VirtualMachine.Builder
-
- Enclosing class:
- VirtualMachine
public static final class VirtualMachine.Builder extends java.lang.ObjectBuilder class forVirtualMachine.
-
-
Constructor Summary
Constructors Constructor Description Builder()Constructor with parameters for the required properties ofVirtualMachine.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VirtualMachinebuild()VirtualMachine.BuildersetComputeIds(java.util.List<java.lang.String> computeIds)List of external compute ids of the virtual machine in the format 'id-type-key:value' , list of external compute ids ['uuid:xxxx-xxxx-xxxx-xxxx', 'moIdOnHost:moref-11', 'instanceUuid:xxxx-xxxx-xxxx-xxxx']VirtualMachine.BuildersetDescription(java.lang.String description)Description of this resourceVirtualMachine.BuildersetDisplayName(java.lang.String displayName)Defaults to ID if not setVirtualMachine.BuildersetExternalId(java.lang.String externalId)Current external id of this virtual machine in the system.VirtualMachine.BuildersetGuestInfo(GuestInfo guestInfo)VirtualMachine.BuildersetHostId(java.lang.String hostId)Id of the host in which this virtual machine exists.VirtualMachine.BuildersetLastSyncTime(java.lang.Long lastSyncTime)Timestamp of last modification format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.VirtualMachine.BuildersetLinks(java.util.List<ResourceLink> links)The server will populate this field when returing the resource.VirtualMachine.BuildersetLocalIdOnHost(java.lang.String localIdOnHost)Id of the vm unique within the host.VirtualMachine.BuildersetPowerState(java.lang.String powerState)Possible values are:VirtualMachine.POWER_STATE_VM_RUNNINGVirtualMachine.POWER_STATE_VM_STOPPEDVirtualMachine.POWER_STATE_VM_SUSPENDEDVirtualMachine.POWER_STATE_UNKNOWNCurrent power state of this virtual machine in the system.VirtualMachine.BuildersetResourceType(java.lang.String resourceType)The type of this resource.VirtualMachine.BuildersetRuntimeInfo(VirtualMachineRuntimeInfo runtimeInfo)VirtualMachine.BuildersetSchema(java.lang.String schema)Schema for this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.VirtualMachine.BuildersetScope(java.util.List<DiscoveredResourceScope> scope)Specifies list of scope of discovered resource.VirtualMachine.BuildersetSelf(SelfResourceLink self)VirtualMachine.BuildersetSource(ResourceReference source)VirtualMachine.BuildersetTags(java.util.List<Tag> tags)Opaque identifiers meaningful to the API userVirtualMachine.BuildersetType(java.lang.String type)Possible values are:VirtualMachine.TYPE_EDGEVirtualMachine.TYPE_SERVICEVirtualMachine.TYPE_REGULARVirtualMachine.TYPE_MPVirtualMachine.TYPE_INTELLIGENCEVirtualMachine.TYPE_VC_SYSTEMVirtualMachine.TYPE_UNKNOWNVirtual Machine type; Edge, Service VM or other.VirtualMachine.BuildersetUptv2Enabled(java.lang.Boolean uptv2Enabled)If UPT enabled is true for any virtual network interface of the virtual machine, then this property is true for the virtual machine.
-
-
-
Constructor Detail
-
Builder
public Builder()
Constructor with parameters for the required properties ofVirtualMachine.
-
-
Method Detail
-
setLinks
public VirtualMachine.Builder setLinks(java.util.List<ResourceLink> links)
The server will populate this field when returing the resource. Ignored on PUT and POST. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
links- New value for the property.
-
setSchema
public VirtualMachine.Builder setSchema(java.lang.String schema)
Schema for this resource This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
schema- New value for the property.
-
setSelf
public VirtualMachine.Builder setSelf(SelfResourceLink self)
- Parameters:
self- New value for the property.
-
setLastSyncTime
public VirtualMachine.Builder setLastSyncTime(java.lang.Long lastSyncTime)
Timestamp of last modification format: int64 This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
lastSyncTime- New value for the property.
-
setDescription
public VirtualMachine.Builder setDescription(java.lang.String description)
Description of this resource- Parameters:
description- New value for the property.
-
setDisplayName
public VirtualMachine.Builder setDisplayName(java.lang.String displayName)
Defaults to ID if not set- Parameters:
displayName- New value for the property.
-
setResourceType
public VirtualMachine.Builder setResourceType(java.lang.String resourceType)
The type of this resource.- Parameters:
resourceType- New value for the property.
-
setScope
public VirtualMachine.Builder setScope(java.util.List<DiscoveredResourceScope> scope)
Specifies list of scope of discovered resource. e.g. if VHC path is associated with principal identity, who owns the discovered resource, then scope id will be VHC path and scope type will be VHC.- Parameters:
scope- New value for the property.
-
setTags
public VirtualMachine.Builder setTags(java.util.List<Tag> tags)
Opaque identifiers meaningful to the API user- Parameters:
tags- New value for the property.
-
setComputeIds
public VirtualMachine.Builder setComputeIds(java.util.List<java.lang.String> computeIds)
List of external compute ids of the virtual machine in the format 'id-type-key:value' , list of external compute ids ['uuid:xxxx-xxxx-xxxx-xxxx', 'moIdOnHost:moref-11', 'instanceUuid:xxxx-xxxx-xxxx-xxxx']- Parameters:
computeIds- New value for the property.
-
setExternalId
public VirtualMachine.Builder setExternalId(java.lang.String externalId)
Current external id of this virtual machine in the system.- Parameters:
externalId- New value for the property.
-
setGuestInfo
public VirtualMachine.Builder setGuestInfo(GuestInfo guestInfo)
- Parameters:
guestInfo- New value for the property.
-
setHostId
public VirtualMachine.Builder setHostId(java.lang.String hostId)
Id of the host in which this virtual machine exists.- Parameters:
hostId- New value for the property.
-
setLocalIdOnHost
public VirtualMachine.Builder setLocalIdOnHost(java.lang.String localIdOnHost)
Id of the vm unique within the host.- Parameters:
localIdOnHost- New value for the property.
-
setPowerState
public VirtualMachine.Builder setPowerState(java.lang.String powerState)
Possible values are: Current power state of this virtual machine in the system.- Parameters:
powerState- New value for the property.
-
setRuntimeInfo
public VirtualMachine.Builder setRuntimeInfo(VirtualMachineRuntimeInfo runtimeInfo)
- Parameters:
runtimeInfo- New value for the property.
-
setSource
public VirtualMachine.Builder setSource(ResourceReference source)
- Parameters:
source- New value for the property.
-
setType
public VirtualMachine.Builder setType(java.lang.String type)
Possible values are: Virtual Machine type; Edge, Service VM or other. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
type- New value for the property.
-
setUptv2Enabled
public VirtualMachine.Builder setUptv2Enabled(java.lang.Boolean uptv2Enabled)
If UPT enabled is true for any virtual network interface of the virtual machine, then this property is true for the virtual machine. This property may be present in responses from the server, but if it is present in a request to server it will be ignored.- Parameters:
uptv2Enabled- New value for the property.
-
build
public VirtualMachine build()
-
-