Class ProductEventDetail (0.10.2)

Stay organized with collections Save and categorize content based on your preferences.
public final class ProductEventDetail extends GeneratedMessageV3 implements ProductEventDetailOrBuilder

ProductEventDetail captures user event information specific to retail products.

Protobuf type google.cloud.recommendationengine.v1beta1.ProductEventDetail

Static Fields

CART_ID_FIELD_NUMBER

public static final int CART_ID_FIELD_NUMBER
Field Value
TypeDescription
int

LIST_ID_FIELD_NUMBER

public static final int LIST_ID_FIELD_NUMBER
Field Value
TypeDescription
int

PAGE_CATEGORIES_FIELD_NUMBER

public static final int PAGE_CATEGORIES_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_DETAILS_FIELD_NUMBER

public static final int PRODUCT_DETAILS_FIELD_NUMBER
Field Value
TypeDescription
int

PURCHASE_TRANSACTION_FIELD_NUMBER

public static final int PURCHASE_TRANSACTION_FIELD_NUMBER
Field Value
TypeDescription
int

SEARCH_QUERY_FIELD_NUMBER

public static final int SEARCH_QUERY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ProductEventDetail getDefaultInstance()
Returns
TypeDescription
ProductEventDetail

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ProductEventDetail.Builder newBuilder()
Returns
TypeDescription
ProductEventDetail.Builder

newBuilder(ProductEventDetail prototype)

public static ProductEventDetail.Builder newBuilder(ProductEventDetail prototype)
Parameter
NameDescription
prototypeProductEventDetail
Returns
TypeDescription
ProductEventDetail.Builder

parseDelimitedFrom(InputStream input)

public static ProductEventDetail parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductEventDetail parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ProductEventDetail parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ProductEventDetail parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ProductEventDetail parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ProductEventDetail parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ProductEventDetail parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductEventDetail parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ProductEventDetail parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductEventDetail parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ProductEventDetail parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ProductEventDetail parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ProductEventDetail> parser()
Returns
TypeDescription
Parser<ProductEventDetail>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

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];

Returns
TypeDescription
String

The cartId.

getCartIdBytes()

public 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];

Returns
TypeDescription
ByteString

The bytes for cartId.

getDefaultInstanceForType()

public ProductEventDetail getDefaultInstanceForType()
Returns
TypeDescription
ProductEventDetail

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;

Returns
TypeDescription
String

The listId.

getListIdBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for listId.

getPageCategories(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
CatalogItem.CategoryHierarchy

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;

Returns
TypeDescription
int

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;

Returns
TypeDescription
List<CategoryHierarchy>

getPageCategoriesOrBuilder(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
CatalogItem.CategoryHierarchyOrBuilder

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;

Returns
TypeDescription
List<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchyOrBuilder>

getParserForType()

public Parser<ProductEventDetail> getParserForType()
Returns
TypeDescription
Parser<ProductEventDetail>
Overrides

getProductDetails(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProductDetail

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;

Returns
TypeDescription
int

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;

Returns
TypeDescription
List<ProductDetail>

getProductDetailsOrBuilder(int index)

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;

Parameter
NameDescription
indexint
Returns
TypeDescription
ProductDetailOrBuilder

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;

Returns
TypeDescription
List<? extends com.google.cloud.recommendationengine.v1beta1.ProductDetailOrBuilder>

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];

Returns
TypeDescription
PurchaseTransaction

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];

Returns
TypeDescription
PurchaseTransactionOrBuilder

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;

Returns
TypeDescription
String

The searchQuery.

getSearchQueryBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for searchQuery.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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];

Returns
TypeDescription
boolean

Whether the purchaseTransaction field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ProductEventDetail.Builder newBuilderForType()
Returns
TypeDescription
ProductEventDetail.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ProductEventDetail.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ProductEventDetail.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ProductEventDetail.Builder toBuilder()
Returns
TypeDescription
ProductEventDetail.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException