Class Chunk
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.Chunk
- All Implemented Interfaces:
ChunkOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@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.v1beta.Chunk- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classChunk captures all raw metadata information of items to be recommended or searched in the chunk mode.static final classMetadata of the current chunk.static interfacestatic final classDocument metadata contains the information of the document of the current chunk.static interfacestatic final classPage span of the chunk.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
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 extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanOutput only.Output only.Content is a string from a document (parsed content).com.google.protobuf.ByteStringContent is a string from a document (parsed content).static Chunkcom.google.protobuf.StructOutput only.com.google.protobuf.StructOrBuilderOutput only.static final com.google.protobuf.Descriptors.DescriptorMetadata 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.com.google.protobuf.Parser<Chunk>doubleOutput only.intbooleanOutput only.booleanOutput only.booleanMetadata of the document from the current chunk.inthashCode()booleanPage span of the chunk.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Chunk.Builderstatic Chunk.BuildernewBuilder(Chunk prototype) protected Chunk.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ChunkparseDelimitedFrom(InputStream input) static ChunkparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ChunkparseFrom(byte[] data) static ChunkparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ChunkparseFrom(com.google.protobuf.ByteString data) static ChunkparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ChunkparseFrom(com.google.protobuf.CodedInputStream input) static ChunkparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ChunkparseFrom(InputStream input) static ChunkparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ChunkparseFrom(ByteBuffer data) static ChunkparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Chunk>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER- See Also:
-
RELEVANCE_SCORE_FIELD_NUMBER
public static final int RELEVANCE_SCORE_FIELD_NUMBER- See Also:
-
DOCUMENT_METADATA_FIELD_NUMBER
public static final int DOCUMENT_METADATA_FIELD_NUMBER- See Also:
-
DERIVED_STRUCT_DATA_FIELD_NUMBER
public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER- See Also:
-
PAGE_SPAN_FIELD_NUMBER
public static final int PAGE_SPAN_FIELD_NUMBER- See Also:
-
CHUNK_METADATA_FIELD_NUMBER
public static final int CHUNK_METADATA_FIELD_NUMBER- See Also:
-
-
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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Chunk parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Chunk parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Chunk parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Chunk parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Chunk parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Chunk parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Chunk parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Chunk parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Chunk parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-