2.2.0 (latest) 2.0.6 1.34.2 1.33.1 1.32.3 1.31.0 1.30.0 1.29.2 1.28.2 1.26.0 1.25.0 1.24.4 1.23.0 1.22.1 1.21.2 1.19.0 1.18.1 1.17.1 Reference documentation and code samples for the Cloud Datastore V1 Client class AggregationResult.

The result of a single bucket from a Datastore aggregation query.

The keys of `aggregate_properties` are the same for all results in an
aggregation query, unlike entity queries which can have different fields
present for each result.

Generated from protobuf message `google.datastore.v1.AggregationResult`

## Namespace

Google \\ Cloud \\ Datastore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ aggregate_properties` | `array|Google\Protobuf\Internal\MapField` The result of the aggregation functions, ex: `COUNT(*) AS total_entities`. The key is the [alias](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.AggregationQuery.Aggregation#_Google_Cloud_Datastore_V1_AggregationQuery_Aggregation__getAlias__) assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query. |

### getAggregateProperties

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

The key is the
[alias](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.AggregationQuery.Aggregation#_Google_Cloud_Datastore_V1_AggregationQuery_Aggregation__getAlias__) assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setAggregateProperties

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

The key is the
[alias](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.AggregationQuery.Aggregation#_Google_Cloud_Datastore_V1_AggregationQuery_Aggregation__getAlias__) assigned to
the aggregation function on input and the size of this map equals the
number of aggregation functions in the query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |