Class Document
-
- All Implemented Interfaces:
public abstract class Document extends JsonSerializable
A Document is a collection of Chunks.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classDocument.BuilderBuilder for Document.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description Document()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>name()Immutable. abstract Optional<String>displayName()Optional. abstract Optional<DocumentState>state()Output only. abstract Optional<Long>sizeBytes()Output only. abstract Optional<String>mimeType()Output only. abstract Optional<Instant>createTime()Output only. abstract Optional<List<CustomMetadata>>customMetadata()Optional. abstract Optional<Instant>updateTime()Output only. static Document.Builderbuilder()Instantiates a builder for Document. abstract Document.BuildertoBuilder()Creates a builder with the same values as this instance. static DocumentfromJson(String jsonString)Deserializes a JSON string to a Document object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
name
abstract Optional<String> name()
Immutable. Identifier. The `Document` resource name. The ID (name excluding the "fileSearchStores/*/documents/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c`
-
displayName
abstract Optional<String> displayName()
Optional. The human-readable display name for the `Document`. The display name must be no more than 512 characters in length, including spaces. Example: "Semantic Retriever Documentation".
-
state
abstract Optional<DocumentState> state()
Output only. Current state of the `Document`.
-
sizeBytes
abstract Optional<Long> sizeBytes()
Output only. The size of raw bytes ingested into the Document.
-
createTime
abstract Optional<Instant> createTime()
Output only. The Timestamp of when the `Document` was created.
-
customMetadata
abstract Optional<List<CustomMetadata>> customMetadata()
Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`.
-
updateTime
abstract Optional<Instant> updateTime()
Output only. The Timestamp of when the `Document` was last updated.
-
builder
static Document.Builder builder()
Instantiates a builder for Document.
-
toBuilder
abstract Document.Builder toBuilder()
Creates a builder with the same values as this instance.
-
-
-
-