Package com.google.cloud.aiplatform.v1
Class MachineSpec.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
com.google.cloud.aiplatform.v1.MachineSpec.Builder
- All Implemented Interfaces:
MachineSpecOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- MachineSpec
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.MachineSpec-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The number of accelerators to attach to the machine.Immutable.Optional.Immutable.Optional.Immutable.intThe number of accelerators to attach to the machine.Immutable.intImmutable.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.Immutable.com.google.protobuf.ByteStringImmutable.Optional.Optional.Optional.Immutable.com.google.protobuf.ByteStringImmutable.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(MachineSpec other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.setAcceleratorCount(int value) The number of accelerators to attach to the machine.Immutable.setAcceleratorTypeValue(int value) Immutable.setGpuPartitionSize(String value) Optional.setGpuPartitionSizeBytes(com.google.protobuf.ByteString value) Optional.setMachineType(String value) Immutable.setMachineTypeBytes(com.google.protobuf.ByteString value) Immutable.Optional.setReservationAffinity(ReservationAffinity.Builder builderForValue) Optional.setTpuTopology(String value) Immutable.setTpuTopologyBytes(com.google.protobuf.ByteString value) Immutable.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, 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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MachineSpec.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
-
mergeFrom
public MachineSpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MachineSpec.Builder>- Throws:
IOException
-
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];- Specified by:
getMachineTypein interfaceMachineSpecOrBuilder- Returns:
- The machineType.
-
getMachineTypeBytes
public 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];- Specified by:
getMachineTypeBytesin interfaceMachineSpecOrBuilder- Returns:
- The bytes for machineType.
-
setMachineType
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];- Parameters:
value- The machineType to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setMachineTypeBytes
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];- Parameters:
value- The bytes for machineType to set.- Returns:
- This builder for chaining.
-
getAcceleratorTypeValue
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];- Specified by:
getAcceleratorTypeValuein interfaceMachineSpecOrBuilder- Returns:
- The enum numeric value on the wire for acceleratorType.
-
setAcceleratorTypeValue
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];- Parameters:
value- The enum numeric value on the wire for acceleratorType to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getAcceleratorTypein interfaceMachineSpecOrBuilder- Returns:
- The acceleratorType.
-
setAcceleratorType
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];- Parameters:
value- The acceleratorType to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
getAcceleratorCount
public int getAcceleratorCount()The number of accelerators to attach to the machine.
int32 accelerator_count = 3;- Specified by:
getAcceleratorCountin interfaceMachineSpecOrBuilder- Returns:
- The acceleratorCount.
-
setAcceleratorCount
The number of accelerators to attach to the machine.
int32 accelerator_count = 3;- Parameters:
value- The acceleratorCount to set.- Returns:
- This builder for chaining.
-
clearAcceleratorCount
The number of accelerators to attach to the machine.
int32 accelerator_count = 3;- Returns:
- This builder for chaining.
-
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];- Specified by:
getGpuPartitionSizein interfaceMachineSpecOrBuilder- Returns:
- The gpuPartitionSize.
-
getGpuPartitionSizeBytes
public 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];- Specified by:
getGpuPartitionSizeBytesin interfaceMachineSpecOrBuilder- Returns:
- The bytes for gpuPartitionSize.
-
setGpuPartitionSize
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];- Parameters:
value- The gpuPartitionSize to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setGpuPartitionSizeBytes
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];- Parameters:
value- The bytes for gpuPartitionSize to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getTpuTopologyin interfaceMachineSpecOrBuilder- Returns:
- The tpuTopology.
-
getTpuTopologyBytes
public 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];- Specified by:
getTpuTopologyBytesin interfaceMachineSpecOrBuilder- Returns:
- The bytes for tpuTopology.
-
setTpuTopology
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];- Parameters:
value- The tpuTopology to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setTpuTopologyBytes
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];- Parameters:
value- The bytes for tpuTopology to set.- Returns:
- This builder for chaining.
-
hasReservationAffinity
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];- Specified by:
hasReservationAffinityin interfaceMachineSpecOrBuilder- Returns:
- Whether the reservationAffinity field is set.
-
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];- Specified by:
getReservationAffinityin interfaceMachineSpecOrBuilder- Returns:
- The reservationAffinity.
-
setReservationAffinity
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]; -
setReservationAffinity
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]; -
mergeReservationAffinity
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]; -
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]; -
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]; -
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];- Specified by:
getReservationAffinityOrBuilderin interfaceMachineSpecOrBuilder
-