pub struct UserEventService { /* private fields */ }Expand description
Implements a client for the Vertex AI Search for commerce API.
§Example
let client = UserEventService::builder().build().await?;
// use `client` to make requests to the Vertex AI Search for commerce API.§Service Description
Service for ingesting end user actions on the customer website.
§Configuration
To configure UserEventService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://retail.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
UserEventService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap UserEventService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl UserEventService
impl UserEventService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for UserEventService.
let client = UserEventService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: UserEventService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: UserEventService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn write_user_event(&self) -> WriteUserEvent
pub fn write_user_event(&self) -> WriteUserEvent
Writes a single user event.
Sourcepub fn collect_user_event(&self) -> CollectUserEvent
pub fn collect_user_event(&self) -> CollectUserEvent
Writes a single user event from the browser.
For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned.
This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
Sourcepub fn purge_user_events(&self) -> PurgeUserEvents
pub fn purge_user_events(&self) -> PurgeUserEvents
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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn import_user_events(&self) -> ImportUserEvents
pub fn import_user_events(&self) -> ImportUserEvents
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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn rejoin_user_events(&self) -> RejoinUserEvents
pub fn rejoin_user_events(&self) -> RejoinUserEvents
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.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for UserEventService
impl Clone for UserEventService
Source§fn clone(&self) -> UserEventService
fn clone(&self) -> UserEventService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more