Message

sealed interface Message

Represents a message sent within a conversation, containing structured content in one of several formats.

Inheritors

Types

Link copied to clipboard
@JsonClass(generateAdapter = true)
class ChoicesMessage(val id: String, val inReplyToMessageId: String? = null, @Json(name = "choices") val content: ChoicesFormat, val reply: Message? = null, var channelAddressIdentifier: String? = null, var routingAttributes: Map<String, Any>? = null, var language: String? = null, var context: List<EntryPayload.SessionContextPayload>? = null) : Message
Link copied to clipboard
@JsonClass(generateAdapter = true)
class ChoicesResponseMessage(val id: String, val inReplyToMessageId: String? = null, @Json(name = "choicesResponse") val content: ChoicesResponseFormat, val reply: Message? = null, var channelAddressIdentifier: String? = null, var routingAttributes: Map<String, Any>? = null, var language: String? = null, var context: List<EntryPayload.SessionContextPayload>? = null) : Message
Link copied to clipboard

Discriminator for the structural format of a message.

Link copied to clipboard
@JsonClass(generateAdapter = true)
class FormMessage(val id: String, val inReplyToMessageId: String? = null, @Json(name = "form") val content: FormFormat, val reply: Message? = null, var channelAddressIdentifier: String? = null, var routingAttributes: Map<String, Any>? = null, var language: String? = null, var context: List<EntryPayload.SessionContextPayload>? = null) : Message
Link copied to clipboard
@JsonClass(generateAdapter = true)
class FormResponseMessage(val id: String, val inReplyToMessageId: String? = null, @Json(name = "formResponse") val content: FormResponseFormat, val reply: Message? = null, var channelAddressIdentifier: String? = null, var routingAttributes: Map<String, Any>? = null, var language: String? = null, var context: List<EntryPayload.SessionContextPayload>? = null) : Message
Link copied to clipboard
@JsonClass(generateAdapter = true)
class StaticContentMessage(val id: String, val inReplyToMessageId: String? = null, @Json(name = "staticContent") val content: StaticContentFormat, val reply: Message? = null, var channelAddressIdentifier: String? = null, var routingAttributes: Map<String, Any>? = null, var language: String? = null, var context: List<EntryPayload.SessionContextPayload>? = null) : Message

Properties

Link copied to clipboard

The channel address identifier for routing purposes.

Link copied to clipboard
abstract val content: MessageFormat

The formatted content of this message.

Link copied to clipboard

Context entries attached to this message for pre-chat or hidden fields.

Link copied to clipboard
abstract val id: String

The unique identifier of this message.

Link copied to clipboard
abstract val inReplyToMessageId: String?

The identifier of the message this is replying to, or null if not a reply.

Link copied to clipboard

Whether this message initiates a new messaging session.

Link copied to clipboard
abstract var language: String?

The BCP 47 language tag for this message.

Link copied to clipboard

The structural type of this message, determining how content should be interpreted.

Link copied to clipboard
abstract val reply: Message?

The original message being replied to, if this is a reply.

Link copied to clipboard
abstract var routingAttributes: Map<String, Any>?

Key-value pairs used for skill-based routing decisions.