Class MachineSpec.Builder (3.50.0)

public static final class MachineSpec.Builder extends GeneratedMessageV3.Builder<MachineSpec.Builder> implements MachineSpecOrBuilder

Specification of a single machine.

Protobuf type google.cloud.aiplatform.v1beta1.MachineSpec

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MachineSpec build()
Returns
Type Description
MachineSpec

buildPartial()

public MachineSpec buildPartial()
Returns
Type Description
MachineSpec

clear()

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

clearAcceleratorCount()

public MachineSpec.Builder clearAcceleratorCount()

The number of accelerators to attach to the machine.

int32 accelerator_count = 3;

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

clearAcceleratorType()

public MachineSpec.Builder clearAcceleratorType()

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.

.google.cloud.aiplatform.v1beta1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMachineType()

public MachineSpec.Builder clearMachineType()

Immutable. The type of the machine.

See the list of machine types supported for prediction

See the list of machine types supported for custom training.

For DeployedModel this field is optional, and the default value is n1-standard-2. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReservationAffinity()

public MachineSpec.Builder clearReservationAffinity()

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
MachineSpec.Builder

clearTpuTopology()

public MachineSpec.Builder clearTpuTopology()

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

clone()

public MachineSpec.Builder clone()
Returns
Type Description
MachineSpec.Builder
Overrides

getAcceleratorCount()

public int getAcceleratorCount()

The number of accelerators to attach to the machine.

int32 accelerator_count = 3;

Returns
Type Description
int

The acceleratorCount.

getAcceleratorType()

public AcceleratorType getAcceleratorType()

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.

.google.cloud.aiplatform.v1beta1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
AcceleratorType

The acceleratorType.

getAcceleratorTypeValue()

public int getAcceleratorTypeValue()

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.

.google.cloud.aiplatform.v1beta1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The enum numeric value on the wire for acceleratorType.

getDefaultInstanceForType()

public MachineSpec getDefaultInstanceForType()
Returns
Type Description
MachineSpec

getDescriptorForType()

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

getMachineType()

public String getMachineType()

Immutable. The type of the machine.

See the list of machine types supported for prediction

See the list of machine types supported for custom training.

For DeployedModel this field is optional, and the default value is n1-standard-2. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The machineType.

getMachineTypeBytes()

public ByteString getMachineTypeBytes()

Immutable. The type of the machine.

See the list of machine types supported for prediction

See the list of machine types supported for custom training.

For DeployedModel this field is optional, and the default value is n1-standard-2. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for machineType.

getReservationAffinity()

public ReservationAffinity getReservationAffinity()

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ReservationAffinity

The reservationAffinity.

getReservationAffinityBuilder()

public ReservationAffinity.Builder getReservationAffinityBuilder()

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ReservationAffinity.Builder

getReservationAffinityOrBuilder()

public ReservationAffinityOrBuilder getReservationAffinityOrBuilder()

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ReservationAffinityOrBuilder

getTpuTopology()

public String getTpuTopology()

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The tpuTopology.

getTpuTopologyBytes()

public ByteString getTpuTopologyBytes()

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for tpuTopology.

hasReservationAffinity()

public boolean hasReservationAffinity()

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the reservationAffinity field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MachineSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeReservationAffinity(ReservationAffinity value)

public MachineSpec.Builder mergeReservationAffinity(ReservationAffinity value)

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ReservationAffinity
Returns
Type Description
MachineSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAcceleratorCount(int value)

public MachineSpec.Builder setAcceleratorCount(int value)

The number of accelerators to attach to the machine.

int32 accelerator_count = 3;

Parameter
Name Description
value int

The acceleratorCount to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

setAcceleratorType(AcceleratorType value)

public MachineSpec.Builder setAcceleratorType(AcceleratorType value)

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.

.google.cloud.aiplatform.v1beta1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value AcceleratorType

The acceleratorType to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

setAcceleratorTypeValue(int value)

public MachineSpec.Builder setAcceleratorTypeValue(int value)

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.

.google.cloud.aiplatform.v1beta1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value int

The enum numeric value on the wire for acceleratorType to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMachineType(String value)

public MachineSpec.Builder setMachineType(String value)

Immutable. The type of the machine.

See the list of machine types supported for prediction

See the list of machine types supported for custom training.

For DeployedModel this field is optional, and the default value is n1-standard-2. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The machineType to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

setMachineTypeBytes(ByteString value)

public MachineSpec.Builder setMachineTypeBytes(ByteString value)

Immutable. The type of the machine.

See the list of machine types supported for prediction

See the list of machine types supported for custom training.

For DeployedModel this field is optional, and the default value is n1-standard-2. For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for machineType to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

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

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

setReservationAffinity(ReservationAffinity value)

public MachineSpec.Builder setReservationAffinity(ReservationAffinity value)

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ReservationAffinity
Returns
Type Description
MachineSpec.Builder

setReservationAffinity(ReservationAffinity.Builder builderForValue)

public MachineSpec.Builder setReservationAffinity(ReservationAffinity.Builder builderForValue)

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

.google.cloud.aiplatform.v1beta1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ReservationAffinity.Builder
Returns
Type Description
MachineSpec.Builder

setTpuTopology(String value)

public MachineSpec.Builder setTpuTopology(String value)

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The tpuTopology to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

setTpuTopologyBytes(ByteString value)

public MachineSpec.Builder setTpuTopologyBytes(ByteString value)

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for tpuTopology to set.

Returns
Type Description
MachineSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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