Class Chunk.Builder (0.36.0)

public static final class Chunk.Builder extends GeneratedMessageV3.Builder<Chunk.Builder> implements ChunkOrBuilder

Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.

Protobuf type google.cloud.discoveryengine.v1alpha.Chunk

Implements

ChunkOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Chunk build()
Returns
TypeDescription
Chunk

buildPartial()

public Chunk buildPartial()
Returns
TypeDescription
Chunk

clear()

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

clearContent()

public Chunk.Builder clearContent()

Content is a string from a document (parsed content).

string content = 3;

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

clearDerivedStructData()

public Chunk.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Chunk.Builder

clearDocumentMetadata()

public Chunk.Builder clearDocumentMetadata()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
Chunk.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearId()

public Chunk.Builder clearId()

Unique chunk id of the current chunk.

string id = 2;

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

clearName()

public Chunk.Builder clearName()

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getContent()

public String getContent()

Content is a string from a document (parsed content).

string content = 3;

Returns
TypeDescription
String

The content.

getContentBytes()

public ByteString getContentBytes()

Content is a string from a document (parsed content).

string content = 3;

Returns
TypeDescription
ByteString

The bytes for content.

getDefaultInstanceForType()

public Chunk getDefaultInstanceForType()
Returns
TypeDescription
Chunk

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 = 4 [(.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 = 4 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
StructOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocumentMetadata()

public Chunk.DocumentMetadata getDocumentMetadata()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
Chunk.DocumentMetadata

The documentMetadata.

getDocumentMetadataBuilder()

public Chunk.DocumentMetadata.Builder getDocumentMetadataBuilder()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
Chunk.DocumentMetadata.Builder

getDocumentMetadataOrBuilder()

public Chunk.DocumentMetadataOrBuilder getDocumentMetadataOrBuilder()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
Chunk.DocumentMetadataOrBuilder

getId()

public String getId()

Unique chunk id of the current chunk.

string id = 2;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Unique chunk id of the current chunk.

string id = 2;

Returns
TypeDescription
ByteString

The bytes for id.

getName()

public String getName()

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the derivedStructData field is set.

hasDocumentMetadata()

public boolean hasDocumentMetadata()

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Returns
TypeDescription
boolean

Whether the documentMetadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDerivedStructData(Struct value)

public Chunk.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Chunk.Builder

mergeDocumentMetadata(Chunk.DocumentMetadata value)

public Chunk.Builder mergeDocumentMetadata(Chunk.DocumentMetadata value)

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Parameter
NameDescription
valueChunk.DocumentMetadata
Returns
TypeDescription
Chunk.Builder

mergeFrom(Chunk other)

public Chunk.Builder mergeFrom(Chunk other)
Parameter
NameDescription
otherChunk
Returns
TypeDescription
Chunk.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContent(String value)

public Chunk.Builder setContent(String value)

Content is a string from a document (parsed content).

string content = 3;

Parameter
NameDescription
valueString

The content to set.

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

setContentBytes(ByteString value)

public Chunk.Builder setContentBytes(ByteString value)

Content is a string from a document (parsed content).

string content = 3;

Parameter
NameDescription
valueByteString

The bytes for content to set.

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

setDerivedStructData(Struct value)

public Chunk.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueStruct
Returns
TypeDescription
Chunk.Builder

setDerivedStructData(Struct.Builder builderForValue)

public Chunk.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Chunk.Builder

setDocumentMetadata(Chunk.DocumentMetadata value)

public Chunk.Builder setDocumentMetadata(Chunk.DocumentMetadata value)

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Parameter
NameDescription
valueChunk.DocumentMetadata
Returns
TypeDescription
Chunk.Builder

setDocumentMetadata(Chunk.DocumentMetadata.Builder builderForValue)

public Chunk.Builder setDocumentMetadata(Chunk.DocumentMetadata.Builder builderForValue)

Metadata of the document from the current chunk.

.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;

Parameter
NameDescription
builderForValueChunk.DocumentMetadata.Builder
Returns
TypeDescription
Chunk.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setId(String value)

public Chunk.Builder setId(String value)

Unique chunk id of the current chunk.

string id = 2;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

setIdBytes(ByteString value)

public Chunk.Builder setIdBytes(ByteString value)

Unique chunk id of the current chunk.

string id = 2;

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

setName(String value)

public Chunk.Builder setName(String value)

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Chunk.Builder setNameBytes(ByteString value)

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Chunk.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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