Class ClaudeFile.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • createdAt

      public abstract ClaudeFile.Builder createdAt(Instant createdAt)
      Setter for createdAt.

      createdAt: Output only. The time at which the file was created.

    • clearCreatedAt

      @CanIgnoreReturnValue public ClaudeFile.Builder clearCreatedAt()
      Clears the value of createdAt field.
    • downloadable

      public abstract ClaudeFile.Builder downloadable(boolean downloadable)
      Setter for downloadable.

      downloadable: Output only. Whether the contents of this file can be retrieved with `DownloadFile`. False for user-uploaded files, true for tool-generated ones.

    • clearDownloadable

      @CanIgnoreReturnValue public ClaudeFile.Builder clearDownloadable()
      Clears the value of downloadable field.
    • expiresAt

      public abstract ClaudeFile.Builder expiresAt(Instant expiresAt)
      Setter for expiresAt.

      expiresAt: Output only. The time at which the file expires and is deleted, set from the `expires_in_seconds` upload form field. Unset for files that do not expire, which is serialised as `null`.

    • clearExpiresAt

      @CanIgnoreReturnValue public ClaudeFile.Builder clearExpiresAt()
      Clears the value of expiresAt field.
    • filename

      public abstract ClaudeFile.Builder filename(String filename)
      Setter for filename.

      filename: Output only. The original name of the uploaded file, taken from the `Content-Disposition` header on upload. Between 1 and 255 characters. Control characters and the characters `<>:"|?*\/` are not accepted.

    • clearFilename

      @CanIgnoreReturnValue public ClaudeFile.Builder clearFilename()
      Clears the value of filename field.
    • id

      public abstract ClaudeFile.Builder id(String id)
      Setter for id.

      id: Output only. The server-assigned identifier of the file, for example `file_abc123`. This is the ID to pass in subsequent model requests.

    • clearId

      @CanIgnoreReturnValue public ClaudeFile.Builder clearId()
      Clears the value of id field.
    • mimeType

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

      mimeType: Output only. The media type of the file, taken from the `Content-Type` header of the file part on upload.

    • clearMimeType

      @CanIgnoreReturnValue public ClaudeFile.Builder clearMimeType()
      Clears the value of mimeType field.
    • sizeBytes

      public abstract ClaudeFile.Builder sizeBytes(Integer sizeBytes)
      Setter for sizeBytes.

      sizeBytes: Output only. The size of the file in bytes.

    • clearSizeBytes

      @CanIgnoreReturnValue public ClaudeFile.Builder clearSizeBytes()
      Clears the value of sizeBytes field.
    • type

      public abstract ClaudeFile.Builder type(String type)
      Setter for type.

      type: Output only. The object type. Always `file`.

    • clearType

      @CanIgnoreReturnValue public ClaudeFile.Builder clearType()
      Clears the value of type field.
    • build

      public abstract ClaudeFile build()