public final class UserEvent extends GeneratedMessageV3 implements UserEventOrBuilder
UserEvent captures all metadata information recommendation engine needs to
know about how end users interact with customers' website.
Protobuf type google.cloud.recommendationengine.v1beta1.UserEvent
Static Fields
EVENT_DETAIL_FIELD_NUMBER
public static final int EVENT_DETAIL_FIELD_NUMBER
Field Value
EVENT_SOURCE_FIELD_NUMBER
public static final int EVENT_SOURCE_FIELD_NUMBER
Field Value
EVENT_TIME_FIELD_NUMBER
public static final int EVENT_TIME_FIELD_NUMBER
Field Value
EVENT_TYPE_FIELD_NUMBER
public static final int EVENT_TYPE_FIELD_NUMBER
Field Value
PRODUCT_EVENT_DETAIL_FIELD_NUMBER
public static final int PRODUCT_EVENT_DETAIL_FIELD_NUMBER
Field Value
USER_INFO_FIELD_NUMBER
public static final int USER_INFO_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static UserEvent getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static UserEvent.Builder newBuilder()
Returns
newBuilder(UserEvent prototype)
public static UserEvent.Builder newBuilder(UserEvent prototype)
Parameter
Returns
public static UserEvent parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static UserEvent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static UserEvent parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static UserEvent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static UserEvent parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static UserEvent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static UserEvent parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static UserEvent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static UserEvent parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static UserEvent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static UserEvent parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static UserEvent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<UserEvent> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public UserEvent getDefaultInstanceForType()
Returns
getEventDetail()
public EventDetail getEventDetail()
Optional. User event detailed information common across different
recommendation types.
.google.cloud.recommendationengine.v1beta1.EventDetail event_detail = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
getEventDetailOrBuilder()
public EventDetailOrBuilder getEventDetailOrBuilder()
Optional. User event detailed information common across different
recommendation types.
.google.cloud.recommendationengine.v1beta1.EventDetail event_detail = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
getEventSource()
public UserEvent.EventSource getEventSource()
Optional. This field should not be set when using JavaScript pixel
or the Recommendations AI Tag. Defaults to EVENT_SOURCE_UNSPECIFIED
.
.google.cloud.recommendationengine.v1beta1.UserEvent.EventSource event_source = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns
getEventSourceValue()
public int getEventSourceValue()
Optional. This field should not be set when using JavaScript pixel
or the Recommendations AI Tag. Defaults to EVENT_SOURCE_UNSPECIFIED
.
.google.cloud.recommendationengine.v1beta1.UserEvent.EventSource event_source = 6 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type | Description |
int | The enum numeric value on the wire for eventSource.
|
getEventTime()
public Timestamp getEventTime()
Optional. Only required for ImportUserEvents method. Timestamp of user
event created.
.google.protobuf.Timestamp event_time = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
getEventTimeOrBuilder()
public TimestampOrBuilder getEventTimeOrBuilder()
Optional. Only required for ImportUserEvents method. Timestamp of user
event created.
.google.protobuf.Timestamp event_time = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
getEventType()
public String getEventType()
Required. User event type. Allowed values are:
add-to-cart
Products being added to cart.
add-to-list
Items being added to a list (shopping list, favorites
etc).
category-page-view
Special pages such as sale or promotion pages
viewed.
checkout-start
User starting a checkout process.
detail-page-view
Products detail page viewed.
home-page-view
Homepage viewed.
page-visit
Generic page visits not included in the event types above.
purchase-complete
User finishing a purchase.
refund
Purchased items being refunded or returned.
remove-from-cart
Products being removed from cart.
remove-from-list
Items being removed from a list.
search
Product search.
shopping-cart-page-view
User viewing a shopping cart.
impression
List of items displayed. Used by Google Tag Manager.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
Type | Description |
String | The eventType.
|
getEventTypeBytes()
public ByteString getEventTypeBytes()
Required. User event type. Allowed values are:
add-to-cart
Products being added to cart.
add-to-list
Items being added to a list (shopping list, favorites
etc).
category-page-view
Special pages such as sale or promotion pages
viewed.
checkout-start
User starting a checkout process.
detail-page-view
Products detail page viewed.
home-page-view
Homepage viewed.
page-visit
Generic page visits not included in the event types above.
purchase-complete
User finishing a purchase.
refund
Purchased items being refunded or returned.
remove-from-cart
Products being removed from cart.
remove-from-list
Items being removed from a list.
search
Product search.
shopping-cart-page-view
User viewing a shopping cart.
impression
List of items displayed. Used by Google Tag Manager.
string event_type = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
getParserForType()
public Parser<UserEvent> getParserForType()
Returns
Overrides
getProductEventDetail()
public ProductEventDetail getProductEventDetail()
Optional. Retail product specific user event metadata.
This field is required for the following event types:
add-to-cart
add-to-list
category-page-view
checkout-start
detail-page-view
purchase-complete
refund
remove-from-cart
remove-from-list
search
This field is optional for the following event types:
page-visit
shopping-cart-page-view
- note that 'product_event_detail' should be
set for this unless the shopping cart is empty.
This field is not allowed for the following event types:
home-page-view
.google.cloud.recommendationengine.v1beta1.ProductEventDetail product_event_detail = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
getProductEventDetailOrBuilder()
public ProductEventDetailOrBuilder getProductEventDetailOrBuilder()
Optional. Retail product specific user event metadata.
This field is required for the following event types:
add-to-cart
add-to-list
category-page-view
checkout-start
detail-page-view
purchase-complete
refund
remove-from-cart
remove-from-list
search
This field is optional for the following event types:
page-visit
shopping-cart-page-view
- note that 'product_event_detail' should be
set for this unless the shopping cart is empty.
This field is not allowed for the following event types:
home-page-view
.google.cloud.recommendationengine.v1beta1.ProductEventDetail product_event_detail = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getUserInfo()
public UserInfo getUserInfo()
Required. User information.
.google.cloud.recommendationengine.v1beta1.UserInfo user_info = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
getUserInfoOrBuilder()
public UserInfoOrBuilder getUserInfoOrBuilder()
Required. User information.
.google.cloud.recommendationengine.v1beta1.UserInfo user_info = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
hasEventDetail()
public boolean hasEventDetail()
Optional. User event detailed information common across different
recommendation types.
.google.cloud.recommendationengine.v1beta1.EventDetail event_detail = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type | Description |
boolean | Whether the eventDetail field is set.
|
hasEventTime()
public boolean hasEventTime()
Optional. Only required for ImportUserEvents method. Timestamp of user
event created.
.google.protobuf.Timestamp event_time = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type | Description |
boolean | Whether the eventTime field is set.
|
hasProductEventDetail()
public boolean hasProductEventDetail()
Optional. Retail product specific user event metadata.
This field is required for the following event types:
add-to-cart
add-to-list
category-page-view
checkout-start
detail-page-view
purchase-complete
refund
remove-from-cart
remove-from-list
search
This field is optional for the following event types:
page-visit
shopping-cart-page-view
- note that 'product_event_detail' should be
set for this unless the shopping cart is empty.
This field is not allowed for the following event types:
home-page-view
.google.cloud.recommendationengine.v1beta1.ProductEventDetail product_event_detail = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type | Description |
boolean | Whether the productEventDetail field is set.
|
hasUserInfo()
public boolean hasUserInfo()
Required. User information.
.google.cloud.recommendationengine.v1beta1.UserInfo user_info = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type | Description |
boolean | Whether the userInfo field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public UserEvent.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected UserEvent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public UserEvent.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions