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

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class CreateDocumentRequest.

Request message for DocumentService.CreateDocument method.

Generated from protobuf message google.cloud.discoveryengine.v1.CreateDocumentRequest

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

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

↳ document Google\Cloud\DiscoveryEngine\V1\Document

Required. The Document to create.

↳ document_id string

Required. The ID to use for the Document, which becomes the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

getParent

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

Returns
Type Description
string

setParent

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

Parameter
Name Description
var string
Returns
Type Description
$this

getDocument

Required. The Document to create.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Document|null

hasDocument

clearDocument

setDocument

Required. The Document to create.

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Document
Returns
Type Description
$this

getDocumentId

Required. The ID to use for the Document, which becomes the final component of the Document.name.

If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
Type Description
string

setDocumentId

Required. The ID to use for the Document, which becomes the final component of the Document.name.

If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Parameter
Name Description
var string
Returns
Type Description
$this

static::build

Parameters
Name Description
parent string

Required. The parent resource name, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}. Please see Google\Cloud\DiscoveryEngine\V1\DocumentServiceClient::branchName() for help formatting this field.

document Google\Cloud\DiscoveryEngine\V1\Document

Required. The Document to create.

documentId string

Required. The ID to use for the Document, which becomes the final component of the Document.name.

If the caller does not have permission to create the Document, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

This field must be unique among all Documents with the same parent. Otherwise, an ALREADY_EXISTS error is returned.

This field must conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\CreateDocumentRequest