Class EventDetail

  • All Implemented Interfaces:
    EventDetailOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class EventDetail
    extends com.google.protobuf.GeneratedMessageV3
    implements EventDetailOrBuilder
     User event details shared by all recommendation types.
     
    Protobuf type google.cloud.recommendationengine.v1beta1.EventDetail
    See Also:
    Serialized Form
    • Field Detail

      • REFERRER_URI_FIELD_NUMBER

        public static final int REFERRER_URI_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PAGE_VIEW_ID_FIELD_NUMBER

        public static final int PAGE_VIEW_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EXPERIMENT_IDS_FIELD_NUMBER

        public static final int EXPERIMENT_IDS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RECOMMENDATION_TOKEN_FIELD_NUMBER

        public static final int RECOMMENDATION_TOKEN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EVENT_ATTRIBUTES_FIELD_NUMBER

        public static final int EVENT_ATTRIBUTES_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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];
        Specified by:
        getUri in interface EventDetailOrBuilder
        Returns:
        The uri.
      • getUriBytes

        public com.google.protobuf.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];
        Specified by:
        getUriBytes in interface EventDetailOrBuilder
        Returns:
        The bytes for uri.
      • 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];
        Specified by:
        getReferrerUri in interface EventDetailOrBuilder
        Returns:
        The referrerUri.
      • getReferrerUriBytes

        public com.google.protobuf.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];
        Specified by:
        getReferrerUriBytes in interface EventDetailOrBuilder
        Returns:
        The bytes for referrerUri.
      • 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];
        Specified by:
        getPageViewId in interface EventDetailOrBuilder
        Returns:
        The pageViewId.
      • getPageViewIdBytes

        public com.google.protobuf.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];
        Specified by:
        getPageViewIdBytes in interface EventDetailOrBuilder
        Returns:
        The bytes for pageViewId.
      • getExperimentIdsList

        public com.google.protobuf.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];
        Specified by:
        getExperimentIdsList in interface EventDetailOrBuilder
        Returns:
        A list containing the experimentIds.
      • 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];
        Specified by:
        getExperimentIdsCount in interface EventDetailOrBuilder
        Returns:
        The count of experimentIds.
      • getExperimentIds

        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];
        Specified by:
        getExperimentIds in interface EventDetailOrBuilder
        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)
         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];
        Specified by:
        getExperimentIdsBytes in interface EventDetailOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the experimentIds at the given index.
      • 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];
        Specified by:
        getRecommendationToken in interface EventDetailOrBuilder
        Returns:
        The recommendationToken.
      • getRecommendationTokenBytes

        public com.google.protobuf.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];
        Specified by:
        getRecommendationTokenBytes in interface EventDetailOrBuilder
        Returns:
        The bytes for recommendationToken.
      • 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];
        Specified by:
        hasEventAttributes in interface EventDetailOrBuilder
        Returns:
        Whether the eventAttributes field is set.
      • 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];
        Specified by:
        getEventAttributes in interface EventDetailOrBuilder
        Returns:
        The eventAttributes.
      • 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];
        Specified by:
        getEventAttributesOrBuilder in interface EventDetailOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static EventDetail parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static EventDetail parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static EventDetail parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static EventDetail parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static EventDetail parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static EventDetail parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static EventDetail parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

        public EventDetail.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public EventDetail.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected EventDetail.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static EventDetail getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<EventDetail> parser()
      • getParserForType

        public com.google.protobuf.Parser<EventDetail> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public EventDetail getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder