Interface MessageContent.DataMessageContent

All Superinterfaces:
MessageContent
All Known Subinterfaces:
MessageContent.ImageDataMessageContent, MessageContent.PdfDataMessageContent
All Known Implementing Classes:
MessageContent.ImageBytesMessageContent, MessageContent.PdfBytesMessageContent
Enclosing interface:
MessageContent

public static sealed interface MessageContent.DataMessageContent extends MessageContent permits MessageContent.ImageDataMessageContent, MessageContent.PdfDataMessageContent
Inline content already loaded as bytes.

Counterpart to MessageContent.LoadableMessageContent: where loadable content references its bytes by URI and is resolved by the runtime, DataMessageContent carries the bytes directly, typically after a ContentLoader or object-storage resolution has happened.

Application code is not expected to construct these directly; reference content by URI (e.g. object://bucket/key) and let the runtime load it. Concrete implementations are provided internally and produced by the testkit so tests can inspect what the model received.

  • Method Details

    • data

      byte[] data()
      The inline bytes.
    • mimeType

      Optional<String> mimeType()
      The media type of data(), if known, e.g. image/png.