pub struct ProductEventDetail {
pub search_query: String,
pub page_categories: Vec<CategoryHierarchy>,
pub product_details: Vec<ProductDetail>,
pub list_id: String,
pub cart_id: String,
pub purchase_transaction: Option<PurchaseTransaction>,
}
Expand description
ProductEventDetail captures user event information specific to retail products.
Fields§
§search_query: String
Required for search
events. Other event types should not set this field.
The user’s search query as UTF-8 encoded text with a length limit of 5 KiB.
page_categories: Vec<CategoryHierarchy>
Required for category-page-view
events. Other event types should not set
this field.
The categories associated with a category page.
Category pages include special pages such as sales or promotions. For
instance, a special sale page may have the category hierarchy:
categories : [“Sales”, “2017 Black Friday Deals”].
product_details: Vec<ProductDetail>
The main product details related to the event.
This field is required for the following event types:
add-to-cart
add-to-list
checkout-start
detail-page-view
purchase-complete
refund
remove-from-cart
remove-from-list
This field is optional for the following event types:
page-visit
shopping-cart-page-view
- note that ‘product_details’ should be set for this unless the shopping cart is empty.
This field is not allowed for the following event types:
category-page-view
home-page-view
search
list_id: String
Required for add-to-list
and remove-from-list
events. The id or name of
the list that the item is being added to or removed from. Other event types
should not set this field.
cart_id: String
Optional. The id or name of the associated shopping cart. This id is used to associate multiple items added or present in the cart before purchase.
This can only be set for add-to-cart
, remove-from-cart
,
checkout-start
, purchase-complete
, or shopping-cart-page-view
events.
purchase_transaction: Option<PurchaseTransaction>
Optional. A transaction represents the entire purchase transaction.
Required for purchase-complete
events. Optional for checkout-start
events. Other event types should not set this field.
Trait Implementations§
source§impl Clone for ProductEventDetail
impl Clone for ProductEventDetail
source§fn clone(&self) -> ProductEventDetail
fn clone(&self) -> ProductEventDetail
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProductEventDetail
impl Debug for ProductEventDetail
source§impl Default for ProductEventDetail
impl Default for ProductEventDetail
source§impl Message for ProductEventDetail
impl Message for ProductEventDetail
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 ProductEventDetail
impl PartialEq for ProductEventDetail
source§fn eq(&self, other: &ProductEventDetail) -> bool
fn eq(&self, other: &ProductEventDetail) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ProductEventDetail
Auto Trait Implementations§
impl Freeze for ProductEventDetail
impl RefUnwindSafe for ProductEventDetail
impl Send for ProductEventDetail
impl Sync for ProductEventDetail
impl Unpin for ProductEventDetail
impl UnwindSafe for ProductEventDetail
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