Record Class Message

java.lang.Object
java.lang.Record
dev.postproxy.sdk.model.Message

public record Message(String id, String chatId, String externalId, MessageDirection direction, String body, MessageStatus status, String tag, String externalCommentId, String errorMessage, Map<String,Object> platformData, String externalPostedAt, String externalDeliveredAt, String externalReadAt, String externalEditedAt, String replyToExternalId, Map<String,Object> replyMarkup, String externalDeletedAt, List<Reaction> reactions, List<Attachment> attachments, boolean isUnsupported, String createdAt) extends Record
  • Constructor Details

    • Message

      public Message(String id, String chatId, String externalId, MessageDirection direction, String body, MessageStatus status, String tag, String externalCommentId, String errorMessage, Map<String,Object> platformData, String externalPostedAt, String externalDeliveredAt, String externalReadAt, String externalEditedAt, String replyToExternalId, Map<String,Object> replyMarkup, String externalDeletedAt, List<Reaction> reactions, List<Attachment> attachments, boolean isUnsupported, String createdAt)
      Creates an instance of a Message record class.
      Parameters:
      id - the value for the id record component
      chatId - the value for the chatId record component
      externalId - the value for the externalId record component
      direction - the value for the direction record component
      body - the value for the body record component
      status - the value for the status record component
      tag - the value for the tag record component
      externalCommentId - the value for the externalCommentId record component
      errorMessage - the value for the errorMessage record component
      platformData - the value for the platformData record component
      externalPostedAt - the value for the externalPostedAt record component
      externalDeliveredAt - the value for the externalDeliveredAt record component
      externalReadAt - the value for the externalReadAt record component
      externalEditedAt - the value for the externalEditedAt record component
      replyToExternalId - the value for the replyToExternalId record component
      replyMarkup - the value for the replyMarkup record component
      externalDeletedAt - the value for the externalDeletedAt record component
      reactions - the value for the reactions record component
      attachments - the value for the attachments record component
      isUnsupported - the value for the isUnsupported record component
      createdAt - the value for the createdAt record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • chatId

      public String chatId()
      Returns the value of the chatId record component.
      Returns:
      the value of the chatId record component
    • externalId

      public String externalId()
      Returns the value of the externalId record component.
      Returns:
      the value of the externalId record component
    • direction

      public MessageDirection direction()
      Returns the value of the direction record component.
      Returns:
      the value of the direction record component
    • body

      public String body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • status

      public MessageStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • tag

      public String tag()
      Returns the value of the tag record component.
      Returns:
      the value of the tag record component
    • externalCommentId

      public String externalCommentId()
      Returns the value of the externalCommentId record component.
      Returns:
      the value of the externalCommentId record component
    • errorMessage

      public String errorMessage()
      Returns the value of the errorMessage record component.
      Returns:
      the value of the errorMessage record component
    • platformData

      public Map<String,Object> platformData()
      Returns the value of the platformData record component.
      Returns:
      the value of the platformData record component
    • externalPostedAt

      public String externalPostedAt()
      Returns the value of the externalPostedAt record component.
      Returns:
      the value of the externalPostedAt record component
    • externalDeliveredAt

      public String externalDeliveredAt()
      Returns the value of the externalDeliveredAt record component.
      Returns:
      the value of the externalDeliveredAt record component
    • externalReadAt

      public String externalReadAt()
      Returns the value of the externalReadAt record component.
      Returns:
      the value of the externalReadAt record component
    • externalEditedAt

      public String externalEditedAt()
      Returns the value of the externalEditedAt record component.
      Returns:
      the value of the externalEditedAt record component
    • replyToExternalId

      public String replyToExternalId()
      Returns the value of the replyToExternalId record component.
      Returns:
      the value of the replyToExternalId record component
    • replyMarkup

      public Map<String,Object> replyMarkup()
      Returns the value of the replyMarkup record component.
      Returns:
      the value of the replyMarkup record component
    • externalDeletedAt

      public String externalDeletedAt()
      Returns the value of the externalDeletedAt record component.
      Returns:
      the value of the externalDeletedAt record component
    • reactions

      public List<Reaction> reactions()
      Returns the value of the reactions record component.
      Returns:
      the value of the reactions record component
    • attachments

      public List<Attachment> attachments()
      Returns the value of the attachments record component.
      Returns:
      the value of the attachments record component
    • isUnsupported

      public boolean isUnsupported()
      Returns the value of the isUnsupported record component.
      Returns:
      the value of the isUnsupported record component
    • createdAt

      public String createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component