Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class Document.
Document captures all raw metadata information of items to be recommended or searched.
Generated from protobuf message google.cloud.discoveryengine.v1beta.Document
Namespace
Google \ Cloud \ DiscoveryEngine \ V1betaMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ struct_data |
Google\Protobuf\Struct
The structured JSON data for the document. It should conform to the registered Schema.schema or an |
↳ json_data |
string
The JSON string representation of the document. It should conform to the registered Schema.schema or an |
↳ name |
string
Immutable. The full resource name of the document. Format: |
↳ id |
string
Immutable. The identifier of the document. Id should conform to RFC-1034 standard with a length limit of 63 characters. |
↳ schema_id |
string
The identifier of the schema located in the same data store. |
↳ content |
Google\Cloud\DiscoveryEngine\V1beta\Document\Content
The unstructured data linked to this document. Content must be set if this document is under a |
↳ parent_document_id |
string
The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to RFC-1034 standard with a length limit of 63 characters. |
↳ derived_struct_data |
Google\Protobuf\Struct
Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. |
getStructData
The structured JSON data for the document. It should conform to the
registered
Schema.schema or an
INVALID_ARGUMENT
error is thrown.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Struct|null |
hasStructData
setStructData
The structured JSON data for the document. It should conform to the
registered
Schema.schema or an
INVALID_ARGUMENT
error is thrown.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Struct
|
Returns | |
---|---|
Type | Description |
$this |
getJsonData
The JSON string representation of the document. It should conform to the
registered
Schema.schema or an
INVALID_ARGUMENT
error is thrown.
Returns | |
---|---|
Type | Description |
string |
hasJsonData
setJsonData
The JSON string representation of the document. It should conform to the
registered
Schema.schema or an
INVALID_ARGUMENT
error is thrown.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getName
Immutable. The full resource name of the document.
Format:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}
.
This field must be a UTF-8 encoded string with a length limit of 1024
characters.
Returns | |
---|---|
Type | Description |
string |
setName
Immutable. The full resource name of the document.
Format:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}
.
This field must be a UTF-8 encoded string with a length limit of 1024
characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getId
Immutable. The identifier of the document.
Id should conform to RFC-1034 standard with a length limit of 63 characters.
Returns | |
---|---|
Type | Description |
string |
setId
Immutable. The identifier of the document.
Id should conform to RFC-1034 standard with a length limit of 63 characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSchemaId
The identifier of the schema located in the same data store.
Returns | |
---|---|
Type | Description |
string |
setSchemaId
The identifier of the schema located in the same data store.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getContent
The unstructured data linked to this document. Content must be set if this
document is under a
CONTENT_REQUIRED
data store.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1beta\Document\Content|null |
hasContent
clearContent
setContent
The unstructured data linked to this document. Content must be set if this
document is under a
CONTENT_REQUIRED
data store.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1beta\Document\Content
|
Returns | |
---|---|
Type | Description |
$this |
getParentDocumentId
The identifier of the parent document. Currently supports at most two level document hierarchy.
Id should conform to RFC-1034 standard with a length limit of 63 characters.
Returns | |
---|---|
Type | Description |
string |
setParentDocumentId
The identifier of the parent document. Currently supports at most two level document hierarchy.
Id should conform to RFC-1034 standard with a length limit of 63 characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDerivedStructData
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Struct|null |
hasDerivedStructData
clearDerivedStructData
setDerivedStructData
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Struct
|
Returns | |
---|---|
Type | Description |
$this |
getData
Returns | |
---|---|
Type | Description |
string |