Class StructuredAggregationQuery.Aggregation.Builder (3.15.7)

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:

` 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 ( ... );

becomes:

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 ( ... ); `

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.

clearAvg()

public StructuredAggregationQuery.Aggregation.Builder clearAvg()

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

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

clearSum()

public StructuredAggregationQuery.Aggregation.Builder clearSum()

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

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:

` 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 ( ... );

becomes:

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 ( ... ); `

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:

` 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 ( ... );

becomes:

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 ( ... ); `

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.

getAvg()

public StructuredAggregationQuery.Aggregation.Avg getAvg()

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Avg

The avg.

getAvgBuilder()

public StructuredAggregationQuery.Aggregation.Avg.Builder getAvgBuilder()

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Avg.Builder

getAvgOrBuilder()

public StructuredAggregationQuery.Aggregation.AvgOrBuilder getAvgOrBuilder()

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.AvgOrBuilder

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

getSum()

public StructuredAggregationQuery.Aggregation.Sum getSum()

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Sum

The sum.

getSumBuilder()

public StructuredAggregationQuery.Aggregation.Sum.Builder getSumBuilder()

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Sum.Builder

getSumOrBuilder()

public StructuredAggregationQuery.Aggregation.SumOrBuilder getSumOrBuilder()

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.SumOrBuilder

hasAvg()

public boolean hasAvg()

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

Returns
TypeDescription
boolean

Whether the avg field is set.

hasCount()

public boolean hasCount()

Count aggregator.

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

Returns
TypeDescription
boolean

Whether the count field is set.

hasSum()

public boolean hasSum()

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

Returns
TypeDescription
boolean

Whether the sum field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAvg(StructuredAggregationQuery.Aggregation.Avg value)

public StructuredAggregationQuery.Aggregation.Builder mergeAvg(StructuredAggregationQuery.Aggregation.Avg value)

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

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

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

mergeSum(StructuredAggregationQuery.Aggregation.Sum value)

public StructuredAggregationQuery.Aggregation.Builder mergeSum(StructuredAggregationQuery.Aggregation.Sum value)

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

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

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:

` 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 ( ... );

becomes:

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 ( ... ); `

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:

` 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 ( ... );

becomes:

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 ( ... ); `

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.

setAvg(StructuredAggregationQuery.Aggregation.Avg value)

public StructuredAggregationQuery.Aggregation.Builder setAvg(StructuredAggregationQuery.Aggregation.Avg value)

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

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

setAvg(StructuredAggregationQuery.Aggregation.Avg.Builder builderForValue)

public StructuredAggregationQuery.Aggregation.Builder setAvg(StructuredAggregationQuery.Aggregation.Avg.Builder builderForValue)

Average aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;

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

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

setSum(StructuredAggregationQuery.Aggregation.Sum value)

public StructuredAggregationQuery.Aggregation.Builder setSum(StructuredAggregationQuery.Aggregation.Sum value)

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

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

setSum(StructuredAggregationQuery.Aggregation.Sum.Builder builderForValue)

public StructuredAggregationQuery.Aggregation.Builder setSum(StructuredAggregationQuery.Aggregation.Sum.Builder builderForValue)

Sum aggregator.

.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;

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

setUnknownFields(UnknownFieldSet unknownFields)

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