Class AllocationPolicy.Accelerator.Builder (0.5.0)

public static final class AllocationPolicy.Accelerator.Builder extends GeneratedMessageV3.Builder<AllocationPolicy.Accelerator.Builder> implements AllocationPolicy.AcceleratorOrBuilder

Accelerator describes Compute Engine accelerators to be attached to VMs.

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AllocationPolicy.Accelerator build()
Returns
Type Description
AllocationPolicy.Accelerator

buildPartial()

public AllocationPolicy.Accelerator buildPartial()
Returns
Type Description
AllocationPolicy.Accelerator

clear()

public AllocationPolicy.Accelerator.Builder clear()
Returns
Type Description
AllocationPolicy.Accelerator.Builder
Overrides

clearCount()

public AllocationPolicy.Accelerator.Builder clearCount()

The number of accelerators of this type.

int64 count = 2;

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInstallGpuDrivers() (deprecated)

public AllocationPolicy.Accelerator.Builder clearInstallGpuDrivers()

Deprecated. google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is deprecated. See google/cloud/batch/v1/job.proto;l=292

Deprecated: please use instances[0].install_gpu_drivers instead.

bool install_gpu_drivers = 3 [deprecated = true];

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearType()

public AllocationPolicy.Accelerator.Builder clearType()

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list.

string type = 1;

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clone()

public AllocationPolicy.Accelerator.Builder clone()
Returns
Type Description
AllocationPolicy.Accelerator.Builder
Overrides

getCount()

public long getCount()

The number of accelerators of this type.

int64 count = 2;

Returns
Type Description
long

The count.

getDefaultInstanceForType()

public AllocationPolicy.Accelerator getDefaultInstanceForType()
Returns
Type Description
AllocationPolicy.Accelerator

getDescriptorForType()

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

getInstallGpuDrivers() (deprecated)

public boolean getInstallGpuDrivers()

Deprecated. google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is deprecated. See google/cloud/batch/v1/job.proto;l=292

Deprecated: please use instances[0].install_gpu_drivers instead.

bool install_gpu_drivers = 3 [deprecated = true];

Returns
Type Description
boolean

The installGpuDrivers.

getType()

public String getType()

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list.

string type = 1;

Returns
Type Description
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list.

string type = 1;

Returns
Type Description
ByteString

The bytes for type.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AllocationPolicy.Accelerator other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCount(long value)

public AllocationPolicy.Accelerator.Builder setCount(long value)

The number of accelerators of this type.

int64 count = 2;

Parameter
Name Description
value long

The count to set.

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInstallGpuDrivers(boolean value) (deprecated)

public AllocationPolicy.Accelerator.Builder setInstallGpuDrivers(boolean value)

Deprecated. google.cloud.batch.v1.AllocationPolicy.Accelerator.install_gpu_drivers is deprecated. See google/cloud/batch/v1/job.proto;l=292

Deprecated: please use instances[0].install_gpu_drivers instead.

bool install_gpu_drivers = 3 [deprecated = true];

Parameter
Name Description
value boolean

The installGpuDrivers to set.

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

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

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

setType(String value)

public AllocationPolicy.Accelerator.Builder setType(String value)

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list.

string type = 1;

Parameter
Name Description
value String

The type to set.

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public AllocationPolicy.Accelerator.Builder setTypeBytes(ByteString value)

The accelerator type. For example, "nvidia-tesla-t4". See gcloud compute accelerator-types list.

string type = 1;

Parameter
Name Description
value ByteString

The bytes for type to set.

Returns
Type Description
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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