Document Identifier.

| JSON representation |
|---|
| ``` { "revisionRef": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/DocumentId#RevisionRef`) }, // Union field `type` can be only one of the following: "gcsManagedDocId": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/DocumentId#GCSManagedDocumentId`) }, "unmanagedDocId": { object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/DocumentId#UnmanagedDocumentId`) } // End of list of possible types for union field `type`. } ``` |

| Fields ||
|---|---|
| `revisionRef` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/DocumentId#RevisionRef`)`` Points to a specific revision of the document if set. |
| Union field `type`. `type` can be only one of the following: ||
| `gcsManagedDocId` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/DocumentId#GCSManagedDocumentId`)`` A document ID within user-managed Cloud Storage. |
| `unmanagedDocId` | ``object (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/DocumentId#UnmanagedDocumentId`)`` A document ID within unmanaged dataset. |

## GCSManagedDocumentId

Identifies a document uniquely within the scope of a dataset in the user-managed Cloud Storage option.

| JSON representation |
|---|
| ``` { "gcsUri": string, "cwDocId": string } ``` |

| Fields ||
|---|---|
| `gcsUri` | `string` Required. The Cloud Storage URI where the actual document is stored. |
| `cwDocId (deprecated)` | `string` > [!WARNING] > This item is deprecated! ID of the document (indexed) managed by Content Warehouse. |

## UnmanagedDocumentId

Identifies a document uniquely within the scope of a dataset in unmanaged option.

| JSON representation |
|---|
| ``` { "docId": string } ``` |

| Fields ||
|---|---|
| `docId` | `string` Required. The ID of the document. |

## RevisionRef

The revision reference specifies which revision on the document to read.

| JSON representation |
|---|
| ``` { // Union field `source` can be only one of the following: "revisionCase": enum (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/RevisionCase`), "revisionId": string, "latestProcessorVersion": string // End of list of possible types for union field `source`. } ``` |

| Fields ||
|---|---|
| Union field `source`. Specifies which revision to read. `source` can be only one of the following: ||
| `revisionCase` | ``enum (`https://docs.cloud.google.com/document-ai/docs/reference/rest/Shared.Types/RevisionCase`)`` Reads the revision by the predefined case. |
| `revisionId` | `string` Reads the revision given by the id. |
| `latestProcessorVersion` | `string` Reads the revision generated by the processor version. The format takes the full resource name of processor version. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` |