Class StructuredAggregationQuery.Aggregation.Sum.Builder (3.21.3)

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

Sum of the values of the requested field.

  • Only numeric values will be aggregated. All non-numeric values including NULL are skipped.

  • If the aggregated values contain NaN, returns NaN. Infinity math follows IEEE-754 standards.

  • If the aggregated value set is empty, returns 0.

  • Returns a 64-bit integer if all aggregated numbers are integers and the sum result does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision.

  • When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.

Protobuf type google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StructuredAggregationQuery.Aggregation.Sum build()
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum

buildPartial()

public StructuredAggregationQuery.Aggregation.Sum buildPartial()
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum

clear()

public StructuredAggregationQuery.Aggregation.Sum.Builder clear()
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

clearField()

public StructuredAggregationQuery.Aggregation.Sum.Builder clearField()

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder

clearField(Descriptors.FieldDescriptor field)

public StructuredAggregationQuery.Aggregation.Sum.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public StructuredAggregationQuery.Aggregation.Sum.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

clone()

public StructuredAggregationQuery.Aggregation.Sum.Builder clone()
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

getDefaultInstanceForType()

public StructuredAggregationQuery.Aggregation.Sum getDefaultInstanceForType()
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum

getDescriptorForType()

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

getField()

public StructuredQuery.FieldReference getField()

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Returns
Type Description
StructuredQuery.FieldReference

The field.

getFieldBuilder()

public StructuredQuery.FieldReference.Builder getFieldBuilder()

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Returns
Type Description
StructuredQuery.FieldReference.Builder

getFieldOrBuilder()

public StructuredQuery.FieldReferenceOrBuilder getFieldOrBuilder()

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Returns
Type Description
StructuredQuery.FieldReferenceOrBuilder

hasField()

public boolean hasField()

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Returns
Type Description
boolean

Whether the field field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeField(StructuredQuery.FieldReference value)

public StructuredAggregationQuery.Aggregation.Sum.Builder mergeField(StructuredQuery.FieldReference value)

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Parameter
Name Description
value StructuredQuery.FieldReference
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder

mergeFrom(StructuredAggregationQuery.Aggregation.Sum other)

public StructuredAggregationQuery.Aggregation.Sum.Builder mergeFrom(StructuredAggregationQuery.Aggregation.Sum other)
Parameter
Name Description
other StructuredAggregationQuery.Aggregation.Sum
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public StructuredAggregationQuery.Aggregation.Sum.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StructuredAggregationQuery.Aggregation.Sum.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

setField(StructuredQuery.FieldReference value)

public StructuredAggregationQuery.Aggregation.Sum.Builder setField(StructuredQuery.FieldReference value)

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Parameter
Name Description
value StructuredQuery.FieldReference
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder

setField(StructuredQuery.FieldReference.Builder builderForValue)

public StructuredAggregationQuery.Aggregation.Sum.Builder setField(StructuredQuery.FieldReference.Builder builderForValue)

The field to aggregate on.

.google.firestore.v1.StructuredQuery.FieldReference field = 1;

Parameter
Name Description
builderForValue StructuredQuery.FieldReference.Builder
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public StructuredAggregationQuery.Aggregation.Sum.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final StructuredAggregationQuery.Aggregation.Sum.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StructuredAggregationQuery.Aggregation.Sum.Builder
Overrides