Class HistogramQueryResult.Builder (2.17.0)

public static final class HistogramQueryResult.Builder extends GeneratedMessageV3.Builder<HistogramQueryResult.Builder> implements HistogramQueryResultOrBuilder

Histogram result that matches HistogramQuery specified in searches.

Protobuf type google.cloud.talent.v4beta1.HistogramQueryResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HistogramQueryResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

build()

public HistogramQueryResult build()
Returns
TypeDescription
HistogramQueryResult

buildPartial()

public HistogramQueryResult buildPartial()
Returns
TypeDescription
HistogramQueryResult

clear()

public HistogramQueryResult.Builder clear()
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public HistogramQueryResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

clearHistogram()

public HistogramQueryResult.Builder clearHistogram()
Returns
TypeDescription
HistogramQueryResult.Builder

clearHistogramQuery()

public HistogramQueryResult.Builder clearHistogramQuery()

Requested histogram expression.

string histogram_query = 1;

Returns
TypeDescription
HistogramQueryResult.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HistogramQueryResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

clone()

public HistogramQueryResult.Builder clone()
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

containsHistogram(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public HistogramQueryResult getDefaultInstanceForType()
Returns
TypeDescription
HistogramQueryResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHistogram()

public Map<String,Long> getHistogram()

Use #getHistogramMap() instead.

Returns
TypeDescription
Map<String,Long>

getHistogramCount()

public int getHistogramCount()

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;

Returns
TypeDescription
int

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;

Returns
TypeDescription
Map<String,Long>

getHistogramOrDefault(String key, long defaultValue)

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;

Parameters
NameDescription
keyString
defaultValuelong
Returns
TypeDescription
long

getHistogramOrThrow(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
long

getHistogramQuery()

public String getHistogramQuery()

Requested histogram expression.

string histogram_query = 1;

Returns
TypeDescription
String

The histogramQuery.

getHistogramQueryBytes()

public ByteString getHistogramQueryBytes()

Requested histogram expression.

string histogram_query = 1;

Returns
TypeDescription
ByteString

The bytes for histogramQuery.

getMutableHistogram()

public Map<String,Long> getMutableHistogram()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Long>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(HistogramQueryResult other)

public HistogramQueryResult.Builder mergeFrom(HistogramQueryResult other)
Parameter
NameDescription
otherHistogramQueryResult
Returns
TypeDescription
HistogramQueryResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HistogramQueryResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public HistogramQueryResult.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HistogramQueryResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

putAllHistogram(Map<String,Long> values)

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;

Parameter
NameDescription
valuesMap<String,Long>
Returns
TypeDescription
HistogramQueryResult.Builder

putHistogram(String key, long value)

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;

Parameters
NameDescription
keyString
valuelong
Returns
TypeDescription
HistogramQueryResult.Builder

removeHistogram(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
HistogramQueryResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public HistogramQueryResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

setHistogramQuery(String value)

public HistogramQueryResult.Builder setHistogramQuery(String value)

Requested histogram expression.

string histogram_query = 1;

Parameter
NameDescription
valueString

The histogramQuery to set.

Returns
TypeDescription
HistogramQueryResult.Builder

This builder for chaining.

setHistogramQueryBytes(ByteString value)

public HistogramQueryResult.Builder setHistogramQueryBytes(ByteString value)

Requested histogram expression.

string histogram_query = 1;

Parameter
NameDescription
valueByteString

The bytes for histogramQuery to set.

Returns
TypeDescription
HistogramQueryResult.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public HistogramQueryResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final HistogramQueryResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
HistogramQueryResult.Builder
Overrides