Class DiskInstantiationConfig.Builder (1.54.0)

public static final class DiskInstantiationConfig.Builder extends GeneratedMessageV3.Builder<DiskInstantiationConfig.Builder> 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 Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DiskInstantiationConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

build()

public DiskInstantiationConfig build()
Returns
Type Description
DiskInstantiationConfig

buildPartial()

public DiskInstantiationConfig buildPartial()
Returns
Type Description
DiskInstantiationConfig

clear()

public DiskInstantiationConfig.Builder clear()
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

clearAutoDelete()

public DiskInstantiationConfig.Builder clearAutoDelete()

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
DiskInstantiationConfig.Builder

This builder for chaining.

clearCustomImage()

public DiskInstantiationConfig.Builder clearCustomImage()

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

optional string custom_image = 184123149;

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

clearDeviceName()

public DiskInstantiationConfig.Builder clearDeviceName()

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

optional string device_name = 67541716;

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DiskInstantiationConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

clearInstantiateFrom()

public DiskInstantiationConfig.Builder clearInstantiateFrom()

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
DiskInstantiationConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DiskInstantiationConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

clone()

public DiskInstantiationConfig.Builder clone()
Returns
Type Description
DiskInstantiationConfig.Builder
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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(DiskInstantiationConfig other)

public DiskInstantiationConfig.Builder mergeFrom(DiskInstantiationConfig other)
Parameter
Name Description
other DiskInstantiationConfig
Returns
Type Description
DiskInstantiationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DiskInstantiationConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public DiskInstantiationConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DiskInstantiationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

setAutoDelete(boolean value)

public DiskInstantiationConfig.Builder setAutoDelete(boolean value)

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;

Parameter
Name Description
value boolean

The autoDelete to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

setCustomImage(String value)

public DiskInstantiationConfig.Builder setCustomImage(String value)

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

optional string custom_image = 184123149;

Parameter
Name Description
value String

The customImage to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

setCustomImageBytes(ByteString value)

public DiskInstantiationConfig.Builder setCustomImageBytes(ByteString value)

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

optional string custom_image = 184123149;

Parameter
Name Description
value ByteString

The bytes for customImage to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

setDeviceName(String value)

public DiskInstantiationConfig.Builder setDeviceName(String value)

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

optional string device_name = 67541716;

Parameter
Name Description
value String

The deviceName to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

setDeviceNameBytes(ByteString value)

public DiskInstantiationConfig.Builder setDeviceNameBytes(ByteString value)

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

optional string device_name = 67541716;

Parameter
Name Description
value ByteString

The bytes for deviceName to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DiskInstantiationConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

setInstantiateFrom(String value)

public DiskInstantiationConfig.Builder setInstantiateFrom(String value)

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;

Parameter
Name Description
value String

The instantiateFrom to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

setInstantiateFromBytes(ByteString value)

public DiskInstantiationConfig.Builder setInstantiateFromBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for instantiateFrom to set.

Returns
Type Description
DiskInstantiationConfig.Builder

This builder for chaining.

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

public DiskInstantiationConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DiskInstantiationConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DiskInstantiationConfig.Builder
Overrides