Class Document.Builder (0.29.0)

public static final class Document.Builder extends GeneratedMessageV3.Builder<Document.Builder> implements DocumentOrBuilder

Document captures all raw metadata information of items to be recommended or searched.

Protobuf type google.cloud.discoveryengine.v1.Document

Implements

DocumentOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Builder
Overrides

build()

public Document build()
Returns
TypeDescription
Document

buildPartial()

public Document buildPartial()
Returns
TypeDescription
Document

clear()

public Document.Builder clear()
Returns
TypeDescription
Document.Builder
Overrides

clearContent()

public Document.Builder clearContent()

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Returns
TypeDescription
Document.Builder

clearData()

public Document.Builder clearData()
Returns
TypeDescription
Document.Builder

clearDerivedStructData()

public Document.Builder clearDerivedStructData()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Document.Builder

clearField(Descriptors.FieldDescriptor field)

public Document.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Document.Builder
Overrides

clearId()

public Document.Builder clearId()

Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

string id = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearJsonData()

public Document.Builder clearJsonData()

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

string json_data = 5;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearName()

public Document.Builder clearName()

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 name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Document.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Document.Builder
Overrides

clearParentDocumentId()

public Document.Builder clearParentDocumentId()

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 parent_document_id = 7;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearSchemaId()

public Document.Builder clearSchemaId()

The identifier of the schema located in the same data store.

string schema_id = 3;

Returns
TypeDescription
Document.Builder

This builder for chaining.

clearStructData()

public Document.Builder clearStructData()

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Returns
TypeDescription
Document.Builder

clone()

public Document.Builder clone()
Returns
TypeDescription
Document.Builder
Overrides

getContent()

public Document.Content getContent()

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Returns
TypeDescription
Document.Content

The content.

getContentBuilder()

public Document.Content.Builder getContentBuilder()

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Returns
TypeDescription
Document.Content.Builder

getContentOrBuilder()

public Document.ContentOrBuilder getContentOrBuilder()

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Returns
TypeDescription
Document.ContentOrBuilder

getDataCase()

public Document.DataCase getDataCase()
Returns
TypeDescription
Document.DataCase

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
TypeDescription
Document

getDerivedStructData()

public Struct getDerivedStructData()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Struct

The derivedStructData.

getDerivedStructDataBuilder()

public Struct.Builder getDerivedStructDataBuilder()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getDerivedStructDataOrBuilder()

public StructOrBuilder getDerivedStructDataOrBuilder()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StructOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getId()

public String getId()

Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

string id = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

string id = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for id.

getJsonData()

public String getJsonData()

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

string json_data = 5;

Returns
TypeDescription
String

The jsonData.

getJsonDataBytes()

public ByteString getJsonDataBytes()

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

string json_data = 5;

Returns
TypeDescription
ByteString

The bytes for jsonData.

getName()

public String 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 name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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 name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for name.

getParentDocumentId()

public String 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 parent_document_id = 7;

Returns
TypeDescription
String

The parentDocumentId.

getParentDocumentIdBytes()

public ByteString getParentDocumentIdBytes()

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 parent_document_id = 7;

Returns
TypeDescription
ByteString

The bytes for parentDocumentId.

getSchemaId()

public String getSchemaId()

The identifier of the schema located in the same data store.

string schema_id = 3;

Returns
TypeDescription
String

The schemaId.

getSchemaIdBytes()

public ByteString getSchemaIdBytes()

The identifier of the schema located in the same data store.

string schema_id = 3;

Returns
TypeDescription
ByteString

The bytes for schemaId.

getStructData()

public Struct getStructData()

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Returns
TypeDescription
Struct

The structData.

getStructDataBuilder()

public Struct.Builder getStructDataBuilder()

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Returns
TypeDescription
Builder

getStructDataOrBuilder()

public StructOrBuilder getStructDataOrBuilder()

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Returns
TypeDescription
StructOrBuilder

hasContent()

public boolean hasContent()

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Returns
TypeDescription
boolean

Whether the content field is set.

hasDerivedStructData()

public boolean hasDerivedStructData()

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the derivedStructData field is set.

hasJsonData()

public boolean hasJsonData()

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

string json_data = 5;

Returns
TypeDescription
boolean

Whether the jsonData field is set.

hasStructData()

public boolean hasStructData()

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Returns
TypeDescription
boolean

Whether the structData field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeContent(Document.Content value)

public Document.Builder mergeContent(Document.Content value)

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Parameter
NameDescription
valueDocument.Content
Returns
TypeDescription
Document.Builder

mergeDerivedStructData(Struct value)

public Document.Builder mergeDerivedStructData(Struct value)

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Document.Builder

mergeFrom(Document other)

public Document.Builder mergeFrom(Document other)
Parameter
NameDescription
otherDocument
Returns
TypeDescription
Document.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Document.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Document.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Document.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Document.Builder
Overrides

mergeStructData(Struct value)

public Document.Builder mergeStructData(Struct value)

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Document.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Builder
Overrides

setContent(Document.Content value)

public Document.Builder setContent(Document.Content value)

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Parameter
NameDescription
valueDocument.Content
Returns
TypeDescription
Document.Builder

setContent(Document.Content.Builder builderForValue)

public Document.Builder setContent(Document.Content.Builder builderForValue)

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

.google.cloud.discoveryengine.v1.Document.Content content = 10;

Parameter
NameDescription
builderForValueDocument.Content.Builder
Returns
TypeDescription
Document.Builder

setDerivedStructData(Struct value)

public Document.Builder setDerivedStructData(Struct value)

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Document.Builder

setDerivedStructData(Struct.Builder builderForValue)

public Document.Builder setDerivedStructData(Struct.Builder builderForValue)

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

.google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Document.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Document.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Document.Builder
Overrides

setId(String value)

public Document.Builder setId(String value)

Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

string id = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setIdBytes(ByteString value)

public Document.Builder setIdBytes(ByteString value)

Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

string id = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setJsonData(String value)

public Document.Builder setJsonData(String value)

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

string json_data = 5;

Parameter
NameDescription
valueString

The jsonData to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setJsonDataBytes(ByteString value)

public Document.Builder setJsonDataBytes(ByteString value)

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

string json_data = 5;

Parameter
NameDescription
valueByteString

The bytes for jsonData to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setName(String value)

public Document.Builder setName(String value)

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 name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Document.Builder setNameBytes(ByteString value)

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 name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setParentDocumentId(String value)

public Document.Builder setParentDocumentId(String value)

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 parent_document_id = 7;

Parameter
NameDescription
valueString

The parentDocumentId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setParentDocumentIdBytes(ByteString value)

public Document.Builder setParentDocumentIdBytes(ByteString value)

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 parent_document_id = 7;

Parameter
NameDescription
valueByteString

The bytes for parentDocumentId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Document.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Document.Builder
Overrides

setSchemaId(String value)

public Document.Builder setSchemaId(String value)

The identifier of the schema located in the same data store.

string schema_id = 3;

Parameter
NameDescription
valueString

The schemaId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setSchemaIdBytes(ByteString value)

public Document.Builder setSchemaIdBytes(ByteString value)

The identifier of the schema located in the same data store.

string schema_id = 3;

Parameter
NameDescription
valueByteString

The bytes for schemaId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setStructData(Struct value)

public Document.Builder setStructData(Struct value)

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Document.Builder

setStructData(Struct.Builder builderForValue)

public Document.Builder setStructData(Struct.Builder builderForValue)

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

.google.protobuf.Struct struct_data = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Document.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Document.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Document.Builder
Overrides