Class ViewedObjectIDs

java.lang.Object
com.algolia.model.insights.ViewedObjectIDs

public class ViewedObjectIDs extends Object
Use this event to track when users viewed items in the search results.
  • Constructor Details

    • ViewedObjectIDs

      public ViewedObjectIDs()
  • Method Details

    • setEventName

      public ViewedObjectIDs setEventName(String eventName)
    • getEventName

      @Nonnull public String getEventName()
      Can contain up to 64 ASCII characters. Consider naming events consistently—for example, by adopting Segment's [object-action](https://segment.com/academy/collecting-data/naming-conventions-for-clean-data/#the-object-action-framework) framework.
      Returns:
      eventName
    • setEventType

      public ViewedObjectIDs setEventType(ViewEvent eventType)
    • getEventType

      @Nonnull public ViewEvent getEventType()
      Get eventType
      Returns:
      eventType
    • setIndex

      public ViewedObjectIDs setIndex(String index)
    • getIndex

      @Nonnull public String getIndex()
      Name of the Algolia index.
      Returns:
      index
    • setObjectIDs

      public ViewedObjectIDs setObjectIDs(List<String> objectIDs)
    • addObjectIDs

      public ViewedObjectIDs addObjectIDs(String objectIDsItem)
    • getObjectIDs

      @Nonnull public List<String> getObjectIDs()
      List of object identifiers for items of an Algolia index.
      Returns:
      objectIDs
    • setUserToken

      public ViewedObjectIDs setUserToken(String userToken)
    • getUserToken

      @Nonnull public String getUserToken()
      Anonymous or pseudonymous user identifier. > **Note**: Never include personally identifiable information in user tokens.
      Returns:
      userToken
    • setTimestamp

      public ViewedObjectIDs setTimestamp(Long timestamp)
    • getTimestamp

      @Nullable public Long getTimestamp()
      Time of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
      Returns:
      timestamp
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object