Class AttachedDisk (1.52.0)

public final class AttachedDisk extends GeneratedMessageV3 implements AttachedDiskOrBuilder

An instance-attached disk resource.

Protobuf type google.cloud.compute.v1.AttachedDisk

Static Fields

ARCHITECTURE_FIELD_NUMBER

public static final int ARCHITECTURE_FIELD_NUMBER
Field Value
Type Description
int

AUTO_DELETE_FIELD_NUMBER

public static final int AUTO_DELETE_FIELD_NUMBER
Field Value
Type Description
int

BOOT_FIELD_NUMBER

public static final int BOOT_FIELD_NUMBER
Field Value
Type Description
int

DEVICE_NAME_FIELD_NUMBER

public static final int DEVICE_NAME_FIELD_NUMBER
Field Value
Type Description
int

DISK_ENCRYPTION_KEY_FIELD_NUMBER

public static final int DISK_ENCRYPTION_KEY_FIELD_NUMBER
Field Value
Type Description
int

DISK_SIZE_GB_FIELD_NUMBER

public static final int DISK_SIZE_GB_FIELD_NUMBER
Field Value
Type Description
int

FORCE_ATTACH_FIELD_NUMBER

public static final int FORCE_ATTACH_FIELD_NUMBER
Field Value
Type Description
int

GUEST_OS_FEATURES_FIELD_NUMBER

public static final int GUEST_OS_FEATURES_FIELD_NUMBER
Field Value
Type Description
int

INDEX_FIELD_NUMBER

public static final int INDEX_FIELD_NUMBER
Field Value
Type Description
int

INITIALIZE_PARAMS_FIELD_NUMBER

public static final int INITIALIZE_PARAMS_FIELD_NUMBER
Field Value
Type Description
int

INTERFACE_FIELD_NUMBER

public static final int INTERFACE_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

LICENSES_FIELD_NUMBER

public static final int LICENSES_FIELD_NUMBER
Field Value
Type Description
int

MODE_FIELD_NUMBER

public static final int MODE_FIELD_NUMBER
Field Value
Type Description
int

SAVED_STATE_FIELD_NUMBER

public static final int SAVED_STATE_FIELD_NUMBER
Field Value
Type Description
int

SHIELDED_INSTANCE_INITIAL_STATE_FIELD_NUMBER

public static final int SHIELDED_INSTANCE_INITIAL_STATE_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_FIELD_NUMBER

public static final int SOURCE_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AttachedDisk getDefaultInstance()
Returns
Type Description
AttachedDisk

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AttachedDisk.Builder newBuilder()
Returns
Type Description
AttachedDisk.Builder

newBuilder(AttachedDisk prototype)

public static AttachedDisk.Builder newBuilder(AttachedDisk prototype)
Parameter
Name Description
prototype AttachedDisk
Returns
Type Description
AttachedDisk.Builder

parseDelimitedFrom(InputStream input)

public static AttachedDisk parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AttachedDisk
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttachedDisk parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttachedDisk
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AttachedDisk parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AttachedDisk
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AttachedDisk parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttachedDisk
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AttachedDisk parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AttachedDisk
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AttachedDisk parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttachedDisk
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AttachedDisk parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AttachedDisk
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AttachedDisk parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttachedDisk
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AttachedDisk parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AttachedDisk
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AttachedDisk parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttachedDisk
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AttachedDisk parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AttachedDisk
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AttachedDisk parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttachedDisk
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AttachedDisk> parser()
Returns
Type Description
Parser<AttachedDisk>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getArchitecture()

public String getArchitecture()

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

optional string architecture = 302803283;

Returns
Type Description
String

The architecture.

getArchitectureBytes()

public ByteString getArchitectureBytes()

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

optional string architecture = 302803283;

Returns
Type Description
ByteString

The bytes for architecture.

getAutoDelete()

public boolean getAutoDelete()

Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

optional bool auto_delete = 464761403;

Returns
Type Description
boolean

The autoDelete.

getBoot()

public boolean getBoot()

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

optional bool boot = 3029746;

Returns
Type Description
boolean

The boot.

getDefaultInstanceForType()

public AttachedDisk getDefaultInstanceForType()
Returns
Type Description
AttachedDisk

getDeviceName()

public String getDeviceName()

Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

optional string device_name = 67541716;

Returns
Type Description
String

The deviceName.

getDeviceNameBytes()

public ByteString getDeviceNameBytes()

Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

optional string device_name = 67541716;

Returns
Type Description
ByteString

The bytes for deviceName.

getDiskEncryptionKey()

public CustomerEncryptionKey getDiskEncryptionKey()

Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.

optional .google.cloud.compute.v1.CustomerEncryptionKey disk_encryption_key = 271660677;

Returns
Type Description
CustomerEncryptionKey

The diskEncryptionKey.

getDiskEncryptionKeyOrBuilder()

public CustomerEncryptionKeyOrBuilder getDiskEncryptionKeyOrBuilder()

Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.

optional .google.cloud.compute.v1.CustomerEncryptionKey disk_encryption_key = 271660677;

Returns
Type Description
CustomerEncryptionKeyOrBuilder

getDiskSizeGb()

public long getDiskSizeGb()

The size of the disk in GB.

optional int64 disk_size_gb = 316263735;

Returns
Type Description
long

The diskSizeGb.

getForceAttach()

public boolean getForceAttach()

[Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.

optional bool force_attach = 142758425;

Returns
Type Description
boolean

The forceAttach.

getGuestOsFeatures(int index)

public GuestOsFeature getGuestOsFeatures(int index)

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
Name Description
index int
Returns
Type Description
GuestOsFeature

getGuestOsFeaturesCount()

public int getGuestOsFeaturesCount()

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
Type Description
int

getGuestOsFeaturesList()

public List<GuestOsFeature> getGuestOsFeaturesList()

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
Type Description
List<GuestOsFeature>

getGuestOsFeaturesOrBuilder(int index)

public GuestOsFeatureOrBuilder getGuestOsFeaturesOrBuilder(int index)

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
Name Description
index int
Returns
Type Description
GuestOsFeatureOrBuilder

getGuestOsFeaturesOrBuilderList()

public List<? extends GuestOsFeatureOrBuilder> getGuestOsFeaturesOrBuilderList()

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
Type Description
List<? extends com.google.cloud.compute.v1.GuestOsFeatureOrBuilder>

getIndex()

public int getIndex()

[Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

optional int32 index = 100346066;

Returns
Type Description
int

The index.

getInitializeParams()

public AttachedDiskInitializeParams getInitializeParams()

[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

optional .google.cloud.compute.v1.AttachedDiskInitializeParams initialize_params = 17697045;

Returns
Type Description
AttachedDiskInitializeParams

The initializeParams.

getInitializeParamsOrBuilder()

public AttachedDiskInitializeParamsOrBuilder getInitializeParamsOrBuilder()

[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

optional .google.cloud.compute.v1.AttachedDiskInitializeParams initialize_params = 17697045;

Returns
Type Description
AttachedDiskInitializeParamsOrBuilder

getInterface()

public String getInterface()

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. Check the Interface enum for the list of possible values.

optional string interface = 502623545;

Returns
Type Description
String

The interface.

getInterfaceBytes()

public ByteString getInterfaceBytes()

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. Check the Interface enum for the list of possible values.

optional string interface = 502623545;

Returns
Type Description
ByteString

The bytes for interface.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getLicenses(int index)

public String getLicenses(int index)

[Output Only] Any valid publicly visible licenses.

repeated string licenses = 337642578;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The licenses at the given index.

getLicensesBytes(int index)

public ByteString getLicensesBytes(int index)

[Output Only] Any valid publicly visible licenses.

repeated string licenses = 337642578;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the licenses at the given index.

getLicensesCount()

public int getLicensesCount()

[Output Only] Any valid publicly visible licenses.

repeated string licenses = 337642578;

Returns
Type Description
int

The count of licenses.

getLicensesList()

public ProtocolStringList getLicensesList()

[Output Only] Any valid publicly visible licenses.

repeated string licenses = 337642578;

Returns
Type Description
ProtocolStringList

A list containing the licenses.

getMode()

public String getMode()

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
Type Description
String

The mode.

getModeBytes()

public ByteString getModeBytes()

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
Type Description
ByteString

The bytes for mode.

getParserForType()

public Parser<AttachedDisk> getParserForType()
Returns
Type Description
Parser<AttachedDisk>
Overrides

getSavedState()

public String getSavedState()

For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api. Check the SavedState enum for the list of possible values.

optional string saved_state = 411587801;

Returns
Type Description
String

The savedState.

getSavedStateBytes()

public ByteString getSavedStateBytes()

For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api. Check the SavedState enum for the list of possible values.

optional string saved_state = 411587801;

Returns
Type Description
ByteString

The bytes for savedState.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getShieldedInstanceInitialState()

public InitialStateConfig getShieldedInstanceInitialState()

[Output Only] shielded vm initial state stored on disk

optional .google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;

Returns
Type Description
InitialStateConfig

The shieldedInstanceInitialState.

getShieldedInstanceInitialStateOrBuilder()

public InitialStateConfigOrBuilder getShieldedInstanceInitialStateOrBuilder()

[Output Only] shielded vm initial state stored on disk

optional .google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;

Returns
Type Description
InitialStateConfigOrBuilder

getSource()

public String getSource()

Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.

optional string source = 177235995;

Returns
Type Description
String

The source.

getSourceBytes()

public ByteString getSourceBytes()

Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.

optional string source = 177235995;

Returns
Type Description
ByteString

The bytes for source.

getType()

public String getType()

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
Type Description
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
Type Description
ByteString

The bytes for type.

hasArchitecture()

public boolean hasArchitecture()

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

optional string architecture = 302803283;

Returns
Type Description
boolean

Whether the architecture field is set.

hasAutoDelete()

public boolean hasAutoDelete()

Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).

optional bool auto_delete = 464761403;

Returns
Type Description
boolean

Whether the autoDelete field is set.

hasBoot()

public boolean hasBoot()

Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.

optional bool boot = 3029746;

Returns
Type Description
boolean

Whether the boot field is set.

hasDeviceName()

public boolean hasDeviceName()

Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.

optional string device_name = 67541716;

Returns
Type Description
boolean

Whether the deviceName field is set.

hasDiskEncryptionKey()

public boolean hasDiskEncryptionKey()

Encrypts or decrypts a disk using a customer-supplied encryption key. If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key. If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance. If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group.

optional .google.cloud.compute.v1.CustomerEncryptionKey disk_encryption_key = 271660677;

Returns
Type Description
boolean

Whether the diskEncryptionKey field is set.

hasDiskSizeGb()

public boolean hasDiskSizeGb()

The size of the disk in GB.

optional int64 disk_size_gb = 316263735;

Returns
Type Description
boolean

Whether the diskSizeGb field is set.

hasForceAttach()

public boolean hasForceAttach()

[Input Only] Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error.

optional bool force_attach = 142758425;

Returns
Type Description
boolean

Whether the forceAttach field is set.

hasIndex()

public boolean hasIndex()

[Output Only] A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.

optional int32 index = 100346066;

Returns
Type Description
boolean

Whether the index field is set.

hasInitializeParams()

public boolean hasInitializeParams()

[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both.

optional .google.cloud.compute.v1.AttachedDiskInitializeParams initialize_params = 17697045;

Returns
Type Description
boolean

Whether the initializeParams field is set.

hasInterface()

public boolean hasInterface()

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. For most machine types, the default is SCSI. Local SSDs can use either NVME or SCSI. In certain configurations, persistent disks can use NVMe. For more information, see About persistent disks. Check the Interface enum for the list of possible values.

optional string interface = 502623545;

Returns
Type Description
boolean

Whether the interface field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind field is set.

hasMode()

public boolean hasMode()

The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
Type Description
boolean

Whether the mode field is set.

hasSavedState()

public boolean hasSavedState()

For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field is set to PRESERVED if the LocalSSD data has been saved to a persistent location by customer request. (see the discard_local_ssd option on Stop/Suspend). Read-only in the api. Check the SavedState enum for the list of possible values.

optional string saved_state = 411587801;

Returns
Type Description
boolean

Whether the savedState field is set.

hasShieldedInstanceInitialState()

public boolean hasShieldedInstanceInitialState()

[Output Only] shielded vm initial state stored on disk

optional .google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;

Returns
Type Description
boolean

Whether the shieldedInstanceInitialState field is set.

hasSource()

public boolean hasSource()

Specifies a valid partial or full URL to an existing Persistent Disk resource. When creating a new instance, one of initializeParams.sourceImage or initializeParams.sourceSnapshot or disks.source is required except for local SSD. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name for zonal disk, and the URL for regional disk.

optional string source = 177235995;

Returns
Type Description
boolean

Whether the source field is set.

hasType()

public boolean hasType()

Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
Type Description
boolean

Whether the type field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AttachedDisk.Builder newBuilderForType()
Returns
Type Description
AttachedDisk.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AttachedDisk.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AttachedDisk.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AttachedDisk.Builder toBuilder()
Returns
Type Description
AttachedDisk.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException