Class Chunk.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Chunk.Builder>
com.google.cloud.discoveryengine.v1beta.Chunk.Builder
- All Implemented Interfaces:
ChunkOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Chunk
public static final class Chunk.Builder
extends com.google.protobuf.GeneratedMessage.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.v1beta.Chunk-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Output only.Content is a string from a document (parsed content).Output only.Metadata of the document from the current chunk.clearId()Unique chunk ID of the current chunk.The full resource name of the chunk.Page span of the chunk.Output only.Output only.Output only.Output only.Content is a string from a document (parsed content).com.google.protobuf.ByteStringContent is a string from a document (parsed content).com.google.protobuf.StructOutput only.com.google.protobuf.Struct.BuilderOutput only.com.google.protobuf.StructOrBuilderOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorMetadata of the document from the current chunk.Metadata of the document from the current chunk.Metadata of the document from the current chunk.getId()Unique chunk ID of the current chunk.com.google.protobuf.ByteStringUnique chunk ID of the current chunk.getName()The full resource name of the chunk.com.google.protobuf.ByteStringThe full resource name of the chunk.Page span of the chunk.Page span of the chunk.Page span of the chunk.doubleOutput only.booleanOutput only.booleanOutput only.booleanMetadata of the document from the current chunk.booleanPage span of the chunk.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanOutput only.mergeDerivedStructData(com.google.protobuf.Struct value) Output only.Metadata of the document from the current chunk.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergePageSpan(Chunk.PageSpan value) Page span of the chunk.Output only.setChunkMetadata(Chunk.ChunkMetadata.Builder builderForValue) Output only.setContent(String value) Content is a string from a document (parsed content).setContentBytes(com.google.protobuf.ByteString value) Content is a string from a document (parsed content).setDerivedStructData(com.google.protobuf.Struct value) Output only.setDerivedStructData(com.google.protobuf.Struct.Builder builderForValue) Output only.Metadata of the document from the current chunk.setDocumentMetadata(Chunk.DocumentMetadata.Builder builderForValue) Metadata of the document from the current chunk.Unique chunk ID of the current chunk.setIdBytes(com.google.protobuf.ByteString value) Unique chunk ID of the current chunk.The full resource name of the chunk.setNameBytes(com.google.protobuf.ByteString value) The full resource name of the chunk.setPageSpan(Chunk.PageSpan value) Page span of the chunk.setPageSpan(Chunk.PageSpan.Builder builderForValue) Page span of the chunk.setRelevanceScore(double value) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Chunk.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Chunk.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Chunk.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Chunk.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Chunk.Builder>
-
mergeFrom
public Chunk.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Chunk.Builder>- Throws:
IOException
-
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;- Specified by:
getNamein interfaceChunkOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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;- Specified by:
getNameBytesin interfaceChunkOrBuilder- Returns:
- The bytes for name.
-
setName
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;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setNameBytes
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;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getId
Unique chunk ID of the current chunk.
string id = 2;- Specified by:
getIdin interfaceChunkOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()Unique chunk ID of the current chunk.
string id = 2;- Specified by:
getIdBytesin interfaceChunkOrBuilder- Returns:
- The bytes for id.
-
setId
Unique chunk ID of the current chunk.
string id = 2;- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
Unique chunk ID of the current chunk.
string id = 2;- Returns:
- This builder for chaining.
-
setIdBytes
Unique chunk ID of the current chunk.
string id = 2;- Parameters:
value- The bytes for id to set.- Returns:
- This builder for chaining.
-
getContent
Content is a string from a document (parsed content).
string content = 3;- Specified by:
getContentin interfaceChunkOrBuilder- Returns:
- The content.
-
getContentBytes
public com.google.protobuf.ByteString getContentBytes()Content is a string from a document (parsed content).
string content = 3;- Specified by:
getContentBytesin interfaceChunkOrBuilder- Returns:
- The bytes for content.
-
setContent
Content is a string from a document (parsed content).
string content = 3;- Parameters:
value- The content to set.- Returns:
- This builder for chaining.
-
clearContent
Content is a string from a document (parsed content).
string content = 3;- Returns:
- This builder for chaining.
-
setContentBytes
Content is a string from a document (parsed content).
string content = 3;- Parameters:
value- The bytes for content to set.- Returns:
- This builder for chaining.
-
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 [SearchService.SearchResponse][].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasRelevanceScorein interfaceChunkOrBuilder- Returns:
- Whether the relevanceScore field is set.
-
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 [SearchService.SearchResponse][].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getRelevanceScorein interfaceChunkOrBuilder- Returns:
- The relevanceScore.
-
setRelevanceScore
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 [SearchService.SearchResponse][].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The relevanceScore to set.- Returns:
- This builder for chaining.
-
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 [SearchService.SearchResponse][].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
hasDocumentMetadata
public boolean hasDocumentMetadata()Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;- Specified by:
hasDocumentMetadatain interfaceChunkOrBuilder- Returns:
- Whether the documentMetadata field is set.
-
getDocumentMetadata
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;- Specified by:
getDocumentMetadatain interfaceChunkOrBuilder- Returns:
- The documentMetadata.
-
setDocumentMetadata
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; -
setDocumentMetadata
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; -
mergeDocumentMetadata
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; -
clearDocumentMetadata
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; -
getDocumentMetadataBuilder
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; -
getDocumentMetadataOrBuilder
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;- Specified by:
getDocumentMetadataOrBuilderin interfaceChunkOrBuilder
-
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];- Specified by:
hasDerivedStructDatain interfaceChunkOrBuilder- Returns:
- Whether the derivedStructData field is set.
-
getDerivedStructData
public com.google.protobuf.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];- Specified by:
getDerivedStructDatain interfaceChunkOrBuilder- Returns:
- The derivedStructData.
-
setDerivedStructData
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]; -
setDerivedStructData
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]; -
mergeDerivedStructData
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]; -
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]; -
getDerivedStructDataBuilder
public com.google.protobuf.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]; -
getDerivedStructDataOrBuilder
public com.google.protobuf.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];- Specified by:
getDerivedStructDataOrBuilderin interfaceChunkOrBuilder
-
hasPageSpan
public boolean hasPageSpan()Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;- Specified by:
hasPageSpanin interfaceChunkOrBuilder- Returns:
- Whether the pageSpan field is set.
-
getPageSpan
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;- Specified by:
getPageSpanin interfaceChunkOrBuilder- Returns:
- The pageSpan.
-
setPageSpan
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; -
setPageSpan
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; -
mergePageSpan
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; -
clearPageSpan
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; -
getPageSpanBuilder
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; -
getPageSpanOrBuilder
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;- Specified by:
getPageSpanOrBuilderin interfaceChunkOrBuilder
-
hasChunkMetadata
public boolean hasChunkMetadata()Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasChunkMetadatain interfaceChunkOrBuilder- Returns:
- Whether the chunkMetadata field is set.
-
getChunkMetadata
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getChunkMetadatain interfaceChunkOrBuilder- Returns:
- The chunkMetadata.
-
setChunkMetadata
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
setChunkMetadata
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
mergeChunkMetadata
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
clearChunkMetadata
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getChunkMetadataBuilder
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getChunkMetadataOrBuilder
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getChunkMetadataOrBuilderin interfaceChunkOrBuilder
-