Class Blob.Builder

java.lang.Object
com.google.genai.types.Blob.Builder
Enclosing class:
Blob

public abstract static class Blob.Builder extends Object
Builder for Blob.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • data

      public abstract Blob.Builder data(byte[] data)
      Setter for data.

      data: Required. Raw bytes.

    • clearData

      @CanIgnoreReturnValue public Blob.Builder clearData()
      Clears the value of data field.
    • displayName

      public abstract Blob.Builder displayName(String displayName)
      Setter for displayName.

      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.

    • clearDisplayName

      @CanIgnoreReturnValue public Blob.Builder clearDisplayName()
      Clears the value of displayName field.
    • mimeType

      public abstract Blob.Builder mimeType(String mimeType)
      Setter for mimeType.

      mimeType: Required. The IANA standard MIME type of the source data.

    • clearMimeType

      @CanIgnoreReturnValue public Blob.Builder clearMimeType()
      Clears the value of mimeType field.
    • build

      public abstract Blob build()