# Google Cloud Recommendation Engine V1beta1 Client - Class PredictResponse (0.9.3)

0.9.3 (latest) 0.9.2 0.8.2 0.7.7 0.6.4 0.5.0 0.4.12

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class PredictResponse.

Response message for predict method.

Generated from protobuf message `google.cloud.recommendationengine.v1beta1.PredictResponse`

## Namespace

Google \\ Cloud \\ RecommendationEngine \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ results` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest/V1beta1.PredictResponse.PredictionResult>` A list of recommended items. The order represents the ranking (from the most relevant item to the least). |
| `↳ recommendation_token` | `string` A unique recommendation token. This should be included in the user event logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. |
| `↳ items_missing_in_catalog` | `string[]` IDs of items in the request that were missing from the catalog. |
| `↳ dry_run` | `bool` True if the dryRun property was set in the request. |
| `↳ metadata` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Additional domain specific prediction response metadata. |
| `↳ next_page_token` | `string` If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token. |

### getResults

A list of recommended items. The order represents the ranking (from the
most relevant item to the least).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest/V1beta1.PredictResponse.PredictionResult>` |   |

### setResults

A list of recommended items. The order represents the ranking (from the
most relevant item to the least).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest/V1beta1.PredictResponse.PredictionResult>` |

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

### getRecommendationToken

A unique recommendation token. This should be included in the user event
logs resulting from this recommendation, which enables accurate attribution
of recommendation model performance.

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

### setRecommendationToken

A unique recommendation token. This should be included in the user event
logs resulting from this recommendation, which enables accurate attribution
of recommendation model performance.

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

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

### getItemsMissingInCatalog

IDs of items in the request that were missing from the catalog.

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

### setItemsMissingInCatalog

IDs of items in the request that were missing from the catalog.

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

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

### getDryRun

True if the dryRun property was set in the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDryRun

True if the dryRun property was set in the request.

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

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

### getMetadata

Additional domain specific prediction response metadata.

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

### setMetadata

Additional domain specific prediction response metadata.

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

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

### getNextPageToken

If empty, the list is complete. If nonempty, the token to pass to the next
request's PredictRequest.page_token.

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

### setNextPageToken

If empty, the list is complete. If nonempty, the token to pass to the next
request's PredictRequest.page_token.

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

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