Retail v2 API - Class UserEventServiceClientImpl (2.4.0)

public sealed class UserEventServiceClientImpl : UserEventServiceClient

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

UserEventService client wrapper implementation, for convenient use.

Inheritance

Object > UserEventServiceClient > UserEventServiceClientImpl

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

Service for ingesting end user actions on the customer website.

Constructors

UserEventServiceClientImpl(UserEventService.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
NameDescription
grpcClientUserEventService.UserEventServiceClient

The underlying gRPC client.

settingsUserEventServiceSettings

The base UserEventServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override UserEventService.UserEventServiceClient GrpcClient { get; }

The underlying gRPC UserEventService client

Property Value
TypeDescription
UserEventService.UserEventServiceClient
Overrides

ImportUserEventsOperationsClient

public override OperationsClient ImportUserEventsOperationsClient { get; }

The long-running operations client for ImportUserEvents.

Property Value
TypeDescription
OperationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient
Overrides

PurgeUserEventsOperationsClient

public override OperationsClient PurgeUserEventsOperationsClient { get; }

The long-running operations client for PurgeUserEvents.

Property Value
TypeDescription
OperationsClient
Overrides

RejoinUserEventsOperationsClient

public override OperationsClient RejoinUserEventsOperationsClient { get; }

The long-running operations client for RejoinUserEvents.

Property Value
TypeDescription
OperationsClient
Overrides

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 3rd party domain.

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

Parameters
NameDescription
requestCollectUserEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
HttpBody

The RPC response.

Overrides

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 3rd party domain.

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

Parameters
NameDescription
requestCollectUserEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<HttpBody>

A Task containing the RPC response.

Overrides

ImportUserEvents(ImportUserEventsRequest, CallSettings)

public override Operation<ImportUserEventsResponse, ImportMetadata> 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
NameDescription
requestImportUserEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ImportUserEventsResponse, ImportMetadata>

The RPC response.

Overrides

ImportUserEventsAsync(ImportUserEventsRequest, CallSettings)

public override async Task<Operation<ImportUserEventsResponse, ImportMetadata>> 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
NameDescription
requestImportUserEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ImportUserEventsResponse, ImportMetadata>>

A Task containing the RPC response.

Overrides

PurgeUserEvents(PurgeUserEventsRequest, CallSettings)

public override Operation<PurgeUserEventsResponse, PurgeMetadata> 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
NameDescription
requestPurgeUserEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<PurgeUserEventsResponse, PurgeMetadata>

The RPC response.

Overrides

PurgeUserEventsAsync(PurgeUserEventsRequest, CallSettings)

public override async Task<Operation<PurgeUserEventsResponse, PurgeMetadata>> 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
NameDescription
requestPurgeUserEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<PurgeUserEventsResponse, PurgeMetadata>>

A Task containing the RPC response.

Overrides

RejoinUserEvents(RejoinUserEventsRequest, CallSettings)

public override Operation<RejoinUserEventsResponse, RejoinUserEventsMetadata> RejoinUserEvents(RejoinUserEventsRequest request, CallSettings callSettings = null)

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

Parameters
NameDescription
requestRejoinUserEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RejoinUserEventsResponse, RejoinUserEventsMetadata>

The RPC response.

Overrides

RejoinUserEventsAsync(RejoinUserEventsRequest, CallSettings)

public override async Task<Operation<RejoinUserEventsResponse, RejoinUserEventsMetadata>> RejoinUserEventsAsync(RejoinUserEventsRequest request, CallSettings callSettings = null)

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

Parameters
NameDescription
requestRejoinUserEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RejoinUserEventsResponse, RejoinUserEventsMetadata>>

A Task containing the RPC response.

Overrides

WriteUserEvent(WriteUserEventRequest, CallSettings)

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

Writes a single user event.

Parameters
NameDescription
requestWriteUserEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
UserEvent

The RPC response.

Overrides

WriteUserEventAsync(WriteUserEventRequest, CallSettings)

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

Writes a single user event.

Parameters
NameDescription
requestWriteUserEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<UserEvent>

A Task containing the RPC response.

Overrides