Class FactChunk.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FactChunk.Builder>
com.google.cloud.discoveryengine.v1beta.FactChunk.Builder
All Implemented Interfaces:
FactChunkOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
FactChunk

public static final class FactChunk.Builder extends com.google.protobuf.GeneratedMessage.Builder<FactChunk.Builder> implements FactChunkOrBuilder
 Fact Chunk.
 
Protobuf type google.cloud.discoveryengine.v1beta.FactChunk
  • 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<FactChunk.Builder>
    • internalGetMutableMapFieldReflection

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

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

      public FactChunk.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<FactChunk.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<FactChunk.Builder>
    • getDefaultInstanceForType

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

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

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

      public FactChunk.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<FactChunk.Builder>
    • mergeFrom

      public FactChunk.Builder mergeFrom(FactChunk other)
    • isInitialized

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

      public FactChunk.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<FactChunk.Builder>
      Throws:
      IOException
    • getChunkText

      public String getChunkText()
       Text content of the fact chunk. Can be at most 10K characters long.
       
      string chunk_text = 1;
      Specified by:
      getChunkText in interface FactChunkOrBuilder
      Returns:
      The chunkText.
    • getChunkTextBytes

      public com.google.protobuf.ByteString getChunkTextBytes()
       Text content of the fact chunk. Can be at most 10K characters long.
       
      string chunk_text = 1;
      Specified by:
      getChunkTextBytes in interface FactChunkOrBuilder
      Returns:
      The bytes for chunkText.
    • setChunkText

      public FactChunk.Builder setChunkText(String value)
       Text content of the fact chunk. Can be at most 10K characters long.
       
      string chunk_text = 1;
      Parameters:
      value - The chunkText to set.
      Returns:
      This builder for chaining.
    • clearChunkText

      public FactChunk.Builder clearChunkText()
       Text content of the fact chunk. Can be at most 10K characters long.
       
      string chunk_text = 1;
      Returns:
      This builder for chaining.
    • setChunkTextBytes

      public FactChunk.Builder setChunkTextBytes(com.google.protobuf.ByteString value)
       Text content of the fact chunk. Can be at most 10K characters long.
       
      string chunk_text = 1;
      Parameters:
      value - The bytes for chunkText to set.
      Returns:
      This builder for chaining.
    • getSource

      public String getSource()
       Source from which this fact chunk was retrieved. If it was retrieved
       from the GroundingFacts provided in the request then this field will
       contain the index of the specific fact from which this chunk was
       retrieved.
       
      string source = 2;
      Specified by:
      getSource in interface FactChunkOrBuilder
      Returns:
      The source.
    • getSourceBytes

      public com.google.protobuf.ByteString getSourceBytes()
       Source from which this fact chunk was retrieved. If it was retrieved
       from the GroundingFacts provided in the request then this field will
       contain the index of the specific fact from which this chunk was
       retrieved.
       
      string source = 2;
      Specified by:
      getSourceBytes in interface FactChunkOrBuilder
      Returns:
      The bytes for source.
    • setSource

      public FactChunk.Builder setSource(String value)
       Source from which this fact chunk was retrieved. If it was retrieved
       from the GroundingFacts provided in the request then this field will
       contain the index of the specific fact from which this chunk was
       retrieved.
       
      string source = 2;
      Parameters:
      value - The source to set.
      Returns:
      This builder for chaining.
    • clearSource

      public FactChunk.Builder clearSource()
       Source from which this fact chunk was retrieved. If it was retrieved
       from the GroundingFacts provided in the request then this field will
       contain the index of the specific fact from which this chunk was
       retrieved.
       
      string source = 2;
      Returns:
      This builder for chaining.
    • setSourceBytes

      public FactChunk.Builder setSourceBytes(com.google.protobuf.ByteString value)
       Source from which this fact chunk was retrieved. If it was retrieved
       from the GroundingFacts provided in the request then this field will
       contain the index of the specific fact from which this chunk was
       retrieved.
       
      string source = 2;
      Parameters:
      value - The bytes for source to set.
      Returns:
      This builder for chaining.
    • getIndex

      public int getIndex()
       The index of this chunk. Currently, only used for the streaming mode.
       
      int32 index = 4;
      Specified by:
      getIndex in interface FactChunkOrBuilder
      Returns:
      The index.
    • setIndex

      public FactChunk.Builder setIndex(int value)
       The index of this chunk. Currently, only used for the streaming mode.
       
      int32 index = 4;
      Parameters:
      value - The index to set.
      Returns:
      This builder for chaining.
    • clearIndex

      public FactChunk.Builder clearIndex()
       The index of this chunk. Currently, only used for the streaming mode.
       
      int32 index = 4;
      Returns:
      This builder for chaining.
    • getSourceMetadataCount

      public int getSourceMetadataCount()
      Description copied from interface: FactChunkOrBuilder
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
      Specified by:
      getSourceMetadataCount in interface FactChunkOrBuilder
    • containsSourceMetadata

      public boolean containsSourceMetadata(String key)
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
      Specified by:
      containsSourceMetadata in interface FactChunkOrBuilder
    • getSourceMetadata

      @Deprecated public Map<String,String> getSourceMetadata()
      Deprecated.
      Specified by:
      getSourceMetadata in interface FactChunkOrBuilder
    • getSourceMetadataMap

      public Map<String,String> getSourceMetadataMap()
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
      Specified by:
      getSourceMetadataMap in interface FactChunkOrBuilder
    • getSourceMetadataOrDefault

      public String getSourceMetadataOrDefault(String key, String defaultValue)
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
      Specified by:
      getSourceMetadataOrDefault in interface FactChunkOrBuilder
    • getSourceMetadataOrThrow

      public String getSourceMetadataOrThrow(String key)
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
      Specified by:
      getSourceMetadataOrThrow in interface FactChunkOrBuilder
    • clearSourceMetadata

      public FactChunk.Builder clearSourceMetadata()
    • removeSourceMetadata

      public FactChunk.Builder removeSourceMetadata(String key)
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
    • getMutableSourceMetadata

      @Deprecated public Map<String,String> getMutableSourceMetadata()
      Deprecated.
      Use alternate mutation accessors instead.
    • putSourceMetadata

      public FactChunk.Builder putSourceMetadata(String key, String value)
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;
    • putAllSourceMetadata

      public FactChunk.Builder putAllSourceMetadata(Map<String,String> values)
       More fine-grained information for the source reference.
       
      map<string, string> source_metadata = 3;