Class AggregationQuery.Aggregation.Builder (2.21.1)

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

Defines an aggregation that produces a single result.

Protobuf type google.datastore.v1.AggregationQuery.Aggregation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AggregationQuery.Aggregation build()
Returns
Type Description
AggregationQuery.Aggregation

buildPartial()

public AggregationQuery.Aggregation buildPartial()
Returns
Type Description
AggregationQuery.Aggregation

clear()

public AggregationQuery.Aggregation.Builder clear()
Returns
Type Description
AggregationQuery.Aggregation.Builder
Overrides

clearAlias()

public AggregationQuery.Aggregation.Builder clearAlias()

Optional. Optional name of the property to store the result of the aggregation.

If not provided, Datastore will pick a default name following the format property_<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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); `

Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

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

Returns
Type Description
AggregationQuery.Aggregation.Builder

This builder for chaining.

clearAvg()

public AggregationQuery.Aggregation.Builder clearAvg()

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Returns
Type Description
AggregationQuery.Aggregation.Builder

clearCount()

public AggregationQuery.Aggregation.Builder clearCount()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
Type Description
AggregationQuery.Aggregation.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOperator()

public AggregationQuery.Aggregation.Builder clearOperator()
Returns
Type Description
AggregationQuery.Aggregation.Builder

clearSum()

public AggregationQuery.Aggregation.Builder clearSum()

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Returns
Type Description
AggregationQuery.Aggregation.Builder

clone()

public AggregationQuery.Aggregation.Builder clone()
Returns
Type Description
AggregationQuery.Aggregation.Builder
Overrides

getAlias()

public String getAlias()

Optional. Optional name of the property to store the result of the aggregation.

If not provided, Datastore will pick a default name following the format property_<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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); `

Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

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

Returns
Type Description
String

The alias.

getAliasBytes()

public ByteString getAliasBytes()

Optional. Optional name of the property to store the result of the aggregation.

If not provided, Datastore will pick a default name following the format property_<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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); `

Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

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

Returns
Type Description
ByteString

The bytes for alias.

getAvg()

public AggregationQuery.Aggregation.Avg getAvg()

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Returns
Type Description
AggregationQuery.Aggregation.Avg

The avg.

getAvgBuilder()

public AggregationQuery.Aggregation.Avg.Builder getAvgBuilder()

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Returns
Type Description
AggregationQuery.Aggregation.Avg.Builder

getAvgOrBuilder()

public AggregationQuery.Aggregation.AvgOrBuilder getAvgOrBuilder()

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Returns
Type Description
AggregationQuery.Aggregation.AvgOrBuilder

getCount()

public AggregationQuery.Aggregation.Count getCount()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
Type Description
AggregationQuery.Aggregation.Count

The count.

getCountBuilder()

public AggregationQuery.Aggregation.Count.Builder getCountBuilder()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
Type Description
AggregationQuery.Aggregation.Count.Builder

getCountOrBuilder()

public AggregationQuery.Aggregation.CountOrBuilder getCountOrBuilder()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
Type Description
AggregationQuery.Aggregation.CountOrBuilder

getDefaultInstanceForType()

public AggregationQuery.Aggregation getDefaultInstanceForType()
Returns
Type Description
AggregationQuery.Aggregation

getDescriptorForType()

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

getOperatorCase()

public AggregationQuery.Aggregation.OperatorCase getOperatorCase()
Returns
Type Description
AggregationQuery.Aggregation.OperatorCase

getSum()

public AggregationQuery.Aggregation.Sum getSum()

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Returns
Type Description
AggregationQuery.Aggregation.Sum

The sum.

getSumBuilder()

public AggregationQuery.Aggregation.Sum.Builder getSumBuilder()

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder

getSumOrBuilder()

public AggregationQuery.Aggregation.SumOrBuilder getSumOrBuilder()

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Returns
Type Description
AggregationQuery.Aggregation.SumOrBuilder

hasAvg()

public boolean hasAvg()

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Returns
Type Description
boolean

Whether the avg field is set.

hasCount()

public boolean hasCount()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
Type Description
boolean

Whether the count field is set.

hasSum()

public boolean hasSum()

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Returns
Type Description
boolean

Whether the sum field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAvg(AggregationQuery.Aggregation.Avg value)

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

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Parameter
Name Description
value AggregationQuery.Aggregation.Avg
Returns
Type Description
AggregationQuery.Aggregation.Builder

mergeCount(AggregationQuery.Aggregation.Count value)

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

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Parameter
Name Description
value AggregationQuery.Aggregation.Count
Returns
Type Description
AggregationQuery.Aggregation.Builder

mergeFrom(AggregationQuery.Aggregation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSum(AggregationQuery.Aggregation.Sum value)

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

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Parameter
Name Description
value AggregationQuery.Aggregation.Sum
Returns
Type Description
AggregationQuery.Aggregation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAlias(String value)

public AggregationQuery.Aggregation.Builder setAlias(String value)

Optional. Optional name of the property to store the result of the aggregation.

If not provided, Datastore will pick a default name following the format property_<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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); `

Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

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

Parameter
Name Description
value String

The alias to set.

Returns
Type Description
AggregationQuery.Aggregation.Builder

This builder for chaining.

setAliasBytes(ByteString value)

public AggregationQuery.Aggregation.Builder setAliasBytes(ByteString value)

Optional. Optional name of the property to store the result of the aggregation.

If not provided, Datastore will pick a default name following the format property_<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 property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT(*) AS property_2 OVER ( ... ); `

Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

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

Parameter
Name Description
value ByteString

The bytes for alias to set.

Returns
Type Description
AggregationQuery.Aggregation.Builder

This builder for chaining.

setAvg(AggregationQuery.Aggregation.Avg value)

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

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Parameter
Name Description
value AggregationQuery.Aggregation.Avg
Returns
Type Description
AggregationQuery.Aggregation.Builder

setAvg(AggregationQuery.Aggregation.Avg.Builder builderForValue)

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

Average aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Avg avg = 3;

Parameter
Name Description
builderForValue AggregationQuery.Aggregation.Avg.Builder
Returns
Type Description
AggregationQuery.Aggregation.Builder

setCount(AggregationQuery.Aggregation.Count value)

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

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Parameter
Name Description
value AggregationQuery.Aggregation.Count
Returns
Type Description
AggregationQuery.Aggregation.Builder

setCount(AggregationQuery.Aggregation.Count.Builder builderForValue)

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

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Parameter
Name Description
builderForValue AggregationQuery.Aggregation.Count.Builder
Returns
Type Description
AggregationQuery.Aggregation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSum(AggregationQuery.Aggregation.Sum value)

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

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Parameter
Name Description
value AggregationQuery.Aggregation.Sum
Returns
Type Description
AggregationQuery.Aggregation.Builder

setSum(AggregationQuery.Aggregation.Sum.Builder builderForValue)

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

Sum aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Sum sum = 2;

Parameter
Name Description
builderForValue AggregationQuery.Aggregation.Sum.Builder
Returns
Type Description
AggregationQuery.Aggregation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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