Class DiskInstantiationConfig (1.64.0)

public final class DiskInstantiationConfig extends GeneratedMessageV3 implements DiskInstantiationConfigOrBuilder

A specification of the desired way to instantiate a disk in the instance template when its created from a source instance.

Protobuf type google.cloud.compute.v1.DiskInstantiationConfig

Static Fields

AUTO_DELETE_FIELD_NUMBER

public static final int AUTO_DELETE_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_IMAGE_FIELD_NUMBER

public static final int CUSTOM_IMAGE_FIELD_NUMBER
Field Value
Type Description
int

DEVICE_NAME_FIELD_NUMBER

public static final int DEVICE_NAME_FIELD_NUMBER
Field Value
Type Description
int

INSTANTIATE_FROM_FIELD_NUMBER

public static final int INSTANTIATE_FROM_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DiskInstantiationConfig getDefaultInstance()
Returns
Type Description
DiskInstantiationConfig

getDescriptor()

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

newBuilder()

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

newBuilder(DiskInstantiationConfig prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

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.

getCustomImage()

public String getCustomImage()

The custom source image to be used to restore this disk when instantiating this instance template.

optional string custom_image = 184123149;

Returns
Type Description
String

The customImage.

getCustomImageBytes()

public ByteString getCustomImageBytes()

The custom source image to be used to restore this disk when instantiating this instance template.

optional string custom_image = 184123149;

Returns
Type Description
ByteString

The bytes for customImage.

getDefaultInstanceForType()

public DiskInstantiationConfig getDefaultInstanceForType()
Returns
Type Description
DiskInstantiationConfig

getDeviceName()

public String getDeviceName()

Specifies the device name of the disk to which the configurations apply to.

optional string device_name = 67541716;

Returns
Type Description
String

The deviceName.

getDeviceNameBytes()

public ByteString getDeviceNameBytes()

Specifies the device name of the disk to which the configurations apply to.

optional string device_name = 67541716;

Returns
Type Description
ByteString

The bytes for deviceName.

getInstantiateFrom()

public String getInstantiateFrom()

Specifies whether to include the disk and what image to use. Possible values are: - source-image: to use the same image that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - source-image-family: to use the same image family that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks. - attach-read-only: to attach a read-only disk. Applicable to read-only disks. - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks. Check the InstantiateFrom enum for the list of possible values.

optional string instantiate_from = 393383903;

Returns
Type Description
String

The instantiateFrom.

getInstantiateFromBytes()

public ByteString getInstantiateFromBytes()

Specifies whether to include the disk and what image to use. Possible values are: - source-image: to use the same image that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - source-image-family: to use the same image family that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks. - attach-read-only: to attach a read-only disk. Applicable to read-only disks. - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks. Check the InstantiateFrom enum for the list of possible values.

optional string instantiate_from = 393383903;

Returns
Type Description
ByteString

The bytes for instantiateFrom.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hasCustomImage()

public boolean hasCustomImage()

The custom source image to be used to restore this disk when instantiating this instance template.

optional string custom_image = 184123149;

Returns
Type Description
boolean

Whether the customImage field is set.

hasDeviceName()

public boolean hasDeviceName()

Specifies the device name of the disk to which the configurations apply to.

optional string device_name = 67541716;

Returns
Type Description
boolean

Whether the deviceName field is set.

hasInstantiateFrom()

public boolean hasInstantiateFrom()

Specifies whether to include the disk and what image to use. Possible values are: - source-image: to use the same image that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - source-image-family: to use the same image family that was used to create the source instance's corresponding disk. Applicable to the boot disk and additional read-write disks. - custom-image: to use a user-provided image url for disk creation. Applicable to the boot disk and additional read-write disks. - attach-read-only: to attach a read-only disk. Applicable to read-only disks. - do-not-include: to exclude a disk from the template. Applicable to additional read-write disks, local SSDs, and read-only disks. Check the InstantiateFrom enum for the list of possible values.

optional string instantiate_from = 393383903;

Returns
Type Description
boolean

Whether the instantiateFrom 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 DiskInstantiationConfig.Builder newBuilderForType()
Returns
Type Description
DiskInstantiationConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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