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

## Implements

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

## Methods

### getAggregationQuery()

    public abstract AggregationQuery getAggregationQuery()

The query to run.

`.google.datastore.v1.AggregationQuery aggregation_query = 3;`

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

### getAggregationQueryOrBuilder()

    public abstract AggregationQueryOrBuilder getAggregationQueryOrBuilder()

The query to run.

`.google.datastore.v1.AggregationQuery aggregation_query = 3;`

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

### getDatabaseId()

    public abstract String getDatabaseId()

The ID of the database against which to make the request.

'(default)' is not allowed; please use empty string '' to refer the default
database.

`string database_id = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The databaseId. |

### getDatabaseIdBytes()

    public abstract ByteString getDatabaseIdBytes()

The ID of the database against which to make the request.

'(default)' is not allowed; please use empty string '' to refer the default
database.

`string database_id = 9;`

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

### getExplainOptions()

    public abstract ExplainOptions getExplainOptions()

Optional. Explain options for the query. If set, additional query
statistics will be returned. If not, only query results will be returned.

`
.google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getExplainOptionsOrBuilder()

    public abstract ExplainOptionsOrBuilder getExplainOptionsOrBuilder()

Optional. Explain options for the query. If set, additional query
statistics will be returned. If not, only query results will be returned.

`
.google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getGqlQuery()

    public abstract GqlQuery getGqlQuery()

The GQL query to run. This query must be an aggregation query.

`.google.datastore.v1.GqlQuery gql_query = 7;`

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

### getGqlQueryOrBuilder()

    public abstract GqlQueryOrBuilder getGqlQueryOrBuilder()

The GQL query to run. This query must be an aggregation query.

`.google.datastore.v1.GqlQuery gql_query = 7;`

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

### getPartitionId()

    public abstract PartitionId getPartitionId()

Entities are partitioned into subsets, identified by a partition ID.
Queries are scoped to a single partition.
This partition ID is normalized with the standard default context
partition ID.

`.google.datastore.v1.PartitionId partition_id = 2;`

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

### getPartitionIdOrBuilder()

    public abstract PartitionIdOrBuilder getPartitionIdOrBuilder()

Entities are partitioned into subsets, identified by a partition ID.
Queries are scoped to a single partition.
This partition ID is normalized with the standard default context
partition ID.

`.google.datastore.v1.PartitionId partition_id = 2;`

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

### getProjectId()

    public abstract String getProjectId()

Required. The ID of the project against which to make the request.

`string project_id = 8 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The projectId. |

### getProjectIdBytes()

    public abstract ByteString getProjectIdBytes()

Required. The ID of the project against which to make the request.

`string project_id = 8 [(.google.api.field_behavior) = REQUIRED];`

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

### getQueryTypeCase()

    public abstract RunAggregationQueryRequest.QueryTypeCase getQueryTypeCase()

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

### getReadOptions()

    public abstract ReadOptions getReadOptions()

The options for this query.

`.google.datastore.v1.ReadOptions read_options = 1;`

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

### getReadOptionsOrBuilder()

    public abstract ReadOptionsOrBuilder getReadOptionsOrBuilder()

The options for this query.

`.google.datastore.v1.ReadOptions read_options = 1;`

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

### hasAggregationQuery()

    public abstract boolean hasAggregationQuery()

The query to run.

`.google.datastore.v1.AggregationQuery aggregation_query = 3;`

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

### hasExplainOptions()

    public abstract boolean hasExplainOptions()

Optional. Explain options for the query. If set, additional query
statistics will be returned. If not, only query results will be returned.

`
.google.datastore.v1.ExplainOptions explain_options = 11 [(.google.api.field_behavior) = OPTIONAL];
`

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

### hasGqlQuery()

    public abstract boolean hasGqlQuery()

The GQL query to run. This query must be an aggregation query.

`.google.datastore.v1.GqlQuery gql_query = 7;`

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

### hasPartitionId()

    public abstract boolean hasPartitionId()

Entities are partitioned into subsets, identified by a partition ID.
Queries are scoped to a single partition.
This partition ID is normalized with the standard default context
partition ID.

`.google.datastore.v1.PartitionId partition_id = 2;`

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

### hasReadOptions()

    public abstract boolean hasReadOptions()

The options for this query.

`.google.datastore.v1.ReadOptions read_options = 1;`

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