# Interface RunAggregationQueryResponseOrBuilder (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 RunAggregationQueryResponseOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getBatch()

    public abstract AggregationResultBatch getBatch()

A batch of aggregation results. Always present.

`.google.datastore.v1.AggregationResultBatch batch = 1;`

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

### getBatchOrBuilder()

    public abstract AggregationResultBatchOrBuilder getBatchOrBuilder()

A batch of aggregation results. Always present.

`.google.datastore.v1.AggregationResultBatch batch = 1;`

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

### getExplainMetrics()

    public abstract ExplainMetrics getExplainMetrics()

Query explain metrics. This is only present when the
RunAggregationQueryRequest.explain_options
is provided, and it is sent only once with the last response in the stream.

`.google.datastore.v1.ExplainMetrics explain_metrics = 9;`

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

### getExplainMetricsOrBuilder()

    public abstract ExplainMetricsOrBuilder getExplainMetricsOrBuilder()

Query explain metrics. This is only present when the
RunAggregationQueryRequest.explain_options
is provided, and it is sent only once with the last response in the stream.

`.google.datastore.v1.ExplainMetrics explain_metrics = 9;`

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

### getQuery()

    public abstract AggregationQuery getQuery()

The parsed form of the `GqlQuery` from the request, if it was set.

`.google.datastore.v1.AggregationQuery query = 2;`

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

### getQueryOrBuilder()

    public abstract AggregationQueryOrBuilder getQueryOrBuilder()

The parsed form of the `GqlQuery` from the request, if it was set.

`.google.datastore.v1.AggregationQuery query = 2;`

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

### getTransaction()

    public abstract ByteString getTransaction()

The identifier of the transaction that was started as part of this
RunAggregationQuery request.

Set only when
ReadOptions.new_transaction
was set in
RunAggregationQueryRequest.read_options.

`bytes transaction = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The transaction. |

### hasBatch()

    public abstract boolean hasBatch()

A batch of aggregation results. Always present.

`.google.datastore.v1.AggregationResultBatch batch = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the batch field is set. |

### hasExplainMetrics()

    public abstract boolean hasExplainMetrics()

Query explain metrics. This is only present when the
RunAggregationQueryRequest.explain_options
is provided, and it is sent only once with the last response in the stream.

`.google.datastore.v1.ExplainMetrics explain_metrics = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the explainMetrics field is set. |

### hasQuery()

    public abstract boolean hasQuery()

The parsed form of the `GqlQuery` from the request, if it was set.

`.google.datastore.v1.AggregationQuery query = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the query field is set. |