Package com.tnsai.channels.model
Record Class MessageMeta
java.lang.Object
java.lang.Record
com.tnsai.channels.model.MessageMeta
- Record Components:
replyToMessageId- message this is replying to (null if not a reply)threadId- thread identifier (null if not threaded)platformMessageId- the native message id from the source platformextra- arbitrary key-value pairs for platform-specific data
public record MessageMeta(String replyToMessageId, String threadId, String platformMessageId, Map<String,String> extra)
extends Record
Optional platform-specific metadata carried alongside a
UnifiedMessage.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.extra()Returns the value of theextrarecord component.final inthashCode()Returns a hash code value for this object.static MessageMetaReturns the value of theplatformMessageIdrecord component.static MessageMetaReturns the value of thereplyToMessageIdrecord component.threadId()Returns the value of thethreadIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageMeta
public MessageMeta(String replyToMessageId, String threadId, String platformMessageId, Map<String, String> extra) Creates an instance of aMessageMetarecord class.- Parameters:
replyToMessageId- the value for thereplyToMessageIdrecord componentthreadId- the value for thethreadIdrecord componentplatformMessageId- the value for theplatformMessageIdrecord componentextra- the value for theextrarecord component
-
-
Method Details
-
of
-
reply
-
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
replyToMessageId
Returns the value of thereplyToMessageIdrecord component.- Returns:
- the value of the
replyToMessageIdrecord component
-
threadId
Returns the value of thethreadIdrecord component.- Returns:
- the value of the
threadIdrecord component
-
platformMessageId
Returns the value of theplatformMessageIdrecord component.- Returns:
- the value of the
platformMessageIdrecord component
-
extra
Returns the value of theextrarecord component.- Returns:
- the value of the
extrarecord component
-