Class AllocationPolicy.Accelerator.Builder (0.41.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 the VM.

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

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

buildPartial()

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

clear()

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

clearCount()

public AllocationPolicy.Accelerator.Builder clearCount()

The number of accelerators of this type.

int64 count = 2;

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clearDriverVersion()

public AllocationPolicy.Accelerator.Builder clearDriverVersion()

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

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

bool install_gpu_drivers = 3 [deprecated = true];

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AllocationPolicy.Accelerator.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

clone()

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

getCount()

public long getCount()

The number of accelerators of this type.

int64 count = 2;

Returns
TypeDescription
long

The count.

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDriverVersion()

public String getDriverVersion()

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The driverVersion.

getDriverVersionBytes()

public ByteString getDriverVersionBytes()

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for driverVersion.

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=360

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

bool install_gpu_drivers = 3 [deprecated = true];

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

The bytes for type.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AllocationPolicy.Accelerator other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The count to set.

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setDriverVersion(String value)

public AllocationPolicy.Accelerator.Builder setDriverVersion(String value)

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The driverVersion to set.

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setDriverVersionBytes(ByteString value)

public AllocationPolicy.Accelerator.Builder setDriverVersionBytes(ByteString value)

Optional. The NVIDIA GPU driver version that should be installed for this type.

You can define the specific driver version such as "470.103.01", following the driver version requirements in https://cloud.google.com/compute/docs/gpus/install-drivers-gpu#minimum-driver. Batch will install the specific accelerator driver if qualified.

string driver_version = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for driverVersion to set.

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

bool install_gpu_drivers = 3 [deprecated = true];

Parameter
NameDescription
valueboolean

The installGpuDrivers to set.

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

The type to set.

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

The bytes for type to set.

Returns
TypeDescription
AllocationPolicy.Accelerator.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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