-
@Serializable() public final class MessageOne transcript line / message. Mirrors the Rust
Messageshape.For outbound sends the SDK fires
MessageAddedwith a provisionalMessage(id = "", localId = <uuid>, status = SENDING, ...)before the wire round-trip. The server-issuedidlands on the follow-upMessageUpdated. The stable lookup key during the sending phase islocalId; once delivered, bothidandlocalIdare populated.
-
-
Field Summary
Fields Modifier and Type Field Description private final MessageRoleroleprivate final Stringidprivate final StringlocalIdprivate final Stringtextprivate final Stringhtmlprivate final Stringtimestampprivate final StringuserIdprivate final StringuserNameprivate final Stringactionprivate final List<Attachment>attachmentsprivate final List<MessageButton>buttonsprivate final List<MessageCard>galleryprivate final StringerrorTextprivate final MessageStatusstatusprivate final MessageStatestateprivate final MessageMetadatametadata
-
Constructor Summary
Constructors Constructor Description Message(MessageRole role, String id, String localId, String text, String html, String timestamp, String userId, String userName, String action, List<Attachment> attachments, List<MessageButton> buttons, List<MessageCard> gallery, String errorText, MessageStatus status, MessageState state, MessageMetadata metadata)
-
Method Summary
Modifier and Type Method Description final MessageRolegetRole()final StringgetId()final StringgetLocalId()SDK-issued temporary id for outbound messages awaiting server confirmation. final StringgetText()final StringgetHtml()final StringgetTimestamp()final StringgetUserId()final StringgetUserName()final StringgetAction()Lifecycle action for a role == SYSTEMrow:"queued"|"joined"|"ended".final List<Attachment>getAttachments()final List<MessageButton>getButtons()Interactive prompt options on a flow-authored role == SYSTEMrow.final List<MessageCard>getGallery()Gallery-card carousel on a flow-authored role == SYSTEMrow — the card-shaped sibling of buttons.final StringgetErrorText()final MessageStatusgetStatus()final MessageStategetState()final MessageMetadatagetMetadata()-
-
Constructor Detail
-
Message
Message(MessageRole role, String id, String localId, String text, String html, String timestamp, String userId, String userName, String action, List<Attachment> attachments, List<MessageButton> buttons, List<MessageCard> gallery, String errorText, MessageStatus status, MessageState state, MessageMetadata metadata)
-
-
Method Detail
-
getRole
final MessageRole getRole()
-
getLocalId
final String getLocalId()
SDK-issued temporary id for outbound messages awaiting server confirmation. Set on the provisional
MessageAddedpayload so the consumer can locate the row whenMessageUpdatedarrives.nullfor inbound messages or any message originating on the server.
-
getTimestamp
final String getTimestamp()
-
getUserName
final String getUserName()
-
getAction
final String getAction()
Lifecycle action for a
role == SYSTEMrow:"queued"|"joined"|"ended". Set by connect on lifecycle system messages; absent on ordinary messages and on flow-bot system messages (which keep bubble rendering — the divider discriminator is action-presence, NOT role). Wire key:action. Connect owns the vocabulary; a distinct"left"was considered and dropped there.
-
getAttachments
final List<Attachment> getAttachments()
-
getButtons
final List<MessageButton> getButtons()
Interactive prompt options on a flow-authored
role == SYSTEMrow. Empty on every ordinary message — a non-empty list is what makes this message a prompt. Note a prompt carries NO action, so it renders as a bubble, not a lifecycle divider.
-
getGallery
final List<MessageCard> getGallery()
Gallery-card carousel on a flow-authored
role == SYSTEMrow — the card-shaped sibling of buttons. Empty on ordinary messages.
-
getErrorText
final String getErrorText()
-
getStatus
final MessageStatus getStatus()
-
getState
final MessageState getState()
-
getMetadata
final MessageMetadata getMetadata()
-
-
-
-