public static final class MachineSpec.Builder extends com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder> implements MachineSpecOrBuilder
Specification of a single machine.Protobuf type
google.cloud.aiplatform.v1.MachineSpecaddRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>public MachineSpec.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>public MachineSpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MachineSpec build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MachineSpec buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MachineSpec.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MachineSpec.Builder>public MachineSpec.Builder mergeFrom(MachineSpec other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>public MachineSpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MachineSpec.Builder>IOExceptionpublic String getMachineType()
Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];getMachineType in interface MachineSpecOrBuilderpublic com.google.protobuf.ByteString getMachineTypeBytes()
Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];getMachineTypeBytes in interface MachineSpecOrBuilderpublic MachineSpec.Builder setMachineType(String value)
Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];value - The machineType to set.public MachineSpec.Builder clearMachineType()
Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];public MachineSpec.Builder setMachineTypeBytes(com.google.protobuf.ByteString value)
Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] this field is optional, and the default value is `n1-standard-2`. For [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] or as part of [WorkerPoolSpec][google.cloud.aiplatform.v1.WorkerPoolSpec] this field is required.
string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE];value - The bytes for machineType to set.public int getAcceleratorTypeValue()
Immutable. The type of accelerator(s) that may be attached to the machine as per [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
.google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];
getAcceleratorTypeValue in interface MachineSpecOrBuilderpublic 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.v1.MachineSpec.accelerator_count].
.google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];
value - The enum numeric value on the wire for acceleratorType to set.public AcceleratorType getAcceleratorType()
Immutable. The type of accelerator(s) that may be attached to the machine as per [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
.google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];
getAcceleratorType in interface MachineSpecOrBuilderpublic 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.v1.MachineSpec.accelerator_count].
.google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];
value - The acceleratorType to set.public MachineSpec.Builder clearAcceleratorType()
Immutable. The type of accelerator(s) that may be attached to the machine as per [accelerator_count][google.cloud.aiplatform.v1.MachineSpec.accelerator_count].
.google.cloud.aiplatform.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE];
public int getAcceleratorCount()
The number of accelerators to attach to the machine.
int32 accelerator_count = 3;getAcceleratorCount in interface MachineSpecOrBuilderpublic MachineSpec.Builder setAcceleratorCount(int value)
The number of accelerators to attach to the machine.
int32 accelerator_count = 3;value - The acceleratorCount to set.public MachineSpec.Builder clearAcceleratorCount()
The number of accelerators to attach to the machine.
int32 accelerator_count = 3;public String getGpuPartitionSize()
Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
getGpuPartitionSize in interface MachineSpecOrBuilderpublic com.google.protobuf.ByteString getGpuPartitionSizeBytes()
Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
getGpuPartitionSizeBytes in interface MachineSpecOrBuilderpublic MachineSpec.Builder setGpuPartitionSize(String value)
Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
value - The gpuPartitionSize to set.public MachineSpec.Builder clearGpuPartitionSize()
Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
public MachineSpec.Builder setGpuPartitionSizeBytes(com.google.protobuf.ByteString value)
Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to [Nvidia GPU Partitioning](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus-multi#multi-instance_gpu_partitions) for the available partition sizes. If set, the accelerator_count should be set to 1.
string gpu_partition_size = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
value - The bytes for gpuPartitionSize to set.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];getTpuTopology in interface MachineSpecOrBuilderpublic com.google.protobuf.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];getTpuTopologyBytes in interface MachineSpecOrBuilderpublic 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];value - The tpuTopology to set.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];public MachineSpec.Builder setTpuTopologyBytes(com.google.protobuf.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];value - The bytes for tpuTopology to set.public boolean hasReservationAffinity()
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
hasReservationAffinity in interface MachineSpecOrBuilderpublic ReservationAffinity getReservationAffinity()
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
getReservationAffinity in interface MachineSpecOrBuilderpublic MachineSpec.Builder setReservationAffinity(ReservationAffinity value)
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
public MachineSpec.Builder setReservationAffinity(ReservationAffinity.Builder builderForValue)
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
public MachineSpec.Builder mergeReservationAffinity(ReservationAffinity value)
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
public MachineSpec.Builder clearReservationAffinity()
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
public ReservationAffinity.Builder getReservationAffinityBuilder()
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
public ReservationAffinityOrBuilder getReservationAffinityOrBuilder()
Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
.google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
getReservationAffinityOrBuilder in interface MachineSpecOrBuilderCopyright © 2026 Google LLC. All rights reserved.