# Firestore in Datastore mode V1 API - Class Google::Cloud::Datastore::V1::RunAggregationQueryRequest (v1.6.0)

1.6.0 (latest) 1.5.1 1.4.1 1.3.1 1.2.0 1.1.0 1.0.1 0.19.0 0.18.0 0.17.0 0.16.3 0.15.0 0.14.0 0.13.1 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.5 Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::RunAggregationQueryRequest.

The request for
[Datastore.RunAggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-Datastore-Client#Google__Cloud__Datastore__V1__Datastore__Client_run_aggregation_query_instance_ "Google::Cloud::Datastore::V1::Datastore::Client#run_aggregation_query (method)").

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #aggregation_query

    def aggregation_query() -> ::Google::Cloud::Datastore::V1::AggregationQuery

**Returns**

- ([::Google::Cloud::Datastore::V1::AggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationQuery)) --- The query to run.


  Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #aggregation_query=

    def aggregation_query=(value) -> ::Google::Cloud::Datastore::V1::AggregationQuery

**Parameter**

- **value** ([::Google::Cloud::Datastore::V1::AggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationQuery)) --- The query to run.


  Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Datastore::V1::AggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-AggregationQuery)) --- The query to run.


  Note: The following fields are mutually exclusive: `aggregation_query`, `gql_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #database_id

    def database_id() -> ::String

**Returns**

- (::String) --- The ID of the database against which to make the request.

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

### #database_id=

    def database_id=(value) -> ::String

**Parameter**

- **value** (::String) --- The ID of the database against which to make the request.


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

- (::String) --- The ID of the database against which to make the request.

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

### #explain_options

    def explain_options() -> ::Google::Cloud::Datastore::V1::ExplainOptions

**Returns**

- ([::Google::Cloud::Datastore::V1::ExplainOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-ExplainOptions)) --- Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned.

### #explain_options=

    def explain_options=(value) -> ::Google::Cloud::Datastore::V1::ExplainOptions

**Parameter**

- **value** ([::Google::Cloud::Datastore::V1::ExplainOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-ExplainOptions)) --- Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned.
**Returns**

- ([::Google::Cloud::Datastore::V1::ExplainOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-ExplainOptions)) --- Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned.

### #gql_query

    def gql_query() -> ::Google::Cloud::Datastore::V1::GqlQuery

**Returns**

- ([::Google::Cloud::Datastore::V1::GqlQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-GqlQuery)) --- The GQL query to run. This query must be an aggregation query.


  Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #gql_query=

    def gql_query=(value) -> ::Google::Cloud::Datastore::V1::GqlQuery

**Parameter**

- **value** ([::Google::Cloud::Datastore::V1::GqlQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-GqlQuery)) --- The GQL query to run. This query must be an aggregation query.


  Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Datastore::V1::GqlQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-GqlQuery)) --- The GQL query to run. This query must be an aggregation query.


  Note: The following fields are mutually exclusive: `gql_query`, `aggregation_query`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #partition_id

    def partition_id() -> ::Google::Cloud::Datastore::V1::PartitionId

**Returns**

- ([::Google::Cloud::Datastore::V1::PartitionId](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-PartitionId)) --- 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.

### #partition_id=

    def partition_id=(value) -> ::Google::Cloud::Datastore::V1::PartitionId

**Parameter**

- **value** ([::Google::Cloud::Datastore::V1::PartitionId](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-PartitionId)) --- 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.
**Returns**

- ([::Google::Cloud::Datastore::V1::PartitionId](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-PartitionId)) --- 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.

### #project_id

    def project_id() -> ::String

**Returns**

- (::String) --- Required. The ID of the project against which to make the request.

### #project_id=

    def project_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The ID of the project against which to make the request.
**Returns**

- (::String) --- Required. The ID of the project against which to make the request.

### #read_options

    def read_options() -> ::Google::Cloud::Datastore::V1::ReadOptions

**Returns**

- ([::Google::Cloud::Datastore::V1::ReadOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-ReadOptions)) --- The options for this query.

### #read_options=

    def read_options=(value) -> ::Google::Cloud::Datastore::V1::ReadOptions

**Parameter**

- **value** ([::Google::Cloud::Datastore::V1::ReadOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-ReadOptions)) --- The options for this query.
**Returns**

- ([::Google::Cloud::Datastore::V1::ReadOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-ReadOptions)) --- The options for this query.