Class ProductEventDetail.Builder (0.20.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.recommendationengine.v1beta1.CatalogItem.CategoryHierarchy>
Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.recommendationengine.v1beta1.ProductDetail>
Returns
TypeDescription
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
NameDescription
valueCatalogItem.CategoryHierarchy
Returns
TypeDescription
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
NameDescription
builderForValueCatalogItem.CategoryHierarchy.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueCatalogItem.CategoryHierarchy
Returns
TypeDescription
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
NameDescription
indexint
builderForValueCatalogItem.CategoryHierarchy.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueProductDetail
Returns
TypeDescription
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
NameDescription
builderForValueProductDetail.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueProductDetail
Returns
TypeDescription
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
NameDescription
indexint
builderForValueProductDetail.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ProductDetail.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProductEventDetail.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ProductEventDetail.Builder
Overrides

build()

public ProductEventDetail build()
Returns
TypeDescription
ProductEventDetail

buildPartial()

public ProductEventDetail buildPartial()
Returns
TypeDescription
ProductEventDetail

clear()

public ProductEventDetail.Builder clear()
Returns
TypeDescription
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
TypeDescription
ProductEventDetail.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ProductEventDetail.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ProductEventDetail.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ProductEventDetail.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ProductEventDetail.Builder

This builder for chaining.

clone()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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

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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
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>

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

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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
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.

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
TypeDescription
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
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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ProductEventDetail other)

public ProductEventDetail.Builder mergeFrom(ProductEventDetail other)
Parameter
NameDescription
otherProductEventDetail
Returns
TypeDescription
ProductEventDetail.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ProductEventDetail.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductEventDetail.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ProductEventDetail.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuePurchaseTransaction
Returns
TypeDescription
ProductEventDetail.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ProductEventDetail.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The cartId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for cartId to set.

Returns
TypeDescription
ProductEventDetail.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ProductEventDetail.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The listId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for listId to set.

Returns
TypeDescription
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
NameDescription
indexint
valueCatalogItem.CategoryHierarchy
Returns
TypeDescription
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
NameDescription
indexint
builderForValueCatalogItem.CategoryHierarchy.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueProductDetail
Returns
TypeDescription
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
NameDescription
indexint
builderForValueProductDetail.Builder
Returns
TypeDescription
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
NameDescription
valuePurchaseTransaction
Returns
TypeDescription
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
NameDescription
builderForValuePurchaseTransaction.Builder
Returns
TypeDescription
ProductEventDetail.Builder

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

public ProductEventDetail.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The searchQuery to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for searchQuery to set.

Returns
TypeDescription
ProductEventDetail.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ProductEventDetail.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ProductEventDetail.Builder
Overrides