Package com.google.cloud.retail.v2alpha
Class UserEvent.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
com.google.cloud.retail.v2alpha.UserEvent.Builder
- All Implemented Interfaces:
UserEventOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- UserEvent
public static final class UserEvent.Builder
extends com.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
implements UserEventOrBuilder
UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.Protobuf type
google.cloud.retail.v2alpha.UserEvent-
Method Summary
Modifier and TypeMethodDescriptionaddAllExperimentIds(Iterable<String> values) A list of identifiers for the independent experiment groups this user event belongs to.addAllPageCategories(Iterable<String> values) The categories associated with a category page.addAllProductDetails(Iterable<? extends ProductDetail> values) The main product details related to the event.addExperimentIds(String value) A list of identifiers for the independent experiment groups this user event belongs to.addExperimentIdsBytes(com.google.protobuf.ByteString value) A list of identifiers for the independent experiment groups this user event belongs to.addPageCategories(String value) The categories associated with a category page.addPageCategoriesBytes(com.google.protobuf.ByteString value) The categories associated with a category page.addProductDetails(int index, ProductDetail value) The main product details related to the event.addProductDetails(int index, ProductDetail.Builder builderForValue) The main product details related to the event.addProductDetails(ProductDetail value) The main product details related to the event.addProductDetails(ProductDetail.Builder builderForValue) The main product details related to the event.The main product details related to the event.addProductDetailsBuilder(int index) The main product details related to the event.build()clear()Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict].The ID or name of the associated shopping cart.The main auto-completion details related to the event.The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc.Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.Required.A list of identifiers for the independent experiment groups this user event belongs to.The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered.An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).The order in which products are returned.The categories associated with a category page.A unique ID of a web page view.The main product details related to the event.A transaction represents the entire purchase transaction.The referrer URL of the current page.The user's search query.A unique identifier for tracking a visitor session with a length limit of 128 bytes.clearUri()Complete URL (window.location.href) of the user's current page.User information.Required.booleancontainsAttributes(String key) Extra user event features to include in the recommendation model.Deprecated.intExtra user event features to include in the recommendation model.Extra user event features to include in the recommendation model.getAttributesOrDefault(String key, CustomAttribute defaultValue) Extra user event features to include in the recommendation model.Extra user event features to include in the recommendation model.Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict].com.google.protobuf.ByteStringHighly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict].The ID or name of the associated shopping cart.com.google.protobuf.ByteStringThe ID or name of the associated shopping cart.The main auto-completion details related to the event.The main auto-completion details related to the event.The main auto-completion details related to the event.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc.com.google.protobuf.ByteStringThe entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc.com.google.protobuf.TimestampOnly required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.com.google.protobuf.Timestamp.BuilderOnly required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.com.google.protobuf.TimestampOrBuilderOnly required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.Required.com.google.protobuf.ByteStringRequired.getExperimentIds(int index) A list of identifiers for the independent experiment groups this user event belongs to.com.google.protobuf.ByteStringgetExperimentIdsBytes(int index) A list of identifiers for the independent experiment groups this user event belongs to.intA list of identifiers for the independent experiment groups this user event belongs to.com.google.protobuf.ProtocolStringListA list of identifiers for the independent experiment groups this user event belongs to.The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered.com.google.protobuf.ByteStringThe filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered.Deprecated.intAn integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).The order in which products are returned.com.google.protobuf.ByteStringThe order in which products are returned.getPageCategories(int index) The categories associated with a category page.com.google.protobuf.ByteStringgetPageCategoriesBytes(int index) The categories associated with a category page.intThe categories associated with a category page.com.google.protobuf.ProtocolStringListThe categories associated with a category page.A unique ID of a web page view.com.google.protobuf.ByteStringA unique ID of a web page view.getProductDetails(int index) The main product details related to the event.getProductDetailsBuilder(int index) The main product details related to the event.The main product details related to the event.intThe main product details related to the event.The main product details related to the event.getProductDetailsOrBuilder(int index) The main product details related to the event.List<? extends ProductDetailOrBuilder>The main product details related to the event.A transaction represents the entire purchase transaction.A transaction represents the entire purchase transaction.A transaction represents the entire purchase transaction.The referrer URL of the current page.com.google.protobuf.ByteStringThe referrer URL of the current page.The user's search query.com.google.protobuf.ByteStringThe user's search query.A unique identifier for tracking a visitor session with a length limit of 128 bytes.com.google.protobuf.ByteStringA unique identifier for tracking a visitor session with a length limit of 128 bytes.getUri()Complete URL (window.location.href) of the user's current page.com.google.protobuf.ByteStringComplete URL (window.location.href) of the user's current page.User information.User information.User information.Required.com.google.protobuf.ByteStringRequired.booleanThe main auto-completion details related to the event.booleanOnly required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.booleanA transaction represents the entire purchase transaction.booleanUser information.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanThe main auto-completion details related to the event.mergeEventTime(com.google.protobuf.Timestamp value) Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) A transaction represents the entire purchase transaction.mergeUserInfo(UserInfo value) User information.putAllAttributes(Map<String, CustomAttribute> values) Extra user event features to include in the recommendation model.putAttributes(String key, CustomAttribute value) Extra user event features to include in the recommendation model.Extra user event features to include in the recommendation model.removeAttributes(String key) Extra user event features to include in the recommendation model.removeProductDetails(int index) The main product details related to the event.setAttributionToken(String value) Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict].setAttributionTokenBytes(com.google.protobuf.ByteString value) Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict].The ID or name of the associated shopping cart.setCartIdBytes(com.google.protobuf.ByteString value) The ID or name of the associated shopping cart.The main auto-completion details related to the event.setCompletionDetail(CompletionDetail.Builder builderForValue) The main auto-completion details related to the event.The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc.setEntityBytes(com.google.protobuf.ByteString value) The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc.setEventTime(com.google.protobuf.Timestamp value) Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method.setEventType(String value) Required.setEventTypeBytes(com.google.protobuf.ByteString value) Required.setExperimentIds(int index, String value) A list of identifiers for the independent experiment groups this user event belongs to.The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered.setFilterBytes(com.google.protobuf.ByteString value) The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered.setOffset(int value) An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).setOrderBy(String value) The order in which products are returned.setOrderByBytes(com.google.protobuf.ByteString value) The order in which products are returned.setPageCategories(int index, String value) The categories associated with a category page.setPageViewId(String value) A unique ID of a web page view.setPageViewIdBytes(com.google.protobuf.ByteString value) A unique ID of a web page view.setProductDetails(int index, ProductDetail value) The main product details related to the event.setProductDetails(int index, ProductDetail.Builder builderForValue) The main product details related to the event.A transaction represents the entire purchase transaction.setPurchaseTransaction(PurchaseTransaction.Builder builderForValue) A transaction represents the entire purchase transaction.setReferrerUri(String value) The referrer URL of the current page.setReferrerUriBytes(com.google.protobuf.ByteString value) The referrer URL of the current page.setSearchQuery(String value) The user's search query.setSearchQueryBytes(com.google.protobuf.ByteString value) The user's search query.setSessionId(String value) A unique identifier for tracking a visitor session with a length limit of 128 bytes.setSessionIdBytes(com.google.protobuf.ByteString value) A unique identifier for tracking a visitor session with a length limit of 128 bytes.Complete URL (window.location.href) of the user's current page.setUriBytes(com.google.protobuf.ByteString value) Complete URL (window.location.href) of the user's current page.setUserInfo(UserInfo value) User information.setUserInfo(UserInfo.Builder builderForValue) User information.setVisitorId(String value) Required.setVisitorIdBytes(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<UserEvent.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<UserEvent.Builder>
-
mergeFrom
public UserEvent.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<UserEvent.Builder>- Throws:
IOException
-
getEventType
Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getEventTypein interfaceUserEventOrBuilder- Returns:
- The eventType.
-
getEventTypeBytes
public com.google.protobuf.ByteString getEventTypeBytes()Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getEventTypeBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for eventType.
-
setEventType
Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The eventType to set.- Returns:
- This builder for chaining.
-
clearEventType
Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setEventTypeBytes
Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for eventType to set.- Returns:
- This builder for chaining.
-
getVisitorId
Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.
string visitor_id = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getVisitorIdin interfaceUserEventOrBuilder- Returns:
- The visitorId.
-
getVisitorIdBytes
public com.google.protobuf.ByteString getVisitorIdBytes()Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.
string visitor_id = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getVisitorIdBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for visitorId.
-
setVisitorId
Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.
string visitor_id = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The visitorId to set.- Returns:
- This builder for chaining.
-
clearVisitorId
Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.
string visitor_id = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setVisitorIdBytes
Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.
string visitor_id = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for visitorId to set.- Returns:
- This builder for chaining.
-
getSessionId
A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.
string session_id = 21;- Specified by:
getSessionIdin interfaceUserEventOrBuilder- Returns:
- The sessionId.
-
getSessionIdBytes
public com.google.protobuf.ByteString getSessionIdBytes()A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.
string session_id = 21;- Specified by:
getSessionIdBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for sessionId.
-
setSessionId
A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.
string session_id = 21;- Parameters:
value- The sessionId to set.- Returns:
- This builder for chaining.
-
clearSessionId
A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.
string session_id = 21;- Returns:
- This builder for chaining.
-
setSessionIdBytes
A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.
string session_id = 21;- Parameters:
value- The bytes for sessionId to set.- Returns:
- This builder for chaining.
-
hasEventTime
public boolean hasEventTime()Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3;- Specified by:
hasEventTimein interfaceUserEventOrBuilder- Returns:
- Whether the eventTime field is set.
-
getEventTime
public com.google.protobuf.Timestamp getEventTime()Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3;- Specified by:
getEventTimein interfaceUserEventOrBuilder- Returns:
- The eventTime.
-
setEventTime
Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3; -
setEventTime
Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3; -
mergeEventTime
Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3; -
clearEventTime
Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3; -
getEventTimeBuilder
public com.google.protobuf.Timestamp.Builder getEventTimeBuilder()Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3; -
getEventTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder()Only required for [UserEventService.ImportUserEvents][google.cloud.retail.v2alpha.UserEventService.ImportUserEvents] method. Timestamp of when the user event happened.
.google.protobuf.Timestamp event_time = 3;- Specified by:
getEventTimeOrBuilderin interfaceUserEventOrBuilder
-
getExperimentIdsList
public com.google.protobuf.ProtocolStringList getExperimentIdsList()A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Specified by:
getExperimentIdsListin interfaceUserEventOrBuilder- Returns:
- A list containing the experimentIds.
-
getExperimentIdsCount
public int getExperimentIdsCount()A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Specified by:
getExperimentIdsCountin interfaceUserEventOrBuilder- Returns:
- The count of experimentIds.
-
getExperimentIds
A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Specified by:
getExperimentIdsin interfaceUserEventOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The experimentIds at the given index.
-
getExperimentIdsBytes
public com.google.protobuf.ByteString getExperimentIdsBytes(int index) A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Specified by:
getExperimentIdsBytesin interfaceUserEventOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the experimentIds at the given index.
-
setExperimentIds
A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Parameters:
index- The index to set the value at.value- The experimentIds to set.- Returns:
- This builder for chaining.
-
addExperimentIds
A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Parameters:
value- The experimentIds to add.- Returns:
- This builder for chaining.
-
addAllExperimentIds
A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Parameters:
values- The experimentIds to add.- Returns:
- This builder for chaining.
-
clearExperimentIds
A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Returns:
- This builder for chaining.
-
addExperimentIdsBytes
A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
repeated string experiment_ids = 4;- Parameters:
value- The bytes of the experimentIds to add.- Returns:
- This builder for chaining.
-
getAttributionToken
Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. This field enables accurate attribution of recommendation model performance. The value must be a valid [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. The value must be a valid [SearchResponse.attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token] for user events that are the result of [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] as a URL parameter to product K's page. When recording events on product K's page, log the [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] to this field.
string attribution_token = 5;- Specified by:
getAttributionTokenin interfaceUserEventOrBuilder- Returns:
- The attributionToken.
-
getAttributionTokenBytes
public com.google.protobuf.ByteString getAttributionTokenBytes()Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. This field enables accurate attribution of recommendation model performance. The value must be a valid [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. The value must be a valid [SearchResponse.attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token] for user events that are the result of [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] as a URL parameter to product K's page. When recording events on product K's page, log the [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] to this field.
string attribution_token = 5;- Specified by:
getAttributionTokenBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for attributionToken.
-
setAttributionToken
Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. This field enables accurate attribution of recommendation model performance. The value must be a valid [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. The value must be a valid [SearchResponse.attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token] for user events that are the result of [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] as a URL parameter to product K's page. When recording events on product K's page, log the [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] to this field.
string attribution_token = 5;- Parameters:
value- The attributionToken to set.- Returns:
- This builder for chaining.
-
clearAttributionToken
Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. This field enables accurate attribution of recommendation model performance. The value must be a valid [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. The value must be a valid [SearchResponse.attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token] for user events that are the result of [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] as a URL parameter to product K's page. When recording events on product K's page, log the [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] to this field.
string attribution_token = 5;- Returns:
- This builder for chaining.
-
setAttributionTokenBytes
Highly recommended for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. This field enables accurate attribution of recommendation model performance. The value must be a valid [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] for user events that are the result of [PredictionService.Predict][google.cloud.retail.v2alpha.PredictionService.Predict]. The value must be a valid [SearchResponse.attribution_token][google.cloud.retail.v2alpha.SearchResponse.attribution_token] for user events that are the result of [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] as a URL parameter to product K's page. When recording events on product K's page, log the [PredictResponse.attribution_token][google.cloud.retail.v2alpha.PredictResponse.attribution_token] to this field.
string attribution_token = 5;- Parameters:
value- The bytes for attributionToken to set.- Returns:
- This builder for chaining.
-
getProductDetailsList
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6;- Specified by:
getProductDetailsListin interfaceUserEventOrBuilder
-
getProductDetailsCount
public int getProductDetailsCount()The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6;- Specified by:
getProductDetailsCountin interfaceUserEventOrBuilder
-
getProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6;- Specified by:
getProductDetailsin interfaceUserEventOrBuilder
-
setProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
setProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
addProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
addProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
addProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
addProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
addAllProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
clearProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
removeProductDetails
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
getProductDetailsBuilder
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
getProductDetailsOrBuilder
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6;- Specified by:
getProductDetailsOrBuilderin interfaceUserEventOrBuilder
-
getProductDetailsOrBuilderList
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6;- Specified by:
getProductDetailsOrBuilderListin interfaceUserEventOrBuilder
-
addProductDetailsBuilder
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
addProductDetailsBuilder
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
getProductDetailsBuilderList
The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different [product_details][google.cloud.retail.v2alpha.UserEvent.product_details] is desired. The end user may have not finished browsing the whole page yet.
repeated .google.cloud.retail.v2alpha.ProductDetail product_details = 6; -
hasCompletionDetail
public boolean hasCompletionDetail()The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22;- Specified by:
hasCompletionDetailin interfaceUserEventOrBuilder- Returns:
- Whether the completionDetail field is set.
-
getCompletionDetail
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22;- Specified by:
getCompletionDetailin interfaceUserEventOrBuilder- Returns:
- The completionDetail.
-
setCompletionDetail
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22; -
setCompletionDetail
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22; -
mergeCompletionDetail
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22; -
clearCompletionDetail
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22; -
getCompletionDetailBuilder
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22; -
getCompletionDetailOrBuilder
The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
.google.cloud.retail.v2alpha.CompletionDetail completion_detail = 22;- Specified by:
getCompletionDetailOrBuilderin interfaceUserEventOrBuilder
-
getAttributesCount
public int getAttributesCount()Description copied from interface:UserEventOrBuilderExtra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7;- Specified by:
getAttributesCountin interfaceUserEventOrBuilder
-
containsAttributes
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7;- Specified by:
containsAttributesin interfaceUserEventOrBuilder
-
getAttributes
Deprecated.UsegetAttributesMap()instead.- Specified by:
getAttributesin interfaceUserEventOrBuilder
-
getAttributesMap
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7;- Specified by:
getAttributesMapin interfaceUserEventOrBuilder
-
getAttributesOrDefault
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7;- Specified by:
getAttributesOrDefaultin interfaceUserEventOrBuilder
-
getAttributesOrThrow
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7;- Specified by:
getAttributesOrThrowin interfaceUserEventOrBuilder
-
clearAttributes
-
removeAttributes
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7; -
getMutableAttributes
Deprecated.Use alternate mutation accessors instead. -
putAttributes
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7; -
putAllAttributes
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7; -
putAttributesBuilderIfAbsent
Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
map<string, .google.cloud.retail.v2alpha.CustomAttribute> attributes = 7; -
getCartId
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`, `purchase-complete`, or `shopping-cart-page-view` events.
string cart_id = 8;- Specified by:
getCartIdin interfaceUserEventOrBuilder- Returns:
- The cartId.
-
getCartIdBytes
public com.google.protobuf.ByteString getCartIdBytes()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`, `purchase-complete`, or `shopping-cart-page-view` events.
string cart_id = 8;- Specified by:
getCartIdBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for cartId.
-
setCartId
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`, `purchase-complete`, or `shopping-cart-page-view` events.
string cart_id = 8;- Parameters:
value- The cartId to set.- Returns:
- This builder for chaining.
-
clearCartId
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`, `purchase-complete`, or `shopping-cart-page-view` events.
string cart_id = 8;- Returns:
- This builder for chaining.
-
setCartIdBytes
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`, `purchase-complete`, or `shopping-cart-page-view` events.
string cart_id = 8;- Parameters:
value- The bytes for cartId to set.- Returns:
- This builder for chaining.
-
hasPurchaseTransaction
public boolean hasPurchaseTransaction()A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9;- Specified by:
hasPurchaseTransactionin interfaceUserEventOrBuilder- Returns:
- Whether the purchaseTransaction field is set.
-
getPurchaseTransaction
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9;- Specified by:
getPurchaseTransactionin interfaceUserEventOrBuilder- Returns:
- The purchaseTransaction.
-
setPurchaseTransaction
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9; -
setPurchaseTransaction
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9; -
mergePurchaseTransaction
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9; -
clearPurchaseTransaction
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9; -
getPurchaseTransactionBuilder
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9; -
getPurchaseTransactionOrBuilder
A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
.google.cloud.retail.v2alpha.PurchaseTransaction purchase_transaction = 9;- Specified by:
getPurchaseTransactionOrBuilderin interfaceUserEventOrBuilder
-
getSearchQuery
The user's search query. See [SearchRequest.query][google.cloud.retail.v2alpha.SearchRequest.query] for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string search_query = 10;- Specified by:
getSearchQueryin interfaceUserEventOrBuilder- Returns:
- The searchQuery.
-
getSearchQueryBytes
public com.google.protobuf.ByteString getSearchQueryBytes()The user's search query. See [SearchRequest.query][google.cloud.retail.v2alpha.SearchRequest.query] for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string search_query = 10;- Specified by:
getSearchQueryBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for searchQuery.
-
setSearchQuery
The user's search query. See [SearchRequest.query][google.cloud.retail.v2alpha.SearchRequest.query] for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string search_query = 10;- Parameters:
value- The searchQuery to set.- Returns:
- This builder for chaining.
-
clearSearchQuery
The user's search query. See [SearchRequest.query][google.cloud.retail.v2alpha.SearchRequest.query] for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string search_query = 10;- Returns:
- This builder for chaining.
-
setSearchQueryBytes
The user's search query. See [SearchRequest.query][google.cloud.retail.v2alpha.SearchRequest.query] for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string search_query = 10;- Parameters:
value- The bytes for searchQuery to set.- Returns:
- This builder for chaining.
-
getFilter
The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string filter = 16;- Specified by:
getFilterin interfaceUserEventOrBuilder- Returns:
- The filter.
-
getFilterBytes
public com.google.protobuf.ByteString getFilterBytes()The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string filter = 16;- Specified by:
getFilterBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for filter.
-
setFilter
The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string filter = 16;- Parameters:
value- The filter to set.- Returns:
- This builder for chaining.
-
clearFilter
The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string filter = 16;- Returns:
- This builder for chaining.
-
setFilterBytes
The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See [SearchRequest.filter][google.cloud.retail.v2alpha.SearchRequest.filter] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
string filter = 16;- Parameters:
value- The bytes for filter to set.- Returns:
- This builder for chaining.
-
getOrderBy
The order in which products are returned. See [SearchRequest.order_by][google.cloud.retail.v2alpha.SearchRequest.order_by] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string order_by = 17;- Specified by:
getOrderByin interfaceUserEventOrBuilder- Returns:
- The orderBy.
-
getOrderByBytes
public com.google.protobuf.ByteString getOrderByBytes()The order in which products are returned. See [SearchRequest.order_by][google.cloud.retail.v2alpha.SearchRequest.order_by] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string order_by = 17;- Specified by:
getOrderByBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for orderBy.
-
setOrderBy
The order in which products are returned. See [SearchRequest.order_by][google.cloud.retail.v2alpha.SearchRequest.order_by] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string order_by = 17;- Parameters:
value- The orderBy to set.- Returns:
- This builder for chaining.
-
clearOrderBy
The order in which products are returned. See [SearchRequest.order_by][google.cloud.retail.v2alpha.SearchRequest.order_by] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string order_by = 17;- Returns:
- This builder for chaining.
-
setOrderByBytes
The order in which products are returned. See [SearchRequest.order_by][google.cloud.retail.v2alpha.SearchRequest.order_by] for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
string order_by = 17;- Parameters:
value- The bytes for orderBy to set.- Returns:
- This builder for chaining.
-
getOffset
public int getOffset()An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See [SearchRequest.offset][google.cloud.retail.v2alpha.SearchRequest.offset] for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
int32 offset = 18;- Specified by:
getOffsetin interfaceUserEventOrBuilder- Returns:
- The offset.
-
setOffset
An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See [SearchRequest.offset][google.cloud.retail.v2alpha.SearchRequest.offset] for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
int32 offset = 18;- Parameters:
value- The offset to set.- Returns:
- This builder for chaining.
-
clearOffset
An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See [SearchRequest.offset][google.cloud.retail.v2alpha.SearchRequest.offset] for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
int32 offset = 18;- Returns:
- This builder for chaining.
-
getPageCategoriesList
public com.google.protobuf.ProtocolStringList getPageCategoriesList()The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Specified by:
getPageCategoriesListin interfaceUserEventOrBuilder- Returns:
- A list containing the pageCategories.
-
getPageCategoriesCount
public int getPageCategoriesCount()The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Specified by:
getPageCategoriesCountin interfaceUserEventOrBuilder- Returns:
- The count of pageCategories.
-
getPageCategories
The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Specified by:
getPageCategoriesin interfaceUserEventOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The pageCategories at the given index.
-
getPageCategoriesBytes
public com.google.protobuf.ByteString getPageCategoriesBytes(int index) The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Specified by:
getPageCategoriesBytesin interfaceUserEventOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the pageCategories at the given index.
-
setPageCategories
The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Parameters:
index- The index to set the value at.value- The pageCategories to set.- Returns:
- This builder for chaining.
-
addPageCategories
The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Parameters:
value- The pageCategories to add.- Returns:
- This builder for chaining.
-
addAllPageCategories
The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Parameters:
values- The pageCategories to add.- Returns:
- This builder for chaining.
-
clearPageCategories
The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Returns:
- This builder for chaining.
-
addPageCategoriesBytes
The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"]. Required for `category-page-view` events. At least one of [search_query][google.cloud.retail.v2alpha.UserEvent.search_query] or [page_categories][google.cloud.retail.v2alpha.UserEvent.page_categories] is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
repeated string page_categories = 11;- Parameters:
value- The bytes of the pageCategories to add.- Returns:
- This builder for chaining.
-
hasUserInfo
public boolean hasUserInfo()User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12;- Specified by:
hasUserInfoin interfaceUserEventOrBuilder- Returns:
- Whether the userInfo field is set.
-
getUserInfo
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12;- Specified by:
getUserInfoin interfaceUserEventOrBuilder- Returns:
- The userInfo.
-
setUserInfo
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12; -
setUserInfo
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12; -
mergeUserInfo
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12; -
clearUserInfo
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12; -
getUserInfoBuilder
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12; -
getUserInfoOrBuilder
User information.
.google.cloud.retail.v2alpha.UserInfo user_info = 12;- Specified by:
getUserInfoOrBuilderin interfaceUserEventOrBuilder
-
getUri
Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
string uri = 13;- Specified by:
getUriin interfaceUserEventOrBuilder- Returns:
- The uri.
-
getUriBytes
public com.google.protobuf.ByteString getUriBytes()Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
string uri = 13;- Specified by:
getUriBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for uri.
-
setUri
Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
string uri = 13;- Parameters:
value- The uri to set.- Returns:
- This builder for chaining.
-
clearUri
Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
string uri = 13;- Returns:
- This builder for chaining.
-
setUriBytes
Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
string uri = 13;- Parameters:
value- The bytes for uri to set.- Returns:
- This builder for chaining.
-
getReferrerUri
The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string referrer_uri = 14;- Specified by:
getReferrerUriin interfaceUserEventOrBuilder- Returns:
- The referrerUri.
-
getReferrerUriBytes
public com.google.protobuf.ByteString getReferrerUriBytes()The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string referrer_uri = 14;- Specified by:
getReferrerUriBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for referrerUri.
-
setReferrerUri
The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string referrer_uri = 14;- Parameters:
value- The referrerUri to set.- Returns:
- This builder for chaining.
-
clearReferrerUri
The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string referrer_uri = 14;- Returns:
- This builder for chaining.
-
setReferrerUriBytes
The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string referrer_uri = 14;- Parameters:
value- The bytes for referrerUri to set.- Returns:
- This builder for chaining.
-
getPageViewId
A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string page_view_id = 15;- Specified by:
getPageViewIdin interfaceUserEventOrBuilder- Returns:
- The pageViewId.
-
getPageViewIdBytes
public com.google.protobuf.ByteString getPageViewIdBytes()A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string page_view_id = 15;- Specified by:
getPageViewIdBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for pageViewId.
-
setPageViewId
A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string page_view_id = 15;- Parameters:
value- The pageViewId to set.- Returns:
- This builder for chaining.
-
clearPageViewId
A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string page_view_id = 15;- Returns:
- This builder for chaining.
-
setPageViewIdBytes
A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
string page_view_id = 15;- Parameters:
value- The bytes for pageViewId to set.- Returns:
- This builder for chaining.
-
getEntity
The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.
string entity = 23;- Specified by:
getEntityin interfaceUserEventOrBuilder- Returns:
- The entity.
-
getEntityBytes
public com.google.protobuf.ByteString getEntityBytes()The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.
string entity = 23;- Specified by:
getEntityBytesin interfaceUserEventOrBuilder- Returns:
- The bytes for entity.
-
setEntity
The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.
string entity = 23;- Parameters:
value- The entity to set.- Returns:
- This builder for chaining.
-
clearEntity
The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.
string entity = 23;- Returns:
- This builder for chaining.
-
setEntityBytes
The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.
string entity = 23;- Parameters:
value- The bytes for entity to set.- Returns:
- This builder for chaining.
-