Resource: Document
A document uploaded for automated review. Documents are immutable post-creation; to review a new version, create a new Document.
| JSON representation |
|---|
{ "name": string, "displayName": string, "createTime": string, "latestReviewSummary": { object ( |
| Fields | |
|---|---|
name |
Identifier. Resource name in format |
displayName |
Optional. User-provided display title or filename for the document. |
createTime |
Output only. Timestamp when the document was initially created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
latestReviewSummary |
Output only. Summary of the most recent review run for this document, if any. Populated by |
| The source of the document content. Exactly one source must be provided. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
driveSource |
Optional. Reference to a Google Drive file to import. |
| End of mutually exclusive fields. | |
DriveSource
Configuration for importing a document directly from Google Drive.
| JSON representation |
|---|
{ "fileId": string, "revisionId": string, "resourceKey": string, "resourceKeySet": boolean } |
| Fields | |
|---|---|
fileId |
Required. Immutable. The Google Drive file ID (e.g. "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"). For Google Drive shortcuts, callers must pass the resolved target file's |
revisionId |
Optional. Input only. Immutable. Importing a specific revision is not currently supported; non-empty values return INVALID_ARGUMENT. |
resourceKey |
Optional. Input only. Immutable. Resource key ( |
resourceKeySet |
Output only. Indicates whether a resource key was provided for this Drive source. |
ReviewSummary
Lightweight summary of a Review execution run for display in Document views.
| JSON representation |
|---|
{
"review": string,
"state": enum ( |
| Fields | |
|---|---|
review |
Output only. Resource name of the Review. |
state |
Output only. Current review lifecycle state. |
createTime |
Output only. Timestamp when this review attempt was initiated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
Methods |
|
|---|---|
|
Deletes a document and its stored content. |
|
Estimates what a review of a document would cost on the caller's Gemini API key. |
|
Retrieves document metadata. |
|
Lists documents for the authenticated caller with cursor pagination. |