Class HistogramQueryResult.Builder (2.45.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.v4.HistogramQueryResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HistogramQueryResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HistogramQueryResult.Builder
Overrides

build()

public HistogramQueryResult build()
Returns
Type Description
HistogramQueryResult

buildPartial()

public HistogramQueryResult buildPartial()
Returns
Type Description
HistogramQueryResult

clear()

public HistogramQueryResult.Builder clear()
Returns
Type Description
HistogramQueryResult.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public HistogramQueryResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HistogramQueryResult.Builder
Overrides

clearHistogram()

public HistogramQueryResult.Builder clearHistogram()
Returns
Type Description
HistogramQueryResult.Builder

clearHistogramQuery()

public HistogramQueryResult.Builder clearHistogramQuery()

Requested histogram expression.

string histogram_query = 1;

Returns
Type Description
HistogramQueryResult.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HistogramQueryResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HistogramQueryResult.Builder
Overrides

clone()

public HistogramQueryResult.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public HistogramQueryResult getDefaultInstanceForType()
Returns
Type Description
HistogramQueryResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHistogram() (deprecated)

public Map<String,Long> getHistogram()

Use #getHistogramMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue long
Returns
Type Description
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
Name Description
key String
Returns
Type Description
long

getHistogramQuery()

public String getHistogramQuery()

Requested histogram expression.

string histogram_query = 1;

Returns
Type Description
String

The histogramQuery.

getHistogramQueryBytes()

public ByteString getHistogramQueryBytes()

Requested histogram expression.

string histogram_query = 1;

Returns
Type Description
ByteString

The bytes for histogramQuery.

getMutableHistogram() (deprecated)

public Map<String,Long> getMutableHistogram()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Long>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HistogramQueryResult other)

public HistogramQueryResult.Builder mergeFrom(HistogramQueryResult other)
Parameter
Name Description
other HistogramQueryResult
Returns
Type Description
HistogramQueryResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HistogramQueryResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HistogramQueryResult.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public HistogramQueryResult.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
HistogramQueryResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HistogramQueryResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,Long>
Returns
Type Description
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
Name Description
key String
value long
Returns
Type Description
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
Name Description
key String
Returns
Type Description
HistogramQueryResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public HistogramQueryResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HistogramQueryResult.Builder
Overrides

setHistogramQuery(String value)

public HistogramQueryResult.Builder setHistogramQuery(String value)

Requested histogram expression.

string histogram_query = 1;

Parameter
Name Description
value String

The histogramQuery to set.

Returns
Type Description
HistogramQueryResult.Builder

This builder for chaining.

setHistogramQueryBytes(ByteString value)

public HistogramQueryResult.Builder setHistogramQueryBytes(ByteString value)

Requested histogram expression.

string histogram_query = 1;

Parameter
Name Description
value ByteString

The bytes for histogramQuery to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HistogramQueryResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final HistogramQueryResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HistogramQueryResult.Builder
Overrides