Class UserEvent (0.30.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
TypeDescription
int

EVENT_SOURCE_FIELD_NUMBER

public static final int EVENT_SOURCE_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_TIME_FIELD_NUMBER

public static final int EVENT_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_TYPE_FIELD_NUMBER

public static final int EVENT_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_EVENT_DETAIL_FIELD_NUMBER

public static final int PRODUCT_EVENT_DETAIL_FIELD_NUMBER
Field Value
TypeDescription
int

USER_INFO_FIELD_NUMBER

public static final int USER_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static UserEvent getDefaultInstance()
Returns
TypeDescription
UserEvent

getDescriptor()

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

newBuilder()

public static UserEvent.Builder newBuilder()
Returns
TypeDescription
UserEvent.Builder

newBuilder(UserEvent prototype)

public static UserEvent.Builder newBuilder(UserEvent prototype)
Parameter
NameDescription
prototypeUserEvent
Returns
TypeDescription
UserEvent.Builder

parseDelimitedFrom(InputStream input)

public static UserEvent parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static UserEvent parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static UserEvent parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static UserEvent parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static UserEvent parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static UserEvent parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static UserEvent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UserEvent
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<UserEvent> parser()
Returns
TypeDescription
Parser<UserEvent>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public UserEvent getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for eventType.

getParserForType()

public Parser<UserEvent> getParserForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProductEventDetailOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUserInfo()

public UserInfo getUserInfo()

Required. User information.

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

Returns
TypeDescription
UserInfo

The userInfo.

getUserInfoOrBuilder()

public UserInfoOrBuilder getUserInfoOrBuilder()

Required. User information.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the userInfo field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public UserEvent.Builder newBuilderForType()
Returns
TypeDescription
UserEvent.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected UserEvent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
UserEvent.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public UserEvent.Builder toBuilder()
Returns
TypeDescription
UserEvent.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException