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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.
    static final class 
    Metadata of the current chunk.
    static interface 
     
    static final class 
    Document metadata contains the information of the document of the current chunk.
    static interface 
     
    static final class 
    Page span of the chunk.
    static interface 
     

    Nested 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.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Output only.
    Output only.
    Content is a string from a document (parsed content).
    com.google.protobuf.ByteString
    Content is a string from a document (parsed content).
    static Chunk
     
     
    com.google.protobuf.Struct
    Output only.
    com.google.protobuf.StructOrBuilder
    Output only.
    static final com.google.protobuf.Descriptors.Descriptor
     
    Metadata of the document from the current chunk.
    Metadata of the document from the current chunk.
    Unique chunk ID of the current chunk.
    com.google.protobuf.ByteString
    Unique chunk ID of the current chunk.
    The full resource name of the chunk.
    com.google.protobuf.ByteString
    The full resource name of the chunk.
    Page span of the chunk.
    Page span of the chunk.
    com.google.protobuf.Parser<Chunk>
     
    double
    Output only.
    int
     
    boolean
    Output only.
    boolean
    Output only.
    boolean
    Metadata of the document from the current chunk.
    int
     
    boolean
    Page span of the chunk.
    boolean
    Output only.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(Chunk prototype)
     
     
    protected Chunk.Builder
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static Chunk
     
    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(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
     
    static Chunk
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Chunk
     
    static Chunk
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Chunk>
     
     
    void
    writeTo(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, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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;
      Specified by:
      getName in interface ChunkOrBuilder
      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:
      getNameBytes in interface ChunkOrBuilder
      Returns:
      The bytes for name.
    • getId

      public String getId()
       Unique chunk ID of the current chunk.
       
      string id = 2;
      Specified by:
      getId in interface ChunkOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       Unique chunk ID of the current chunk.
       
      string id = 2;
      Specified by:
      getIdBytes in interface ChunkOrBuilder
      Returns:
      The bytes for id.
    • getContent

      public String getContent()
       Content is a string from a document (parsed content).
       
      string content = 3;
      Specified by:
      getContent in interface ChunkOrBuilder
      Returns:
      The content.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes()
       Content is a string from a document (parsed content).
       
      string content = 3;
      Specified by:
      getContentBytes in interface ChunkOrBuilder
      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:
      hasRelevanceScore in interface ChunkOrBuilder
      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:
      getRelevanceScore in interface ChunkOrBuilder
      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:
      hasDocumentMetadata in interface ChunkOrBuilder
      Returns:
      Whether the documentMetadata field is set.
    • getDocumentMetadata

      public Chunk.DocumentMetadata getDocumentMetadata()
       Metadata of the document from the current chunk.
       
      .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;
      Specified by:
      getDocumentMetadata in interface ChunkOrBuilder
      Returns:
      The documentMetadata.
    • getDocumentMetadataOrBuilder

      public Chunk.DocumentMetadataOrBuilder getDocumentMetadataOrBuilder()
       Metadata of the document from the current chunk.
       
      .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;
      Specified by:
      getDocumentMetadataOrBuilder in interface ChunkOrBuilder
    • 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:
      hasDerivedStructData in interface ChunkOrBuilder
      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:
      getDerivedStructData in interface ChunkOrBuilder
      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:
      getDerivedStructDataOrBuilder in interface ChunkOrBuilder
    • hasPageSpan

      public boolean hasPageSpan()
       Page span of the chunk.
       
      .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;
      Specified by:
      hasPageSpan in interface ChunkOrBuilder
      Returns:
      Whether the pageSpan field is set.
    • getPageSpan

      public Chunk.PageSpan getPageSpan()
       Page span of the chunk.
       
      .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;
      Specified by:
      getPageSpan in interface ChunkOrBuilder
      Returns:
      The pageSpan.
    • getPageSpanOrBuilder

      public Chunk.PageSpanOrBuilder getPageSpanOrBuilder()
       Page span of the chunk.
       
      .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;
      Specified by:
      getPageSpanOrBuilder in interface ChunkOrBuilder
    • 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:
      hasChunkMetadata in interface ChunkOrBuilder
      Returns:
      Whether the chunkMetadata field is set.
    • getChunkMetadata

      public Chunk.ChunkMetadata 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:
      getChunkMetadata in interface ChunkOrBuilder
      Returns:
      The chunkMetadata.
    • getChunkMetadataOrBuilder

      public Chunk.ChunkMetadataOrBuilder 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:
      getChunkMetadataOrBuilder in interface ChunkOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static Chunk parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Chunk parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Chunk parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Chunk parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Chunk parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Chunk parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Chunk.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Chunk.Builder newBuilder()
    • newBuilder

      public static Chunk.Builder newBuilder(Chunk prototype)
    • toBuilder

      public Chunk.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Chunk.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Chunk getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Chunk> parser()
    • getParserForType

      public com.google.protobuf.Parser<Chunk> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Chunk getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder