@Generated public final class Chunk extends com.google.protobuf.GeneratedMessage 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| Modifier and Type | Class and Description |
|---|---|
static class |
Chunk.AnnotationMetadata
The annotation metadata includes structured content in the current chunk.
|
static interface |
Chunk.AnnotationMetadataOrBuilder |
static class |
Chunk.Builder
Chunk captures all raw metadata information of items to be recommended or
searched in the chunk mode.
|
static class |
Chunk.ChunkMetadata
Metadata of the current chunk.
|
static interface |
Chunk.ChunkMetadataOrBuilder |
static class |
Chunk.DocumentMetadata
Document metadata contains the information of the document of the current
chunk.
|
static interface |
Chunk.DocumentMetadataOrBuilder |
static class |
Chunk.PageSpan
Page span of the chunk.
|
static interface |
Chunk.PageSpanOrBuilder |
static class |
Chunk.StructuredContent
The structured content information.
|
static interface |
Chunk.StructuredContentOrBuilder |
static class |
Chunk.StructureType
Defines the types of the structured content that can be extracted.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ANNOTATION_CONTENTS_FIELD_NUMBER |
static int |
ANNOTATION_METADATA_FIELD_NUMBER |
static int |
CHUNK_METADATA_FIELD_NUMBER |
static int |
CONTENT_FIELD_NUMBER |
static int |
DATA_URLS_FIELD_NUMBER |
static int |
DERIVED_STRUCT_DATA_FIELD_NUMBER |
static int |
DOCUMENT_METADATA_FIELD_NUMBER |
static int |
ID_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PAGE_SPAN_FIELD_NUMBER |
static int |
RELEVANCE_SCORE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAnnotationContents(int index)
Output only.
|
com.google.protobuf.ByteString |
getAnnotationContentsBytes(int index)
Output only.
|
int |
getAnnotationContentsCount()
Output only.
|
com.google.protobuf.ProtocolStringList |
getAnnotationContentsList()
Output only.
|
Chunk.AnnotationMetadata |
getAnnotationMetadata(int index)
Output only.
|
int |
getAnnotationMetadataCount()
Output only.
|
List<Chunk.AnnotationMetadata> |
getAnnotationMetadataList()
Output only.
|
Chunk.AnnotationMetadataOrBuilder |
getAnnotationMetadataOrBuilder(int index)
Output only.
|
List<? extends Chunk.AnnotationMetadataOrBuilder> |
getAnnotationMetadataOrBuilderList()
Output only.
|
Chunk.ChunkMetadata |
getChunkMetadata()
Output only.
|
Chunk.ChunkMetadataOrBuilder |
getChunkMetadataOrBuilder()
Output only.
|
String |
getContent()
Content is a string from a document (parsed content).
|
com.google.protobuf.ByteString |
getContentBytes()
Content is a string from a document (parsed content).
|
String |
getDataUrls(int index)
Output only.
|
com.google.protobuf.ByteString |
getDataUrlsBytes(int index)
Output only.
|
int |
getDataUrlsCount()
Output only.
|
com.google.protobuf.ProtocolStringList |
getDataUrlsList()
Output only.
|
static Chunk |
getDefaultInstance() |
Chunk |
getDefaultInstanceForType() |
com.google.protobuf.Struct |
getDerivedStructData()
Output only.
|
com.google.protobuf.StructOrBuilder |
getDerivedStructDataOrBuilder()
Output only.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Chunk.DocumentMetadata |
getDocumentMetadata()
Metadata of the document from the current chunk.
|
Chunk.DocumentMetadataOrBuilder |
getDocumentMetadataOrBuilder()
Metadata of the document from the current chunk.
|
String |
getId()
Unique chunk ID of the current chunk.
|
com.google.protobuf.ByteString |
getIdBytes()
Unique chunk ID of the current chunk.
|
String |
getName()
The full resource name of the chunk.
|
com.google.protobuf.ByteString |
getNameBytes()
The full resource name of the chunk.
|
Chunk.PageSpan |
getPageSpan()
Page span of the chunk.
|
Chunk.PageSpanOrBuilder |
getPageSpanOrBuilder()
Page span of the chunk.
|
com.google.protobuf.Parser<Chunk> |
getParserForType() |
double |
getRelevanceScore()
Output only.
|
int |
getSerializedSize() |
boolean |
hasChunkMetadata()
Output only.
|
boolean |
hasDerivedStructData()
Output only.
|
boolean |
hasDocumentMetadata()
Metadata of the document from the current chunk.
|
int |
hashCode() |
boolean |
hasPageSpan()
Page span of the chunk.
|
boolean |
hasRelevanceScore()
Output only.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Chunk.Builder |
newBuilder() |
static Chunk.Builder |
newBuilder(Chunk prototype) |
Chunk.Builder |
newBuilderForType() |
protected Chunk.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static Chunk |
parseDelimitedFrom(InputStream input) |
static Chunk |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Chunk |
parseFrom(byte[] data) |
static Chunk |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Chunk |
parseFrom(ByteBuffer data) |
static Chunk |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Chunk |
parseFrom(com.google.protobuf.ByteString data) |
static Chunk |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Chunk |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Chunk |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Chunk |
parseFrom(InputStream input) |
static Chunk |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Chunk> |
parser() |
Chunk.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
public static final int RELEVANCE_SCORE_FIELD_NUMBER
public static final int DOCUMENT_METADATA_FIELD_NUMBER
public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER
public static final int PAGE_SPAN_FIELD_NUMBER
public static final int CHUNK_METADATA_FIELD_NUMBER
public static final int DATA_URLS_FIELD_NUMBER
public static final int ANNOTATION_CONTENTS_FIELD_NUMBER
public static final int ANNOTATION_METADATA_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic 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;getName in interface ChunkOrBuilderpublic 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;getNameBytes in interface ChunkOrBuilderpublic String getId()
Unique chunk ID of the current chunk.
string id = 2;getId in interface ChunkOrBuilderpublic com.google.protobuf.ByteString getIdBytes()
Unique chunk ID of the current chunk.
string id = 2;getIdBytes in interface ChunkOrBuilderpublic String getContent()
Content is a string from a document (parsed content).
string content = 3;getContent in interface ChunkOrBuilderpublic com.google.protobuf.ByteString getContentBytes()
Content is a string from a document (parsed content).
string content = 3;getContentBytes in interface ChunkOrBuilderpublic 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][google.cloud.discoveryengine.v1.SearchResponse].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];hasRelevanceScore in interface ChunkOrBuilderpublic 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][google.cloud.discoveryengine.v1.SearchResponse].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];getRelevanceScore in interface ChunkOrBuilderpublic boolean hasDocumentMetadata()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata document_metadata = 5;hasDocumentMetadata in interface ChunkOrBuilderpublic Chunk.DocumentMetadata getDocumentMetadata()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata document_metadata = 5;getDocumentMetadata in interface ChunkOrBuilderpublic Chunk.DocumentMetadataOrBuilder getDocumentMetadataOrBuilder()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1.Chunk.DocumentMetadata document_metadata = 5;getDocumentMetadataOrBuilder in interface ChunkOrBuilderpublic 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];
hasDerivedStructData in interface ChunkOrBuilderpublic 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];
getDerivedStructData in interface ChunkOrBuilderpublic 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];
getDerivedStructDataOrBuilder in interface ChunkOrBuilderpublic boolean hasPageSpan()
Page span of the chunk.
.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;hasPageSpan in interface ChunkOrBuilderpublic Chunk.PageSpan getPageSpan()
Page span of the chunk.
.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;getPageSpan in interface ChunkOrBuilderpublic Chunk.PageSpanOrBuilder getPageSpanOrBuilder()
Page span of the chunk.
.google.cloud.discoveryengine.v1.Chunk.PageSpan page_span = 6;getPageSpanOrBuilder in interface ChunkOrBuilderpublic boolean hasChunkMetadata()
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasChunkMetadata in interface ChunkOrBuilderpublic 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];
getChunkMetadata in interface ChunkOrBuilderpublic 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];
getChunkMetadataOrBuilder in interface ChunkOrBuilderpublic com.google.protobuf.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>][;base64],<data>
repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getDataUrlsList in interface ChunkOrBuilderpublic 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>][;base64],<data>
repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getDataUrlsCount in interface ChunkOrBuilderpublic 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>][;base64],<data>
repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getDataUrls in interface ChunkOrBuilderindex - The index of the element to return.public com.google.protobuf.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>][;base64],<data>
repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getDataUrlsBytes in interface ChunkOrBuilderindex - The index of the value to return.public com.google.protobuf.ProtocolStringList getAnnotationContentsList()
Output only. Annotation contents if the current chunk contains annotations.
repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
getAnnotationContentsList in interface ChunkOrBuilderpublic int getAnnotationContentsCount()
Output only. Annotation contents if the current chunk contains annotations.
repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
getAnnotationContentsCount in interface ChunkOrBuilderpublic 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];
getAnnotationContents in interface ChunkOrBuilderindex - The index of the element to return.public com.google.protobuf.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];
getAnnotationContentsBytes in interface ChunkOrBuilderindex - The index of the value to return.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];
getAnnotationMetadataList in interface ChunkOrBuilderpublic 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];
getAnnotationMetadataOrBuilderList in interface ChunkOrBuilderpublic 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];
getAnnotationMetadataCount in interface ChunkOrBuilderpublic 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];
getAnnotationMetadata in interface ChunkOrBuilderpublic 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];
getAnnotationMetadataOrBuilder in interface ChunkOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageIOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Chunk parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Chunk parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Chunk parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Chunk parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Chunk parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Chunk parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Chunk parseFrom(InputStream input) throws IOException
IOExceptionpublic static Chunk parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Chunk parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Chunk parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Chunk parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Chunk parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Chunk.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Chunk.Builder newBuilder()
public static Chunk.Builder newBuilder(Chunk prototype)
public Chunk.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Chunk.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static Chunk getDefaultInstance()
public static com.google.protobuf.Parser<Chunk> parser()
public com.google.protobuf.Parser<Chunk> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic Chunk getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2026 Google LLC. All rights reserved.