Class Document.Builder (0.3.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.v1beta.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

clearData()

public Document.Builder clearData()
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}/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()

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

string schema_id = 3 [(.google.api.field_behavior) = REQUIRED];

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

getDataCase()

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

getDefaultInstanceForType()

public Document getDefaultInstanceForType()
Returns
TypeDescription
Document

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}/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}/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()

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

string schema_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The schemaId.

getSchemaIdBytes()

public ByteString getSchemaIdBytes()

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

string schema_id = 3 [(.google.api.field_behavior) = REQUIRED];

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

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

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

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}/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}/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)

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

string schema_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The schemaId to set.

Returns
TypeDescription
Document.Builder

This builder for chaining.

setSchemaIdBytes(ByteString value)

public Document.Builder setSchemaIdBytes(ByteString value)

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

string schema_id = 3 [(.google.api.field_behavior) = REQUIRED];

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