Google Cloud Discovery Engine V1 Client - Class CreateDocumentRequest (1.10.1) Stay organized with collections Save and categorize content based on your preferences.
Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class CreateDocumentRequest.
Request message forDocumentService.CreateDocumentmethod.
Generated from protobuf messagegoogle.cloud.discoveryengine.v1.CreateDocumentRequest
Namespace
Google \ Cloud \ DiscoveryEngine \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data | arrayOptional. Data for populating the Message object. |
↳ parent | stringRequired. The parent resource name, such as |
↳ document | DocumentRequired. TheDocument to create. |
↳ document_id | stringRequired. The ID to use for theDocument, which becomes the final component of theDocument.name. If the caller does not have permission to create theDocument, regardless of whether or not it exists, a |
getParent
Required. The parent resource name, such asprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.
| Returns | |
|---|---|
| Type | Description |
string | |
setParent
Required. The parent resource name, such asprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.
| Parameter | |
|---|---|
| Name | Description |
var | string |
| Returns | |
|---|---|
| Type | Description |
$this | |
getDocument
Required. TheDocument tocreate.
| Returns | |
|---|---|
| Type | Description |
Document|null | |
hasDocument
clearDocument
setDocument
Required. TheDocument tocreate.
| Parameter | |
|---|---|
| Name | Description |
var | Document |
| Returns | |
|---|---|
| Type | Description |
$this | |
getDocumentId
Required. The ID to use for theDocument, which becomes thefinal component of theDocument.name.
If the caller does not have permission to create theDocument, regardless of whetheror not it exists, aPERMISSION_DENIED error is returned.This field must be unique among allDocuments with the sameparent.Otherwise, anALREADY_EXISTS error is returned.This field must conform toRFC-1034standard with a length limit of 128 characters. Otherwise, anINVALID_ARGUMENT error is returned.
| Returns | |
|---|---|
| Type | Description |
string | |
setDocumentId
Required. The ID to use for theDocument, which becomes thefinal component of theDocument.name.
If the caller does not have permission to create theDocument, regardless of whetheror not it exists, aPERMISSION_DENIED error is returned.This field must be unique among allDocuments with the sameparent.Otherwise, anALREADY_EXISTS error is returned.This field must conform toRFC-1034standard with a length limit of 128 characters. Otherwise, anINVALID_ARGUMENT error is returned.
| Parameter | |
|---|---|
| Name | Description |
var | string |
| Returns | |
|---|---|
| Type | Description |
$this | |
static::build
| Parameters | |
|---|---|
| Name | Description |
parent | stringRequired. The parent resource name, such as |
document | DocumentRequired. TheDocument tocreate. |
documentId | stringRequired. The ID to use for theDocument, which becomes thefinal component of theDocument.name. If the caller does not have permission to create theDocument, regardless of whetheror not it exists, a This field must be unique among allDocuments with the sameparent.Otherwise, an This field must conform toRFC-1034standard with a length limit of 128 characters. Otherwise, an |
| Returns | |
|---|---|
| Type | Description |
CreateDocumentRequest | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-24 UTC.