Class AcceleratorConfig.Builder

  • All Implemented Interfaces:
    AcceleratorConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    AcceleratorConfig

    public static final class AcceleratorConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
    implements AcceleratorConfigOrBuilder
     Specifies the type and number of accelerator cards attached to the instances
     of an instance. See [GPUs on Compute
     Engine](https://cloud.google.com/compute/docs/gpus/).
     
    Protobuf type google.cloud.dataproc.v1.AcceleratorConfig
    • Method Detail

      • getDescriptor

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

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

        public AcceleratorConfig.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.GeneratedMessageV3.Builder<AcceleratorConfig.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.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • getDefaultInstanceForType

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

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

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

        public AcceleratorConfig.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • setField

        public AcceleratorConfig.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • clearField

        public AcceleratorConfig.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • clearOneof

        public AcceleratorConfig.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • setRepeatedField

        public AcceleratorConfig.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          int index,
                                                          Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • addRepeatedField

        public AcceleratorConfig.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • mergeFrom

        public AcceleratorConfig.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<AcceleratorConfig.Builder>
      • isInitialized

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

        public AcceleratorConfig.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<AcceleratorConfig.Builder>
        Throws:
        IOException
      • getAcceleratorTypeUri

        public String getAcceleratorTypeUri()
         Full URL, partial URI, or short name of the accelerator type resource to
         expose to this instance. See
         [Compute Engine
         AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).
        
         Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `nvidia-tesla-k80`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the accelerator type
         resource, for example, `nvidia-tesla-k80`.
         
        string accelerator_type_uri = 1;
        Specified by:
        getAcceleratorTypeUri in interface AcceleratorConfigOrBuilder
        Returns:
        The acceleratorTypeUri.
      • getAcceleratorTypeUriBytes

        public com.google.protobuf.ByteString getAcceleratorTypeUriBytes()
         Full URL, partial URI, or short name of the accelerator type resource to
         expose to this instance. See
         [Compute Engine
         AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).
        
         Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `nvidia-tesla-k80`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the accelerator type
         resource, for example, `nvidia-tesla-k80`.
         
        string accelerator_type_uri = 1;
        Specified by:
        getAcceleratorTypeUriBytes in interface AcceleratorConfigOrBuilder
        Returns:
        The bytes for acceleratorTypeUri.
      • setAcceleratorTypeUri

        public AcceleratorConfig.Builder setAcceleratorTypeUri​(String value)
         Full URL, partial URI, or short name of the accelerator type resource to
         expose to this instance. See
         [Compute Engine
         AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).
        
         Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `nvidia-tesla-k80`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the accelerator type
         resource, for example, `nvidia-tesla-k80`.
         
        string accelerator_type_uri = 1;
        Parameters:
        value - The acceleratorTypeUri to set.
        Returns:
        This builder for chaining.
      • clearAcceleratorTypeUri

        public AcceleratorConfig.Builder clearAcceleratorTypeUri()
         Full URL, partial URI, or short name of the accelerator type resource to
         expose to this instance. See
         [Compute Engine
         AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).
        
         Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `nvidia-tesla-k80`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the accelerator type
         resource, for example, `nvidia-tesla-k80`.
         
        string accelerator_type_uri = 1;
        Returns:
        This builder for chaining.
      • setAcceleratorTypeUriBytes

        public AcceleratorConfig.Builder setAcceleratorTypeUriBytes​(com.google.protobuf.ByteString value)
         Full URL, partial URI, or short name of the accelerator type resource to
         expose to this instance. See
         [Compute Engine
         AcceleratorTypes](https://cloud.google.com/compute/docs/reference/v1/acceleratorTypes).
        
         Examples:
        
         * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `projects/[project_id]/zones/[zone]/acceleratorTypes/nvidia-tesla-k80`
         * `nvidia-tesla-k80`
        
         **Auto Zone Exception**: If you are using the Dataproc
         [Auto Zone
         Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
         feature, you must use the short name of the accelerator type
         resource, for example, `nvidia-tesla-k80`.
         
        string accelerator_type_uri = 1;
        Parameters:
        value - The bytes for acceleratorTypeUri to set.
        Returns:
        This builder for chaining.
      • getAcceleratorCount

        public int getAcceleratorCount()
         The number of the accelerator cards of this type exposed to this instance.
         
        int32 accelerator_count = 2;
        Specified by:
        getAcceleratorCount in interface AcceleratorConfigOrBuilder
        Returns:
        The acceleratorCount.
      • setAcceleratorCount

        public AcceleratorConfig.Builder setAcceleratorCount​(int value)
         The number of the accelerator cards of this type exposed to this instance.
         
        int32 accelerator_count = 2;
        Parameters:
        value - The acceleratorCount to set.
        Returns:
        This builder for chaining.
      • clearAcceleratorCount

        public AcceleratorConfig.Builder clearAcceleratorCount()
         The number of the accelerator cards of this type exposed to this instance.
         
        int32 accelerator_count = 2;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final AcceleratorConfig.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>
      • mergeUnknownFields

        public final AcceleratorConfig.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AcceleratorConfig.Builder>