Class Chunk.Builder (0.60.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.v1.Chunk

Implements

ChunkOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllAnnotationContents(Iterable<String> values)

public Chunk.Builder addAllAnnotationContents(Iterable<String> values)

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The annotationContents to add.

Returns
Type Description
Chunk.Builder

This builder for chaining.

addAllAnnotationMetadata(Iterable<? extends Chunk.AnnotationMetadata> values)

public Chunk.Builder addAllAnnotationMetadata(Iterable<? extends Chunk.AnnotationMetadata> values)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata>
Returns
Type Description
Chunk.Builder

addAllDataUrls(Iterable<String> values)

public Chunk.Builder addAllDataUrls(Iterable<String> values)

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<String>

The dataUrls to add.

Returns
Type Description
Chunk.Builder

This builder for chaining.

addAnnotationContents(String value)

public Chunk.Builder addAnnotationContents(String value)

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The annotationContents to add.

Returns
Type Description
Chunk.Builder

This builder for chaining.

addAnnotationContentsBytes(ByteString value)

public Chunk.Builder addAnnotationContentsBytes(ByteString value)

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the annotationContents to add.

Returns
Type Description
Chunk.Builder

This builder for chaining.

addAnnotationMetadata(Chunk.AnnotationMetadata value)

public Chunk.Builder addAnnotationMetadata(Chunk.AnnotationMetadata value)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Chunk.AnnotationMetadata
Returns
Type Description
Chunk.Builder

addAnnotationMetadata(Chunk.AnnotationMetadata.Builder builderForValue)

public Chunk.Builder addAnnotationMetadata(Chunk.AnnotationMetadata.Builder builderForValue)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Chunk.AnnotationMetadata.Builder
Returns
Type Description
Chunk.Builder

addAnnotationMetadata(int index, Chunk.AnnotationMetadata value)

public Chunk.Builder addAnnotationMetadata(int index, Chunk.AnnotationMetadata value)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Chunk.AnnotationMetadata
Returns
Type Description
Chunk.Builder

addAnnotationMetadata(int index, Chunk.AnnotationMetadata.Builder builderForValue)

public Chunk.Builder addAnnotationMetadata(int index, Chunk.AnnotationMetadata.Builder builderForValue)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Chunk.AnnotationMetadata.Builder
Returns
Type Description
Chunk.Builder

addAnnotationMetadataBuilder()

public Chunk.AnnotationMetadata.Builder addAnnotationMetadataBuilder()

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.AnnotationMetadata.Builder

addAnnotationMetadataBuilder(int index)

public Chunk.AnnotationMetadata.Builder addAnnotationMetadataBuilder(int index)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Chunk.AnnotationMetadata.Builder

addDataUrls(String value)

public Chunk.Builder addDataUrls(String value)

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The dataUrls to add.

Returns
Type Description
Chunk.Builder

This builder for chaining.

addDataUrlsBytes(ByteString value)

public Chunk.Builder addDataUrlsBytes(ByteString value)

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes of the dataUrls to add.

Returns
Type Description
Chunk.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Chunk.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Chunk.Builder
Overrides

build()

public Chunk build()
Returns
Type Description
Chunk

buildPartial()

public Chunk buildPartial()
Returns
Type Description
Chunk

clear()

public Chunk.Builder clear()
Returns
Type Description
Chunk.Builder
Overrides

clearAnnotationContents()

public Chunk.Builder clearAnnotationContents()

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.Builder

This builder for chaining.

clearAnnotationMetadata()

public Chunk.Builder clearAnnotationMetadata()

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.Builder

clearChunkMetadata()

public Chunk.Builder clearChunkMetadata()

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.Builder

clearContent()

public Chunk.Builder clearContent()

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

string content = 3;

Returns
Type Description
Chunk.Builder

This builder for chaining.

clearDataUrls()

public Chunk.Builder clearDataUrls()

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
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
Type Description
Chunk.Builder

clearDocumentMetadata()

public Chunk.Builder clearDocumentMetadata()

Metadata of the document from the current chunk.

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

Returns
Type Description
Chunk.Builder

clearField(Descriptors.FieldDescriptor field)

public Chunk.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Chunk.Builder
Overrides

clearId()

public Chunk.Builder clearId()

Unique chunk ID of the current chunk.

string id = 2;

Returns
Type Description
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
Type Description
Chunk.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Chunk.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Chunk.Builder
Overrides

clearPageSpan()

public Chunk.Builder clearPageSpan()

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Returns
Type Description
Chunk.Builder

clearRelevanceScore()

public Chunk.Builder clearRelevanceScore()

Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.

optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.Builder

This builder for chaining.

clone()

public Chunk.Builder clone()
Returns
Type Description
Chunk.Builder
Overrides

getAnnotationContents(int index)

public String getAnnotationContents(int index)

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The annotationContents at the given index.

getAnnotationContentsBytes(int index)

public ByteString getAnnotationContentsBytes(int index)

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the annotationContents at the given index.

getAnnotationContentsCount()

public int getAnnotationContentsCount()

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of annotationContents.

getAnnotationContentsList()

public ProtocolStringList getAnnotationContentsList()

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the annotationContents.

getAnnotationMetadata(int index)

public Chunk.AnnotationMetadata getAnnotationMetadata(int index)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Chunk.AnnotationMetadata

getAnnotationMetadataBuilder(int index)

public Chunk.AnnotationMetadata.Builder getAnnotationMetadataBuilder(int index)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Chunk.AnnotationMetadata.Builder

getAnnotationMetadataBuilderList()

public List<Chunk.AnnotationMetadata.Builder> getAnnotationMetadataBuilderList()

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getAnnotationMetadataCount()

public int getAnnotationMetadataCount()

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getAnnotationMetadataList()

public List<Chunk.AnnotationMetadata> getAnnotationMetadataList()

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<AnnotationMetadata>

getAnnotationMetadataOrBuilder(int index)

public Chunk.AnnotationMetadataOrBuilder getAnnotationMetadataOrBuilder(int index)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Chunk.AnnotationMetadataOrBuilder

getAnnotationMetadataOrBuilderList()

public List<? extends Chunk.AnnotationMetadataOrBuilder> getAnnotationMetadataOrBuilderList()

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1.Chunk.AnnotationMetadataOrBuilder>

getChunkMetadata()

public Chunk.ChunkMetadata getChunkMetadata()

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.ChunkMetadata

The chunkMetadata.

getChunkMetadataBuilder()

public Chunk.ChunkMetadata.Builder getChunkMetadataBuilder()

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.ChunkMetadata.Builder

getChunkMetadataOrBuilder()

public Chunk.ChunkMetadataOrBuilder getChunkMetadataOrBuilder()

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Chunk.ChunkMetadataOrBuilder

getContent()

public String getContent()

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

string content = 3;

Returns
Type Description
String

The content.

getContentBytes()

public ByteString getContentBytes()

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

string content = 3;

Returns
Type Description
ByteString

The bytes for content.

getDataUrls(int index)

public String getDataUrls(int index)

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The dataUrls at the given index.

getDataUrlsBytes(int index)

public ByteString getDataUrlsBytes(int index)

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the dataUrls at the given index.

getDataUrlsCount()

public int getDataUrlsCount()

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The count of dataUrls.

getDataUrlsList()

public ProtocolStringList getDataUrlsList()

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ProtocolStringList

A list containing the dataUrls.

getDefaultInstanceForType()

public Chunk getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
StructOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDocumentMetadata()

public Chunk.DocumentMetadata getDocumentMetadata()

Metadata of the document from the current chunk.

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

Returns
Type Description
Chunk.DocumentMetadata

The documentMetadata.

getDocumentMetadataBuilder()

public Chunk.DocumentMetadata.Builder getDocumentMetadataBuilder()

Metadata of the document from the current chunk.

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

Returns
Type Description
Chunk.DocumentMetadata.Builder

getDocumentMetadataOrBuilder()

public Chunk.DocumentMetadataOrBuilder getDocumentMetadataOrBuilder()

Metadata of the document from the current chunk.

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

Returns
Type Description
Chunk.DocumentMetadataOrBuilder

getId()

public String getId()

Unique chunk ID of the current chunk.

string id = 2;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

Unique chunk ID of the current chunk.

string id = 2;

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getPageSpan()

public Chunk.PageSpan getPageSpan()

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Returns
Type Description
Chunk.PageSpan

The pageSpan.

getPageSpanBuilder()

public Chunk.PageSpan.Builder getPageSpanBuilder()

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Returns
Type Description
Chunk.PageSpan.Builder

getPageSpanOrBuilder()

public Chunk.PageSpanOrBuilder getPageSpanOrBuilder()

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Returns
Type Description
Chunk.PageSpanOrBuilder

getRelevanceScore()

public double getRelevanceScore()

Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.

optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
double

The relevanceScore.

hasChunkMetadata()

public boolean hasChunkMetadata()

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

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

Returns
Type Description
boolean

Whether the derivedStructData field is set.

hasDocumentMetadata()

public boolean hasDocumentMetadata()

Metadata of the document from the current chunk.

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

Returns
Type Description
boolean

Whether the documentMetadata field is set.

hasPageSpan()

public boolean hasPageSpan()

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Returns
Type Description
boolean

Whether the pageSpan field is set.

hasRelevanceScore()

public boolean hasRelevanceScore()

Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.

optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the relevanceScore field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeChunkMetadata(Chunk.ChunkMetadata value)

public Chunk.Builder mergeChunkMetadata(Chunk.ChunkMetadata value)

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Chunk.ChunkMetadata
Returns
Type Description
Chunk.Builder

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
Name Description
value Struct
Returns
Type Description
Chunk.Builder

mergeDocumentMetadata(Chunk.DocumentMetadata value)

public Chunk.Builder mergeDocumentMetadata(Chunk.DocumentMetadata value)

Metadata of the document from the current chunk.

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

Parameter
Name Description
value Chunk.DocumentMetadata
Returns
Type Description
Chunk.Builder

mergeFrom(Chunk other)

public Chunk.Builder mergeFrom(Chunk other)
Parameter
Name Description
other Chunk
Returns
Type Description
Chunk.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Chunk.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Chunk.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Chunk.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Chunk.Builder
Overrides

mergePageSpan(Chunk.PageSpan value)

public Chunk.Builder mergePageSpan(Chunk.PageSpan value)

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Parameter
Name Description
value Chunk.PageSpan
Returns
Type Description
Chunk.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Chunk.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Chunk.Builder
Overrides

removeAnnotationMetadata(int index)

public Chunk.Builder removeAnnotationMetadata(int index)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Chunk.Builder

setAnnotationContents(int index, String value)

public Chunk.Builder setAnnotationContents(int index, String value)

Output only. Annotation contents if the current chunk contains annotations.

repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The annotationContents to set.

Returns
Type Description
Chunk.Builder

This builder for chaining.

setAnnotationMetadata(int index, Chunk.AnnotationMetadata value)

public Chunk.Builder setAnnotationMetadata(int index, Chunk.AnnotationMetadata value)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Chunk.AnnotationMetadata
Returns
Type Description
Chunk.Builder

setAnnotationMetadata(int index, Chunk.AnnotationMetadata.Builder builderForValue)

public Chunk.Builder setAnnotationMetadata(int index, Chunk.AnnotationMetadata.Builder builderForValue)

Output only. The annotation metadata includes structured content in the current chunk.

repeated .google.cloud.discoveryengine.v1.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Chunk.AnnotationMetadata.Builder
Returns
Type Description
Chunk.Builder

setChunkMetadata(Chunk.ChunkMetadata value)

public Chunk.Builder setChunkMetadata(Chunk.ChunkMetadata value)

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Chunk.ChunkMetadata
Returns
Type Description
Chunk.Builder

setChunkMetadata(Chunk.ChunkMetadata.Builder builderForValue)

public Chunk.Builder setChunkMetadata(Chunk.ChunkMetadata.Builder builderForValue)

Output only. Metadata of the current chunk.

.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Chunk.ChunkMetadata.Builder
Returns
Type Description
Chunk.Builder

setContent(String value)

public Chunk.Builder setContent(String value)

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

string content = 3;

Parameter
Name Description
value String

The content to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for content to set.

Returns
Type Description
Chunk.Builder

This builder for chaining.

setDataUrls(int index, String value)

public Chunk.Builder setDataUrls(int index, String value)

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:<mediatype>,<data>

repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int

The index to set the value at.

value String

The dataUrls to set.

Returns
Type Description
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
Name Description
value Struct
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
Chunk.Builder

setDocumentMetadata(Chunk.DocumentMetadata value)

public Chunk.Builder setDocumentMetadata(Chunk.DocumentMetadata value)

Metadata of the document from the current chunk.

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

Parameter
Name Description
value Chunk.DocumentMetadata
Returns
Type Description
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.v1.Chunk.DocumentMetadata document_metadata = 5;

Parameter
Name Description
builderForValue Chunk.DocumentMetadata.Builder
Returns
Type Description
Chunk.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Chunk.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Chunk.Builder
Overrides

setId(String value)

public Chunk.Builder setId(String value)

Unique chunk ID of the current chunk.

string id = 2;

Parameter
Name Description
value String

The id to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Chunk.Builder

This builder for chaining.

setPageSpan(Chunk.PageSpan value)

public Chunk.Builder setPageSpan(Chunk.PageSpan value)

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Parameter
Name Description
value Chunk.PageSpan
Returns
Type Description
Chunk.Builder

setPageSpan(Chunk.PageSpan.Builder builderForValue)

public Chunk.Builder setPageSpan(Chunk.PageSpan.Builder builderForValue)

Page span of the chunk.

.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;

Parameter
Name Description
builderForValue Chunk.PageSpan.Builder
Returns
Type Description
Chunk.Builder

setRelevanceScore(double value)

public Chunk.Builder setRelevanceScore(double value)

Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchResponse.

optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value double

The relevanceScore to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Chunk.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Chunk.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Chunk.Builder
Overrides