
target.apidocs.com.google.api.services.compute.model.Snapshot.html Maven / Gradle / Ivy
Snapshot (Compute Engine API beta-rev20220312-1.32.1)
com.google.api.services.compute.model
Class Snapshot
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.Snapshot
-
public final class Snapshot
extends GenericJson
Represents a Persistent Disk Snapshot resource. You can use snapshots to back up data on a
regular interval. For more information, read Creating persistent disk snapshots.
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
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Snapshot()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Snapshot
clone()
byte[]
decodeLabelFingerprint()
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking.
Snapshot
encodeLabelFingerprint(byte[] labelFingerprint)
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking.
Boolean
getAutoCreated()
[Output Only] Set to true if snapshots are automatically created by applying resource policy on
the target disk.
String
getChainName()
Creates the new snapshot in the snapshot chain labeled with the specified name.
String
getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
String
getDescription()
An optional description of this resource.
Long
getDiskSizeGb()
[Output Only] Size of the source disk, specified in GB.
Long
getDownloadBytes()
[Output Only] Number of bytes downloaded to restore a snapshot to a disk.
Boolean
getGuestFlush()
[Input Only] Whether to attempt an application consistent snapshot by informing the OS to
prepare for the snapshot process.
BigInteger
getId()
[Output Only] The unique identifier for the resource.
String
getKind()
[Output Only] Type of the resource.
String
getLabelFingerprint()
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking.
Map<String,String>
getLabels()
Labels to apply to this snapshot.
List<Long>
getLicenseCodes()
[Output Only] Integer license codes indicating which licenses are attached to this snapshot.
List<String>
getLicenses()
[Output Only] A list of public visible licenses that apply to this snapshot.
String
getLocationHint()
An opaque location hint used to place the snapshot close to other resources.
String
getName()
Name of the resource; provided by the client when the resource is created.
Boolean
getSatisfiesPzs()
[Output Only] Reserved for future use.
String
getSelfLink()
[Output Only] Server-defined URL for the resource.
CustomerEncryptionKey
getSnapshotEncryptionKey()
Encrypts the snapshot using a customer-supplied encryption key.
String
getSourceDisk()
The source disk used to create this snapshot.
CustomerEncryptionKey
getSourceDiskEncryptionKey()
The customer-supplied encryption key of the source disk.
String
getSourceDiskId()
[Output Only] The ID value of the disk used to create this snapshot.
String
getStatus()
[Output Only] The status of the snapshot.
Long
getStorageBytes()
[Output Only] A size of the storage used by the snapshot.
String
getStorageBytesStatus()
[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as
a result of shared storage reallocation.
List<String>
getStorageLocations()
Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
List<String>
getUserLicenses()
[Output Only] A list of user provided licenses represented by a list of URLs to the license
resource.
Snapshot
set(String fieldName,
Object value)
Snapshot
setAutoCreated(Boolean autoCreated)
[Output Only] Set to true if snapshots are automatically created by applying resource policy on
the target disk.
Snapshot
setChainName(String chainName)
Creates the new snapshot in the snapshot chain labeled with the specified name.
Snapshot
setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
Snapshot
setDescription(String description)
An optional description of this resource.
Snapshot
setDiskSizeGb(Long diskSizeGb)
[Output Only] Size of the source disk, specified in GB.
Snapshot
setDownloadBytes(Long downloadBytes)
[Output Only] Number of bytes downloaded to restore a snapshot to a disk.
Snapshot
setGuestFlush(Boolean guestFlush)
[Input Only] Whether to attempt an application consistent snapshot by informing the OS to
prepare for the snapshot process.
Snapshot
setId(BigInteger id)
[Output Only] The unique identifier for the resource.
Snapshot
setKind(String kind)
[Output Only] Type of the resource.
Snapshot
setLabelFingerprint(String labelFingerprint)
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking.
Snapshot
setLabels(Map<String,String> labels)
Labels to apply to this snapshot.
Snapshot
setLicenseCodes(List<Long> licenseCodes)
[Output Only] Integer license codes indicating which licenses are attached to this snapshot.
Snapshot
setLicenses(List<String> licenses)
[Output Only] A list of public visible licenses that apply to this snapshot.
Snapshot
setLocationHint(String locationHint)
An opaque location hint used to place the snapshot close to other resources.
Snapshot
setName(String name)
Name of the resource; provided by the client when the resource is created.
Snapshot
setSatisfiesPzs(Boolean satisfiesPzs)
[Output Only] Reserved for future use.
Snapshot
setSelfLink(String selfLink)
[Output Only] Server-defined URL for the resource.
Snapshot
setSnapshotEncryptionKey(CustomerEncryptionKey snapshotEncryptionKey)
Encrypts the snapshot using a customer-supplied encryption key.
Snapshot
setSourceDisk(String sourceDisk)
The source disk used to create this snapshot.
Snapshot
setSourceDiskEncryptionKey(CustomerEncryptionKey sourceDiskEncryptionKey)
The customer-supplied encryption key of the source disk.
Snapshot
setSourceDiskId(String sourceDiskId)
[Output Only] The ID value of the disk used to create this snapshot.
Snapshot
setStatus(String status)
[Output Only] The status of the snapshot.
Snapshot
setStorageBytes(Long storageBytes)
[Output Only] A size of the storage used by the snapshot.
Snapshot
setStorageBytesStatus(String storageBytesStatus)
[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as
a result of shared storage reallocation.
Snapshot
setStorageLocations(List<String> storageLocations)
Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
Snapshot
setUserLicenses(List<String> userLicenses)
[Output Only] A list of user provided licenses represented by a list of URLs to the license
resource.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAutoCreated
public Boolean getAutoCreated()
[Output Only] Set to true if snapshots are automatically created by applying resource policy on
the target disk.
- Returns:
- value or
null
for none
-
setAutoCreated
public Snapshot setAutoCreated(Boolean autoCreated)
[Output Only] Set to true if snapshots are automatically created by applying resource policy on
the target disk.
- Parameters:
autoCreated
- autoCreated or null
for none
-
getChainName
public String getChainName()
Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name
must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for
advanced service owners who needs to create separate snapshot chains, for example, for
chargeback tracking. When you describe your snapshot resource, this field is visible only if it
has a non-empty value.
- Returns:
- value or
null
for none
-
setChainName
public Snapshot setChainName(String chainName)
Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name
must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for
advanced service owners who needs to create separate snapshot chains, for example, for
chargeback tracking. When you describe your snapshot resource, this field is visible only if it
has a non-empty value.
- Parameters:
chainName
- chainName or null
for none
-
getCreationTimestamp
public String getCreationTimestamp()
[Output Only] Creation timestamp in RFC3339 text format.
- Returns:
- value or
null
for none
-
setCreationTimestamp
public Snapshot setCreationTimestamp(String creationTimestamp)
[Output Only] Creation timestamp in RFC3339 text format.
- Parameters:
creationTimestamp
- creationTimestamp or null
for none
-
getDescription
public String getDescription()
An optional description of this resource. Provide this property when you create the resource.
- Returns:
- value or
null
for none
-
setDescription
public Snapshot setDescription(String description)
An optional description of this resource. Provide this property when you create the resource.
- Parameters:
description
- description or null
for none
-
getDiskSizeGb
public Long getDiskSizeGb()
[Output Only] Size of the source disk, specified in GB.
- Returns:
- value or
null
for none
-
setDiskSizeGb
public Snapshot setDiskSizeGb(Long diskSizeGb)
[Output Only] Size of the source disk, specified in GB.
- Parameters:
diskSizeGb
- diskSizeGb or null
for none
-
getDownloadBytes
public Long getDownloadBytes()
[Output Only] Number of bytes downloaded to restore a snapshot to a disk.
- Returns:
- value or
null
for none
-
setDownloadBytes
public Snapshot setDownloadBytes(Long downloadBytes)
[Output Only] Number of bytes downloaded to restore a snapshot to a disk.
- Parameters:
downloadBytes
- downloadBytes or null
for none
-
getGuestFlush
public Boolean getGuestFlush()
[Input Only] Whether to attempt an application consistent snapshot by informing the OS to
prepare for the snapshot process.
- Returns:
- value or
null
for none
-
setGuestFlush
public Snapshot setGuestFlush(Boolean guestFlush)
[Input Only] Whether to attempt an application consistent snapshot by informing the OS to
prepare for the snapshot process.
- Parameters:
guestFlush
- guestFlush or null
for none
-
getId
public BigInteger getId()
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- Returns:
- value or
null
for none
-
setId
public Snapshot setId(BigInteger id)
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- Parameters:
id
- id or null
for none
-
getKind
public String getKind()
[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
- Returns:
- value or
null
for none
-
setKind
public Snapshot setKind(String kind)
[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.
- Parameters:
kind
- kind or null
for none
-
getLabelFingerprint
public String getLabelFingerprint()
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve a snapshot.
- Returns:
- value or
null
for none
- See Also:
decodeLabelFingerprint()
-
decodeLabelFingerprint
public byte[] decodeLabelFingerprint()
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve a snapshot.
- Returns:
- Base64 decoded value or
null
for none
- Since:
- 1.14
- See Also:
getLabelFingerprint()
-
setLabelFingerprint
public Snapshot setLabelFingerprint(String labelFingerprint)
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve a snapshot.
- Parameters:
labelFingerprint
- labelFingerprint or null
for none
- See Also:
#encodeLabelFingerprint()
-
encodeLabelFingerprint
public Snapshot encodeLabelFingerprint(byte[] labelFingerprint)
A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the
labels set used for optimistic locking. The fingerprint is initially generated by Compute
Engine and changes after every request to modify or update labels. You must always provide an
up-to-date fingerprint hash in order to update or change labels, otherwise the request will
fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to
retrieve a snapshot.
- Since:
- 1.14
- See Also:
The value is encoded Base64 or {@code null} for none.
-
getLabels
public Map<String,String> getLabels()
Labels to apply to this snapshot. These can be later modified by the setLabels method. Label
values may be empty.
- Returns:
- value or
null
for none
-
setLabels
public Snapshot setLabels(Map<String,String> labels)
Labels to apply to this snapshot. These can be later modified by the setLabels method. Label
values may be empty.
- Parameters:
labels
- labels or null
for none
-
getLicenseCodes
public List<Long> getLicenseCodes()
[Output Only] Integer license codes indicating which licenses are attached to this snapshot.
- Returns:
- value or
null
for none
-
setLicenseCodes
public Snapshot setLicenseCodes(List<Long> licenseCodes)
[Output Only] Integer license codes indicating which licenses are attached to this snapshot.
- Parameters:
licenseCodes
- licenseCodes or null
for none
-
getLicenses
public List<String> getLicenses()
[Output Only] A list of public visible licenses that apply to this snapshot. This can be
because the original image had licenses attached (such as a Windows image).
- Returns:
- value or
null
for none
-
setLicenses
public Snapshot setLicenses(List<String> licenses)
[Output Only] A list of public visible licenses that apply to this snapshot. This can be
because the original image had licenses attached (such as a Windows image).
- Parameters:
licenses
- licenses or null
for none
-
getLocationHint
public String getLocationHint()
An opaque location hint used to place the snapshot close to other resources. This field is for
use by internal tools that use the public API.
- Returns:
- value or
null
for none
-
setLocationHint
public Snapshot setLocationHint(String locationHint)
An opaque location hint used to place the snapshot close to other resources. This field is for
use by internal tools that use the public API.
- Parameters:
locationHint
- locationHint or null
for none
-
getName
public String getName()
Name of the resource; provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
- Returns:
- value or
null
for none
-
setName
public Snapshot setName(String name)
Name of the resource; provided by the client when the resource is created. The name must be
1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
character must be a lowercase letter, and all following characters must be a dash, lowercase
letter, or digit, except the last character, which cannot be a dash.
- Parameters:
name
- name or null
for none
-
getSatisfiesPzs
public Boolean getSatisfiesPzs()
[Output Only] Reserved for future use.
- Returns:
- value or
null
for none
-
setSatisfiesPzs
public Snapshot setSatisfiesPzs(Boolean satisfiesPzs)
[Output Only] Reserved for future use.
- Parameters:
satisfiesPzs
- satisfiesPzs or null
for none
-
getSelfLink
public String getSelfLink()
[Output Only] Server-defined URL for the resource.
- Returns:
- value or
null
for none
-
setSelfLink
public Snapshot setSelfLink(String selfLink)
[Output Only] Server-defined URL for the resource.
- Parameters:
selfLink
- selfLink or null
for none
-
getSnapshotEncryptionKey
public CustomerEncryptionKey getSnapshotEncryptionKey()
Encrypts the snapshot using a customer-supplied encryption key. After you encrypt a snapshot
using a customer-supplied key, you must provide the same key if you use the snapshot later. For
example, you must provide the encryption key when you create a disk from the encrypted snapshot
in a future request. Customer-supplied encryption keys do not protect access to metadata of the
snapshot. If you do not provide an encryption key when creating the snapshot, then the snapshot
will be encrypted using an automatically generated key and you do not need to provide a key to
use the snapshot later.
- Returns:
- value or
null
for none
-
setSnapshotEncryptionKey
public Snapshot setSnapshotEncryptionKey(CustomerEncryptionKey snapshotEncryptionKey)
Encrypts the snapshot using a customer-supplied encryption key. After you encrypt a snapshot
using a customer-supplied key, you must provide the same key if you use the snapshot later. For
example, you must provide the encryption key when you create a disk from the encrypted snapshot
in a future request. Customer-supplied encryption keys do not protect access to metadata of the
snapshot. If you do not provide an encryption key when creating the snapshot, then the snapshot
will be encrypted using an automatically generated key and you do not need to provide a key to
use the snapshot later.
- Parameters:
snapshotEncryptionKey
- snapshotEncryptionKey or null
for none
-
getSourceDisk
public String getSourceDisk()
The source disk used to create this snapshot.
- Returns:
- value or
null
for none
-
setSourceDisk
public Snapshot setSourceDisk(String sourceDisk)
The source disk used to create this snapshot.
- Parameters:
sourceDisk
- sourceDisk or null
for none
-
getSourceDiskEncryptionKey
public CustomerEncryptionKey getSourceDiskEncryptionKey()
The customer-supplied encryption key of the source disk. Required if the source disk is
protected by a customer-supplied encryption key.
- Returns:
- value or
null
for none
-
setSourceDiskEncryptionKey
public Snapshot setSourceDiskEncryptionKey(CustomerEncryptionKey sourceDiskEncryptionKey)
The customer-supplied encryption key of the source disk. Required if the source disk is
protected by a customer-supplied encryption key.
- Parameters:
sourceDiskEncryptionKey
- sourceDiskEncryptionKey or null
for none
-
getSourceDiskId
public String getSourceDiskId()
[Output Only] The ID value of the disk used to create this snapshot. This value may be used to
determine whether the snapshot was taken from the current or a previous instance of a given
disk name.
- Returns:
- value or
null
for none
-
setSourceDiskId
public Snapshot setSourceDiskId(String sourceDiskId)
[Output Only] The ID value of the disk used to create this snapshot. This value may be used to
determine whether the snapshot was taken from the current or a previous instance of a given
disk name.
- Parameters:
sourceDiskId
- sourceDiskId or null
for none
-
getStatus
public String getStatus()
[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or
UPLOADING.
- Returns:
- value or
null
for none
-
setStatus
public Snapshot setStatus(String status)
[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or
UPLOADING.
- Parameters:
status
- status or null
for none
-
getStorageBytes
public Long getStorageBytes()
[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this
number is expected to change with snapshot creation/deletion.
- Returns:
- value or
null
for none
-
setStorageBytes
public Snapshot setStorageBytes(Long storageBytes)
[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this
number is expected to change with snapshot creation/deletion.
- Parameters:
storageBytes
- storageBytes or null
for none
-
getStorageBytesStatus
public String getStorageBytesStatus()
[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as
a result of shared storage reallocation. This status can either be UPDATING, meaning the size
of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-
date.
- Returns:
- value or
null
for none
-
setStorageBytesStatus
public Snapshot setStorageBytesStatus(String storageBytesStatus)
[Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as
a result of shared storage reallocation. This status can either be UPDATING, meaning the size
of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-
date.
- Parameters:
storageBytesStatus
- storageBytesStatus or null
for none
-
getStorageLocations
public List<String> getStorageLocations()
Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
- Returns:
- value or
null
for none
-
setStorageLocations
public Snapshot setStorageLocations(List<String> storageLocations)
Cloud Storage bucket storage location of the snapshot (regional or multi-regional).
- Parameters:
storageLocations
- storageLocations or null
for none
-
getUserLicenses
public List<String> getUserLicenses()
[Output Only] A list of user provided licenses represented by a list of URLs to the license
resource.
- Returns:
- value or
null
for none
-
setUserLicenses
public Snapshot setUserLicenses(List<String> userLicenses)
[Output Only] A list of user provided licenses represented by a list of URLs to the license
resource.
- Parameters:
userLicenses
- userLicenses or null
for none
-
set
public Snapshot set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public Snapshot clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2022 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy