Interface ContentPart

All Known Implementing Classes:
AudioPart, ImagePart, TextPart, VideoPart

public sealed interface ContentPart permits TextPart, ImagePart, AudioPart, VideoPart
Represents a part of a message content (Text or Media). Using sealed interface for controlled hierarchy.

Supported content types:

  • TextPart - Plain text content
  • ImagePart - Image data (Base64 or URL)
  • AudioPart - Audio data for transcription or understanding
  • VideoPart - Video data for understanding (Gemini)
  • Method Summary

    Modifier and Type
    Method
    Description
     
  • Method Details