Class GroundingSupport.Builder

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

public static final class GroundingSupport.Builder extends com.google.protobuf.GeneratedMessage.Builder<GroundingSupport.Builder> implements GroundingSupportOrBuilder
 Grounding support.
 
Protobuf type google.cloud.aiplatform.v1.GroundingSupport
  • 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<GroundingSupport.Builder>
    • clear

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

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

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

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

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

      public GroundingSupport.Builder mergeFrom(GroundingSupport other)
    • isInitialized

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

      public GroundingSupport.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<GroundingSupport.Builder>
      Throws:
      IOException
    • hasSegment

      public boolean hasSegment()
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
      Specified by:
      hasSegment in interface GroundingSupportOrBuilder
      Returns:
      Whether the segment field is set.
    • getSegment

      public Segment getSegment()
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
      Specified by:
      getSegment in interface GroundingSupportOrBuilder
      Returns:
      The segment.
    • setSegment

      public GroundingSupport.Builder setSegment(Segment value)
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
    • setSegment

      public GroundingSupport.Builder setSegment(Segment.Builder builderForValue)
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
    • mergeSegment

      public GroundingSupport.Builder mergeSegment(Segment value)
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
    • clearSegment

      public GroundingSupport.Builder clearSegment()
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
    • getSegmentBuilder

      public Segment.Builder getSegmentBuilder()
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
    • getSegmentOrBuilder

      public SegmentOrBuilder getSegmentOrBuilder()
       Segment of the content this support belongs to.
       
      optional .google.cloud.aiplatform.v1.Segment segment = 1;
      Specified by:
      getSegmentOrBuilder in interface GroundingSupportOrBuilder
    • getGroundingChunkIndicesList

      public List<Integer> getGroundingChunkIndicesList()
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Specified by:
      getGroundingChunkIndicesList in interface GroundingSupportOrBuilder
      Returns:
      A list containing the groundingChunkIndices.
    • getGroundingChunkIndicesCount

      public int getGroundingChunkIndicesCount()
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Specified by:
      getGroundingChunkIndicesCount in interface GroundingSupportOrBuilder
      Returns:
      The count of groundingChunkIndices.
    • getGroundingChunkIndices

      public int getGroundingChunkIndices(int index)
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Specified by:
      getGroundingChunkIndices in interface GroundingSupportOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The groundingChunkIndices at the given index.
    • setGroundingChunkIndices

      public GroundingSupport.Builder setGroundingChunkIndices(int index, int value)
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Parameters:
      index - The index to set the value at.
      value - The groundingChunkIndices to set.
      Returns:
      This builder for chaining.
    • addGroundingChunkIndices

      public GroundingSupport.Builder addGroundingChunkIndices(int value)
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Parameters:
      value - The groundingChunkIndices to add.
      Returns:
      This builder for chaining.
    • addAllGroundingChunkIndices

      public GroundingSupport.Builder addAllGroundingChunkIndices(Iterable<? extends Integer> values)
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Parameters:
      values - The groundingChunkIndices to add.
      Returns:
      This builder for chaining.
    • clearGroundingChunkIndices

      public GroundingSupport.Builder clearGroundingChunkIndices()
       A list of indices (into 'grounding_chunk') specifying the
       citations associated with the claim. For instance [1,3,4] means
       that grounding_chunk[1], grounding_chunk[3],
       grounding_chunk[4] are the retrieved content attributed to the claim.
       
      repeated int32 grounding_chunk_indices = 2;
      Returns:
      This builder for chaining.
    • getConfidenceScoresList

      public List<Float> getConfidenceScoresList()
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Specified by:
      getConfidenceScoresList in interface GroundingSupportOrBuilder
      Returns:
      A list containing the confidenceScores.
    • getConfidenceScoresCount

      public int getConfidenceScoresCount()
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Specified by:
      getConfidenceScoresCount in interface GroundingSupportOrBuilder
      Returns:
      The count of confidenceScores.
    • getConfidenceScores

      public float getConfidenceScores(int index)
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Specified by:
      getConfidenceScores in interface GroundingSupportOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The confidenceScores at the given index.
    • setConfidenceScores

      public GroundingSupport.Builder setConfidenceScores(int index, float value)
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Parameters:
      index - The index to set the value at.
      value - The confidenceScores to set.
      Returns:
      This builder for chaining.
    • addConfidenceScores

      public GroundingSupport.Builder addConfidenceScores(float value)
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Parameters:
      value - The confidenceScores to add.
      Returns:
      This builder for chaining.
    • addAllConfidenceScores

      public GroundingSupport.Builder addAllConfidenceScores(Iterable<? extends Float> values)
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Parameters:
      values - The confidenceScores to add.
      Returns:
      This builder for chaining.
    • clearConfidenceScores

      public GroundingSupport.Builder clearConfidenceScores()
       Confidence score of the support references. Ranges from 0 to 1. 1 is the
       most confident. This list must have the same size as the
       grounding_chunk_indices.
       
      repeated float confidence_scores = 3;
      Returns:
      This builder for chaining.