Package com.google.genai.types
Class ClaudeFile
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ClaudeFile
A file that can be referenced by ID from subsequent Claude model requests. The JSON
representation of this message matches the Claude Files API File object field-for-field, so that
code written against that API parses these responses unchanged. This data type is not supported
in Gemini API.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClaudeFile.Builderbuilder()Instantiates a builder for ClaudeFile.Output only.Output only.Output only.filename()Output only.static ClaudeFileDeserializes a JSON string to a ClaudeFile object.id()Output only.mimeType()Output only.Output only.abstract ClaudeFile.BuilderCreates a builder with the same values as this instance.type()Output only.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
ClaudeFile
public ClaudeFile()
-
-
Method Details
-
createdAt
Output only. The time at which the file was created. -
downloadable
Output only. Whether the contents of this file can be retrieved with `DownloadFile`. False for user-uploaded files, true for tool-generated ones. -
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`. -
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. -
id
Output only. The server-assigned identifier of the file, for example `file_abc123`. This is the ID to pass in subsequent model requests. -
mimeType
Output only. The media type of the file, taken from the `Content-Type` header of the file part on upload. -
sizeBytes
Output only. The size of the file in bytes. -
type
Output only. The object type. Always `file`. -
builder
Instantiates a builder for ClaudeFile. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a ClaudeFile object.
-