Package com.google.firestore.v1
Class StructuredAggregationQuery.Aggregation.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
com.google.firestore.v1.StructuredAggregationQuery.Aggregation.Builder
- All Implemented Interfaces:
StructuredAggregationQuery.AggregationOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- StructuredAggregationQuery.Aggregation
public static final class StructuredAggregationQuery.Aggregation.Builder
extends com.google.protobuf.GeneratedMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
implements StructuredAggregationQuery.AggregationOrBuilder
Defines an aggregation that produces a single result.Protobuf type
google.firestore.v1.StructuredAggregationQuery.Aggregation-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.clearAvg()Average aggregator.Count aggregator.clearSum()Sum aggregator.getAlias()Optional.com.google.protobuf.ByteStringOptional.getAvg()Average aggregator.Average aggregator.Average aggregator.getCount()Count aggregator.Count aggregator.Count aggregator.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetSum()Sum aggregator.Sum aggregator.Sum aggregator.booleanhasAvg()Average aggregator.booleanhasCount()Count aggregator.booleanhasSum()Sum aggregator.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanAverage aggregator.Count aggregator.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Sum aggregator.Optional.setAliasBytes(com.google.protobuf.ByteString value) Optional.Average aggregator.setAvg(StructuredAggregationQuery.Aggregation.Avg.Builder builderForValue) Average aggregator.Count aggregator.setCount(StructuredAggregationQuery.Aggregation.Count.Builder builderForValue) Count aggregator.Sum aggregator.setSum(StructuredAggregationQuery.Aggregation.Sum.Builder builderForValue) Sum aggregator.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
-
mergeFrom
public StructuredAggregationQuery.Aggregation.Builder mergeFrom(StructuredAggregationQuery.Aggregation other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>
-
mergeFrom
public StructuredAggregationQuery.Aggregation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StructuredAggregationQuery.Aggregation.Builder>- Throws:
IOException
-
getOperatorCase
- Specified by:
getOperatorCasein interfaceStructuredAggregationQuery.AggregationOrBuilder
-
clearOperator
-
hasCount
public boolean hasCount()Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;- Specified by:
hasCountin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- Whether the count field is set.
-
getCount
Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;- Specified by:
getCountin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- The count.
-
setCount
public StructuredAggregationQuery.Aggregation.Builder setCount(StructuredAggregationQuery.Aggregation.Count value) Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; -
setCount
public StructuredAggregationQuery.Aggregation.Builder setCount(StructuredAggregationQuery.Aggregation.Count.Builder builderForValue) Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; -
mergeCount
public StructuredAggregationQuery.Aggregation.Builder mergeCount(StructuredAggregationQuery.Aggregation.Count value) Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; -
clearCount
Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; -
getCountBuilder
Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; -
getCountOrBuilder
Count aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1;- Specified by:
getCountOrBuilderin interfaceStructuredAggregationQuery.AggregationOrBuilder
-
hasSum
public boolean hasSum()Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;- Specified by:
hasSumin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- Whether the sum field is set.
-
getSum
Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;- Specified by:
getSumin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- The sum.
-
setSum
public StructuredAggregationQuery.Aggregation.Builder setSum(StructuredAggregationQuery.Aggregation.Sum value) Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; -
setSum
public StructuredAggregationQuery.Aggregation.Builder setSum(StructuredAggregationQuery.Aggregation.Sum.Builder builderForValue) Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; -
mergeSum
public StructuredAggregationQuery.Aggregation.Builder mergeSum(StructuredAggregationQuery.Aggregation.Sum value) Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; -
clearSum
Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; -
getSumBuilder
Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; -
getSumOrBuilder
Sum aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2;- Specified by:
getSumOrBuilderin interfaceStructuredAggregationQuery.AggregationOrBuilder
-
hasAvg
public boolean hasAvg()Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;- Specified by:
hasAvgin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- Whether the avg field is set.
-
getAvg
Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;- Specified by:
getAvgin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- The avg.
-
setAvg
public StructuredAggregationQuery.Aggregation.Builder setAvg(StructuredAggregationQuery.Aggregation.Avg value) Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; -
setAvg
public StructuredAggregationQuery.Aggregation.Builder setAvg(StructuredAggregationQuery.Aggregation.Avg.Builder builderForValue) Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; -
mergeAvg
public StructuredAggregationQuery.Aggregation.Builder mergeAvg(StructuredAggregationQuery.Aggregation.Avg value) Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; -
clearAvg
Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; -
getAvgBuilder
Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; -
getAvgOrBuilder
Average aggregator.
.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3;- Specified by:
getAvgOrBuilderin interfaceStructuredAggregationQuery.AggregationOrBuilder
-
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][google.firestore.v1.Document.fields] limitations.
string alias = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAliasin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- The alias.
-
getAliasBytes
public com.google.protobuf.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][google.firestore.v1.Document.fields] limitations.
string alias = 7 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getAliasBytesin interfaceStructuredAggregationQuery.AggregationOrBuilder- Returns:
- The bytes for alias.
-
setAlias
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][google.firestore.v1.Document.fields] limitations.
string alias = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The alias to set.- Returns:
- This builder for chaining.
-
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][google.firestore.v1.Document.fields] limitations.
string alias = 7 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setAliasBytes
public StructuredAggregationQuery.Aggregation.Builder setAliasBytes(com.google.protobuf.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][google.firestore.v1.Document.fields] limitations.
string alias = 7 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for alias to set.- Returns:
- This builder for chaining.
-