Class DiskInstantiationConfig (1.34.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
TypeDescription
int

CUSTOM_IMAGE_FIELD_NUMBER

public static final int CUSTOM_IMAGE_FIELD_NUMBER
Field Value
TypeDescription
int

DEVICE_NAME_FIELD_NUMBER

public static final int DEVICE_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

INSTANTIATE_FROM_FIELD_NUMBER

public static final int INSTANTIATE_FROM_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DiskInstantiationConfig getDefaultInstance()
Returns
TypeDescription
DiskInstantiationConfig

getDescriptor()

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

newBuilder()

public static DiskInstantiationConfig.Builder newBuilder()
Returns
TypeDescription
DiskInstantiationConfig.Builder

newBuilder(DiskInstantiationConfig prototype)

public static DiskInstantiationConfig.Builder newBuilder(DiskInstantiationConfig prototype)
Parameter
NameDescription
prototypeDiskInstantiationConfig
Returns
TypeDescription
DiskInstantiationConfig.Builder

parseDelimitedFrom(InputStream input)

public static DiskInstantiationConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DiskInstantiationConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DiskInstantiationConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DiskInstantiationConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DiskInstantiationConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DiskInstantiationConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DiskInstantiationConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DiskInstantiationConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DiskInstantiationConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DiskInstantiationConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DiskInstantiationConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DiskInstantiationConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DiskInstantiationConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DiskInstantiationConfig> parser()
Returns
TypeDescription
Parser<DiskInstantiationConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for customImage.

getDefaultInstanceForType()

public DiskInstantiationConfig getDefaultInstanceForType()
Returns
TypeDescription
DiskInstantiationConfig

getDeviceName()

public String getDeviceName()

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

optional string device_name = 67541716;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for instantiateFrom.

getParserForType()

public Parser<DiskInstantiationConfig> getParserForType()
Returns
TypeDescription
Parser<DiskInstantiationConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the instantiateFrom field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DiskInstantiationConfig.Builder newBuilderForType()
Returns
TypeDescription
DiskInstantiationConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DiskInstantiationConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DiskInstantiationConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DiskInstantiationConfig.Builder toBuilder()
Returns
TypeDescription
DiskInstantiationConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException