# Cloud Vision V1 Client - Class ProductSearchResults (2.2.1)

2.2.1 (latest) 2.2.0 2.1.3 2.0.3 1.10.3 1.9.4 1.8.0 1.7.6 1.6.8 Reference documentation and code samples for the Cloud Vision V1 Client class ProductSearchResults.

Results for a product search request.

Generated from protobuf message `google.cloud.vision.v1.ProductSearchResults`

## Namespace

Google \\ Cloud \\ Vision \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ index_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results. |
| `↳ results` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ProductSearchResults.Result>` List of results, one for each product match. |
| `↳ product_grouped_results` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ProductSearchResults.GroupedResult>` List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results. |

### getIndexTime

Timestamp of the index which provided these results. Products added to the
product set and products removed from the product set after this time are
not reflected in the current results.

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

### hasIndexTime

### clearIndexTime

### setIndexTime

Timestamp of the index which provided these results. Products added to the
product set and products removed from the product set after this time are
not reflected in the current results.

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

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

### getResults

List of results, one for each product match.

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

### setResults

List of results, one for each product match.

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

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

### getProductGroupedResults

List of results grouped by products detected in the query image. Each entry
corresponds to one bounding polygon in the query image, and contains the
matching products specific to that region. There may be duplicate product
matches in the union of all the per-product results.

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

### setProductGroupedResults

List of results grouped by products detected in the query image. Each entry
corresponds to one bounding polygon in the query image, and contains the
matching products specific to that region. There may be duplicate product
matches in the union of all the per-product results.

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

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