# Interface AggregationResultOrBuilder (3.1.0)

3.1.0 (latest) 2.40.0 2.37.0 2.36.0 2.34.0 2.33.3 2.32.3 2.31.4 2.30.0 2.29.1 2.28.2 2.27.1 2.26.4 2.25.2 2.24.3 2.23.0 2.22.0 2.21.3 2.20.2 2.19.2 2.18.5 2.17.6

    public interface AggregationResultOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsAggregateProperties(String key)

    public abstract boolean containsAggregateProperties(String key)

The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.

The key is the
alias assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

`map<string, .google.datastore.v1.Value> aggregate_properties = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAggregateProperties() (deprecated)

    public abstract Map<String,Value> getAggregateProperties()

Use [#getAggregatePropertiesMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.AggregationResultOrBuilder#com_google_datastore_v1_AggregationResultOrBuilder_getAggregatePropertiesMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.Value>` |   |

### getAggregatePropertiesCount()

    public abstract int getAggregatePropertiesCount()

The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.

The key is the
alias assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

`map<string, .google.datastore.v1.Value> aggregate_properties = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAggregatePropertiesMap()

    public abstract Map<String,Value> getAggregatePropertiesMap()

The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.

The key is the
alias assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

`map<string, .google.datastore.v1.Value> aggregate_properties = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.Value>` |   |

### getAggregatePropertiesOrDefault(String key, Value defaultValue)

    public abstract Value getAggregatePropertiesOrDefault(String key, Value defaultValue)

The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.

The key is the
alias assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

`map<string, .google.datastore.v1.Value> aggregate_properties = 2;`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.Value` |   |

### getAggregatePropertiesOrThrow(String key)

    public abstract Value getAggregatePropertiesOrThrow(String key)

The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.

The key is the
alias assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

`map<string, .google.datastore.v1.Value> aggregate_properties = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.Value` |   |