public final class Instance
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags
Constructor and Description |
---|
Instance() |
Modifier and Type | Method and Description |
---|---|
Instance |
clone() |
byte[] |
decodeLabelFingerprint()
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
Instance |
encodeLabelFingerprint(byte[] labelFingerprint)
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
java.lang.Boolean |
getCanIpForward()
Allows this instance to send and receive packets with non-matching destination or source IPs.
|
java.lang.String |
getCpuPlatform()
[Output Only] The CPU platform used by this instance.
|
java.lang.String |
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
|
java.lang.Boolean |
getDeletionProtection()
Whether the resource should be protected against deletion.
|
java.lang.String |
getDescription()
An optional description of this resource.
|
java.util.List<AttachedDisk> |
getDisks()
Array of disks associated with this instance.
|
DisplayDevice |
getDisplayDevice()
Enables display device for the instance.
|
java.util.List<AcceleratorConfig> |
getGuestAccelerators()
A list of the type and count of accelerator cards attached to the instance.
|
java.lang.String |
getHostname()
Specifies the hostname of the instance.
|
java.math.BigInteger |
getId()
[Output Only] The unique identifier for the resource.
|
java.lang.String |
getKind()
[Output Only] Type of the resource.
|
java.lang.String |
getLabelFingerprint()
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
java.util.Map<java.lang.String,java.lang.String> |
getLabels()
Labels to apply to this instance.
|
java.lang.String |
getMachineType()
Full or partial URL of the machine type resource to use for this instance, in the format:
zones/zone/machineTypes/machine-type.
|
Metadata |
getMetadata()
The metadata key/value pairs assigned to this instance.
|
java.lang.String |
getMinCpuPlatform()
Specifies a minimum CPU platform for the VM instance.
|
java.lang.String |
getName()
The name of the resource, provided by the client when initially creating the resource.
|
java.util.List<NetworkInterface> |
getNetworkInterfaces()
An array of network configurations for this instance.
|
ReservationAffinity |
getReservationAffinity()
Specifies the reservations that this instance can consume from.
|
Scheduling |
getScheduling()
Sets the scheduling options for this instance.
|
java.lang.String |
getSelfLink()
[Output Only] Server-defined URL for this resource.
|
java.util.List<ServiceAccount> |
getServiceAccounts()
A list of service accounts, with their specified scopes, authorized for this instance.
|
ShieldedInstanceConfig |
getShieldedInstanceConfig() |
ShieldedInstanceIntegrityPolicy |
getShieldedInstanceIntegrityPolicy() |
java.lang.Boolean |
getStartRestricted()
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
|
java.lang.String |
getStatus()
[Output Only] The status of the instance.
|
java.lang.String |
getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
|
Tags |
getTags()
Tags to apply to this instance.
|
java.lang.String |
getZone()
[Output Only] URL of the zone where the instance resides.
|
Instance |
set(java.lang.String fieldName,
java.lang.Object value) |
Instance |
setCanIpForward(java.lang.Boolean canIpForward)
Allows this instance to send and receive packets with non-matching destination or source IPs.
|
Instance |
setCpuPlatform(java.lang.String cpuPlatform)
[Output Only] The CPU platform used by this instance.
|
Instance |
setCreationTimestamp(java.lang.String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
|
Instance |
setDeletionProtection(java.lang.Boolean deletionProtection)
Whether the resource should be protected against deletion.
|
Instance |
setDescription(java.lang.String description)
An optional description of this resource.
|
Instance |
setDisks(java.util.List<AttachedDisk> disks)
Array of disks associated with this instance.
|
Instance |
setDisplayDevice(DisplayDevice displayDevice)
Enables display device for the instance.
|
Instance |
setGuestAccelerators(java.util.List<AcceleratorConfig> guestAccelerators)
A list of the type and count of accelerator cards attached to the instance.
|
Instance |
setHostname(java.lang.String hostname)
Specifies the hostname of the instance.
|
Instance |
setId(java.math.BigInteger id)
[Output Only] The unique identifier for the resource.
|
Instance |
setKind(java.lang.String kind)
[Output Only] Type of the resource.
|
Instance |
setLabelFingerprint(java.lang.String labelFingerprint)
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
Instance |
setLabels(java.util.Map<java.lang.String,java.lang.String> labels)
Labels to apply to this instance.
|
Instance |
setMachineType(java.lang.String machineType)
Full or partial URL of the machine type resource to use for this instance, in the format:
zones/zone/machineTypes/machine-type.
|
Instance |
setMetadata(Metadata metadata)
The metadata key/value pairs assigned to this instance.
|
Instance |
setMinCpuPlatform(java.lang.String minCpuPlatform)
Specifies a minimum CPU platform for the VM instance.
|
Instance |
setName(java.lang.String name)
The name of the resource, provided by the client when initially creating the resource.
|
Instance |
setNetworkInterfaces(java.util.List<NetworkInterface> networkInterfaces)
An array of network configurations for this instance.
|
Instance |
setReservationAffinity(ReservationAffinity reservationAffinity)
Specifies the reservations that this instance can consume from.
|
Instance |
setScheduling(Scheduling scheduling)
Sets the scheduling options for this instance.
|
Instance |
setSelfLink(java.lang.String selfLink)
[Output Only] Server-defined URL for this resource.
|
Instance |
setServiceAccounts(java.util.List<ServiceAccount> serviceAccounts)
A list of service accounts, with their specified scopes, authorized for this instance.
|
Instance |
setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig) |
Instance |
setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy) |
Instance |
setStartRestricted(java.lang.Boolean startRestricted)
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
|
Instance |
setStatus(java.lang.String status)
[Output Only] The status of the instance.
|
Instance |
setStatusMessage(java.lang.String statusMessage)
[Output Only] An optional, human-readable explanation of the status.
|
Instance |
setTags(Tags tags)
Tags to apply to this instance.
|
Instance |
setZone(java.lang.String zone)
[Output Only] URL of the zone where the instance resides.
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
public java.lang.Boolean getCanIpForward()
null
for nonepublic Instance setCanIpForward(java.lang.Boolean canIpForward)
canIpForward
- canIpForward or null
for nonepublic java.lang.String getCpuPlatform()
null
for nonepublic Instance setCpuPlatform(java.lang.String cpuPlatform)
cpuPlatform
- cpuPlatform or null
for nonepublic java.lang.String getCreationTimestamp()
null
for nonepublic Instance setCreationTimestamp(java.lang.String creationTimestamp)
creationTimestamp
- creationTimestamp or null
for nonepublic java.lang.Boolean getDeletionProtection()
null
for nonepublic Instance setDeletionProtection(java.lang.Boolean deletionProtection)
deletionProtection
- deletionProtection or null
for nonepublic java.lang.String getDescription()
null
for nonepublic Instance setDescription(java.lang.String description)
description
- description or null
for nonepublic java.util.List<AttachedDisk> getDisks()
null
for nonepublic Instance setDisks(java.util.List<AttachedDisk> disks)
disks
- disks or null
for nonepublic DisplayDevice getDisplayDevice()
null
for nonepublic Instance setDisplayDevice(DisplayDevice displayDevice)
displayDevice
- displayDevice or null
for nonepublic java.util.List<AcceleratorConfig> getGuestAccelerators()
null
for nonepublic Instance setGuestAccelerators(java.util.List<AcceleratorConfig> guestAccelerators)
guestAccelerators
- guestAccelerators or null
for nonepublic java.lang.String getHostname()
null
for nonepublic Instance setHostname(java.lang.String hostname)
hostname
- hostname or null
for nonepublic java.math.BigInteger getId()
null
for nonepublic Instance setId(java.math.BigInteger id)
id
- id or null
for nonepublic java.lang.String getKind()
null
for nonepublic Instance setKind(java.lang.String kind)
kind
- kind or null
for nonepublic java.lang.String getLabelFingerprint()
null
for nonedecodeLabelFingerprint()
public byte[] decodeLabelFingerprint()
null
for nonegetLabelFingerprint()
public Instance setLabelFingerprint(java.lang.String labelFingerprint)
labelFingerprint
- labelFingerprint or null
for none#encodeLabelFingerprint()
public Instance encodeLabelFingerprint(byte[] labelFingerprint)
The value is encoded Base64 or {@code null} for none.
public java.util.Map<java.lang.String,java.lang.String> getLabels()
null
for nonepublic Instance setLabels(java.util.Map<java.lang.String,java.lang.String> labels)
labels
- labels or null
for nonepublic java.lang.String getMachineType()
null
for nonepublic Instance setMachineType(java.lang.String machineType)
machineType
- machineType or null
for nonepublic Metadata getMetadata()
null
for nonepublic Instance setMetadata(Metadata metadata)
metadata
- metadata or null
for nonepublic java.lang.String getMinCpuPlatform()
null
for nonepublic Instance setMinCpuPlatform(java.lang.String minCpuPlatform)
minCpuPlatform
- minCpuPlatform or null
for nonepublic java.lang.String getName()
null
for nonepublic Instance setName(java.lang.String name)
name
- name or null
for nonepublic java.util.List<NetworkInterface> getNetworkInterfaces()
null
for nonepublic Instance setNetworkInterfaces(java.util.List<NetworkInterface> networkInterfaces)
networkInterfaces
- networkInterfaces or null
for nonepublic ReservationAffinity getReservationAffinity()
null
for nonepublic Instance setReservationAffinity(ReservationAffinity reservationAffinity)
reservationAffinity
- reservationAffinity or null
for nonepublic Scheduling getScheduling()
null
for nonepublic Instance setScheduling(Scheduling scheduling)
scheduling
- scheduling or null
for nonepublic java.lang.String getSelfLink()
null
for nonepublic Instance setSelfLink(java.lang.String selfLink)
selfLink
- selfLink or null
for nonepublic java.util.List<ServiceAccount> getServiceAccounts()
null
for nonepublic Instance setServiceAccounts(java.util.List<ServiceAccount> serviceAccounts)
serviceAccounts
- serviceAccounts or null
for nonepublic ShieldedInstanceConfig getShieldedInstanceConfig()
null
for nonepublic Instance setShieldedInstanceConfig(ShieldedInstanceConfig shieldedInstanceConfig)
shieldedInstanceConfig
- shieldedInstanceConfig or null
for nonepublic ShieldedInstanceIntegrityPolicy getShieldedInstanceIntegrityPolicy()
null
for nonepublic Instance setShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy shieldedInstanceIntegrityPolicy)
shieldedInstanceIntegrityPolicy
- shieldedInstanceIntegrityPolicy or null
for nonepublic java.lang.Boolean getStartRestricted()
null
for nonepublic Instance setStartRestricted(java.lang.Boolean startRestricted)
startRestricted
- startRestricted or null
for nonepublic java.lang.String getStatus()
null
for nonepublic Instance setStatus(java.lang.String status)
status
- status or null
for nonepublic java.lang.String getStatusMessage()
null
for nonepublic Instance setStatusMessage(java.lang.String statusMessage)
statusMessage
- statusMessage or null
for nonepublic Tags getTags()
null
for nonepublic Instance setTags(Tags tags)
tags
- tags or null
for nonepublic java.lang.String getZone()
null
for nonepublic Instance setZone(java.lang.String zone)
zone
- zone or null
for nonepublic Instance set(java.lang.String fieldName, java.lang.Object value)
set
in class com.google.api.client.json.GenericJson
public Instance clone()
clone
in class com.google.api.client.json.GenericJson