Class Snapshot.Builder (1.50.0)

public static final class Snapshot.Builder extends GeneratedMessageV3.Builder<Snapshot.Builder> implements SnapshotOrBuilder

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.

Protobuf type google.cloud.compute.v1.Snapshot

Implements

SnapshotOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllGuestOsFeatures(Iterable<? extends GuestOsFeature> values)

public Snapshot.Builder addAllGuestOsFeatures(Iterable<? extends GuestOsFeature> values)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.GuestOsFeature>
Returns
TypeDescription
Snapshot.Builder

addAllLicenseCodes(Iterable<? extends Long> values)

public Snapshot.Builder addAllLicenseCodes(Iterable<? extends Long> values)

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Parameter
NameDescription
valuesIterable<? extends java.lang.Long>

The licenseCodes to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addAllLicenses(Iterable<String> values)

public Snapshot.Builder addAllLicenses(Iterable<String> values)

[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).

repeated string licenses = 337642578;

Parameter
NameDescription
valuesIterable<String>

The licenses to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addAllStorageLocations(Iterable<String> values)

public Snapshot.Builder addAllStorageLocations(Iterable<String> values)

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Parameter
NameDescription
valuesIterable<String>

The storageLocations to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addGuestOsFeatures(GuestOsFeature value)

public Snapshot.Builder addGuestOsFeatures(GuestOsFeature value)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
valueGuestOsFeature
Returns
TypeDescription
Snapshot.Builder

addGuestOsFeatures(GuestOsFeature.Builder builderForValue)

public Snapshot.Builder addGuestOsFeatures(GuestOsFeature.Builder builderForValue)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
builderForValueGuestOsFeature.Builder
Returns
TypeDescription
Snapshot.Builder

addGuestOsFeatures(int index, GuestOsFeature value)

public Snapshot.Builder addGuestOsFeatures(int index, GuestOsFeature value)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameters
NameDescription
indexint
valueGuestOsFeature
Returns
TypeDescription
Snapshot.Builder

addGuestOsFeatures(int index, GuestOsFeature.Builder builderForValue)

public Snapshot.Builder addGuestOsFeatures(int index, GuestOsFeature.Builder builderForValue)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameters
NameDescription
indexint
builderForValueGuestOsFeature.Builder
Returns
TypeDescription
Snapshot.Builder

addGuestOsFeaturesBuilder()

public GuestOsFeature.Builder addGuestOsFeaturesBuilder()

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Returns
TypeDescription
GuestOsFeature.Builder

addGuestOsFeaturesBuilder(int index)

public GuestOsFeature.Builder addGuestOsFeaturesBuilder(int index)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestOsFeature.Builder

addLicenseCodes(long value)

public Snapshot.Builder addLicenseCodes(long value)

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Parameter
NameDescription
valuelong

The licenseCodes to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addLicenses(String value)

public Snapshot.Builder addLicenses(String value)

[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).

repeated string licenses = 337642578;

Parameter
NameDescription
valueString

The licenses to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addLicensesBytes(ByteString value)

public Snapshot.Builder addLicensesBytes(ByteString value)

[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).

repeated string licenses = 337642578;

Parameter
NameDescription
valueByteString

The bytes of the licenses to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Snapshot.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Snapshot.Builder
Overrides

addStorageLocations(String value)

public Snapshot.Builder addStorageLocations(String value)

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Parameter
NameDescription
valueString

The storageLocations to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

addStorageLocationsBytes(ByteString value)

public Snapshot.Builder addStorageLocationsBytes(ByteString value)

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Parameter
NameDescription
valueByteString

The bytes of the storageLocations to add.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

build()

public Snapshot build()
Returns
TypeDescription
Snapshot

buildPartial()

public Snapshot buildPartial()
Returns
TypeDescription
Snapshot

clear()

public Snapshot.Builder clear()
Returns
TypeDescription
Snapshot.Builder
Overrides

clearArchitecture()

public Snapshot.Builder clearArchitecture()

[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearAutoCreated()

public Snapshot.Builder clearAutoCreated()

[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.

optional bool auto_created = 463922264;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearChainName()

public Snapshot.Builder clearChainName()

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.

optional string chain_name = 68644169;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearCreationSizeBytes()

public Snapshot.Builder clearCreationSizeBytes()

[Output Only] Size in bytes of the snapshot at creation time.

optional int64 creation_size_bytes = 125400077;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearCreationTimestamp()

public Snapshot.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearDescription()

public Snapshot.Builder clearDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearDiskSizeGb()

public Snapshot.Builder clearDiskSizeGb()

[Output Only] Size of the source disk, specified in GB.

optional int64 disk_size_gb = 316263735;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearDownloadBytes()

public Snapshot.Builder clearDownloadBytes()

[Output Only] Number of bytes downloaded to restore a snapshot to a disk.

optional int64 download_bytes = 435054068;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearEnableConfidentialCompute()

public Snapshot.Builder clearEnableConfidentialCompute()

Whether this snapshot is created from a confidential compute mode disk. [Output Only]: This field is not set by user, but from source disk.

optional bool enable_confidential_compute = 102135228;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Snapshot.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Snapshot.Builder
Overrides

clearGuestOsFeatures()

public Snapshot.Builder clearGuestOsFeatures()

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Returns
TypeDescription
Snapshot.Builder

clearId()

public Snapshot.Builder clearId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearKind()

public Snapshot.Builder clearKind()

[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.

optional string kind = 3292052;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearLabelFingerprint()

public Snapshot.Builder clearLabelFingerprint()

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.

optional string label_fingerprint = 178124825;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearLabels()

public Snapshot.Builder clearLabels()
Returns
TypeDescription
Snapshot.Builder

clearLicenseCodes()

public Snapshot.Builder clearLicenseCodes()

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearLicenses()

public Snapshot.Builder clearLicenses()

[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).

repeated string licenses = 337642578;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearLocationHint()

public Snapshot.Builder clearLocationHint()

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.

optional string location_hint = 350519505;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearName()

public Snapshot.Builder clearName()

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? 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.

optional string name = 3373707;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Snapshot.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Snapshot.Builder
Overrides

clearSatisfiesPzi()

public Snapshot.Builder clearSatisfiesPzi()

Output only. Reserved for future use.

optional bool satisfies_pzi = 480964257;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSatisfiesPzs()

public Snapshot.Builder clearSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

public Snapshot.Builder clearSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSnapshotEncryptionKey()

public Snapshot.Builder clearSnapshotEncryptionKey()

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Returns
TypeDescription
Snapshot.Builder

clearSnapshotType()

public Snapshot.Builder clearSnapshotType()

Indicates the type of the snapshot. Check the SnapshotType enum for the list of possible values.

optional string snapshot_type = 124349653;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceDisk()

public Snapshot.Builder clearSourceDisk()

The source disk used to create this snapshot.

optional string source_disk = 451753793;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceDiskEncryptionKey()

public Snapshot.Builder clearSourceDiskEncryptionKey()

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Returns
TypeDescription
Snapshot.Builder

clearSourceDiskForRecoveryCheckpoint()

public Snapshot.Builder clearSourceDiskForRecoveryCheckpoint()

The source disk whose recovery checkpoint will be used to create this snapshot.

optional string source_disk_for_recovery_checkpoint = 359837950;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceDiskId()

public Snapshot.Builder clearSourceDiskId()

[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.

optional string source_disk_id = 454190809;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceInstantSnapshot()

public Snapshot.Builder clearSourceInstantSnapshot()

The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot

optional string source_instant_snapshot = 219202054;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceInstantSnapshotEncryptionKey()

public Snapshot.Builder clearSourceInstantSnapshotEncryptionKey()

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Returns
TypeDescription
Snapshot.Builder

clearSourceInstantSnapshotId()

public Snapshot.Builder clearSourceInstantSnapshotId()

[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.

optional string source_instant_snapshot_id = 287582708;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceSnapshotSchedulePolicy()

public Snapshot.Builder clearSourceSnapshotSchedulePolicy()

[Output Only] URL of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy = 235756291;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearSourceSnapshotSchedulePolicyId()

public Snapshot.Builder clearSourceSnapshotSchedulePolicyId()

[Output Only] ID of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy_id = 70489047;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearStatus()

public Snapshot.Builder clearStatus()

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearStorageBytes()

public Snapshot.Builder clearStorageBytes()

[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.

optional int64 storage_bytes = 424631719;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearStorageBytesStatus()

public Snapshot.Builder clearStorageBytesStatus()

[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. Check the StorageBytesStatus enum for the list of possible values.

optional string storage_bytes_status = 490739082;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clearStorageLocations()

public Snapshot.Builder clearStorageLocations()

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

clone()

public Snapshot.Builder clone()
Returns
TypeDescription
Snapshot.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getArchitecture()

public String getArchitecture()

[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Returns
TypeDescription
String

The architecture.

getArchitectureBytes()

public ByteString getArchitectureBytes()

[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Returns
TypeDescription
ByteString

The bytes for architecture.

getAutoCreated()

public boolean getAutoCreated()

[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.

optional bool auto_created = 463922264;

Returns
TypeDescription
boolean

The autoCreated.

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.

optional string chain_name = 68644169;

Returns
TypeDescription
String

The chainName.

getChainNameBytes()

public ByteString getChainNameBytes()

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.

optional string chain_name = 68644169;

Returns
TypeDescription
ByteString

The bytes for chainName.

getCreationSizeBytes()

public long getCreationSizeBytes()

[Output Only] Size in bytes of the snapshot at creation time.

optional int64 creation_size_bytes = 125400077;

Returns
TypeDescription
long

The creationSizeBytes.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public Snapshot getDefaultInstanceForType()
Returns
TypeDescription
Snapshot

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDiskSizeGb()

public long getDiskSizeGb()

[Output Only] Size of the source disk, specified in GB.

optional int64 disk_size_gb = 316263735;

Returns
TypeDescription
long

The diskSizeGb.

getDownloadBytes()

public long getDownloadBytes()

[Output Only] Number of bytes downloaded to restore a snapshot to a disk.

optional int64 download_bytes = 435054068;

Returns
TypeDescription
long

The downloadBytes.

getEnableConfidentialCompute()

public boolean getEnableConfidentialCompute()

Whether this snapshot is created from a confidential compute mode disk. [Output Only]: This field is not set by user, but from source disk.

optional bool enable_confidential_compute = 102135228;

Returns
TypeDescription
boolean

The enableConfidentialCompute.

getGuestOsFeatures(int index)

public GuestOsFeature getGuestOsFeatures(int index)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestOsFeature

getGuestOsFeaturesBuilder(int index)

public GuestOsFeature.Builder getGuestOsFeaturesBuilder(int index)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestOsFeature.Builder

getGuestOsFeaturesBuilderList()

public List<GuestOsFeature.Builder> getGuestOsFeaturesBuilderList()

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Returns
TypeDescription
List<Builder>

getGuestOsFeaturesCount()

public int getGuestOsFeaturesCount()

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Returns
TypeDescription
int

getGuestOsFeaturesList()

public List<GuestOsFeature> getGuestOsFeaturesList()

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Returns
TypeDescription
List<GuestOsFeature>

getGuestOsFeaturesOrBuilder(int index)

public GuestOsFeatureOrBuilder getGuestOsFeaturesOrBuilder(int index)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
indexint
Returns
TypeDescription
GuestOsFeatureOrBuilder

getGuestOsFeaturesOrBuilderList()

public List<? extends GuestOsFeatureOrBuilder> getGuestOsFeaturesOrBuilderList()

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.GuestOsFeatureOrBuilder>

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

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.

optional string label_fingerprint = 178124825;

Returns
TypeDescription
String

The labelFingerprint.

getLabelFingerprintBytes()

public ByteString getLabelFingerprintBytes()

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.

optional string label_fingerprint = 178124825;

Returns
TypeDescription
ByteString

The bytes for labelFingerprint.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getLicenseCodes(int index)

public long getLicenseCodes(int index)

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
long

The licenseCodes at the given index.

getLicenseCodesCount()

public int getLicenseCodesCount()

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Returns
TypeDescription
int

The count of licenseCodes.

getLicenseCodesList()

public List<Long> getLicenseCodesList()

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Returns
TypeDescription
List<Long>

A list containing the licenseCodes.

getLicenses(int index)

public String getLicenses(int index)

[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).

repeated string licenses = 337642578;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The licenses at the given index.

getLicensesBytes(int index)

public ByteString getLicensesBytes(int index)

[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).

repeated string licenses = 337642578;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the licenses at the given index.

getLicensesCount()

public int getLicensesCount()

[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).

repeated string licenses = 337642578;

Returns
TypeDescription
int

The count of licenses.

getLicensesList()

public ProtocolStringList getLicensesList()

[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).

repeated string licenses = 337642578;

Returns
TypeDescription
ProtocolStringList

A list containing the licenses.

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.

optional string location_hint = 350519505;

Returns
TypeDescription
String

The locationHint.

getLocationHintBytes()

public ByteString getLocationHintBytes()

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.

optional string location_hint = 350519505;

Returns
TypeDescription
ByteString

The bytes for locationHint.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

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? 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.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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? 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.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getSatisfiesPzi()

public boolean getSatisfiesPzi()

Output only. Reserved for future use.

optional bool satisfies_pzi = 480964257;

Returns
TypeDescription
boolean

The satisfiesPzi.

getSatisfiesPzs()

public boolean getSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
TypeDescription
boolean

The satisfiesPzs.

public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Returns
TypeDescription
CustomerEncryptionKey

The snapshotEncryptionKey.

getSnapshotEncryptionKeyBuilder()

public CustomerEncryptionKey.Builder getSnapshotEncryptionKeyBuilder()

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Returns
TypeDescription
CustomerEncryptionKey.Builder

getSnapshotEncryptionKeyOrBuilder()

public CustomerEncryptionKeyOrBuilder getSnapshotEncryptionKeyOrBuilder()

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Returns
TypeDescription
CustomerEncryptionKeyOrBuilder

getSnapshotType()

public String getSnapshotType()

Indicates the type of the snapshot. Check the SnapshotType enum for the list of possible values.

optional string snapshot_type = 124349653;

Returns
TypeDescription
String

The snapshotType.

getSnapshotTypeBytes()

public ByteString getSnapshotTypeBytes()

Indicates the type of the snapshot. Check the SnapshotType enum for the list of possible values.

optional string snapshot_type = 124349653;

Returns
TypeDescription
ByteString

The bytes for snapshotType.

getSourceDisk()

public String getSourceDisk()

The source disk used to create this snapshot.

optional string source_disk = 451753793;

Returns
TypeDescription
String

The sourceDisk.

getSourceDiskBytes()

public ByteString getSourceDiskBytes()

The source disk used to create this snapshot.

optional string source_disk = 451753793;

Returns
TypeDescription
ByteString

The bytes for sourceDisk.

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Returns
TypeDescription
CustomerEncryptionKey

The sourceDiskEncryptionKey.

getSourceDiskEncryptionKeyBuilder()

public CustomerEncryptionKey.Builder getSourceDiskEncryptionKeyBuilder()

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Returns
TypeDescription
CustomerEncryptionKey.Builder

getSourceDiskEncryptionKeyOrBuilder()

public CustomerEncryptionKeyOrBuilder getSourceDiskEncryptionKeyOrBuilder()

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Returns
TypeDescription
CustomerEncryptionKeyOrBuilder

getSourceDiskForRecoveryCheckpoint()

public String getSourceDiskForRecoveryCheckpoint()

The source disk whose recovery checkpoint will be used to create this snapshot.

optional string source_disk_for_recovery_checkpoint = 359837950;

Returns
TypeDescription
String

The sourceDiskForRecoveryCheckpoint.

getSourceDiskForRecoveryCheckpointBytes()

public ByteString getSourceDiskForRecoveryCheckpointBytes()

The source disk whose recovery checkpoint will be used to create this snapshot.

optional string source_disk_for_recovery_checkpoint = 359837950;

Returns
TypeDescription
ByteString

The bytes for sourceDiskForRecoveryCheckpoint.

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.

optional string source_disk_id = 454190809;

Returns
TypeDescription
String

The sourceDiskId.

getSourceDiskIdBytes()

public ByteString getSourceDiskIdBytes()

[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.

optional string source_disk_id = 454190809;

Returns
TypeDescription
ByteString

The bytes for sourceDiskId.

getSourceInstantSnapshot()

public String getSourceInstantSnapshot()

The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot

optional string source_instant_snapshot = 219202054;

Returns
TypeDescription
String

The sourceInstantSnapshot.

getSourceInstantSnapshotBytes()

public ByteString getSourceInstantSnapshotBytes()

The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot

optional string source_instant_snapshot = 219202054;

Returns
TypeDescription
ByteString

The bytes for sourceInstantSnapshot.

getSourceInstantSnapshotEncryptionKey()

public CustomerEncryptionKey getSourceInstantSnapshotEncryptionKey()

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Returns
TypeDescription
CustomerEncryptionKey

The sourceInstantSnapshotEncryptionKey.

getSourceInstantSnapshotEncryptionKeyBuilder()

public CustomerEncryptionKey.Builder getSourceInstantSnapshotEncryptionKeyBuilder()

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Returns
TypeDescription
CustomerEncryptionKey.Builder

getSourceInstantSnapshotEncryptionKeyOrBuilder()

public CustomerEncryptionKeyOrBuilder getSourceInstantSnapshotEncryptionKeyOrBuilder()

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Returns
TypeDescription
CustomerEncryptionKeyOrBuilder

getSourceInstantSnapshotId()

public String getSourceInstantSnapshotId()

[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.

optional string source_instant_snapshot_id = 287582708;

Returns
TypeDescription
String

The sourceInstantSnapshotId.

getSourceInstantSnapshotIdBytes()

public ByteString getSourceInstantSnapshotIdBytes()

[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.

optional string source_instant_snapshot_id = 287582708;

Returns
TypeDescription
ByteString

The bytes for sourceInstantSnapshotId.

getSourceSnapshotSchedulePolicy()

public String getSourceSnapshotSchedulePolicy()

[Output Only] URL of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy = 235756291;

Returns
TypeDescription
String

The sourceSnapshotSchedulePolicy.

getSourceSnapshotSchedulePolicyBytes()

public ByteString getSourceSnapshotSchedulePolicyBytes()

[Output Only] URL of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy = 235756291;

Returns
TypeDescription
ByteString

The bytes for sourceSnapshotSchedulePolicy.

getSourceSnapshotSchedulePolicyId()

public String getSourceSnapshotSchedulePolicyId()

[Output Only] ID of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy_id = 70489047;

Returns
TypeDescription
String

The sourceSnapshotSchedulePolicyId.

getSourceSnapshotSchedulePolicyIdBytes()

public ByteString getSourceSnapshotSchedulePolicyIdBytes()

[Output Only] ID of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy_id = 70489047;

Returns
TypeDescription
ByteString

The bytes for sourceSnapshotSchedulePolicyId.

getStatus()

public String getStatus()

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
ByteString

The bytes for status.

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.

optional int64 storage_bytes = 424631719;

Returns
TypeDescription
long

The storageBytes.

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. Check the StorageBytesStatus enum for the list of possible values.

optional string storage_bytes_status = 490739082;

Returns
TypeDescription
String

The storageBytesStatus.

getStorageBytesStatusBytes()

public ByteString getStorageBytesStatusBytes()

[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. Check the StorageBytesStatus enum for the list of possible values.

optional string storage_bytes_status = 490739082;

Returns
TypeDescription
ByteString

The bytes for storageBytesStatus.

getStorageLocations(int index)

public String getStorageLocations(int index)

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The storageLocations at the given index.

getStorageLocationsBytes(int index)

public ByteString getStorageLocationsBytes(int index)

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the storageLocations at the given index.

getStorageLocationsCount()

public int getStorageLocationsCount()

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Returns
TypeDescription
int

The count of storageLocations.

getStorageLocationsList()

public ProtocolStringList getStorageLocationsList()

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Returns
TypeDescription
ProtocolStringList

A list containing the storageLocations.

hasArchitecture()

public boolean hasArchitecture()

[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Returns
TypeDescription
boolean

Whether the architecture field is set.

hasAutoCreated()

public boolean hasAutoCreated()

[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.

optional bool auto_created = 463922264;

Returns
TypeDescription
boolean

Whether the autoCreated field is set.

hasChainName()

public boolean hasChainName()

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.

optional string chain_name = 68644169;

Returns
TypeDescription
boolean

Whether the chainName field is set.

hasCreationSizeBytes()

public boolean hasCreationSizeBytes()

[Output Only] Size in bytes of the snapshot at creation time.

optional int64 creation_size_bytes = 125400077;

Returns
TypeDescription
boolean

Whether the creationSizeBytes field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasDiskSizeGb()

public boolean hasDiskSizeGb()

[Output Only] Size of the source disk, specified in GB.

optional int64 disk_size_gb = 316263735;

Returns
TypeDescription
boolean

Whether the diskSizeGb field is set.

hasDownloadBytes()

public boolean hasDownloadBytes()

[Output Only] Number of bytes downloaded to restore a snapshot to a disk.

optional int64 download_bytes = 435054068;

Returns
TypeDescription
boolean

Whether the downloadBytes field is set.

hasEnableConfidentialCompute()

public boolean hasEnableConfidentialCompute()

Whether this snapshot is created from a confidential compute mode disk. [Output Only]: This field is not set by user, but from source disk.

optional bool enable_confidential_compute = 102135228;

Returns
TypeDescription
boolean

Whether the enableConfidentialCompute field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasLabelFingerprint()

public boolean hasLabelFingerprint()

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.

optional string label_fingerprint = 178124825;

Returns
TypeDescription
boolean

Whether the labelFingerprint field is set.

hasLocationHint()

public boolean hasLocationHint()

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.

optional string location_hint = 350519505;

Returns
TypeDescription
boolean

Whether the locationHint field is set.

hasName()

public boolean hasName()

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? 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.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasSatisfiesPzi()

public boolean hasSatisfiesPzi()

Output only. Reserved for future use.

optional bool satisfies_pzi = 480964257;

Returns
TypeDescription
boolean

Whether the satisfiesPzi field is set.

hasSatisfiesPzs()

public boolean hasSatisfiesPzs()

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Returns
TypeDescription
boolean

Whether the satisfiesPzs field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasSnapshotEncryptionKey()

public boolean hasSnapshotEncryptionKey()

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Returns
TypeDescription
boolean

Whether the snapshotEncryptionKey field is set.

hasSnapshotType()

public boolean hasSnapshotType()

Indicates the type of the snapshot. Check the SnapshotType enum for the list of possible values.

optional string snapshot_type = 124349653;

Returns
TypeDescription
boolean

Whether the snapshotType field is set.

hasSourceDisk()

public boolean hasSourceDisk()

The source disk used to create this snapshot.

optional string source_disk = 451753793;

Returns
TypeDescription
boolean

Whether the sourceDisk field is set.

hasSourceDiskEncryptionKey()

public boolean hasSourceDiskEncryptionKey()

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Returns
TypeDescription
boolean

Whether the sourceDiskEncryptionKey field is set.

hasSourceDiskForRecoveryCheckpoint()

public boolean hasSourceDiskForRecoveryCheckpoint()

The source disk whose recovery checkpoint will be used to create this snapshot.

optional string source_disk_for_recovery_checkpoint = 359837950;

Returns
TypeDescription
boolean

Whether the sourceDiskForRecoveryCheckpoint field is set.

hasSourceDiskId()

public boolean hasSourceDiskId()

[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.

optional string source_disk_id = 454190809;

Returns
TypeDescription
boolean

Whether the sourceDiskId field is set.

hasSourceInstantSnapshot()

public boolean hasSourceInstantSnapshot()

The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot

optional string source_instant_snapshot = 219202054;

Returns
TypeDescription
boolean

Whether the sourceInstantSnapshot field is set.

hasSourceInstantSnapshotEncryptionKey()

public boolean hasSourceInstantSnapshotEncryptionKey()

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Returns
TypeDescription
boolean

Whether the sourceInstantSnapshotEncryptionKey field is set.

hasSourceInstantSnapshotId()

public boolean hasSourceInstantSnapshotId()

[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.

optional string source_instant_snapshot_id = 287582708;

Returns
TypeDescription
boolean

Whether the sourceInstantSnapshotId field is set.

hasSourceSnapshotSchedulePolicy()

public boolean hasSourceSnapshotSchedulePolicy()

[Output Only] URL of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy = 235756291;

Returns
TypeDescription
boolean

Whether the sourceSnapshotSchedulePolicy field is set.

hasSourceSnapshotSchedulePolicyId()

public boolean hasSourceSnapshotSchedulePolicyId()

[Output Only] ID of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy_id = 70489047;

Returns
TypeDescription
boolean

Whether the sourceSnapshotSchedulePolicyId field is set.

hasStatus()

public boolean hasStatus()

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
boolean

Whether the status field is set.

hasStorageBytes()

public boolean hasStorageBytes()

[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.

optional int64 storage_bytes = 424631719;

Returns
TypeDescription
boolean

Whether the storageBytes field is set.

hasStorageBytesStatus()

public boolean hasStorageBytesStatus()

[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. Check the StorageBytesStatus enum for the list of possible values.

optional string storage_bytes_status = 490739082;

Returns
TypeDescription
boolean

Whether the storageBytesStatus field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Snapshot other)

public Snapshot.Builder mergeFrom(Snapshot other)
Parameter
NameDescription
otherSnapshot
Returns
TypeDescription
Snapshot.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Snapshot.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Snapshot.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Snapshot.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Snapshot.Builder
Overrides

mergeSnapshotEncryptionKey(CustomerEncryptionKey value)

public Snapshot.Builder mergeSnapshotEncryptionKey(CustomerEncryptionKey value)

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Parameter
NameDescription
valueCustomerEncryptionKey
Returns
TypeDescription
Snapshot.Builder

mergeSourceDiskEncryptionKey(CustomerEncryptionKey value)

public Snapshot.Builder mergeSourceDiskEncryptionKey(CustomerEncryptionKey value)

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Parameter
NameDescription
valueCustomerEncryptionKey
Returns
TypeDescription
Snapshot.Builder

mergeSourceInstantSnapshotEncryptionKey(CustomerEncryptionKey value)

public Snapshot.Builder mergeSourceInstantSnapshotEncryptionKey(CustomerEncryptionKey value)

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Parameter
NameDescription
valueCustomerEncryptionKey
Returns
TypeDescription
Snapshot.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Snapshot.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Snapshot.Builder
Overrides

putAllLabels(Map<String,String> values)

public Snapshot.Builder putAllLabels(Map<String,String> values)

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Snapshot.Builder

putLabels(String key, String value)

public Snapshot.Builder putLabels(String key, String value)

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Snapshot.Builder

removeGuestOsFeatures(int index)

public Snapshot.Builder removeGuestOsFeatures(int index)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameter
NameDescription
indexint
Returns
TypeDescription
Snapshot.Builder

removeLabels(String key)

public Snapshot.Builder removeLabels(String key)

Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty.

map<string, string> labels = 500195327;

Parameter
NameDescription
keyString
Returns
TypeDescription
Snapshot.Builder

setArchitecture(String value)

public Snapshot.Builder setArchitecture(String value)

[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Parameter
NameDescription
valueString

The architecture to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setArchitectureBytes(ByteString value)

public Snapshot.Builder setArchitectureBytes(ByteString value)

[Output Only] The architecture of the snapshot. Valid values are ARM64 or X86_64. Check the Architecture enum for the list of possible values.

optional string architecture = 302803283;

Parameter
NameDescription
valueByteString

The bytes for architecture to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setAutoCreated(boolean value)

public Snapshot.Builder setAutoCreated(boolean value)

[Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk.

optional bool auto_created = 463922264;

Parameter
NameDescription
valueboolean

The autoCreated to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setChainName(String value)

public Snapshot.Builder setChainName(String value)

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.

optional string chain_name = 68644169;

Parameter
NameDescription
valueString

The chainName to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setChainNameBytes(ByteString value)

public Snapshot.Builder setChainNameBytes(ByteString value)

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.

optional string chain_name = 68644169;

Parameter
NameDescription
valueByteString

The bytes for chainName to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setCreationSizeBytes(long value)

public Snapshot.Builder setCreationSizeBytes(long value)

[Output Only] Size in bytes of the snapshot at creation time.

optional int64 creation_size_bytes = 125400077;

Parameter
NameDescription
valuelong

The creationSizeBytes to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setCreationTimestamp(String value)

public Snapshot.Builder setCreationTimestamp(String value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueString

The creationTimestamp to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public Snapshot.Builder setCreationTimestampBytes(ByteString value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueByteString

The bytes for creationTimestamp to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setDescription(String value)

public Snapshot.Builder setDescription(String value)

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Snapshot.Builder setDescriptionBytes(ByteString value)

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setDiskSizeGb(long value)

public Snapshot.Builder setDiskSizeGb(long value)

[Output Only] Size of the source disk, specified in GB.

optional int64 disk_size_gb = 316263735;

Parameter
NameDescription
valuelong

The diskSizeGb to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setDownloadBytes(long value)

public Snapshot.Builder setDownloadBytes(long value)

[Output Only] Number of bytes downloaded to restore a snapshot to a disk.

optional int64 download_bytes = 435054068;

Parameter
NameDescription
valuelong

The downloadBytes to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setEnableConfidentialCompute(boolean value)

public Snapshot.Builder setEnableConfidentialCompute(boolean value)

Whether this snapshot is created from a confidential compute mode disk. [Output Only]: This field is not set by user, but from source disk.

optional bool enable_confidential_compute = 102135228;

Parameter
NameDescription
valueboolean

The enableConfidentialCompute to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Snapshot.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Snapshot.Builder
Overrides

setGuestOsFeatures(int index, GuestOsFeature value)

public Snapshot.Builder setGuestOsFeatures(int index, GuestOsFeature value)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameters
NameDescription
indexint
valueGuestOsFeature
Returns
TypeDescription
Snapshot.Builder

setGuestOsFeatures(int index, GuestOsFeature.Builder builderForValue)

public Snapshot.Builder setGuestOsFeatures(int index, GuestOsFeature.Builder builderForValue)

[Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.

repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;

Parameters
NameDescription
indexint
builderForValueGuestOsFeature.Builder
Returns
TypeDescription
Snapshot.Builder

setId(long value)

public Snapshot.Builder setId(long value)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
NameDescription
valuelong

The id to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setKind(String value)

public Snapshot.Builder setKind(String value)

[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.

optional string kind = 3292052;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setKindBytes(ByteString value)

public Snapshot.Builder setKindBytes(ByteString value)

[Output Only] Type of the resource. Always compute#snapshot for Snapshot resources.

optional string kind = 3292052;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setLabelFingerprint(String value)

public Snapshot.Builder setLabelFingerprint(String value)

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.

optional string label_fingerprint = 178124825;

Parameter
NameDescription
valueString

The labelFingerprint to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setLabelFingerprintBytes(ByteString value)

public Snapshot.Builder setLabelFingerprintBytes(ByteString value)

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.

optional string label_fingerprint = 178124825;

Parameter
NameDescription
valueByteString

The bytes for labelFingerprint to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setLicenseCodes(int index, long value)

public Snapshot.Builder setLicenseCodes(int index, long value)

[Output Only] Integer license codes indicating which licenses are attached to this snapshot.

repeated int64 license_codes = 45482664;

Parameters
NameDescription
indexint

The index to set the value at.

valuelong

The licenseCodes to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setLicenses(int index, String value)

public Snapshot.Builder setLicenses(int index, String value)

[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).

repeated string licenses = 337642578;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The licenses to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setLocationHint(String value)

public Snapshot.Builder setLocationHint(String value)

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.

optional string location_hint = 350519505;

Parameter
NameDescription
valueString

The locationHint to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setLocationHintBytes(ByteString value)

public Snapshot.Builder setLocationHintBytes(ByteString value)

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.

optional string location_hint = 350519505;

Parameter
NameDescription
valueByteString

The bytes for locationHint to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setName(String value)

public Snapshot.Builder setName(String value)

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? 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.

optional string name = 3373707;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Snapshot.Builder setNameBytes(ByteString value)

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? 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.

optional string name = 3373707;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Snapshot.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Snapshot.Builder
Overrides

setSatisfiesPzi(boolean value)

public Snapshot.Builder setSatisfiesPzi(boolean value)

Output only. Reserved for future use.

optional bool satisfies_pzi = 480964257;

Parameter
NameDescription
valueboolean

The satisfiesPzi to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSatisfiesPzs(boolean value)

public Snapshot.Builder setSatisfiesPzs(boolean value)

[Output Only] Reserved for future use.

optional bool satisfies_pzs = 480964267;

Parameter
NameDescription
valueboolean

The satisfiesPzs to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

public Snapshot.Builder setSelfLink(String value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueString

The selfLink to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public Snapshot.Builder setSelfLinkBytes(ByteString value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueByteString

The bytes for selfLink to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSnapshotEncryptionKey(CustomerEncryptionKey value)

public Snapshot.Builder setSnapshotEncryptionKey(CustomerEncryptionKey value)

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Parameter
NameDescription
valueCustomerEncryptionKey
Returns
TypeDescription
Snapshot.Builder

setSnapshotEncryptionKey(CustomerEncryptionKey.Builder builderForValue)

public Snapshot.Builder setSnapshotEncryptionKey(CustomerEncryptionKey.Builder builderForValue)

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.

optional .google.cloud.compute.v1.CustomerEncryptionKey snapshot_encryption_key = 43334526;

Parameter
NameDescription
builderForValueCustomerEncryptionKey.Builder
Returns
TypeDescription
Snapshot.Builder

setSnapshotType(String value)

public Snapshot.Builder setSnapshotType(String value)

Indicates the type of the snapshot. Check the SnapshotType enum for the list of possible values.

optional string snapshot_type = 124349653;

Parameter
NameDescription
valueString

The snapshotType to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSnapshotTypeBytes(ByteString value)

public Snapshot.Builder setSnapshotTypeBytes(ByteString value)

Indicates the type of the snapshot. Check the SnapshotType enum for the list of possible values.

optional string snapshot_type = 124349653;

Parameter
NameDescription
valueByteString

The bytes for snapshotType to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceDisk(String value)

public Snapshot.Builder setSourceDisk(String value)

The source disk used to create this snapshot.

optional string source_disk = 451753793;

Parameter
NameDescription
valueString

The sourceDisk to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceDiskBytes(ByteString value)

public Snapshot.Builder setSourceDiskBytes(ByteString value)

The source disk used to create this snapshot.

optional string source_disk = 451753793;

Parameter
NameDescription
valueByteString

The bytes for sourceDisk to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceDiskEncryptionKey(CustomerEncryptionKey value)

public Snapshot.Builder setSourceDiskEncryptionKey(CustomerEncryptionKey value)

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Parameter
NameDescription
valueCustomerEncryptionKey
Returns
TypeDescription
Snapshot.Builder

setSourceDiskEncryptionKey(CustomerEncryptionKey.Builder builderForValue)

public Snapshot.Builder setSourceDiskEncryptionKey(CustomerEncryptionKey.Builder builderForValue)

The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 531501153;

Parameter
NameDescription
builderForValueCustomerEncryptionKey.Builder
Returns
TypeDescription
Snapshot.Builder

setSourceDiskForRecoveryCheckpoint(String value)

public Snapshot.Builder setSourceDiskForRecoveryCheckpoint(String value)

The source disk whose recovery checkpoint will be used to create this snapshot.

optional string source_disk_for_recovery_checkpoint = 359837950;

Parameter
NameDescription
valueString

The sourceDiskForRecoveryCheckpoint to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceDiskForRecoveryCheckpointBytes(ByteString value)

public Snapshot.Builder setSourceDiskForRecoveryCheckpointBytes(ByteString value)

The source disk whose recovery checkpoint will be used to create this snapshot.

optional string source_disk_for_recovery_checkpoint = 359837950;

Parameter
NameDescription
valueByteString

The bytes for sourceDiskForRecoveryCheckpoint to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceDiskId(String value)

public Snapshot.Builder setSourceDiskId(String value)

[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.

optional string source_disk_id = 454190809;

Parameter
NameDescription
valueString

The sourceDiskId to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceDiskIdBytes(ByteString value)

public Snapshot.Builder setSourceDiskIdBytes(ByteString value)

[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.

optional string source_disk_id = 454190809;

Parameter
NameDescription
valueByteString

The bytes for sourceDiskId to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceInstantSnapshot(String value)

public Snapshot.Builder setSourceInstantSnapshot(String value)

The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot

optional string source_instant_snapshot = 219202054;

Parameter
NameDescription
valueString

The sourceInstantSnapshot to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceInstantSnapshotBytes(ByteString value)

public Snapshot.Builder setSourceInstantSnapshotBytes(ByteString value)

The source instant snapshot used to create this snapshot. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instantSnapshots/instantSnapshot - projects/project/zones/zone/instantSnapshots/instantSnapshot - zones/zone/instantSnapshots/instantSnapshot

optional string source_instant_snapshot = 219202054;

Parameter
NameDescription
valueByteString

The bytes for sourceInstantSnapshot to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceInstantSnapshotEncryptionKey(CustomerEncryptionKey value)

public Snapshot.Builder setSourceInstantSnapshotEncryptionKey(CustomerEncryptionKey value)

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Parameter
NameDescription
valueCustomerEncryptionKey
Returns
TypeDescription
Snapshot.Builder

setSourceInstantSnapshotEncryptionKey(CustomerEncryptionKey.Builder builderForValue)

public Snapshot.Builder setSourceInstantSnapshotEncryptionKey(CustomerEncryptionKey.Builder builderForValue)

Customer provided encryption key when creating Snapshot from Instant Snapshot.

optional .google.cloud.compute.v1.CustomerEncryptionKey source_instant_snapshot_encryption_key = 436536060;

Parameter
NameDescription
builderForValueCustomerEncryptionKey.Builder
Returns
TypeDescription
Snapshot.Builder

setSourceInstantSnapshotId(String value)

public Snapshot.Builder setSourceInstantSnapshotId(String value)

[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.

optional string source_instant_snapshot_id = 287582708;

Parameter
NameDescription
valueString

The sourceInstantSnapshotId to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceInstantSnapshotIdBytes(ByteString value)

public Snapshot.Builder setSourceInstantSnapshotIdBytes(ByteString value)

[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.

optional string source_instant_snapshot_id = 287582708;

Parameter
NameDescription
valueByteString

The bytes for sourceInstantSnapshotId to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceSnapshotSchedulePolicy(String value)

public Snapshot.Builder setSourceSnapshotSchedulePolicy(String value)

[Output Only] URL of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy = 235756291;

Parameter
NameDescription
valueString

The sourceSnapshotSchedulePolicy to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceSnapshotSchedulePolicyBytes(ByteString value)

public Snapshot.Builder setSourceSnapshotSchedulePolicyBytes(ByteString value)

[Output Only] URL of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy = 235756291;

Parameter
NameDescription
valueByteString

The bytes for sourceSnapshotSchedulePolicy to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceSnapshotSchedulePolicyId(String value)

public Snapshot.Builder setSourceSnapshotSchedulePolicyId(String value)

[Output Only] ID of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy_id = 70489047;

Parameter
NameDescription
valueString

The sourceSnapshotSchedulePolicyId to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setSourceSnapshotSchedulePolicyIdBytes(ByteString value)

public Snapshot.Builder setSourceSnapshotSchedulePolicyIdBytes(ByteString value)

[Output Only] ID of the resource policy which created this scheduled snapshot.

optional string source_snapshot_schedule_policy_id = 70489047;

Parameter
NameDescription
valueByteString

The bytes for sourceSnapshotSchedulePolicyId to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStatus(String value)

public Snapshot.Builder setStatus(String value)

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Parameter
NameDescription
valueString

The status to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStatusBytes(ByteString value)

public Snapshot.Builder setStatusBytes(ByteString value)

[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Parameter
NameDescription
valueByteString

The bytes for status to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStorageBytes(long value)

public Snapshot.Builder setStorageBytes(long value)

[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.

optional int64 storage_bytes = 424631719;

Parameter
NameDescription
valuelong

The storageBytes to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStorageBytesStatus(String value)

public Snapshot.Builder setStorageBytesStatus(String value)

[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. Check the StorageBytesStatus enum for the list of possible values.

optional string storage_bytes_status = 490739082;

Parameter
NameDescription
valueString

The storageBytesStatus to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStorageBytesStatusBytes(ByteString value)

public Snapshot.Builder setStorageBytesStatusBytes(ByteString value)

[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. Check the StorageBytesStatus enum for the list of possible values.

optional string storage_bytes_status = 490739082;

Parameter
NameDescription
valueByteString

The bytes for storageBytesStatus to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setStorageLocations(int index, String value)

public Snapshot.Builder setStorageLocations(int index, String value)

Cloud Storage bucket storage location of the snapshot (regional or multi-regional).

repeated string storage_locations = 328005274;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The storageLocations to set.

Returns
TypeDescription
Snapshot.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Snapshot.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Snapshot.Builder
Overrides