Struct google_api_proto::google::cloud::recommendationengine::v1beta1::UserEvent
source · pub struct UserEvent {
pub event_type: String,
pub user_info: Option<UserInfo>,
pub event_detail: Option<EventDetail>,
pub product_event_detail: Option<ProductEventDetail>,
pub event_time: Option<Timestamp>,
pub event_source: i32,
}
Expand description
UserEvent captures all metadata information recommendation engine needs to know about how end users interact with customers’ website.
Fields§
§event_type: String
Required. User event type. Allowed values are:
add-to-cart
Products being added to cart.add-to-list
Items being added to a list (shopping list, favorites etc).category-page-view
Special pages such as sale or promotion pages viewed.checkout-start
User starting a checkout process.detail-page-view
Products detail page viewed.home-page-view
Homepage viewed.page-visit
Generic page visits not included in the event types above.purchase-complete
User finishing a purchase.refund
Purchased items being refunded or returned.remove-from-cart
Products being removed from cart.remove-from-list
Items being removed from a list.search
Product search.shopping-cart-page-view
User viewing a shopping cart.impression
List of items displayed. Used by Google Tag Manager.
user_info: Option<UserInfo>
Required. User information.
event_detail: Option<EventDetail>
Optional. User event detailed information common across different recommendation types.
product_event_detail: Option<ProductEventDetail>
Optional. Retail product specific user event metadata.
This field is required for the following event types:
add-to-cart
add-to-list
category-page-view
checkout-start
detail-page-view
purchase-complete
refund
remove-from-cart
remove-from-list
search
This field is optional for the following event types:
page-visit
shopping-cart-page-view
- note that ‘product_event_detail’ should be set for this unless the shopping cart is empty.
This field is not allowed for the following event types:
home-page-view
event_time: Option<Timestamp>
Optional. Only required for ImportUserEvents method. Timestamp of user event created.
event_source: i32
Optional. This field should not be set when using JavaScript pixel
or the Recommendations AI Tag. Defaults to EVENT_SOURCE_UNSPECIFIED
.
Implementations§
source§impl UserEvent
impl UserEvent
sourcepub fn event_source(&self) -> EventSource
pub fn event_source(&self) -> EventSource
Returns the enum value of event_source
, or the default if the field is set to an invalid enum value.
sourcepub fn set_event_source(&mut self, value: EventSource)
pub fn set_event_source(&mut self, value: EventSource)
Sets event_source
to the provided enum value.
Trait Implementations§
source§impl Message for UserEvent
impl Message for UserEvent
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for UserEvent
impl PartialEq for UserEvent
impl StructuralPartialEq for UserEvent
Auto Trait Implementations§
impl Freeze for UserEvent
impl RefUnwindSafe for UserEvent
impl Send for UserEvent
impl Sync for UserEvent
impl Unpin for UserEvent
impl UnwindSafe for UserEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request