# Retail v2 API - Class CollectUserEventRequest (2.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.15.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.14.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.CollectUserEventRequest)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.CollectUserEventRequest)

    public sealed class CollectUserEventRequest : IMessage<CollectUserEventRequest>, IEquatable<CollectUserEventRequest>, IDeepCloneable<CollectUserEventRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Retail v2 API class CollectUserEventRequest.

Request message for CollectUserEvent method.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> CollectUserEventRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CollectUserEventRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CollectUserEventRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CollectUserEventRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Retail.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2)

## Assembly

Google.Cloud.Retail.V2.dll

## Constructors

### CollectUserEventRequest()

    public CollectUserEventRequest()

### CollectUserEventRequest(CollectUserEventRequest)

    public CollectUserEventRequest(CollectUserEventRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequest` |

## Properties

### ConversionRuleCase

    public CollectUserEventRequest.ConversionRuleOneofCase ConversionRuleCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CollectUserEventRequest.ConversionRuleOneofCase` |   |

### Ets

    public long Ets { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### HasPrebuiltRule

    public bool HasPrebuiltRule { get; }

Gets whether the "prebuilt_rule" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Parent

    public string Parent { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PrebuiltRule

    public string PrebuiltRule { get; set; }

The prebuilt rule name that can convert a specific type of raw_json.
For example: "ga4_bq" rule for the GA4 user event schema.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### RawJson

    public string RawJson { get; set; }

An arbitrary serialized JSON string that contains necessary information
that can comprise a user event. When this field is specified, the
user_event field will be ignored. Note: line-delimited JSON is not
supported, a single JSON only.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Uri

    public string Uri { get; set; }

The URL including cgi-parameters but excluding the hash fragment with a
length limit of 5,000 characters. This is often more useful than the
referer URL, because many browsers only send the domain for 3rd party
requests.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### UserEvent

    public string UserEvent { get; set; }

Required. URL encoded UserEvent proto with a length limit of 2,000,000
characters.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |