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.Object
Builder 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 VirtualMachine
build()
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']VirtualMachine.Builder
setDescription(java.lang.String description)
Description of this resourceVirtualMachine.Builder
setDisplayName(java.lang.String displayName)
Defaults to ID if not setVirtualMachine.Builder
setExternalId(java.lang.String externalId)
Current external id of this virtual machine in the system.VirtualMachine.Builder
setGuestInfo(GuestInfo guestInfo)
VirtualMachine.Builder
setHostId(java.lang.String hostId)
Id of the host in which this virtual machine exists.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.VirtualMachine.Builder
setLinks(java.util.List<ResourceLink> links)
The server will populate this field when returing the resource.VirtualMachine.Builder
setLocalIdOnHost(java.lang.String localIdOnHost)
Id of the vm unique within the host.VirtualMachine.Builder
setPowerState(java.lang.String powerState)
Possible values are:VirtualMachine.POWER_STATE_VM_RUNNING
VirtualMachine.POWER_STATE_VM_STOPPED
VirtualMachine.POWER_STATE_VM_SUSPENDED
VirtualMachine.POWER_STATE_UNKNOWN
Current power state of this virtual machine in the system.VirtualMachine.Builder
setResourceType(java.lang.String resourceType)
The type of this resource.VirtualMachine.Builder
setRuntimeInfo(VirtualMachineRuntimeInfo runtimeInfo)
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.VirtualMachine.Builder
setScope(java.util.List<DiscoveredResourceScope> scope)
Specifies list of scope of discovered resource.VirtualMachine.Builder
setSelf(SelfResourceLink self)
VirtualMachine.Builder
setSource(ResourceReference source)
VirtualMachine.Builder
setTags(java.util.List<Tag> tags)
Opaque identifiers meaningful to the API userVirtualMachine.Builder
setType(java.lang.String type)
Possible values are:VirtualMachine.TYPE_EDGE
VirtualMachine.TYPE_SERVICE
VirtualMachine.TYPE_REGULAR
VirtualMachine.TYPE_MP
VirtualMachine.TYPE_INTELLIGENCE
VirtualMachine.TYPE_VC_SYSTEM
VirtualMachine.TYPE_UNKNOWN
Virtual Machine type; Edge, Service VM or other.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.
-
-
-
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()
-
-