Class StructuredAggregationQuery.Aggregation (3.16.3)

public static final class StructuredAggregationQuery.Aggregation extends GeneratedMessageV3 implements StructuredAggregationQuery.AggregationOrBuilder

Defines an aggregation that produces a single result.

Protobuf type google.firestore.v1.StructuredAggregationQuery.Aggregation

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > StructuredAggregationQuery.Aggregation

Static Fields

ALIAS_FIELD_NUMBER

public static final int ALIAS_FIELD_NUMBER
Field Value
TypeDescription
int

AVG_FIELD_NUMBER

public static final int AVG_FIELD_NUMBER
Field Value
TypeDescription
int

COUNT_FIELD_NUMBER

public static final int COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

SUM_FIELD_NUMBER

public static final int SUM_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StructuredAggregationQuery.Aggregation getDefaultInstance()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation

getDescriptor()

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

newBuilder()

public static StructuredAggregationQuery.Aggregation.Builder newBuilder()
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

newBuilder(StructuredAggregationQuery.Aggregation prototype)

public static StructuredAggregationQuery.Aggregation.Builder newBuilder(StructuredAggregationQuery.Aggregation prototype)
Parameter
NameDescription
prototypeStructuredAggregationQuery.Aggregation
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder

parseDelimitedFrom(InputStream input)

public static StructuredAggregationQuery.Aggregation parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredAggregationQuery.Aggregation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StructuredAggregationQuery.Aggregation parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StructuredAggregationQuery.Aggregation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StructuredAggregationQuery.Aggregation parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StructuredAggregationQuery.Aggregation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StructuredAggregationQuery.Aggregation parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredAggregationQuery.Aggregation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StructuredAggregationQuery.Aggregation parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StructuredAggregationQuery.Aggregation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StructuredAggregationQuery.Aggregation parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StructuredAggregationQuery.Aggregation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StructuredAggregationQuery.Aggregation
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StructuredAggregationQuery.Aggregation> parser()
Returns
TypeDescription
Parser<Aggregation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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.

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

getOperatorCase()

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

getParserForType()

public Parser<StructuredAggregationQuery.Aggregation> getParserForType()
Returns
TypeDescription
Parser<Aggregation>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSum()

public StructuredAggregationQuery.Aggregation.Sum getSum()

Sum aggregator.

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

Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Sum

The sum.

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StructuredAggregationQuery.Aggregation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StructuredAggregationQuery.Aggregation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException