public final class Disk 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 | 
|---|
Disk()  | 
| Modifier and Type | Method and Description | 
|---|---|
Disk | 
clone()  | 
byte[] | 
decodeLabelFingerprint()
A fingerprint for the labels being applied to this disk, which is essentially a hash of the
 labels set used for optimistic locking. 
 | 
Disk | 
encodeLabelFingerprint(byte[] labelFingerprint)
A fingerprint for the labels being applied to this disk, which is essentially a hash of the
 labels set used for optimistic locking. 
 | 
String | 
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format. 
 | 
String | 
getDescription()
An optional description of this resource. 
 | 
CustomerEncryptionKey | 
getDiskEncryptionKey()
Encrypts the disk using a customer-supplied encryption key. 
 | 
Boolean | 
getEraseWindowsVssSignature()
Specifies whether the disk restored from a source snapshot should erase Windows specific VSS
 signature. 
 | 
List<GuestOsFeature> | 
getGuestOsFeatures()
A list of features to enable on the guest operating system. 
 | 
BigInteger | 
getId()
[Output Only] The unique identifier for the resource. 
 | 
String | 
getInterface()
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. 
 | 
String | 
getKind()
[Output Only] Type of the resource. 
 | 
String | 
getLabelFingerprint()
A fingerprint for the labels being applied to this disk, which is essentially a hash of the
 labels set used for optimistic locking. 
 | 
Map<String,String> | 
getLabels()
Labels to apply to this disk. 
 | 
String | 
getLastAttachTimestamp()
[Output Only] Last attach timestamp in RFC3339 text format. 
 | 
String | 
getLastDetachTimestamp()
[Output Only] Last detach timestamp in RFC3339 text format. 
 | 
List<Long> | 
getLicenseCodes()
Integer license codes indicating which licenses are attached to this disk. 
 | 
List<String> | 
getLicenses()
A list of publicly visible licenses. 
 | 
Boolean | 
getMultiWriter()
Indicates whether or not the disk can be read/write attached to more than one instance. 
 | 
String | 
getName()
Name of the resource. 
 | 
String | 
getOptions()
Internal use only. 
 | 
Long | 
getPhysicalBlockSizeBytes()
Physical block size of the persistent disk, in bytes. 
 | 
Long | 
getProvisionedIops()
Indicates how many IOPS must be provisioned for the disk. 
 | 
String | 
getRegion()
[Output Only] URL of the region where the disk resides. 
 | 
List<String> | 
getReplicaZones()
URLs of the zones where the disk should be replicated to. 
 | 
List<String> | 
getResourcePolicies()
Resource policies applied to this disk for automatic snapshot creations. 
 | 
Boolean | 
getSatisfiesPzs()
[Output Only] Reserved for future use. 
 | 
String | 
getSelfLink()
[Output Only] Server-defined fully-qualified URL for this resource. 
 | 
String | 
getSelfLinkWithId()
[Output Only] Server-defined URL for this resource's resource id. 
 | 
Long | 
getSizeGb()
Size, in GB, of the persistent disk. 
 | 
String | 
getSourceDisk()
The source disk used to create this disk. 
 | 
String | 
getSourceDiskId()
[Output Only] The unique ID of the disk used to create this disk. 
 | 
String | 
getSourceImage()
The source image used to create this disk. 
 | 
CustomerEncryptionKey | 
getSourceImageEncryptionKey()
The customer-supplied encryption key of the source image. 
 | 
String | 
getSourceImageId()
[Output Only] The ID value of the image used to create this disk. 
 | 
String | 
getSourceInPlaceSnapshot()
[Deprecated] The source in-place snapshot used to create this disk. 
 | 
String | 
getSourceInPlaceSnapshotId()
[Deprecated] [Output Only] The unique ID of the in-place snapshot used to create this disk. 
 | 
String | 
getSourceInstantSnapshot()
The source instant snapshot used to create this disk. 
 | 
String | 
getSourceInstantSnapshotId()
[Output Only] The unique ID of the instant snapshot used to create this disk. 
 | 
String | 
getSourceSnapshot()
The source snapshot used to create this disk. 
 | 
CustomerEncryptionKey | 
getSourceSnapshotEncryptionKey()
The customer-supplied encryption key of the source snapshot. 
 | 
String | 
getSourceSnapshotId()
[Output Only] The unique ID of the snapshot used to create this disk. 
 | 
String | 
getSourceStorageObject()
The full Google Cloud Storage URI where the disk image is stored. 
 | 
String | 
getStatus()
[Output Only] The status of disk creation. 
 | 
String | 
getStorageType()
[Deprecated] Storage type of the persistent disk. 
 | 
String | 
getType()
URL of the disk type resource describing which disk type to use to create the disk. 
 | 
List<String> | 
getUserLicenses()
A list of publicly visible user-licenses. 
 | 
List<String> | 
getUsers()
[Output Only] Links to the users of the disk (attached instances) in form:
 projects/project/zones/zone/instances/instance 
 | 
String | 
getZone()
[Output Only] URL of the zone where the disk resides. 
 | 
Disk | 
set(String fieldName,
   Object value)  | 
Disk | 
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format. 
 | 
Disk | 
setDescription(String description)
An optional description of this resource. 
 | 
Disk | 
setDiskEncryptionKey(CustomerEncryptionKey diskEncryptionKey)
Encrypts the disk using a customer-supplied encryption key. 
 | 
Disk | 
setEraseWindowsVssSignature(Boolean eraseWindowsVssSignature)
Specifies whether the disk restored from a source snapshot should erase Windows specific VSS
 signature. 
 | 
Disk | 
setGuestOsFeatures(List<GuestOsFeature> guestOsFeatures)
A list of features to enable on the guest operating system. 
 | 
Disk | 
setId(BigInteger id)
[Output Only] The unique identifier for the resource. 
 | 
Disk | 
setInterface(String interface__)
Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. 
 | 
Disk | 
setKind(String kind)
[Output Only] Type of the resource. 
 | 
Disk | 
setLabelFingerprint(String labelFingerprint)
A fingerprint for the labels being applied to this disk, which is essentially a hash of the
 labels set used for optimistic locking. 
 | 
Disk | 
setLabels(Map<String,String> labels)
Labels to apply to this disk. 
 | 
Disk | 
setLastAttachTimestamp(String lastAttachTimestamp)
[Output Only] Last attach timestamp in RFC3339 text format. 
 | 
Disk | 
setLastDetachTimestamp(String lastDetachTimestamp)
[Output Only] Last detach timestamp in RFC3339 text format. 
 | 
Disk | 
setLicenseCodes(List<Long> licenseCodes)
Integer license codes indicating which licenses are attached to this disk. 
 | 
Disk | 
setLicenses(List<String> licenses)
A list of publicly visible licenses. 
 | 
Disk | 
setMultiWriter(Boolean multiWriter)
Indicates whether or not the disk can be read/write attached to more than one instance. 
 | 
Disk | 
setName(String name)
Name of the resource. 
 | 
Disk | 
setOptions(String options)
Internal use only. 
 | 
Disk | 
setPhysicalBlockSizeBytes(Long physicalBlockSizeBytes)
Physical block size of the persistent disk, in bytes. 
 | 
Disk | 
setProvisionedIops(Long provisionedIops)
Indicates how many IOPS must be provisioned for the disk. 
 | 
Disk | 
setRegion(String region)
[Output Only] URL of the region where the disk resides. 
 | 
Disk | 
setReplicaZones(List<String> replicaZones)
URLs of the zones where the disk should be replicated to. 
 | 
Disk | 
setResourcePolicies(List<String> resourcePolicies)
Resource policies applied to this disk for automatic snapshot creations. 
 | 
Disk | 
setSatisfiesPzs(Boolean satisfiesPzs)
[Output Only] Reserved for future use. 
 | 
Disk | 
setSelfLink(String selfLink)
[Output Only] Server-defined fully-qualified URL for this resource. 
 | 
Disk | 
setSelfLinkWithId(String selfLinkWithId)
[Output Only] Server-defined URL for this resource's resource id. 
 | 
Disk | 
setSizeGb(Long sizeGb)
Size, in GB, of the persistent disk. 
 | 
Disk | 
setSourceDisk(String sourceDisk)
The source disk used to create this disk. 
 | 
Disk | 
setSourceDiskId(String sourceDiskId)
[Output Only] The unique ID of the disk used to create this disk. 
 | 
Disk | 
setSourceImage(String sourceImage)
The source image used to create this disk. 
 | 
Disk | 
setSourceImageEncryptionKey(CustomerEncryptionKey sourceImageEncryptionKey)
The customer-supplied encryption key of the source image. 
 | 
Disk | 
setSourceImageId(String sourceImageId)
[Output Only] The ID value of the image used to create this disk. 
 | 
Disk | 
setSourceInPlaceSnapshot(String sourceInPlaceSnapshot)
[Deprecated] The source in-place snapshot used to create this disk. 
 | 
Disk | 
setSourceInPlaceSnapshotId(String sourceInPlaceSnapshotId)
[Deprecated] [Output Only] The unique ID of the in-place snapshot used to create this disk. 
 | 
Disk | 
setSourceInstantSnapshot(String sourceInstantSnapshot)
The source instant snapshot used to create this disk. 
 | 
Disk | 
setSourceInstantSnapshotId(String sourceInstantSnapshotId)
[Output Only] The unique ID of the instant snapshot used to create this disk. 
 | 
Disk | 
setSourceSnapshot(String sourceSnapshot)
The source snapshot used to create this disk. 
 | 
Disk | 
setSourceSnapshotEncryptionKey(CustomerEncryptionKey sourceSnapshotEncryptionKey)
The customer-supplied encryption key of the source snapshot. 
 | 
Disk | 
setSourceSnapshotId(String sourceSnapshotId)
[Output Only] The unique ID of the snapshot used to create this disk. 
 | 
Disk | 
setSourceStorageObject(String sourceStorageObject)
The full Google Cloud Storage URI where the disk image is stored. 
 | 
Disk | 
setStatus(String status)
[Output Only] The status of disk creation. 
 | 
Disk | 
setStorageType(String storageType)
[Deprecated] Storage type of the persistent disk. 
 | 
Disk | 
setType(String type)
URL of the disk type resource describing which disk type to use to create the disk. 
 | 
Disk | 
setUserLicenses(List<String> userLicenses)
A list of publicly visible user-licenses. 
 | 
Disk | 
setUsers(List<String> users)
[Output Only] Links to the users of the disk (attached instances) in form:
 projects/project/zones/zone/instances/instance 
 | 
Disk | 
setZone(String zone)
[Output Only] URL of the zone where the disk resides. 
 | 
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic String getCreationTimestamp()
null for nonepublic Disk setCreationTimestamp(String creationTimestamp)
creationTimestamp - creationTimestamp or null for nonepublic String getDescription()
null for nonepublic Disk setDescription(String description)
description - description or null for nonepublic CustomerEncryptionKey getDiskEncryptionKey()
null for nonepublic Disk setDiskEncryptionKey(CustomerEncryptionKey diskEncryptionKey)
diskEncryptionKey - diskEncryptionKey or null for nonepublic Boolean getEraseWindowsVssSignature()
null for nonepublic Disk setEraseWindowsVssSignature(Boolean eraseWindowsVssSignature)
eraseWindowsVssSignature - eraseWindowsVssSignature or null for nonepublic List<GuestOsFeature> getGuestOsFeatures()
null for nonepublic Disk setGuestOsFeatures(List<GuestOsFeature> guestOsFeatures)
guestOsFeatures - guestOsFeatures or null for nonepublic BigInteger getId()
null for nonepublic Disk setId(BigInteger id)
id - id or null for nonepublic String getInterface()
null for nonepublic Disk setInterface(String interface__)
interface__ - interface__ or null for nonepublic String getKind()
null for nonepublic Disk setKind(String kind)
kind - kind or null for nonepublic String getLabelFingerprint()
null for nonedecodeLabelFingerprint()public byte[] decodeLabelFingerprint()
null for nonegetLabelFingerprint()public Disk setLabelFingerprint(String labelFingerprint)
labelFingerprint - labelFingerprint or null for none#encodeLabelFingerprint()public Disk encodeLabelFingerprint(byte[] labelFingerprint)
 The value is encoded Base64 or {@code null} for none.
 
public Map<String,String> getLabels()
null for nonepublic Disk setLabels(Map<String,String> labels)
labels - labels or null for nonepublic String getLastAttachTimestamp()
null for nonepublic Disk setLastAttachTimestamp(String lastAttachTimestamp)
lastAttachTimestamp - lastAttachTimestamp or null for nonepublic String getLastDetachTimestamp()
null for nonepublic Disk setLastDetachTimestamp(String lastDetachTimestamp)
lastDetachTimestamp - lastDetachTimestamp or null for nonepublic List<Long> getLicenseCodes()
null for nonepublic Disk setLicenseCodes(List<Long> licenseCodes)
licenseCodes - licenseCodes or null for nonepublic List<String> getLicenses()
null for nonepublic Disk setLicenses(List<String> licenses)
licenses - licenses or null for nonepublic Boolean getMultiWriter()
null for nonepublic Disk setMultiWriter(Boolean multiWriter)
multiWriter - multiWriter or null for nonepublic String getName()
null for nonepublic Disk setName(String name)
name - name or null for nonepublic String getOptions()
null for nonepublic Disk setOptions(String options)
options - options or null for nonepublic Long getPhysicalBlockSizeBytes()
null for nonepublic Disk setPhysicalBlockSizeBytes(Long physicalBlockSizeBytes)
physicalBlockSizeBytes - physicalBlockSizeBytes or null for nonepublic Long getProvisionedIops()
null for nonepublic Disk setProvisionedIops(Long provisionedIops)
provisionedIops - provisionedIops or null for nonepublic String getRegion()
null for nonepublic Disk setRegion(String region)
region - region or null for nonepublic List<String> getReplicaZones()
null for nonepublic Disk setReplicaZones(List<String> replicaZones)
replicaZones - replicaZones or null for nonepublic List<String> getResourcePolicies()
null for nonepublic Disk setResourcePolicies(List<String> resourcePolicies)
resourcePolicies - resourcePolicies or null for nonepublic Boolean getSatisfiesPzs()
null for nonepublic Disk setSatisfiesPzs(Boolean satisfiesPzs)
satisfiesPzs - satisfiesPzs or null for nonepublic String getSelfLink()
null for nonepublic Disk setSelfLink(String selfLink)
selfLink - selfLink or null for nonepublic String getSelfLinkWithId()
null for nonepublic Disk setSelfLinkWithId(String selfLinkWithId)
selfLinkWithId - selfLinkWithId or null for nonepublic Long getSizeGb()
null for nonepublic Disk setSizeGb(Long sizeGb)
sizeGb - sizeGb or null for nonepublic String getSourceDisk()
null for nonepublic Disk setSourceDisk(String sourceDisk)
sourceDisk - sourceDisk or null for nonepublic String getSourceDiskId()
null for nonepublic Disk setSourceDiskId(String sourceDiskId)
sourceDiskId - sourceDiskId or null for nonepublic String getSourceImage()
null for nonepublic Disk setSourceImage(String sourceImage)
sourceImage - sourceImage or null for nonepublic CustomerEncryptionKey getSourceImageEncryptionKey()
null for nonepublic Disk setSourceImageEncryptionKey(CustomerEncryptionKey sourceImageEncryptionKey)
sourceImageEncryptionKey - sourceImageEncryptionKey or null for nonepublic String getSourceImageId()
null for nonepublic Disk setSourceImageId(String sourceImageId)
sourceImageId - sourceImageId or null for nonepublic String getSourceInPlaceSnapshot()
null for nonepublic Disk setSourceInPlaceSnapshot(String sourceInPlaceSnapshot)
sourceInPlaceSnapshot - sourceInPlaceSnapshot or null for nonepublic String getSourceInPlaceSnapshotId()
null for nonepublic Disk setSourceInPlaceSnapshotId(String sourceInPlaceSnapshotId)
sourceInPlaceSnapshotId - sourceInPlaceSnapshotId or null for nonepublic String getSourceInstantSnapshot()
null for nonepublic Disk setSourceInstantSnapshot(String sourceInstantSnapshot)
sourceInstantSnapshot - sourceInstantSnapshot or null for nonepublic String getSourceInstantSnapshotId()
null for nonepublic Disk setSourceInstantSnapshotId(String sourceInstantSnapshotId)
sourceInstantSnapshotId - sourceInstantSnapshotId or null for nonepublic String getSourceSnapshot()
null for nonepublic Disk setSourceSnapshot(String sourceSnapshot)
sourceSnapshot - sourceSnapshot or null for nonepublic CustomerEncryptionKey getSourceSnapshotEncryptionKey()
null for nonepublic Disk setSourceSnapshotEncryptionKey(CustomerEncryptionKey sourceSnapshotEncryptionKey)
sourceSnapshotEncryptionKey - sourceSnapshotEncryptionKey or null for nonepublic String getSourceSnapshotId()
null for nonepublic Disk setSourceSnapshotId(String sourceSnapshotId)
sourceSnapshotId - sourceSnapshotId or null for nonepublic String getSourceStorageObject()
null for nonepublic Disk setSourceStorageObject(String sourceStorageObject)
sourceStorageObject - sourceStorageObject or null for nonepublic String getStatus()
null for nonepublic Disk setStatus(String status)
status - status or null for nonepublic String getStorageType()
null for nonepublic Disk setStorageType(String storageType)
storageType - storageType or null for nonepublic String getType()
null for nonepublic Disk setType(String type)
type - type or null for nonepublic List<String> getUserLicenses()
null for nonepublic Disk setUserLicenses(List<String> userLicenses)
userLicenses - userLicenses or null for nonepublic List<String> getUsers()
null for nonepublic Disk setUsers(List<String> users)
users - users or null for nonepublic String getZone()
null for nonepublic Disk setZone(String zone)
zone - zone or null for nonepublic Disk set(String fieldName, Object value)
set in class GenericJsonpublic Disk clone()
clone in class GenericJsonCopyright © 2011–2020 Google. All rights reserved.