# Google Cloud Vision Ai V1 Client - Class SearchAssetsRequest (0.3.0)

0.3.0 (latest) 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class SearchAssetsRequest.

Request message for SearchAssets.

Generated from protobuf message `google.cloud.visionai.v1.SearchAssetsRequest`

## Namespace

Google \\ Cloud \\ VisionAI \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ schema_key_sorting_strategy` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.SchemaKeySortingStrategy` Sort by the value under the data schema key. |
| `↳ corpus` | `string` Required. The parent corpus to search. Format: \`projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' |
| `↳ page_size` | `int` The number of results to be returned in this page. If it's 0, the server will decide the appropriate page_size. |
| `↳ page_token` | `string` The continuation token to fetch the next page. If empty, it means it is fetching the first page. |
| `↳ content_time_ranges` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.DateTimeRangeArray` Time ranges that matching video content must fall within. If no ranges are provided, there will be no time restriction. This field is treated just like the criteria below, but defined separately for convenience as it is used frequently. Note that if the end_time is in the future, it will be clamped to the time the request was received. |
| `↳ criteria` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Criteria>` Criteria applied to search results. |
| `↳ facet_selections` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.FacetGroup>` Stores most recent facet selection state. Only facet groups with user's selection will be presented here. Selection state is either selected or unselected. Only selected facet buckets will be used as search criteria. |
| `↳ result_annotation_keys` | `string[]` A list of annotation keys to specify the annotations to be retrieved and returned with each search result. Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search strategy must not be NO_SEARCH. |
| `↳ search_query` | `string` Global search query. Allows user to search assets without needing to specify which field the value belongs to. |

### getSchemaKeySortingStrategy

Sort by the value under the data schema key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.SchemaKeySortingStrategy|null` |   |

### hasSchemaKeySortingStrategy

### setSchemaKeySortingStrategy

Sort by the value under the data schema key.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.SchemaKeySortingStrategy` |

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

### getCorpus

Required. The parent corpus to search.

Format: \`projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'

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

### setCorpus

Required. The parent corpus to search.

Format: \`projects/{project_id}/locations/{location_id}/corpora/{corpus_id}'

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

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

### getPageSize

The number of results to be returned in this page. If it's 0, the server
will decide the appropriate page_size.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPageSize

The number of results to be returned in this page. If it's 0, the server
will decide the appropriate page_size.

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

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

### getPageToken

The continuation token to fetch the next page. If empty, it means it is
fetching the first page.

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

### setPageToken

The continuation token to fetch the next page. If empty, it means it is
fetching the first page.

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

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

### getContentTimeRanges

Time ranges that matching video content must fall within. If no ranges are
provided, there will be no time restriction. This field is treated just
like the criteria below, but defined separately for convenience as it is
used frequently. Note that if the end_time is in the future, it will be
clamped to the time the request was received.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.DateTimeRangeArray|null` |   |

### hasContentTimeRanges

### clearContentTimeRanges

### setContentTimeRanges

Time ranges that matching video content must fall within. If no ranges are
provided, there will be no time restriction. This field is treated just
like the criteria below, but defined separately for convenience as it is
used frequently. Note that if the end_time is in the future, it will be
clamped to the time the request was received.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.DateTimeRangeArray` |

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

### getCriteria

Criteria applied to search results.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Criteria>` |   |

### setCriteria

Criteria applied to search results.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.Criteria>` |

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

### getFacetSelections

Stores most recent facet selection state. Only facet groups with user's
selection will be presented here. Selection state is either selected or
unselected. Only selected facet buckets will be used as search criteria.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.FacetGroup>` |   |

### setFacetSelections

Stores most recent facet selection state. Only facet groups with user's
selection will be presented here. Selection state is either selected or
unselected. Only selected facet buckets will be used as search criteria.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-visionai/latest/V1.FacetGroup>` |

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

### getResultAnnotationKeys

A list of annotation keys to specify the annotations to be retrieved and
returned with each search result.

Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
strategy must not be NO_SEARCH.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setResultAnnotationKeys

A list of annotation keys to specify the annotations to be retrieved and
returned with each search result.

Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search
strategy must not be NO_SEARCH.

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

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

### getSearchQuery

Global search query. Allows user to search assets without needing to
specify which field the value belongs to.

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

### setSearchQuery

Global search query. Allows user to search assets without needing to
specify which field the value belongs to.

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

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

### getSortSpec

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