Class StructuredAggregationQuery.Aggregation.Builder (3.13.2)

public static final class StructuredAggregationQuery.Aggregation.Builder extends GeneratedMessageV3.Builder<StructuredAggregationQuery.Aggregation.Builder> implements StructuredAggregationQuery.AggregationOrBuilder

Defines an aggregation that produces a single result.

Protobuf type google.firestore.v1.StructuredAggregationQuery.Aggregation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StructuredAggregationQuery.Aggregation build()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation

buildPartial()

public StructuredAggregationQuery.Aggregation buildPartial()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation

clear()

public StructuredAggregationQuery.Aggregation.Builder clear()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder
Overrides

clearAlias()

public StructuredAggregationQuery.Aggregation.Builder clearAlias()

Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format field_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to document field name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

This builder for chaining.

clearCount()

public StructuredAggregationQuery.Aggregation.Builder clearCount()

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOperator()

public StructuredAggregationQuery.Aggregation.Builder clearOperator()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

clone()

public StructuredAggregationQuery.Aggregation.Builder clone()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder
Overrides

getAlias()

public String getAlias()

Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format field_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to document field name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The alias.

getAliasBytes()

public ByteString getAliasBytes()

Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format field_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to document field name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for alias.

getCount()

public StructuredAggregationQuery.Aggregation.Count getCount()

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Count

The count.

getCountBuilder()

public StructuredAggregationQuery.Aggregation.Count.Builder getCountBuilder()

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Count.Builder

getCountOrBuilder()

public StructuredAggregationQuery.Aggregation.CountOrBuilder getCountOrBuilder()

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.CountOrBuilder

getDefaultInstanceForType()

public StructuredAggregationQuery.Aggregation getDefaultInstanceForType()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOperatorCase()

public StructuredAggregationQuery.Aggregation.OperatorCase getOperatorCase()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.OperatorCase

hasCount()

public boolean hasCount()

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
boolean

Whether the count field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCount(StructuredAggregationQuery.Aggregation.Count value)

public StructuredAggregationQuery.Aggregation.Builder mergeCount(StructuredAggregationQuery.Aggregation.Count value)

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Parameter
NameDescription
valueStructuredAggregationQuery.Aggregation.Count
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

mergeFrom(StructuredAggregationQuery.Aggregation other)

public StructuredAggregationQuery.Aggregation.Builder mergeFrom(StructuredAggregationQuery.Aggregation other)
Parameter
NameDescription
otherStructuredAggregationQuery.Aggregation
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAlias(String value)

public StructuredAggregationQuery.Aggregation.Builder setAlias(String value)

Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format field_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to document field name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The alias to set.

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

This builder for chaining.

setAliasBytes(ByteString value)

public StructuredAggregationQuery.Aggregation.Builder setAliasBytes(ByteString value)

Optional. Optional name of the field to store the result of the aggregation into. If not provided, Firestore will pick a default name following the format field_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS field_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS field_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to document field name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for alias to set.

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

This builder for chaining.

setCount(StructuredAggregationQuery.Aggregation.Count value)

public StructuredAggregationQuery.Aggregation.Builder setCount(StructuredAggregationQuery.Aggregation.Count value)

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Parameter
NameDescription
valueStructuredAggregationQuery.Aggregation.Count
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

setCount(StructuredAggregationQuery.Aggregation.Count.Builder builderForValue)

public StructuredAggregationQuery.Aggregation.Builder setCount(StructuredAggregationQuery.Aggregation.Count.Builder builderForValue)

Count aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;

Parameter
NameDescription
builderForValueStructuredAggregationQuery.Aggregation.Count.Builder
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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