public final class Instance extends 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
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 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.
|
Boolean |
getCanIpForward()
Allows this instance to send and receive packets with non-matching destination or source IPs.
|
String |
getCpuPlatform()
[Output Only] The CPU platform used by this instance.
|
String |
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
|
Boolean |
getDeletionProtection()
Whether the resource should be protected against deletion.
|
String |
getDescription()
An optional description of this resource.
|
List<AttachedDisk> |
getDisks()
Array of disks associated with this instance.
|
DisplayDevice |
getDisplayDevice()
Enables display device for the instance.
|
List<AcceleratorConfig> |
getGuestAccelerators()
A list of the type and count of accelerator cards attached to the instance.
|
String |
getHostname()
Specifies the hostname of the instance.
|
BigInteger |
getId()
[Output Only] The unique identifier for the resource.
|
String |
getKind()
[Output Only] Type of the resource.
|
String |
getLabelFingerprint()
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
Map<String,String> |
getLabels()
Labels to apply to this instance.
|
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.
|
String |
getMinCpuPlatform()
Specifies a minimum CPU platform for the VM instance.
|
String |
getName()
The name of the resource, provided by the client when initially creating the resource.
|
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.
|
String |
getSelfLink()
[Output Only] Server-defined URL for this resource.
|
List<ServiceAccount> |
getServiceAccounts()
A list of service accounts, with their specified scopes, authorized for this instance.
|
ShieldedInstanceConfig |
getShieldedInstanceConfig() |
ShieldedInstanceIntegrityPolicy |
getShieldedInstanceIntegrityPolicy() |
Boolean |
getStartRestricted()
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
|
String |
getStatus()
[Output Only] The status of the instance.
|
String |
getStatusMessage()
[Output Only] An optional, human-readable explanation of the status.
|
Tags |
getTags()
Tags to apply to this instance.
|
String |
getZone()
[Output Only] URL of the zone where the instance resides.
|
Instance |
set(String fieldName,
Object value) |
Instance |
setCanIpForward(Boolean canIpForward)
Allows this instance to send and receive packets with non-matching destination or source IPs.
|
Instance |
setCpuPlatform(String cpuPlatform)
[Output Only] The CPU platform used by this instance.
|
Instance |
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
|
Instance |
setDeletionProtection(Boolean deletionProtection)
Whether the resource should be protected against deletion.
|
Instance |
setDescription(String description)
An optional description of this resource.
|
Instance |
setDisks(List<AttachedDisk> disks)
Array of disks associated with this instance.
|
Instance |
setDisplayDevice(DisplayDevice displayDevice)
Enables display device for the instance.
|
Instance |
setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
A list of the type and count of accelerator cards attached to the instance.
|
Instance |
setHostname(String hostname)
Specifies the hostname of the instance.
|
Instance |
setId(BigInteger id)
[Output Only] The unique identifier for the resource.
|
Instance |
setKind(String kind)
[Output Only] Type of the resource.
|
Instance |
setLabelFingerprint(String labelFingerprint)
A fingerprint for this request, which is essentially a hash of the label's contents and used
for optimistic locking.
|
Instance |
setLabels(Map<String,String> labels)
Labels to apply to this instance.
|
Instance |
setMachineType(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(String minCpuPlatform)
Specifies a minimum CPU platform for the VM instance.
|
Instance |
setName(String name)
The name of the resource, provided by the client when initially creating the resource.
|
Instance |
setNetworkInterfaces(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(String selfLink)
[Output Only] Server-defined URL for this resource.
|
Instance |
setServiceAccounts(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(Boolean startRestricted)
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected
suspicious activity.
|
Instance |
setStatus(String status)
[Output Only] The status of the instance.
|
Instance |
setStatusMessage(String statusMessage)
[Output Only] An optional, human-readable explanation of the status.
|
Instance |
setTags(Tags tags)
Tags to apply to this instance.
|
Instance |
setZone(String zone)
[Output Only] URL of the zone where the instance resides.
|
getFactory, setFactory, toPrettyString, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Boolean getCanIpForward()
null for nonepublic Instance setCanIpForward(Boolean canIpForward)
canIpForward - canIpForward or null for nonepublic String getCpuPlatform()
null for nonepublic Instance setCpuPlatform(String cpuPlatform)
cpuPlatform - cpuPlatform or null for nonepublic String getCreationTimestamp()
null for nonepublic Instance setCreationTimestamp(String creationTimestamp)
creationTimestamp - creationTimestamp or null for nonepublic Boolean getDeletionProtection()
null for nonepublic Instance setDeletionProtection(Boolean deletionProtection)
deletionProtection - deletionProtection or null for nonepublic String getDescription()
null for nonepublic Instance setDescription(String description)
description - description or null for nonepublic List<AttachedDisk> getDisks()
null for nonepublic Instance setDisks(List<AttachedDisk> disks)
disks - disks or null for nonepublic DisplayDevice getDisplayDevice()
null for nonepublic Instance setDisplayDevice(DisplayDevice displayDevice)
displayDevice - displayDevice or null for nonepublic List<AcceleratorConfig> getGuestAccelerators()
null for nonepublic Instance setGuestAccelerators(List<AcceleratorConfig> guestAccelerators)
guestAccelerators - guestAccelerators or null for nonepublic String getHostname()
null for nonepublic Instance setHostname(String hostname)
hostname - hostname or null for nonepublic BigInteger getId()
null for nonepublic Instance setId(BigInteger id)
id - id or null for nonepublic String getKind()
null for nonepublic Instance setKind(String kind)
kind - kind or null for nonepublic String getLabelFingerprint()
null for nonedecodeLabelFingerprint()public byte[] decodeLabelFingerprint()
null for nonegetLabelFingerprint()public Instance setLabelFingerprint(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 Map<String,String> getLabels()
null for nonepublic Instance setLabels(Map<String,String> labels)
labels - labels or null for nonepublic String getMachineType()
null for nonepublic Instance setMachineType(String machineType)
machineType - machineType or null for nonepublic Metadata getMetadata()
null for nonepublic Instance setMetadata(Metadata metadata)
metadata - metadata or null for nonepublic String getMinCpuPlatform()
null for nonepublic Instance setMinCpuPlatform(String minCpuPlatform)
minCpuPlatform - minCpuPlatform or null for nonepublic String getName()
null for nonepublic Instance setName(String name)
name - name or null for nonepublic List<NetworkInterface> getNetworkInterfaces()
null for nonepublic Instance setNetworkInterfaces(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 String getSelfLink()
null for nonepublic Instance setSelfLink(String selfLink)
selfLink - selfLink or null for nonepublic List<ServiceAccount> getServiceAccounts()
null for nonepublic Instance setServiceAccounts(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 Boolean getStartRestricted()
null for nonepublic Instance setStartRestricted(Boolean startRestricted)
startRestricted - startRestricted or null for nonepublic String getStatus()
null for nonepublic Instance setStatus(String status)
status - status or null for nonepublic String getStatusMessage()
null for nonepublic Instance setStatusMessage(String statusMessage)
statusMessage - statusMessage or null for nonepublic Tags getTags()
null for nonepublic Instance setTags(Tags tags)
tags - tags or null for nonepublic String getZone()
null for nonepublic Instance setZone(String zone)
zone - zone or null for nonepublic Instance set(String fieldName, Object value)
set in class GenericJsonpublic Instance clone()
clone in class GenericJsonCopyright © 2011–2019 Google. All rights reserved.