Class AllocationPolicy.Accelerator.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Accelerator.Builder>
com.google.cloud.batch.v1alpha.AllocationPolicy.Accelerator.Builder
All Implemented Interfaces:
AllocationPolicy.AcceleratorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AllocationPolicy.Accelerator

public static final class AllocationPolicy.Accelerator.Builder extends com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Accelerator.Builder> implements AllocationPolicy.AcceleratorOrBuilder
 Accelerator describes Compute Engine accelerators to be attached to the VM.
 
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.Accelerator
  • 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<AllocationPolicy.Accelerator.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<AllocationPolicy.Accelerator.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<AllocationPolicy.Accelerator.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public AllocationPolicy.Accelerator.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<AllocationPolicy.Accelerator.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Accelerator.Builder>
    • mergeFrom

      public AllocationPolicy.Accelerator.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<AllocationPolicy.Accelerator.Builder>
      Throws:
      IOException
    • getType

      public String getType()
       The accelerator type. For example, "nvidia-tesla-t4".
       See `gcloud compute accelerator-types list`.
       
      string type = 1;
      Specified by:
      getType in interface AllocationPolicy.AcceleratorOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       The accelerator type. For example, "nvidia-tesla-t4".
       See `gcloud compute accelerator-types list`.
       
      string type = 1;
      Specified by:
      getTypeBytes in interface AllocationPolicy.AcceleratorOrBuilder
      Returns:
      The bytes for type.
    • setType

       The accelerator type. For example, "nvidia-tesla-t4".
       See `gcloud compute accelerator-types list`.
       
      string type = 1;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

       The accelerator type. For example, "nvidia-tesla-t4".
       See `gcloud compute accelerator-types list`.
       
      string type = 1;
      Returns:
      This builder for chaining.
    • setTypeBytes

      public AllocationPolicy.Accelerator.Builder setTypeBytes(com.google.protobuf.ByteString value)
       The accelerator type. For example, "nvidia-tesla-t4".
       See `gcloud compute accelerator-types list`.
       
      string type = 1;
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.
    • getCount

      public long getCount()
       The number of accelerators of this type.
       
      int64 count = 2;
      Specified by:
      getCount in interface AllocationPolicy.AcceleratorOrBuilder
      Returns:
      The count.
    • setCount

      public AllocationPolicy.Accelerator.Builder setCount(long value)
       The number of accelerators of this type.
       
      int64 count = 2;
      Parameters:
      value - The count to set.
      Returns:
      This builder for chaining.
    • clearCount

       The number of accelerators of this type.
       
      int64 count = 2;
      Returns:
      This builder for chaining.
    • getInstallGpuDrivers

      @Deprecated public boolean getInstallGpuDrivers()
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.Accelerator.install_gpu_drivers is deprecated. See google/cloud/batch/v1alpha/job.proto;l=450
       Deprecated: please use instances[0].install_gpu_drivers instead.
       
      bool install_gpu_drivers = 3 [deprecated = true];
      Specified by:
      getInstallGpuDrivers in interface AllocationPolicy.AcceleratorOrBuilder
      Returns:
      The installGpuDrivers.
    • setInstallGpuDrivers

      @Deprecated public AllocationPolicy.Accelerator.Builder setInstallGpuDrivers(boolean value)
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.Accelerator.install_gpu_drivers is deprecated. See google/cloud/batch/v1alpha/job.proto;l=450
       Deprecated: please use instances[0].install_gpu_drivers instead.
       
      bool install_gpu_drivers = 3 [deprecated = true];
      Parameters:
      value - The installGpuDrivers to set.
      Returns:
      This builder for chaining.
    • clearInstallGpuDrivers

      @Deprecated public AllocationPolicy.Accelerator.Builder clearInstallGpuDrivers()
      Deprecated.
      google.cloud.batch.v1alpha.AllocationPolicy.Accelerator.install_gpu_drivers is deprecated. See google/cloud/batch/v1alpha/job.proto;l=450
       Deprecated: please use instances[0].install_gpu_drivers instead.
       
      bool install_gpu_drivers = 3 [deprecated = true];
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getDriverVersion in interface AllocationPolicy.AcceleratorOrBuilder
      Returns:
      The driverVersion.
    • getDriverVersionBytes

      public com.google.protobuf.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];
      Specified by:
      getDriverVersionBytes in interface AllocationPolicy.AcceleratorOrBuilder
      Returns:
      The bytes for driverVersion.
    • setDriverVersion

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

      public AllocationPolicy.Accelerator.Builder setDriverVersionBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for driverVersion to set.
      Returns:
      This builder for chaining.