Class HistogramQueryResult.Builder

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

    public static final class HistogramQueryResult.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<HistogramQueryResult.Builder>
    implements HistogramQueryResultOrBuilder
     Histogram result that matches
     [HistogramQuery][google.cloud.talent.v4beta1.HistogramQuery] specified in
     searches.
     
    Protobuf type google.cloud.talent.v4beta1.HistogramQueryResult
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<HistogramQueryResult.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<HistogramQueryResult.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

        public HistogramQueryResult.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<HistogramQueryResult.Builder>
      • setField

        public HistogramQueryResult.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<HistogramQueryResult.Builder>
      • clearField

        public HistogramQueryResult.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<HistogramQueryResult.Builder>
      • clearOneof

        public HistogramQueryResult.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<HistogramQueryResult.Builder>
      • setRepeatedField

        public HistogramQueryResult.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<HistogramQueryResult.Builder>
      • addRepeatedField

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

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

        public HistogramQueryResult.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<HistogramQueryResult.Builder>
        Throws:
        IOException
      • getHistogramQueryBytes

        public com.google.protobuf.ByteString getHistogramQueryBytes()
         Requested histogram expression.
         
        string histogram_query = 1;
        Specified by:
        getHistogramQueryBytes in interface HistogramQueryResultOrBuilder
        Returns:
        The bytes for histogramQuery.
      • setHistogramQuery

        public HistogramQueryResult.Builder setHistogramQuery​(String value)
         Requested histogram expression.
         
        string histogram_query = 1;
        Parameters:
        value - The histogramQuery to set.
        Returns:
        This builder for chaining.
      • clearHistogramQuery

        public HistogramQueryResult.Builder clearHistogramQuery()
         Requested histogram expression.
         
        string histogram_query = 1;
        Returns:
        This builder for chaining.
      • setHistogramQueryBytes

        public HistogramQueryResult.Builder setHistogramQueryBytes​(com.google.protobuf.ByteString value)
         Requested histogram expression.
         
        string histogram_query = 1;
        Parameters:
        value - The bytes for histogramQuery to set.
        Returns:
        This builder for chaining.
      • getHistogramCount

        public int getHistogramCount()
        Description copied from interface: HistogramQueryResultOrBuilder
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
        Specified by:
        getHistogramCount in interface HistogramQueryResultOrBuilder
      • containsHistogram

        public boolean containsHistogram​(String key)
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
        Specified by:
        containsHistogram in interface HistogramQueryResultOrBuilder
      • getHistogramMap

        public Map<String,​Long> getHistogramMap()
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
        Specified by:
        getHistogramMap in interface HistogramQueryResultOrBuilder
      • getHistogramOrDefault

        public long getHistogramOrDefault​(String key,
                                          long defaultValue)
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
        Specified by:
        getHistogramOrDefault in interface HistogramQueryResultOrBuilder
      • getHistogramOrThrow

        public long getHistogramOrThrow​(String key)
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
        Specified by:
        getHistogramOrThrow in interface HistogramQueryResultOrBuilder
      • removeHistogram

        public HistogramQueryResult.Builder removeHistogram​(String key)
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
      • getMutableHistogram

        @Deprecated
        public Map<String,​Long> getMutableHistogram()
        Deprecated.
        Use alternate mutation accessors instead.
      • putHistogram

        public HistogramQueryResult.Builder putHistogram​(String key,
                                                         long value)
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
      • putAllHistogram

        public HistogramQueryResult.Builder putAllHistogram​(Map<String,​Long> values)
         A map from the values of the facet associated with distinct values to the
         number of matching entries with corresponding value.
        
         The key format is:
        
         * (for string histogram) string values stored in the field.
         * (for named numeric bucket) name specified in `bucket()` function, like
           for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`.
         * (for anonymous numeric bucket) range formatted as `<low>-<high>`, for
           example, `0-1000`, `MIN-0`, and `0-MAX`.
         
        map<string, int64> histogram = 2;
      • setUnknownFields

        public final HistogramQueryResult.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<HistogramQueryResult.Builder>
      • mergeUnknownFields

        public final HistogramQueryResult.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<HistogramQueryResult.Builder>