Class AudioContent

java.lang.Object
org.apache.juneau.bean.mcp.v20260728.AudioContent
All Implemented Interfaces:
Content

@Marshalled(typeName="audio") public class AudioContent extends Object implements Content
MCP audio content block (base64 data).

Joins the general-purpose Content dictionary alongside TextContent/ImageContent/ EmbeddedResourceContent — usable anywhere a Content is accepted, not only in sampling contexts. Added specifically to give SamplingMessage.content/CreateMessageResult.content genuine text/image/audio/resource fidelity to the real MCP sampling schema; usable anywhere a Content is accepted, not only sampling contexts.

  • Constructor Details

  • Method Details

    • getData

      public String getData()
      Base64-encoded audio bytes.
      Returns:
      The data, or null if not set.
    • setData

      public AudioContent setData(String value)
      Sets the base64 payload.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • getMimeType

      public String getMimeType()
      Audio MIME type (for example audio/wav, audio/mpeg).
      Returns:
      The MIME type, or null if not set.
    • setMimeType

      Sets the MIME type.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).