# Google Cloud Vector Search V1 Client - Class AggregateDataObjectsRequest (0.4.0)

0.4.0 (latest) 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vector Search V1 Client class AggregateDataObjectsRequest.

Request message for
[DataObjectSearchService.AggregateDataObjects](https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.Client.DataObjectSearchServiceClient#_Google_Cloud_VectorSearch_V1_Client_DataObjectSearchServiceClient__aggregateDataObjects__).

Generated from protobuf message `google.cloud.vectorsearch.v1.AggregateDataObjectsRequest`

## Namespace

Google \\ Cloud \\ VectorSearch \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The resource name of the Collection for which to query. Format: `projects/{project}/locations/{location}/collections/{collection}` |
| `↳ filter` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct. |
| `↳ aggregate` | `int` Required. The aggregation method to apply to the query. |

### getParent

Required. The resource name of the Collection for which to query.

Format: `projects/{project}/locations/{location}/collections/{collection}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setParent

Required. The resource name of the Collection for which to query.

Format: `projects/{project}/locations/{location}/collections/{collection}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getFilter

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
represented as a google.protobuf.Struct.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasFilter

### clearFilter

### setFilter

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
represented as a google.protobuf.Struct.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

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

### getAggregate

Required. The aggregation method to apply to the query.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AggregationMethod](https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.AggregationMethod). |

### setAggregate

Required. The aggregation method to apply to the query.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AggregationMethod](https://docs.cloud.google.com/php/docs/reference/cloud-vectorsearch/latest/V1.AggregationMethod). |

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