Class ProductEventDetail

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.recommendationengine.v1beta1.ProductEventDetail
All Implemented Interfaces:
ProductEventDetailOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ProductEventDetail extends com.google.protobuf.GeneratedMessage implements ProductEventDetailOrBuilder
 ProductEventDetail captures user event information specific to retail
 products.
 
Protobuf type google.cloud.recommendationengine.v1beta1.ProductEventDetail
See Also:
  • Field Details

    • SEARCH_QUERY_FIELD_NUMBER

      public static final int SEARCH_QUERY_FIELD_NUMBER
      See Also:
    • PAGE_CATEGORIES_FIELD_NUMBER

      public static final int PAGE_CATEGORIES_FIELD_NUMBER
      See Also:
    • PRODUCT_DETAILS_FIELD_NUMBER

      public static final int PRODUCT_DETAILS_FIELD_NUMBER
      See Also:
    • LIST_ID_FIELD_NUMBER

      public static final int LIST_ID_FIELD_NUMBER
      See Also:
    • CART_ID_FIELD_NUMBER

      public static final int CART_ID_FIELD_NUMBER
      See Also:
    • PURCHASE_TRANSACTION_FIELD_NUMBER

      public static final int PURCHASE_TRANSACTION_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getSearchQuery

      public String getSearchQuery()
       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.
       
      string search_query = 1;
      Specified by:
      getSearchQuery in interface ProductEventDetailOrBuilder
      Returns:
      The searchQuery.
    • getSearchQueryBytes

      public com.google.protobuf.ByteString getSearchQueryBytes()
       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.
       
      string search_query = 1;
      Specified by:
      getSearchQueryBytes in interface ProductEventDetailOrBuilder
      Returns:
      The bytes for searchQuery.
    • getPageCategoriesList

      public List<CatalogItem.CategoryHierarchy> getPageCategoriesList()
       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"].
       
      repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy page_categories = 2;
      Specified by:
      getPageCategoriesList in interface ProductEventDetailOrBuilder
    • getPageCategoriesOrBuilderList

      public List<? extends CatalogItem.CategoryHierarchyOrBuilder> getPageCategoriesOrBuilderList()
       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"].
       
      repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy page_categories = 2;
      Specified by:
      getPageCategoriesOrBuilderList in interface ProductEventDetailOrBuilder
    • getPageCategoriesCount

      public int getPageCategoriesCount()
       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"].
       
      repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy page_categories = 2;
      Specified by:
      getPageCategoriesCount in interface ProductEventDetailOrBuilder
    • getPageCategories

      public CatalogItem.CategoryHierarchy getPageCategories(int index)
       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"].
       
      repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy page_categories = 2;
      Specified by:
      getPageCategories in interface ProductEventDetailOrBuilder
    • getPageCategoriesOrBuilder

      public CatalogItem.CategoryHierarchyOrBuilder getPageCategoriesOrBuilder(int index)
       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"].
       
      repeated .google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy page_categories = 2;
      Specified by:
      getPageCategoriesOrBuilder in interface ProductEventDetailOrBuilder
    • getProductDetailsList

      public List<ProductDetail> getProductDetailsList()
       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`
       
      repeated .google.cloud.recommendationengine.v1beta1.ProductDetail product_details = 3;
      Specified by:
      getProductDetailsList in interface ProductEventDetailOrBuilder
    • getProductDetailsOrBuilderList

      public List<? extends ProductDetailOrBuilder> getProductDetailsOrBuilderList()
       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`
       
      repeated .google.cloud.recommendationengine.v1beta1.ProductDetail product_details = 3;
      Specified by:
      getProductDetailsOrBuilderList in interface ProductEventDetailOrBuilder
    • getProductDetailsCount

      public int getProductDetailsCount()
       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`
       
      repeated .google.cloud.recommendationengine.v1beta1.ProductDetail product_details = 3;
      Specified by:
      getProductDetailsCount in interface ProductEventDetailOrBuilder
    • getProductDetails

      public ProductDetail getProductDetails(int index)
       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`
       
      repeated .google.cloud.recommendationengine.v1beta1.ProductDetail product_details = 3;
      Specified by:
      getProductDetails in interface ProductEventDetailOrBuilder
    • getProductDetailsOrBuilder

      public ProductDetailOrBuilder getProductDetailsOrBuilder(int index)
       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`
       
      repeated .google.cloud.recommendationengine.v1beta1.ProductDetail product_details = 3;
      Specified by:
      getProductDetailsOrBuilder in interface ProductEventDetailOrBuilder
    • getListId

      public String getListId()
       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.
       
      string list_id = 4;
      Specified by:
      getListId in interface ProductEventDetailOrBuilder
      Returns:
      The listId.
    • getListIdBytes

      public com.google.protobuf.ByteString getListIdBytes()
       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.
       
      string list_id = 4;
      Specified by:
      getListIdBytes in interface ProductEventDetailOrBuilder
      Returns:
      The bytes for listId.
    • getCartId

      public String getCartId()
       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.
       
      string cart_id = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCartId in interface ProductEventDetailOrBuilder
      Returns:
      The cartId.
    • getCartIdBytes

      public com.google.protobuf.ByteString getCartIdBytes()
       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.
       
      string cart_id = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCartIdBytes in interface ProductEventDetailOrBuilder
      Returns:
      The bytes for cartId.
    • hasPurchaseTransaction

      public boolean hasPurchaseTransaction()
       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.
       
      .google.cloud.recommendationengine.v1beta1.PurchaseTransaction purchase_transaction = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasPurchaseTransaction in interface ProductEventDetailOrBuilder
      Returns:
      Whether the purchaseTransaction field is set.
    • getPurchaseTransaction

      public PurchaseTransaction getPurchaseTransaction()
       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.
       
      .google.cloud.recommendationengine.v1beta1.PurchaseTransaction purchase_transaction = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPurchaseTransaction in interface ProductEventDetailOrBuilder
      Returns:
      The purchaseTransaction.
    • getPurchaseTransactionOrBuilder

      public PurchaseTransactionOrBuilder getPurchaseTransactionOrBuilder()
       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.
       
      .google.cloud.recommendationengine.v1beta1.PurchaseTransaction purchase_transaction = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPurchaseTransactionOrBuilder in interface ProductEventDetailOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ProductEventDetail parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductEventDetail parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductEventDetail parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductEventDetail parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductEventDetail parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductEventDetail parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductEventDetail parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProductEventDetail parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ProductEventDetail parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ProductEventDetail parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProductEventDetail parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProductEventDetail parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ProductEventDetail.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ProductEventDetail.Builder newBuilder()
    • newBuilder

      public static ProductEventDetail.Builder newBuilder(ProductEventDetail prototype)
    • toBuilder

      public ProductEventDetail.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ProductEventDetail.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static ProductEventDetail getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ProductEventDetail> parser()
    • getParserForType

      public com.google.protobuf.Parser<ProductEventDetail> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public ProductEventDetail getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder