# Cloud Firestore V1 API - Class Google::Cloud::Firestore::V1::RunAggregationQueryRequest (v2.4.0)

2.4.0 (latest) 2.3.0 2.2.1 2.1.1 2.0.1 1.3.0 1.2.0 1.1.1 1.0.0 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.8 Reference documentation and code samples for the Cloud Firestore V1 API class Google::Cloud::Firestore::V1::RunAggregationQueryRequest.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #explain_options

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

**Returns**

- ([::Google::Cloud::Firestore::V1::ExplainOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-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::Firestore::V1::ExplainOptions

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::ExplainOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-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::Firestore::V1::ExplainOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-ExplainOptions)) --- Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned.

### #new_transaction

    def new_transaction() -> ::Google::Cloud::Firestore::V1::TransactionOptions

**Returns**

- ([::Google::Cloud::Firestore::V1::TransactionOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions)) --- Starts a new transaction as part of the query, defaulting to read-only.


  The new transaction ID will be returned as the first response in the
  stream.

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

### #new_transaction=

    def new_transaction=(value) -> ::Google::Cloud::Firestore::V1::TransactionOptions

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::TransactionOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions)) --- Starts a new transaction as part of the query, defaulting to read-only.


  The new transaction ID will be returned as the first response in the
  stream.

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

- ([::Google::Cloud::Firestore::V1::TransactionOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TransactionOptions)) --- Starts a new transaction as part of the query, defaulting to read-only.


  The new transaction ID will be returned as the first response in the
  stream.

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

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
**Returns**

- (::String) --- Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`

### #read_time

    def read_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Protobuf-Timestamp)) --- Executes the query at the given timestamp.


  This must be a microsecond precision timestamp within the past one hour,
  or if Point-in-Time Recovery is enabled, can additionally be a whole
  minute timestamp within the past 7 days.

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

### #read_time=

    def read_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Protobuf-Timestamp)) --- Executes the query at the given timestamp.


  This must be a microsecond precision timestamp within the past one hour,
  or if Point-in-Time Recovery is enabled, can additionally be a whole
  minute timestamp within the past 7 days.

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

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Protobuf-Timestamp)) --- Executes the query at the given timestamp.


  This must be a microsecond precision timestamp within the past one hour,
  or if Point-in-Time Recovery is enabled, can additionally be a whole
  minute timestamp within the past 7 days.

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

### #structured_aggregation_query

    def structured_aggregation_query() -> ::Google::Cloud::Firestore::V1::StructuredAggregationQuery

**Returns**

- ([::Google::Cloud::Firestore::V1::StructuredAggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-StructuredAggregationQuery)) --- An aggregation query.

### #structured_aggregation_query=

    def structured_aggregation_query=(value) -> ::Google::Cloud::Firestore::V1::StructuredAggregationQuery

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::StructuredAggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-StructuredAggregationQuery)) --- An aggregation query.
**Returns**

- ([::Google::Cloud::Firestore::V1::StructuredAggregationQuery](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-StructuredAggregationQuery)) --- An aggregation query.

### #transaction

    def transaction() -> ::String

**Returns**

- (::String) --- Run the aggregation within an already active transaction.

  The value here is the opaque transaction ID to execute the query in.

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

### #transaction=

    def transaction=(value) -> ::String

**Parameter**

- **value** (::String) --- Run the aggregation within an already active transaction.


  The value here is the opaque transaction ID to execute the query in.

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

- (::String) --- Run the aggregation within an already active transaction.

  The value here is the opaque transaction ID to execute the query in.

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