Class MessageReceipt

java.lang.Object
it.auties.whatsapp.model.message.model.MessageReceipt
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject

public final class MessageReceipt extends Object implements it.auties.protobuf.model.ProtobufMessage
A model that represents the receipt for a message
  • Field Details

    • deliveredTimestampSeconds

      private Long deliveredTimestampSeconds
    • readTimestampSeconds

      private Long readTimestampSeconds
    • playedTimestampSeconds

      private Long playedTimestampSeconds
    • deliveredJids

      private final Set<Jid> deliveredJids
    • readJids

      private final Set<Jid> readJids
  • Constructor Details

    • MessageReceipt

      public MessageReceipt()
    • MessageReceipt

      public MessageReceipt(Long deliveredTimestampSeconds, Long readTimestampSeconds, Long playedTimestampSeconds, Set<Jid> deliveredJids, Set<Jid> readJids)
  • Method Details

    • deliveredTimestampSeconds

      public OptionalLong deliveredTimestampSeconds()
    • deliveredTimestamp

      public Optional<ZonedDateTime> deliveredTimestamp()
      Returns the date when the message was delivered
      Returns:
      a non-null optional
    • readTimestampSeconds

      public OptionalLong readTimestampSeconds()
    • readTimestamp

      public Optional<ZonedDateTime> readTimestamp()
      Returns the date when the message was delivered
      Returns:
      a non-null optional
    • playedTimestampSeconds

      public OptionalLong playedTimestampSeconds()
    • playedTimestamp

      public Optional<ZonedDateTime> playedTimestamp()
      Returns the date when the message was played
      Returns:
      a non-null optional
    • deliveredJids

      public Set<Jid> deliveredJids()
    • readJids

      public Set<Jid> readJids()
    • readTimestampSeconds

      public MessageReceipt readTimestampSeconds(long readTimestampSeconds)
      Sets the read timestampSeconds
      Parameters:
      readTimestampSeconds - the timestampSeconds
      Returns:
      the same instance
    • playedTimestampSeconds

      public MessageReceipt playedTimestampSeconds(long playedTimestampSeconds)
      Sets the played timestampSeconds
      Parameters:
      playedTimestampSeconds - the timestampSeconds
      Returns:
      the same instance