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.v1.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.v1.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;
    • getUri

      public String getUri()
       The URI of the source.
       
      string uri = 5;
      Specified by:
      getUri in interface FactChunkOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       The URI of the source.
       
      string uri = 5;
      Specified by:
      getUriBytes in interface FactChunkOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public FactChunk.Builder setUri(String value)
       The URI of the source.
       
      string uri = 5;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public FactChunk.Builder clearUri()
       The URI of the source.
       
      string uri = 5;
      Returns:
      This builder for chaining.
    • setUriBytes

      public FactChunk.Builder setUriBytes(com.google.protobuf.ByteString value)
       The URI of the source.
       
      string uri = 5;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • getTitle

      public String getTitle()
       The title of the source.
       
      string title = 6;
      Specified by:
      getTitle in interface FactChunkOrBuilder
      Returns:
      The title.
    • getTitleBytes

      public com.google.protobuf.ByteString getTitleBytes()
       The title of the source.
       
      string title = 6;
      Specified by:
      getTitleBytes in interface FactChunkOrBuilder
      Returns:
      The bytes for title.
    • setTitle

      public FactChunk.Builder setTitle(String value)
       The title of the source.
       
      string title = 6;
      Parameters:
      value - The title to set.
      Returns:
      This builder for chaining.
    • clearTitle

      public FactChunk.Builder clearTitle()
       The title of the source.
       
      string title = 6;
      Returns:
      This builder for chaining.
    • setTitleBytes

      public FactChunk.Builder setTitleBytes(com.google.protobuf.ByteString value)
       The title of the source.
       
      string title = 6;
      Parameters:
      value - The bytes for title to set.
      Returns:
      This builder for chaining.
    • getDomain

      public String getDomain()
       The domain of the source.
       
      string domain = 7;
      Specified by:
      getDomain in interface FactChunkOrBuilder
      Returns:
      The domain.
    • getDomainBytes

      public com.google.protobuf.ByteString getDomainBytes()
       The domain of the source.
       
      string domain = 7;
      Specified by:
      getDomainBytes in interface FactChunkOrBuilder
      Returns:
      The bytes for domain.
    • setDomain

      public FactChunk.Builder setDomain(String value)
       The domain of the source.
       
      string domain = 7;
      Parameters:
      value - The domain to set.
      Returns:
      This builder for chaining.
    • clearDomain

      public FactChunk.Builder clearDomain()
       The domain of the source.
       
      string domain = 7;
      Returns:
      This builder for chaining.
    • setDomainBytes

      public FactChunk.Builder setDomainBytes(com.google.protobuf.ByteString value)
       The domain of the source.
       
      string domain = 7;
      Parameters:
      value - The bytes for domain to set.
      Returns:
      This builder for chaining.