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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
    • clear

      public MachineSpec.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<MachineSpec.Builder>
    • getDefaultInstanceForType

      public MachineSpec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public MachineSpec build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public MachineSpec buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public MachineSpec.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MachineSpec.Builder>
    • mergeFrom

      public MachineSpec.Builder mergeFrom(MachineSpec other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<MachineSpec.Builder>
      Throws:
      IOException
    • getMachineType

      public 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];
      Specified by:
      getMachineType in interface MachineSpecOrBuilder
      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:
      getMachineTypeBytes in interface MachineSpecOrBuilder
      Returns:
      The bytes for machineType.
    • setMachineType

      public 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];
      Parameters:
      value - The machineType to set.
      Returns:
      This builder for chaining.
    • clearMachineType

      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];
      Returns:
      This builder for chaining.
    • setMachineTypeBytes

      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];
      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:
      getAcceleratorTypeValue in interface MachineSpecOrBuilder
      Returns:
      The enum numeric value on the wire for acceleratorType.
    • setAcceleratorTypeValue

      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.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

      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];
      Specified by:
      getAcceleratorType in interface MachineSpecOrBuilder
      Returns:
      The acceleratorType.
    • setAcceleratorType

      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.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

      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];
      Returns:
      This builder for chaining.
    • getAcceleratorCount

      public int getAcceleratorCount()
       The number of accelerators to attach to the machine.
       
      int32 accelerator_count = 3;
      Specified by:
      getAcceleratorCount in interface MachineSpecOrBuilder
      Returns:
      The acceleratorCount.
    • setAcceleratorCount

      public MachineSpec.Builder setAcceleratorCount(int value)
       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

      public MachineSpec.Builder clearAcceleratorCount()
       The number of accelerators to attach to the machine.
       
      int32 accelerator_count = 3;
      Returns:
      This builder for chaining.
    • getGpuPartitionSize

      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];
      Specified by:
      getGpuPartitionSize in interface MachineSpecOrBuilder
      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:
      getGpuPartitionSizeBytes in interface MachineSpecOrBuilder
      Returns:
      The bytes for gpuPartitionSize.
    • setGpuPartitionSize

      public 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];
      Parameters:
      value - The gpuPartitionSize to set.
      Returns:
      This builder for chaining.
    • clearGpuPartitionSize

      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];
      Returns:
      This builder for chaining.
    • setGpuPartitionSizeBytes

      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];
      Parameters:
      value - The bytes for gpuPartitionSize to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getTpuTopology in interface MachineSpecOrBuilder
      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:
      getTpuTopologyBytes in interface MachineSpecOrBuilder
      Returns:
      The bytes for tpuTopology.
    • setTpuTopology

      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];
      Parameters:
      value - The tpuTopology to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setTpuTopologyBytes

      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];
      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:
      hasReservationAffinity in interface MachineSpecOrBuilder
      Returns:
      Whether the reservationAffinity field is set.
    • getReservationAffinity

      public 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];
      Specified by:
      getReservationAffinity in interface MachineSpecOrBuilder
      Returns:
      The reservationAffinity.
    • setReservationAffinity

      public 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];
    • setReservationAffinity

      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];
    • mergeReservationAffinity

      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];
    • clearReservationAffinity

      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];
    • getReservationAffinityBuilder

      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];
    • getReservationAffinityOrBuilder

      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];
      Specified by:
      getReservationAffinityOrBuilder in interface MachineSpecOrBuilder