1.0.0-beta25 (latest) 1.0.0-beta24

    public sealed class UserEventServiceClientImpl : UserEventServiceClient

Reference documentation and code samples for the Discovery Engine v1beta API class UserEventServiceClientImpl.

UserEventService client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [UserEventServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient) \> UserEventServiceClientImpl

## Inherited Members

[UserEventServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_DefaultEndpoint) [UserEventServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_DefaultScopes) [UserEventServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_ServiceMetadata) [UserEventServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_CreateAsync_System_Threading_CancellationToken_) [UserEventServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_Create) [UserEventServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_ShutdownDefaultChannelsAsync) [UserEventServiceClient.WriteUserEventAsync(WriteUserEventRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_WriteUserEventAsync_Google_Cloud_DiscoveryEngine_V1Beta_WriteUserEventRequest_System_Threading_CancellationToken_) [UserEventServiceClient.CollectUserEventAsync(CollectUserEventRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_CollectUserEventAsync_Google_Cloud_DiscoveryEngine_V1Beta_CollectUserEventRequest_System_Threading_CancellationToken_) [UserEventServiceClient.PurgeUserEventsAsync(PurgeUserEventsRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PurgeUserEventsAsync_Google_Cloud_DiscoveryEngine_V1Beta_PurgeUserEventsRequest_System_Threading_CancellationToken_) [UserEventServiceClient.PollOncePurgeUserEvents(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PollOncePurgeUserEvents_System_String_Google_Api_Gax_Grpc_CallSettings_) [UserEventServiceClient.PollOncePurgeUserEventsAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PollOncePurgeUserEventsAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [UserEventServiceClient.ImportUserEventsAsync(ImportUserEventsRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_ImportUserEventsAsync_Google_Cloud_DiscoveryEngine_V1Beta_ImportUserEventsRequest_System_Threading_CancellationToken_) [UserEventServiceClient.PollOnceImportUserEvents(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PollOnceImportUserEvents_System_String_Google_Api_Gax_Grpc_CallSettings_) [UserEventServiceClient.PollOnceImportUserEventsAsync(string, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PollOnceImportUserEventsAsync_System_String_Google_Api_Gax_Grpc_CallSettings_) [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.DiscoveryEngine.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)

## Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

## Remarks

Service for ingesting end user actions on a website to Discovery Engine API.

## Constructors

### UserEventServiceClientImpl(UserEventServiceClient, UserEventServiceSettings, ILogger)

    public UserEventServiceClientImpl(UserEventService.UserEventServiceClient grpcClient, UserEventServiceSettings settings, ILogger logger)

Constructs a client wrapper for the UserEventService service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventService.UserEventServiceClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceSettings` The base [UserEventServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override UserEventService.UserEventServiceClient GrpcClient { get; }

The underlying gRPC UserEventService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventService.UserEventServiceClient` |   |

**Overrides** [UserEventServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_GrpcClient)

### ImportUserEventsOperationsClient

    public override OperationsClient ImportUserEventsOperationsClient { get; }

The long-running operations client for `ImportUserEvents`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

**Overrides** [UserEventServiceClient.ImportUserEventsOperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_ImportUserEventsOperationsClient)

### LocationsClient

    public override LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

**Overrides** [UserEventServiceClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_LocationsClient)

### PurgeUserEventsOperationsClient

    public override OperationsClient PurgeUserEventsOperationsClient { get; }

The long-running operations client for `PurgeUserEvents`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

**Overrides** [UserEventServiceClient.PurgeUserEventsOperationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PurgeUserEventsOperationsClient)

## Methods

### CollectUserEvent(CollectUserEventRequest, CallSettings)

    public override HttpBody CollectUserEvent(CollectUserEventRequest request, CallSettings callSettings = null)

Writes a single user event from the browser. This uses a GET request to
due to browser restriction of POST-ing to a third-party domain.

This method is used only by the Discovery Engine API JavaScript pixel and
Google Tag Manager. Users should not call this method directly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CollectUserEventRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.HttpBody.html` | The RPC response. |

**Overrides** [UserEventServiceClient.CollectUserEvent(CollectUserEventRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_CollectUserEvent_Google_Cloud_DiscoveryEngine_V1Beta_CollectUserEventRequest_Google_Api_Gax_Grpc_CallSettings_)

### CollectUserEventAsync(CollectUserEventRequest, CallSettings)

    public override Task<HttpBody> CollectUserEventAsync(CollectUserEventRequest request, CallSettings callSettings = null)

Writes a single user event from the browser. This uses a GET request to
due to browser restriction of POST-ing to a third-party domain.

This method is used only by the Discovery Engine API JavaScript pixel and
Google Tag Manager. Users should not call this method directly.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CollectUserEventRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.HttpBody.html` | A Task containing the RPC response. |

**Overrides** [UserEventServiceClient.CollectUserEventAsync(CollectUserEventRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_CollectUserEventAsync_Google_Cloud_DiscoveryEngine_V1Beta_CollectUserEventRequest_Google_Api_Gax_Grpc_CallSettings_)

### ImportUserEvents(ImportUserEventsRequest, CallSettings)

    public override Operation<ImportUserEventsResponse, ImportUserEventsMetadata> ImportUserEvents(ImportUserEventsRequest request, CallSettings callSettings = null)

Bulk import of user events. Request processing might be
synchronous. Events that already exist are skipped.
Use this method for backfilling historical user events.

Operation.response is of type ImportResponse. Note that it is
possible for a subset of the items to be successfully inserted.
Operation.metadata is of type ImportMetadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportUserEventsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportUserEventsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportUserEventsMetadata` | The RPC response. |

**Overrides** [UserEventServiceClient.ImportUserEvents(ImportUserEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_ImportUserEvents_Google_Cloud_DiscoveryEngine_V1Beta_ImportUserEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ImportUserEventsAsync(ImportUserEventsRequest, CallSettings)

    public override Task<Operation<ImportUserEventsResponse, ImportUserEventsMetadata>> ImportUserEventsAsync(ImportUserEventsRequest request, CallSettings callSettings = null)

Bulk import of user events. Request processing might be
synchronous. Events that already exist are skipped.
Use this method for backfilling historical user events.

Operation.response is of type ImportResponse. Note that it is
possible for a subset of the items to be successfully inserted.
Operation.metadata is of type ImportMetadata.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportUserEventsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportUserEventsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportUserEventsMetadata` | A Task containing the RPC response. |

**Overrides** [UserEventServiceClient.ImportUserEventsAsync(ImportUserEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_ImportUserEventsAsync_Google_Cloud_DiscoveryEngine_V1Beta_ImportUserEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### PurgeUserEvents(PurgeUserEventsRequest, CallSettings)

    public override Operation<PurgeUserEventsResponse, PurgeUserEventsMetadata> PurgeUserEvents(PurgeUserEventsRequest request, CallSettings callSettings = null)

Deletes permanently all user events specified by the filter provided.
Depending on the number of events specified by the filter, this operation
could take hours or days to complete. To test a filter, use the list
command first.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.PurgeUserEventsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.PurgeUserEventsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.PurgeUserEventsMetadata` | The RPC response. |

**Overrides** [UserEventServiceClient.PurgeUserEvents(PurgeUserEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PurgeUserEvents_Google_Cloud_DiscoveryEngine_V1Beta_PurgeUserEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### PurgeUserEventsAsync(PurgeUserEventsRequest, CallSettings)

    public override Task<Operation<PurgeUserEventsResponse, PurgeUserEventsMetadata>> PurgeUserEventsAsync(PurgeUserEventsRequest request, CallSettings callSettings = null)

Deletes permanently all user events specified by the filter provided.
Depending on the number of events specified by the filter, this operation
could take hours or days to complete. To test a filter, use the list
command first.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.PurgeUserEventsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.PurgeUserEventsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.PurgeUserEventsMetadata` | A Task containing the RPC response. |

**Overrides** [UserEventServiceClient.PurgeUserEventsAsync(PurgeUserEventsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_PurgeUserEventsAsync_Google_Cloud_DiscoveryEngine_V1Beta_PurgeUserEventsRequest_Google_Api_Gax_Grpc_CallSettings_)

### WriteUserEvent(WriteUserEventRequest, CallSettings)

    public override UserEvent WriteUserEvent(WriteUserEventRequest request, CallSettings callSettings = null)

Writes a single user event.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.WriteUserEventRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEvent` | The RPC response. |

**Overrides** [UserEventServiceClient.WriteUserEvent(WriteUserEventRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_WriteUserEvent_Google_Cloud_DiscoveryEngine_V1Beta_WriteUserEventRequest_Google_Api_Gax_Grpc_CallSettings_)

### WriteUserEventAsync(WriteUserEventRequest, CallSettings)

    public override Task<UserEvent> WriteUserEventAsync(WriteUserEventRequest request, CallSettings callSettings = null)

Writes a single user event.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.WriteUserEventRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEvent` | A Task containing the RPC response. |

**Overrides** [UserEventServiceClient.WriteUserEventAsync(WriteUserEventRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_UserEventServiceClient_WriteUserEventAsync_Google_Cloud_DiscoveryEngine_V1Beta_WriteUserEventRequest_Google_Api_Gax_Grpc_CallSettings_)