Class EventDetail.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EventDetail.Builder>
com.google.cloud.recommendationengine.v1beta1.EventDetail.Builder
All Implemented Interfaces:
EventDetailOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
EventDetail

public static final class EventDetail.Builder extends com.google.protobuf.GeneratedMessage.Builder<EventDetail.Builder> implements EventDetailOrBuilder
 User event details shared by all recommendation types.
 
Protobuf type google.cloud.recommendationengine.v1beta1.EventDetail
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<EventDetail.Builder>
    • clear

      public EventDetail.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<EventDetail.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<EventDetail.Builder>
    • getDefaultInstanceForType

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

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

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

      public EventDetail.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventDetail.Builder>
    • mergeFrom

      public EventDetail.Builder mergeFrom(EventDetail other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<EventDetail.Builder>
    • mergeFrom

      public EventDetail.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventDetail.Builder>
      Throws:
      IOException
    • 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.
    • setUri

      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];
      Parameters:
      value - The uri to set.
      Returns:
      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:
      This builder for chaining.
    • setUriBytes

      public EventDetail.Builder setUriBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • 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.
    • setReferrerUri

      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];
      Parameters:
      value - The referrerUri to set.
      Returns:
      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:
      This builder for chaining.
    • setReferrerUriBytes

      public EventDetail.Builder setReferrerUriBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for referrerUri to set.
      Returns:
      This builder for chaining.
    • 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.
    • setPageViewId

      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];
      Parameters:
      value - The pageViewId to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setPageViewIdBytes

      public EventDetail.Builder setPageViewIdBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for pageViewId to set.
      Returns:
      This builder for chaining.
    • 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.
    • setExperimentIds

      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:
      index - The index to set the value at.
      value - The experimentIds to set.
      Returns:
      This builder for chaining.
    • addExperimentIds

      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];
      Parameters:
      value - The experimentIds to add.
      Returns:
      This builder for chaining.
    • addAllExperimentIds

      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];
      Parameters:
      values - The experimentIds to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addExperimentIdsBytes

      public EventDetail.Builder addExperimentIdsBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes of the experimentIds to add.
      Returns:
      This builder for chaining.
    • 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.
    • setRecommendationToken

      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];
      Parameters:
      value - The recommendationToken to set.
      Returns:
      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:
      This builder for chaining.
    • setRecommendationTokenBytes

      public EventDetail.Builder setRecommendationTokenBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for recommendationToken to set.
      Returns:
      This builder for chaining.
    • 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.
    • setEventAttributes

      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];
    • setEventAttributes

      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];
    • mergeEventAttributes

      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];
    • 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];
    • 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];
    • 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