Class GroundingChunk.RetrievedContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GroundingChunk.RetrievedContext.Builder>
com.google.cloud.aiplatform.v1.GroundingChunk.RetrievedContext.Builder
All Implemented Interfaces:
GroundingChunk.RetrievedContextOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GroundingChunk.RetrievedContext

public static final class GroundingChunk.RetrievedContext.Builder extends com.google.protobuf.GeneratedMessage.Builder<GroundingChunk.RetrievedContext.Builder> implements GroundingChunk.RetrievedContextOrBuilder
 Chunk from context retrieved by the retrieval tools.
 
Protobuf type google.cloud.aiplatform.v1.GroundingChunk.RetrievedContext
  • 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.Builder<GroundingChunk.RetrievedContext.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<GroundingChunk.RetrievedContext.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<GroundingChunk.RetrievedContext.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

    • isInitialized

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

      public GroundingChunk.RetrievedContext.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<GroundingChunk.RetrievedContext.Builder>
      Throws:
      IOException
    • getContextDetailsCase

      Specified by:
      getContextDetailsCase in interface GroundingChunk.RetrievedContextOrBuilder
    • clearContextDetails

      public GroundingChunk.RetrievedContext.Builder clearContextDetails()
    • hasRagChunk

      public boolean hasRagChunk()
       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
      Specified by:
      hasRagChunk in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      Whether the ragChunk field is set.
    • getRagChunk

      public RagChunk getRagChunk()
       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
      Specified by:
      getRagChunk in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The ragChunk.
    • setRagChunk

       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
    • setRagChunk

      public GroundingChunk.RetrievedContext.Builder setRagChunk(RagChunk.Builder builderForValue)
       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
    • mergeRagChunk

      public GroundingChunk.RetrievedContext.Builder mergeRagChunk(RagChunk value)
       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
    • clearRagChunk

       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
    • getRagChunkBuilder

      public RagChunk.Builder getRagChunkBuilder()
       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
    • getRagChunkOrBuilder

      public RagChunkOrBuilder getRagChunkOrBuilder()
       Additional context for the RAG retrieval result. This is only populated
       when using the RAG retrieval tool.
       
      .google.cloud.aiplatform.v1.RagChunk rag_chunk = 4;
      Specified by:
      getRagChunkOrBuilder in interface GroundingChunk.RetrievedContextOrBuilder
    • hasUri

      public boolean hasUri()
       URI reference of the attribution.
       
      optional string uri = 1;
      Specified by:
      hasUri in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      Whether the uri field is set.
    • getUri

      public String getUri()
       URI reference of the attribution.
       
      optional string uri = 1;
      Specified by:
      getUri in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       URI reference of the attribution.
       
      optional string uri = 1;
      Specified by:
      getUriBytes in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The bytes for uri.
    • setUri

       URI reference of the attribution.
       
      optional string uri = 1;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

       URI reference of the attribution.
       
      optional string uri = 1;
      Returns:
      This builder for chaining.
    • setUriBytes

      public GroundingChunk.RetrievedContext.Builder setUriBytes(com.google.protobuf.ByteString value)
       URI reference of the attribution.
       
      optional string uri = 1;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • hasTitle

      public boolean hasTitle()
       Title of the attribution.
       
      optional string title = 2;
      Specified by:
      hasTitle in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      Whether the title field is set.
    • getTitle

      public String getTitle()
       Title of the attribution.
       
      optional string title = 2;
      Specified by:
      getTitle in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The title.
    • getTitleBytes

      public com.google.protobuf.ByteString getTitleBytes()
       Title of the attribution.
       
      optional string title = 2;
      Specified by:
      getTitleBytes in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The bytes for title.
    • setTitle

       Title of the attribution.
       
      optional string title = 2;
      Parameters:
      value - The title to set.
      Returns:
      This builder for chaining.
    • clearTitle

       Title of the attribution.
       
      optional string title = 2;
      Returns:
      This builder for chaining.
    • setTitleBytes

      public GroundingChunk.RetrievedContext.Builder setTitleBytes(com.google.protobuf.ByteString value)
       Title of the attribution.
       
      optional string title = 2;
      Parameters:
      value - The bytes for title to set.
      Returns:
      This builder for chaining.
    • hasText

      public boolean hasText()
       Text of the attribution.
       
      optional string text = 3;
      Specified by:
      hasText in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      Whether the text field is set.
    • getText

      public String getText()
       Text of the attribution.
       
      optional string text = 3;
      Specified by:
      getText in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The text.
    • getTextBytes

      public com.google.protobuf.ByteString getTextBytes()
       Text of the attribution.
       
      optional string text = 3;
      Specified by:
      getTextBytes in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The bytes for text.
    • setText

       Text of the attribution.
       
      optional string text = 3;
      Parameters:
      value - The text to set.
      Returns:
      This builder for chaining.
    • clearText

       Text of the attribution.
       
      optional string text = 3;
      Returns:
      This builder for chaining.
    • setTextBytes

      public GroundingChunk.RetrievedContext.Builder setTextBytes(com.google.protobuf.ByteString value)
       Text of the attribution.
       
      optional string text = 3;
      Parameters:
      value - The bytes for text to set.
      Returns:
      This builder for chaining.
    • hasDocumentName

      public boolean hasDocumentName()
       Output only. The full document name for the referenced Vertex AI Search
       document.
       
      optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasDocumentName in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      Whether the documentName field is set.
    • getDocumentName

      public String getDocumentName()
       Output only. The full document name for the referenced Vertex AI Search
       document.
       
      optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDocumentName in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The documentName.
    • getDocumentNameBytes

      public com.google.protobuf.ByteString getDocumentNameBytes()
       Output only. The full document name for the referenced Vertex AI Search
       document.
       
      optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDocumentNameBytes in interface GroundingChunk.RetrievedContextOrBuilder
      Returns:
      The bytes for documentName.
    • setDocumentName

      public GroundingChunk.RetrievedContext.Builder setDocumentName(String value)
       Output only. The full document name for the referenced Vertex AI Search
       document.
       
      optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The documentName to set.
      Returns:
      This builder for chaining.
    • clearDocumentName

      public GroundingChunk.RetrievedContext.Builder clearDocumentName()
       Output only. The full document name for the referenced Vertex AI Search
       document.
       
      optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setDocumentNameBytes

      public GroundingChunk.RetrievedContext.Builder setDocumentNameBytes(com.google.protobuf.ByteString value)
       Output only. The full document name for the referenced Vertex AI Search
       document.
       
      optional string document_name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for documentName to set.
      Returns:
      This builder for chaining.