Google Cloud Discovery Engine V1 Client - Class CreateDocumentRequest (1.10.1)

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ parentstring

Required. The parent resource name, such asprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.

↳ documentDocument

Required. TheDocument to create.

↳ document_idstring

Required. 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, 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-1034 standard with a length limit of 128 characters. Otherwise, anINVALID_ARGUMENT error is returned.

getParent

Required. The parent resource name, such asprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.

Returns
TypeDescription
string

setParent

Required. The parent resource name, such asprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDocument

Required. TheDocument tocreate.

Returns
TypeDescription
Document|null

hasDocument

clearDocument

setDocument

Required. TheDocument tocreate.

Parameter
NameDescription
varDocument
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
varstring
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
parentstring

Required. The parent resource name, such asprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}. Please seeDocumentServiceClient::branchName() for help formatting this field.

documentDocument

Required. TheDocument tocreate.

documentIdstring

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
TypeDescription
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.