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.
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 INVALID_ARGUMENT
error is thrown.
↳ json_data
string
The JSON string representation of the document. It should conform to the registered Schema.schema
or an INVALID_ARGUMENT
error is thrown.
↳ name
string
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.
↳ 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 CONTENT_REQUIRED
data store.
↳ 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.
hasStructData
setStructData
The structured JSON data for the document. It should conform to the
registered Schema.schema
or an INVALID_ARGUMENT
error is thrown.
$this
getJsonData
The JSON string representation of the document. It should conform to the
registered Schema.schema
or an INVALID_ARGUMENT
error is thrown.
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.
var
string
$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.
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.
var
string
$this
getId
Immutable. The identifier of the document.
Id should conform to RFC-1034 standard with a length limit of 63 characters.
string
setId
Immutable. The identifier of the document.
Id should conform to RFC-1034 standard with a length limit of 63 characters.
var
string
$this
getSchemaId
The identifier of the schema located in the same data store.
string
setSchemaId
The identifier of the schema located in the same data store.
var
string
$this
getContent
The unstructured data linked to this document. Content must be set if this
document is under a CONTENT_REQUIRED
data store.
hasContent
clearContent
setContent
The unstructured data linked to this document. Content must be set if this
document is under a CONTENT_REQUIRED
data store.
$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.
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.
var
string
$this
getDerivedStructData
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
hasDerivedStructData
clearDerivedStructData
setDerivedStructData
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
$this
getData
string