Class EventDetail.Builder (0.28.0)

public static final class EventDetail.Builder extends GeneratedMessageV3.Builder<EventDetail.Builder> implements EventDetailOrBuilder

User event details shared by all recommendation types.

Protobuf type google.cloud.recommendationengine.v1beta1.EventDetail

Static Methods

getDescriptor()

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

Methods

addAllExperimentIds(Iterable<String> values)

public EventDetail.Builder addAllExperimentIds(Iterable<String> values)

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<String>

The experimentIds to add.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

addExperimentIds(String value)

public EventDetail.Builder addExperimentIds(String value)

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The experimentIds to add.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

addExperimentIdsBytes(ByteString value)

public EventDetail.Builder addExperimentIdsBytes(ByteString value)

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes of the experimentIds to add.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public EventDetail build()
Returns
TypeDescription
EventDetail

buildPartial()

public EventDetail buildPartial()
Returns
TypeDescription
EventDetail

clear()

public EventDetail.Builder clear()
Returns
TypeDescription
EventDetail.Builder
Overrides

clearEventAttributes()

public EventDetail.Builder clearEventAttributes()

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventDetail.Builder

clearExperimentIds()

public EventDetail.Builder clearExperimentIds()

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public EventDetail.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
EventDetail.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public EventDetail.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
EventDetail.Builder
Overrides

clearPageViewId()

public EventDetail.Builder clearPageViewId()

Optional. 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. This pageViewId will be automatically generated if using the JavaScript pixel.

string page_view_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

clearRecommendationToken()

public EventDetail.Builder clearRecommendationToken()

Optional. Recommendation token included in the recommendation prediction response.

This field enables accurate attribution of recommendation model performance.

This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the recommendation results, pass the PredictResponse.recommendationToken property as a url parameter to product K's page. When recording events on product K's page, log the PredictResponse.recommendation_token to this field.

Optional, but highly encouraged for user events that are the result of a recommendation prediction query.

string recommendation_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

clearReferrerUri()

public EventDetail.Builder clearReferrerUri()

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

string referrer_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

clearUri()

public EventDetail.Builder clearUri()

Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

clone()

public EventDetail.Builder clone()
Returns
TypeDescription
EventDetail.Builder
Overrides

getDefaultInstanceForType()

public EventDetail getDefaultInstanceForType()
Returns
TypeDescription
EventDetail

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEventAttributes()

public FeatureMap getEventAttributes()

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FeatureMap

The eventAttributes.

getEventAttributesBuilder()

public FeatureMap.Builder getEventAttributesBuilder()

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FeatureMap.Builder

getEventAttributesOrBuilder()

public FeatureMapOrBuilder getEventAttributesOrBuilder()

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
FeatureMapOrBuilder

getExperimentIds(int index)

public String getExperimentIds(int index)

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The experimentIds at the given index.

getExperimentIdsBytes(int index)

public ByteString getExperimentIdsBytes(int index)

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the experimentIds at the given index.

getExperimentIdsCount()

public int getExperimentIdsCount()

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of experimentIds.

getExperimentIdsList()

public ProtocolStringList getExperimentIdsList()

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ProtocolStringList

A list containing the experimentIds.

getPageViewId()

public String getPageViewId()

Optional. 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. This pageViewId will be automatically generated if using the JavaScript pixel.

string page_view_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The pageViewId.

getPageViewIdBytes()

public ByteString getPageViewIdBytes()

Optional. 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. This pageViewId will be automatically generated if using the JavaScript pixel.

string page_view_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for pageViewId.

getRecommendationToken()

public String getRecommendationToken()

Optional. Recommendation token included in the recommendation prediction response.

This field enables accurate attribution of recommendation model performance.

This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the recommendation results, pass the PredictResponse.recommendationToken property as a url parameter to product K's page. When recording events on product K's page, log the PredictResponse.recommendation_token to this field.

Optional, but highly encouraged for user events that are the result of a recommendation prediction query.

string recommendation_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The recommendationToken.

getRecommendationTokenBytes()

public ByteString getRecommendationTokenBytes()

Optional. Recommendation token included in the recommendation prediction response.

This field enables accurate attribution of recommendation model performance.

This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the recommendation results, pass the PredictResponse.recommendationToken property as a url parameter to product K's page. When recording events on product K's page, log the PredictResponse.recommendation_token to this field.

Optional, but highly encouraged for user events that are the result of a recommendation prediction query.

string recommendation_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for recommendationToken.

getReferrerUri()

public String getReferrerUri()

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

string referrer_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The referrerUri.

getReferrerUriBytes()

public ByteString getReferrerUriBytes()

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

string referrer_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for referrerUri.

getUri()

public String getUri()

Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for uri.

hasEventAttributes()

public boolean hasEventAttributes()

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the eventAttributes field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeEventAttributes(FeatureMap value)

public EventDetail.Builder mergeEventAttributes(FeatureMap value)

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFeatureMap
Returns
TypeDescription
EventDetail.Builder

mergeFrom(EventDetail other)

public EventDetail.Builder mergeFrom(EventDetail other)
Parameter
NameDescription
otherEventDetail
Returns
TypeDescription
EventDetail.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public EventDetail.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EventDetail.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EventDetail.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EventDetail.Builder
Overrides

setEventAttributes(FeatureMap value)

public EventDetail.Builder setEventAttributes(FeatureMap value)

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueFeatureMap
Returns
TypeDescription
EventDetail.Builder

setEventAttributes(FeatureMap.Builder builderForValue)

public EventDetail.Builder setEventAttributes(FeatureMap.Builder builderForValue)

Optional. Extra user event features to include in the recommendation model.

For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc.

.google.cloud.recommendationengine.v1beta1.FeatureMap event_attributes = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueFeatureMap.Builder
Returns
TypeDescription
EventDetail.Builder

setExperimentIds(int index, String value)

public EventDetail.Builder setExperimentIds(int index, String value)

Optional. 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 Recommendation Engine system, using different recommendation models).

repeated string experiment_ids = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The experimentIds to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setPageViewId(String value)

public EventDetail.Builder setPageViewId(String value)

Optional. 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. This pageViewId will be automatically generated if using the JavaScript pixel.

string page_view_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The pageViewId to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setPageViewIdBytes(ByteString value)

public EventDetail.Builder setPageViewIdBytes(ByteString value)

Optional. 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. This pageViewId will be automatically generated if using the JavaScript pixel.

string page_view_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for pageViewId to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setRecommendationToken(String value)

public EventDetail.Builder setRecommendationToken(String value)

Optional. Recommendation token included in the recommendation prediction response.

This field enables accurate attribution of recommendation model performance.

This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the recommendation results, pass the PredictResponse.recommendationToken property as a url parameter to product K's page. When recording events on product K's page, log the PredictResponse.recommendation_token to this field.

Optional, but highly encouraged for user events that are the result of a recommendation prediction query.

string recommendation_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The recommendationToken to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setRecommendationTokenBytes(ByteString value)

public EventDetail.Builder setRecommendationTokenBytes(ByteString value)

Optional. Recommendation token included in the recommendation prediction response.

This field enables accurate attribution of recommendation model performance.

This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the recommendation results, pass the PredictResponse.recommendationToken property as a url parameter to product K's page. When recording events on product K's page, log the PredictResponse.recommendation_token to this field.

Optional, but highly encouraged for user events that are the result of a recommendation prediction query.

string recommendation_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for recommendationToken to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setReferrerUri(String value)

public EventDetail.Builder setReferrerUri(String value)

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

string referrer_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The referrerUri to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setReferrerUriBytes(ByteString value)

public EventDetail.Builder setReferrerUriBytes(ByteString value)

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

string referrer_uri = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for referrerUri to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

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

public EventDetail.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EventDetail.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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

setUri(String value)

public EventDetail.Builder setUri(String value)

Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.

setUriBytes(ByteString value)

public EventDetail.Builder setUriBytes(ByteString value)

Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.

string uri = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
EventDetail.Builder

This builder for chaining.