MessageHandler

interface MessageHandler

Handler used to interact with a ThreadMessage objects.

Inheritors

Functions

Link copied to clipboard

Creates a new ThreadMessage object.

Link copied to clipboard
@Contract(pure = true)
open fun files(msg: ThreadMessage): MessageFileHandler

Returns a handler for interacting with the files in the given message.

@Contract(pure = true)
abstract fun files(messageId: String): MessageFileHandler

Returns a handler for interacting with the files in the message with the given id.

Link copied to clipboard
@Contract(pure = true)
open fun list(): ListThreadMessagesResponse

Lists the 20 most recent messages in the thread.

@Contract(pure = true)
abstract fun list(request: ListThreadMessagesRequest?): ListThreadMessagesResponse

Lists messages in the thread.

Link copied to clipboard

Modifies the given message to have the given updated values.

abstract fun modify(messageId: String, request: ModifyThreadMessageRequest): ThreadMessage

Modifies the message with the given id to have the given updated values.

Link copied to clipboard
@Contract(pure = true)
open fun retrieve(msg: ThreadMessage): ThreadMessage

Retrieves the updated message object from the given message.

@Contract(pure = true)
abstract fun retrieve(id: String): ThreadMessage

Retrieves the message with the given id.

Properties

Link copied to clipboard
abstract val threadId: String

The id of the Thread that this handler is for.