Package com.google.genai.types
Class DocumentMetadata
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.DocumentMetadata
Metadata describes the input document content.
Set this in `Part.document_metadata` or `FunctionResponsePart.document_metadata` when `inline_data` or `file_data` contains a document to configure static document preprocessing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for DocumentMetadata. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentMetadata.Builderbuilder()Instantiates a builder for DocumentMetadata.abstract Optional<List<DocumentMetadataContentLayer>>Content layers to return.endPage()Optional.static DocumentMetadataDeserializes a JSON string to a DocumentMetadata object.Optional.abstract DocumentMetadata.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
DocumentMetadata
public DocumentMetadata()
-
-
Method Details
-
startPage
Optional. 1-indexed inclusive start page. -
endPage
Optional. 1-indexed inclusive end page. -
contentLayers
Content layers to return. If empty, defaults to [PAGE_IMAGE] when DocumentMetadata is set. When DocumentMetadata is not set, default document processing is used (for example, page images for PDFs). -
builder
Instantiates a builder for DocumentMetadata. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a DocumentMetadata object.
-