Class Blob


public abstract class Blob extends JsonSerializable
Content blob.
  • Constructor Details

    • Blob

      public Blob()
  • Method Details

    • data

      public abstract Optional<byte[]> data()
      Required. Raw bytes.
    • displayName

      public abstract Optional<String> displayName()
      Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.
    • mimeType

      public abstract Optional<String> mimeType()
      Required. The IANA standard MIME type of the source data.
    • builder

      public static Blob.Builder builder()
      Instantiates a builder for Blob.
    • toBuilder

      public abstract Blob.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static Blob fromJson(String jsonString)
      Deserializes a JSON string to a Blob object.