Class SemanticChunk.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<SemanticChunk.Builder>
com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
ai.pipestream.data.v1.SemanticChunk.Builder
All Implemented Interfaces:
SemanticChunkOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SemanticChunk

public static final class SemanticChunk.Builder extends com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder> implements SemanticChunkOrBuilder
 Single semantic chunk with its text and embedding.
 
Protobuf type ai.pipestream.data.v1.SemanticChunk
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
    • clear

      public SemanticChunk.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
    • getDefaultInstanceForType

      public SemanticChunk getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SemanticChunk build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SemanticChunk buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SemanticChunk.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SemanticChunk.Builder>
    • mergeFrom

      public SemanticChunk.Builder mergeFrom(SemanticChunk other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SemanticChunk.Builder>
    • mergeFrom

      public SemanticChunk.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SemanticChunk.Builder>
      Throws:
      IOException
    • getChunkId

      public String getChunkId()
       Unique identifier for this chunk within its parent result.
       
      string chunk_id = 1;
      Specified by:
      getChunkId in interface SemanticChunkOrBuilder
      Returns:
      The chunkId.
    • getChunkIdBytes

      public com.google.protobuf.ByteString getChunkIdBytes()
       Unique identifier for this chunk within its parent result.
       
      string chunk_id = 1;
      Specified by:
      getChunkIdBytes in interface SemanticChunkOrBuilder
      Returns:
      The bytes for chunkId.
    • setChunkId

      public SemanticChunk.Builder setChunkId(String value)
       Unique identifier for this chunk within its parent result.
       
      string chunk_id = 1;
      Parameters:
      value - The chunkId to set.
      Returns:
      This builder for chaining.
    • clearChunkId

      public SemanticChunk.Builder clearChunkId()
       Unique identifier for this chunk within its parent result.
       
      string chunk_id = 1;
      Returns:
      This builder for chaining.
    • setChunkIdBytes

      public SemanticChunk.Builder setChunkIdBytes(com.google.protobuf.ByteString value)
       Unique identifier for this chunk within its parent result.
       
      string chunk_id = 1;
      Parameters:
      value - The bytes for chunkId to set.
      Returns:
      This builder for chaining.
    • getChunkNumber

      public long getChunkNumber()
       Sequential number of this chunk within its parent result.
       
      int64 chunk_number = 2;
      Specified by:
      getChunkNumber in interface SemanticChunkOrBuilder
      Returns:
      The chunkNumber.
    • setChunkNumber

      public SemanticChunk.Builder setChunkNumber(long value)
       Sequential number of this chunk within its parent result.
       
      int64 chunk_number = 2;
      Parameters:
      value - The chunkNumber to set.
      Returns:
      This builder for chaining.
    • clearChunkNumber

      public SemanticChunk.Builder clearChunkNumber()
       Sequential number of this chunk within its parent result.
       
      int64 chunk_number = 2;
      Returns:
      This builder for chaining.
    • hasEmbeddingInfo

      public boolean hasEmbeddingInfo()
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
      Specified by:
      hasEmbeddingInfo in interface SemanticChunkOrBuilder
      Returns:
      Whether the embeddingInfo field is set.
    • getEmbeddingInfo

      public ChunkEmbedding getEmbeddingInfo()
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
      Specified by:
      getEmbeddingInfo in interface SemanticChunkOrBuilder
      Returns:
      The embeddingInfo.
    • setEmbeddingInfo

      public SemanticChunk.Builder setEmbeddingInfo(ChunkEmbedding value)
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
    • setEmbeddingInfo

      public SemanticChunk.Builder setEmbeddingInfo(ChunkEmbedding.Builder builderForValue)
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
    • mergeEmbeddingInfo

      public SemanticChunk.Builder mergeEmbeddingInfo(ChunkEmbedding value)
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
    • clearEmbeddingInfo

      public SemanticChunk.Builder clearEmbeddingInfo()
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
    • getEmbeddingInfoBuilder

      public ChunkEmbedding.Builder getEmbeddingInfoBuilder()
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
    • getEmbeddingInfoOrBuilder

      public ChunkEmbeddingOrBuilder getEmbeddingInfoOrBuilder()
       Text and embedding information for this chunk.
       
      .ai.pipestream.data.v1.ChunkEmbedding embedding_info = 3;
      Specified by:
      getEmbeddingInfoOrBuilder in interface SemanticChunkOrBuilder
    • getMetadataCount

      public int getMetadataCount()
      Description copied from interface: SemanticChunkOrBuilder
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
      Specified by:
      getMetadataCount in interface SemanticChunkOrBuilder
    • containsMetadata

      public boolean containsMetadata(String key)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
      Specified by:
      containsMetadata in interface SemanticChunkOrBuilder
    • getMetadata

      @Deprecated public Map<String,com.google.protobuf.Value> getMetadata()
      Deprecated.
      Use getMetadataMap() instead.
      Specified by:
      getMetadata in interface SemanticChunkOrBuilder
    • getMetadataMap

      public Map<String,com.google.protobuf.Value> getMetadataMap()
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
      Specified by:
      getMetadataMap in interface SemanticChunkOrBuilder
    • getMetadataOrDefault

      public com.google.protobuf.Value getMetadataOrDefault(String key, com.google.protobuf.Value defaultValue)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
      Specified by:
      getMetadataOrDefault in interface SemanticChunkOrBuilder
    • getMetadataOrThrow

      public com.google.protobuf.Value getMetadataOrThrow(String key)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
      Specified by:
      getMetadataOrThrow in interface SemanticChunkOrBuilder
    • clearMetadata

      public SemanticChunk.Builder clearMetadata()
    • removeMetadata

      public SemanticChunk.Builder removeMetadata(String key)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
    • getMutableMetadata

      @Deprecated public Map<String,com.google.protobuf.Value> getMutableMetadata()
      Deprecated.
      Use alternate mutation accessors instead.
    • putMetadata

      public SemanticChunk.Builder putMetadata(String key, com.google.protobuf.Value value)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
    • putAllMetadata

      public SemanticChunk.Builder putAllMetadata(Map<String,com.google.protobuf.Value> values)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;
    • putMetadataBuilderIfAbsent

      public com.google.protobuf.Value.Builder putMetadataBuilderIfAbsent(String key)
       Chunk-specific metadata (e.g., page number, section).
       
      map<string, .google.protobuf.Value> metadata = 4;