Class AllocationPolicy.Disk.Builder (0.2.2)

public static final class AllocationPolicy.Disk.Builder extends GeneratedMessageV3.Builder<AllocationPolicy.Disk.Builder> implements AllocationPolicy.DiskOrBuilder

A new persistent disk.

Protobuf type google.cloud.batch.v1.AllocationPolicy.Disk

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AllocationPolicy.Disk build()
Returns
TypeDescription
AllocationPolicy.Disk

buildPartial()

public AllocationPolicy.Disk buildPartial()
Returns
TypeDescription
AllocationPolicy.Disk

clear()

public AllocationPolicy.Disk.Builder clear()
Returns
TypeDescription
AllocationPolicy.Disk.Builder
Overrides

clearDataSource()

public AllocationPolicy.Disk.Builder clearDataSource()
Returns
TypeDescription
AllocationPolicy.Disk.Builder

clearField(Descriptors.FieldDescriptor field)

public AllocationPolicy.Disk.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AllocationPolicy.Disk.Builder
Overrides

clearImage()

public AllocationPolicy.Disk.Builder clearImage()

Name of a public or custom image used as the data source.

string image = 4;

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSizeGb()

public AllocationPolicy.Disk.Builder clearSizeGb()

Disk size in GB. This field is ignored if data_source is disk or image.

int64 size_gb = 2;

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

clearSnapshot()

public AllocationPolicy.Disk.Builder clearSnapshot()

Name of a snapshot used as the data source.

string snapshot = 5;

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

clearType()

public AllocationPolicy.Disk.Builder clearType()

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced".

string type = 1;

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

clone()

public AllocationPolicy.Disk.Builder clone()
Returns
TypeDescription
AllocationPolicy.Disk.Builder
Overrides

getDataSourceCase()

public AllocationPolicy.Disk.DataSourceCase getDataSourceCase()
Returns
TypeDescription
AllocationPolicy.Disk.DataSourceCase

getDefaultInstanceForType()

public AllocationPolicy.Disk getDefaultInstanceForType()
Returns
TypeDescription
AllocationPolicy.Disk

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getImage()

public String getImage()

Name of a public or custom image used as the data source.

string image = 4;

Returns
TypeDescription
String

The image.

getImageBytes()

public ByteString getImageBytes()

Name of a public or custom image used as the data source.

string image = 4;

Returns
TypeDescription
ByteString

The bytes for image.

getSizeGb()

public long getSizeGb()

Disk size in GB. This field is ignored if data_source is disk or image.

int64 size_gb = 2;

Returns
TypeDescription
long

The sizeGb.

getSnapshot()

public String getSnapshot()

Name of a snapshot used as the data source.

string snapshot = 5;

Returns
TypeDescription
String

The snapshot.

getSnapshotBytes()

public ByteString getSnapshotBytes()

Name of a snapshot used as the data source.

string snapshot = 5;

Returns
TypeDescription
ByteString

The bytes for snapshot.

getType()

public String getType()

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced".

string type = 1;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced".

string type = 1;

Returns
TypeDescription
ByteString

The bytes for type.

hasImage()

public boolean hasImage()

Name of a public or custom image used as the data source.

string image = 4;

Returns
TypeDescription
boolean

Whether the image field is set.

hasSnapshot()

public boolean hasSnapshot()

Name of a snapshot used as the data source.

string snapshot = 5;

Returns
TypeDescription
boolean

Whether the snapshot field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AllocationPolicy.Disk other)

public AllocationPolicy.Disk.Builder mergeFrom(AllocationPolicy.Disk other)
Parameter
NameDescription
otherAllocationPolicy.Disk
Returns
TypeDescription
AllocationPolicy.Disk.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AllocationPolicy.Disk.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AllocationPolicy.Disk.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public AllocationPolicy.Disk.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AllocationPolicy.Disk.Builder
Overrides

setImage(String value)

public AllocationPolicy.Disk.Builder setImage(String value)

Name of a public or custom image used as the data source.

string image = 4;

Parameter
NameDescription
valueString

The image to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

setImageBytes(ByteString value)

public AllocationPolicy.Disk.Builder setImageBytes(ByteString value)

Name of a public or custom image used as the data source.

string image = 4;

Parameter
NameDescription
valueByteString

The bytes for image to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

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

public AllocationPolicy.Disk.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AllocationPolicy.Disk.Builder
Overrides

setSizeGb(long value)

public AllocationPolicy.Disk.Builder setSizeGb(long value)

Disk size in GB. This field is ignored if data_source is disk or image.

int64 size_gb = 2;

Parameter
NameDescription
valuelong

The sizeGb to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

setSnapshot(String value)

public AllocationPolicy.Disk.Builder setSnapshot(String value)

Name of a snapshot used as the data source.

string snapshot = 5;

Parameter
NameDescription
valueString

The snapshot to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

setSnapshotBytes(ByteString value)

public AllocationPolicy.Disk.Builder setSnapshotBytes(ByteString value)

Name of a snapshot used as the data source.

string snapshot = 5;

Parameter
NameDescription
valueByteString

The bytes for snapshot to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

setType(String value)

public AllocationPolicy.Disk.Builder setType(String value)

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced".

string type = 1;

Parameter
NameDescription
valueString

The type to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public AllocationPolicy.Disk.Builder setTypeBytes(ByteString value)

Disk type as shown in gcloud compute disk-types list For example, "pd-ssd", "pd-standard", "pd-balanced".

string type = 1;

Parameter
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
AllocationPolicy.Disk.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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