Class DiskInstantiationConfig.Builder (1.26.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DiskInstantiationConfig build()
Returns
TypeDescription
DiskInstantiationConfig

buildPartial()

public DiskInstantiationConfig buildPartial()
Returns
TypeDescription
DiskInstantiationConfig

clear()

public DiskInstantiationConfig.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
DiskInstantiationConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DiskInstantiationConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
DiskInstantiationConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DiskInstantiationConfig other)

public DiskInstantiationConfig.Builder mergeFrom(DiskInstantiationConfig other)
Parameter
NameDescription
otherDiskInstantiationConfig
Returns
TypeDescription
DiskInstantiationConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DiskInstantiationConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The autoDelete to set.

Returns
TypeDescription
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
NameDescription
valueString

The customImage to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for customImage to set.

Returns
TypeDescription
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
NameDescription
valueString

The deviceName to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for deviceName to set.

Returns
TypeDescription
DiskInstantiationConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DiskInstantiationConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The instantiateFrom to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for instantiateFrom to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DiskInstantiationConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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