Class ProductEventDetail.Builder (0.51.0)

public static final class ProductEventDetail.Builder extends GeneratedMessageV3.Builder<ProductEventDetail.Builder> implements ProductEventDetailOrBuilder

ProductEventDetail captures user event information specific to retail products.

Protobuf type google.cloud.recommendationengine.v1beta1.ProductEventDetail

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllPageCategories(Iterable<? extends CatalogItem.CategoryHierarchy> values)

public ProductEventDetail.Builder addAllPageCategories(Iterable<? extends CatalogItem.CategoryHierarchy> values)

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
Name Description
values Iterable<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy>
Returns
Type Description
ProductEventDetail.Builder

addAllProductDetails(Iterable<? extends ProductDetail> values)

public ProductEventDetail.Builder addAllProductDetails(Iterable<? extends ProductDetail> values)

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
Name Description
values Iterable<? extends com.google.cloud.recommendationengine.v1beta1.ProductDetail>
Returns
Type Description
ProductEventDetail.Builder

addPageCategories(CatalogItem.CategoryHierarchy value)

public ProductEventDetail.Builder addPageCategories(CatalogItem.CategoryHierarchy value)

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
Name Description
value CatalogItem.CategoryHierarchy
Returns
Type Description
ProductEventDetail.Builder

addPageCategories(CatalogItem.CategoryHierarchy.Builder builderForValue)

public ProductEventDetail.Builder addPageCategories(CatalogItem.CategoryHierarchy.Builder builderForValue)

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
Name Description
builderForValue CatalogItem.CategoryHierarchy.Builder
Returns
Type Description
ProductEventDetail.Builder

addPageCategories(int index, CatalogItem.CategoryHierarchy value)

public ProductEventDetail.Builder addPageCategories(int index, CatalogItem.CategoryHierarchy value)

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;

Parameters
Name Description
index int
value CatalogItem.CategoryHierarchy
Returns
Type Description
ProductEventDetail.Builder

addPageCategories(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

public ProductEventDetail.Builder addPageCategories(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

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;

Parameters
Name Description
index int
builderForValue CatalogItem.CategoryHierarchy.Builder
Returns
Type Description
ProductEventDetail.Builder

addPageCategoriesBuilder()

public CatalogItem.CategoryHierarchy.Builder addPageCategoriesBuilder()

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
Type Description
CatalogItem.CategoryHierarchy.Builder

addPageCategoriesBuilder(int index)

public CatalogItem.CategoryHierarchy.Builder addPageCategoriesBuilder(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
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchy.Builder

addProductDetails(ProductDetail value)

public ProductEventDetail.Builder addProductDetails(ProductDetail value)

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
Name Description
value ProductDetail
Returns
Type Description
ProductEventDetail.Builder

addProductDetails(ProductDetail.Builder builderForValue)

public ProductEventDetail.Builder addProductDetails(ProductDetail.Builder builderForValue)

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
Name Description
builderForValue ProductDetail.Builder
Returns
Type Description
ProductEventDetail.Builder

addProductDetails(int index, ProductDetail value)

public ProductEventDetail.Builder addProductDetails(int index, ProductDetail value)

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;

Parameters
Name Description
index int
value ProductDetail
Returns
Type Description
ProductEventDetail.Builder

addProductDetails(int index, ProductDetail.Builder builderForValue)

public ProductEventDetail.Builder addProductDetails(int index, ProductDetail.Builder builderForValue)

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;

Parameters
Name Description
index int
builderForValue ProductDetail.Builder
Returns
Type Description
ProductEventDetail.Builder

addProductDetailsBuilder()

public ProductDetail.Builder addProductDetailsBuilder()

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
Type Description
ProductDetail.Builder

addProductDetailsBuilder(int index)

public ProductDetail.Builder addProductDetailsBuilder(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
Name Description
index int
Returns
Type Description
ProductDetail.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProductEventDetail.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ProductEventDetail.Builder
Overrides

build()

public ProductEventDetail build()
Returns
Type Description
ProductEventDetail

buildPartial()

public ProductEventDetail buildPartial()
Returns
Type Description
ProductEventDetail

clear()

public ProductEventDetail.Builder clear()
Returns
Type Description
ProductEventDetail.Builder
Overrides

clearCartId()

public ProductEventDetail.Builder clearCartId()

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
Type Description
ProductEventDetail.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ProductEventDetail.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ProductEventDetail.Builder
Overrides

clearListId()

public ProductEventDetail.Builder clearListId()

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
Type Description
ProductEventDetail.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ProductEventDetail.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ProductEventDetail.Builder
Overrides

clearPageCategories()

public ProductEventDetail.Builder clearPageCategories()

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
Type Description
ProductEventDetail.Builder

clearProductDetails()

public ProductEventDetail.Builder clearProductDetails()

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
Type Description
ProductEventDetail.Builder

clearPurchaseTransaction()

public ProductEventDetail.Builder clearPurchaseTransaction()

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
Type Description
ProductEventDetail.Builder

clearSearchQuery()

public ProductEventDetail.Builder clearSearchQuery()

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
Type Description
ProductEventDetail.Builder

This builder for chaining.

clone()

public ProductEventDetail.Builder clone()
Returns
Type Description
ProductEventDetail.Builder
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
Type Description
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
Type Description
ByteString

The bytes for cartId.

getDefaultInstanceForType()

public ProductEventDetail getDefaultInstanceForType()
Returns
Type Description
ProductEventDetail

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchy

getPageCategoriesBuilder(int index)

public CatalogItem.CategoryHierarchy.Builder getPageCategoriesBuilder(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
Name Description
index int
Returns
Type Description
CatalogItem.CategoryHierarchy.Builder

getPageCategoriesBuilderList()

public List<CatalogItem.CategoryHierarchy.Builder> getPageCategoriesBuilderList()

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
Type Description
List<Builder>

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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
List<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchyOrBuilder>

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
Name Description
index int
Returns
Type Description
ProductDetail

getProductDetailsBuilder(int index)

public ProductDetail.Builder getProductDetailsBuilder(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
Name Description
index int
Returns
Type Description
ProductDetail.Builder

getProductDetailsBuilderList()

public List<ProductDetail.Builder> getProductDetailsBuilderList()

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
Type Description
List<Builder>

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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
PurchaseTransaction

The purchaseTransaction.

getPurchaseTransactionBuilder()

public PurchaseTransaction.Builder getPurchaseTransactionBuilder()

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
Type Description
PurchaseTransaction.Builder

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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for searchQuery.

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
Type Description
boolean

Whether the purchaseTransaction field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ProductEventDetail other)

public ProductEventDetail.Builder mergeFrom(ProductEventDetail other)
Parameter
Name Description
other ProductEventDetail
Returns
Type Description
ProductEventDetail.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProductEventDetail.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductEventDetail.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ProductEventDetail.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ProductEventDetail.Builder
Overrides

mergePurchaseTransaction(PurchaseTransaction value)

public ProductEventDetail.Builder mergePurchaseTransaction(PurchaseTransaction value)

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

Parameter
Name Description
value PurchaseTransaction
Returns
Type Description
ProductEventDetail.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProductEventDetail.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ProductEventDetail.Builder
Overrides

removePageCategories(int index)

public ProductEventDetail.Builder removePageCategories(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
Name Description
index int
Returns
Type Description
ProductEventDetail.Builder

removeProductDetails(int index)

public ProductEventDetail.Builder removeProductDetails(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
Name Description
index int
Returns
Type Description
ProductEventDetail.Builder

setCartId(String value)

public ProductEventDetail.Builder setCartId(String value)

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

Parameter
Name Description
value String

The cartId to set.

Returns
Type Description
ProductEventDetail.Builder

This builder for chaining.

setCartIdBytes(ByteString value)

public ProductEventDetail.Builder setCartIdBytes(ByteString value)

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

Parameter
Name Description
value ByteString

The bytes for cartId to set.

Returns
Type Description
ProductEventDetail.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ProductEventDetail.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ProductEventDetail.Builder
Overrides

setListId(String value)

public ProductEventDetail.Builder setListId(String value)

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;

Parameter
Name Description
value String

The listId to set.

Returns
Type Description
ProductEventDetail.Builder

This builder for chaining.

setListIdBytes(ByteString value)

public ProductEventDetail.Builder setListIdBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for listId to set.

Returns
Type Description
ProductEventDetail.Builder

This builder for chaining.

setPageCategories(int index, CatalogItem.CategoryHierarchy value)

public ProductEventDetail.Builder setPageCategories(int index, CatalogItem.CategoryHierarchy value)

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;

Parameters
Name Description
index int
value CatalogItem.CategoryHierarchy
Returns
Type Description
ProductEventDetail.Builder

setPageCategories(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

public ProductEventDetail.Builder setPageCategories(int index, CatalogItem.CategoryHierarchy.Builder builderForValue)

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;

Parameters
Name Description
index int
builderForValue CatalogItem.CategoryHierarchy.Builder
Returns
Type Description
ProductEventDetail.Builder

setProductDetails(int index, ProductDetail value)

public ProductEventDetail.Builder setProductDetails(int index, ProductDetail value)

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;

Parameters
Name Description
index int
value ProductDetail
Returns
Type Description
ProductEventDetail.Builder

setProductDetails(int index, ProductDetail.Builder builderForValue)

public ProductEventDetail.Builder setProductDetails(int index, ProductDetail.Builder builderForValue)

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;

Parameters
Name Description
index int
builderForValue ProductDetail.Builder
Returns
Type Description
ProductEventDetail.Builder

setPurchaseTransaction(PurchaseTransaction value)

public ProductEventDetail.Builder setPurchaseTransaction(PurchaseTransaction value)

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

Parameter
Name Description
value PurchaseTransaction
Returns
Type Description
ProductEventDetail.Builder

setPurchaseTransaction(PurchaseTransaction.Builder builderForValue)

public ProductEventDetail.Builder setPurchaseTransaction(PurchaseTransaction.Builder builderForValue)

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

Parameter
Name Description
builderForValue PurchaseTransaction.Builder
Returns
Type Description
ProductEventDetail.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ProductEventDetail.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ProductEventDetail.Builder
Overrides

setSearchQuery(String value)

public ProductEventDetail.Builder setSearchQuery(String value)

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;

Parameter
Name Description
value String

The searchQuery to set.

Returns
Type Description
ProductEventDetail.Builder

This builder for chaining.

setSearchQueryBytes(ByteString value)

public ProductEventDetail.Builder setSearchQueryBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for searchQuery to set.

Returns
Type Description
ProductEventDetail.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ProductEventDetail.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ProductEventDetail.Builder
Overrides