# Google Cloud Recommendation Engine V1beta1 Client - Class CollectUserEventRequest (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 CollectUserEventRequest.

Request message for CollectUserEvent method.

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

## Namespace

Google \\ Cloud \\ RecommendationEngine \\ V1beta1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent eventStore name, such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`. |
| `↳ user_event` | `string` Required. URL encoded UserEvent proto. |
| `↳ uri` | `string` Optional. The url including cgi-parameters but excluding the hash fragment. The URL must be truncated to 1.5K bytes to conservatively be under the 2K bytes. This is often more useful than the referer url, because many browsers only send the domain for 3rd party requests. |
| `↳ ets` | `int|string` Optional. The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. |

### getParent

Required. The parent eventStore name, such as
`projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.

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

### setParent

Required. The parent eventStore name, such as
`projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.

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

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

### getUserEvent

Required. URL encoded UserEvent proto.

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

### setUserEvent

Required. URL encoded UserEvent proto.

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

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

### getUri

Optional. The url including cgi-parameters but excluding the hash fragment.

The URL must be truncated to 1.5K bytes to conservatively be under the 2K
bytes. This is often more useful than the referer url, because many
browsers only send the domain for 3rd party requests.

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

### setUri

Optional. The url including cgi-parameters but excluding the hash fragment.

The URL must be truncated to 1.5K bytes to conservatively be under the 2K
bytes. This is often more useful than the referer url, because many
browsers only send the domain for 3rd party requests.

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

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

### getEts

Optional. The event timestamp in milliseconds. This prevents browser
caching of otherwise identical get requests. The name is abbreviated to
reduce the payload bytes.

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

### setEts

Optional. The event timestamp in milliseconds. This prevents browser
caching of otherwise identical get requests. The name is abbreviated to
reduce the payload bytes.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent eventStore name, such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`. Please see UserEventServiceClient::eventStoreName() for help formatting this field. |
| `userEvent` | `string` Required. URL encoded UserEvent proto. |
| `uri` | `string` Optional. The url including cgi-parameters but excluding the hash fragment. The URL must be truncated to 1.5K bytes to conservatively be under the 2K bytes. This is often more useful than the referer url, because many browsers only send the domain for 3rd party requests. |
| `ets` | `int` Optional. The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest/V1beta1.CollectUserEventRequest` |   |