public final class Chunk extends com.google.protobuf.GeneratedMessageV3 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| Modifier and Type | Class and Description |
|---|---|
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 |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CHUNK_METADATA_FIELD_NUMBER |
static int |
CONTENT_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) |
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).
|
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.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Chunk.Builder |
newBuilder() |
static Chunk.Builder |
newBuilder(Chunk prototype) |
Chunk.Builder |
newBuilderForType() |
protected Chunk.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
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, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, 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
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 [SearchService.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 [SearchService.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.v1alpha.Chunk.DocumentMetadata document_metadata = 5;
hasDocumentMetadata in interface ChunkOrBuilderpublic Chunk.DocumentMetadata getDocumentMetadata()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1alpha.Chunk.DocumentMetadata document_metadata = 5;
getDocumentMetadata in interface ChunkOrBuilderpublic Chunk.DocumentMetadataOrBuilder getDocumentMetadataOrBuilder()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1alpha.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.v1alpha.Chunk.PageSpan page_span = 6;hasPageSpan in interface ChunkOrBuilderpublic Chunk.PageSpan getPageSpan()
Page span of the chunk.
.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6;getPageSpan in interface ChunkOrBuilderpublic Chunk.PageSpanOrBuilder getPageSpanOrBuilder()
Page span of the chunk.
.google.cloud.discoveryengine.v1alpha.Chunk.PageSpan page_span = 6;getPageSpanOrBuilder in interface ChunkOrBuilderpublic boolean hasChunkMetadata()
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1alpha.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.v1alpha.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.v1alpha.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getChunkMetadataOrBuilder in interface ChunkOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public 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.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public 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.GeneratedMessageV3public Chunk getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.