Class UserEvent (0.53.0)

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

Implements

UserEventOrBuilder

Static Fields

EVENT_DETAIL_FIELD_NUMBER

public static final int EVENT_DETAIL_FIELD_NUMBER
Field Value
Type Description
int

EVENT_SOURCE_FIELD_NUMBER

public static final int EVENT_SOURCE_FIELD_NUMBER
Field Value
Type Description
int

EVENT_TIME_FIELD_NUMBER

public static final int EVENT_TIME_FIELD_NUMBER
Field Value
Type Description
int

EVENT_TYPE_FIELD_NUMBER

public static final int EVENT_TYPE_FIELD_NUMBER
Field Value
Type Description
int

PRODUCT_EVENT_DETAIL_FIELD_NUMBER

public static final int PRODUCT_EVENT_DETAIL_FIELD_NUMBER
Field Value
Type Description
int

USER_INFO_FIELD_NUMBER

public static final int USER_INFO_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static UserEvent getDefaultInstance()
Returns
Type Description
UserEvent

getDescriptor()

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

newBuilder()

public static UserEvent.Builder newBuilder()
Returns
Type Description
UserEvent.Builder

newBuilder(UserEvent prototype)

public static UserEvent.Builder newBuilder(UserEvent prototype)
Parameter
Name Description
prototype UserEvent
Returns
Type Description
UserEvent.Builder

parseDelimitedFrom(InputStream input)

public static UserEvent parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
UserEvent
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UserEvent
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static UserEvent parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
UserEvent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UserEvent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static UserEvent parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
UserEvent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UserEvent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static UserEvent parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
UserEvent
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UserEvent
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static UserEvent parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
UserEvent
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UserEvent
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static UserEvent parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
UserEvent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UserEvent
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<UserEvent> parser()
Returns
Type Description
Parser<UserEvent>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public UserEvent getDefaultInstanceForType()
Returns
Type Description
UserEvent

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

The eventDetail.

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

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
Type Description
UserEvent.EventSource

The eventSource.

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

The eventTime.

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

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

The bytes for eventType.

getParserForType()

public Parser<UserEvent> getParserForType()
Returns
Type Description
Parser<UserEvent>
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
Type Description
ProductEventDetail

The productEventDetail.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUserInfo()

public UserInfo getUserInfo()

Required. User information.

.google.cloud.recommendationengine.v1beta1.UserInfo user_info = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UserInfo

The userInfo.

getUserInfoOrBuilder()

public UserInfoOrBuilder getUserInfoOrBuilder()

Required. User information.

.google.cloud.recommendationengine.v1beta1.UserInfo user_info = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
UserInfoOrBuilder

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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public UserEvent.Builder newBuilderForType()
Returns
Type Description
UserEvent.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected UserEvent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
UserEvent.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public UserEvent.Builder toBuilder()
Returns
Type Description
UserEvent.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException