Class CheckGroundingResponse.Builder

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

public static final class CheckGroundingResponse.Builder extends com.google.protobuf.GeneratedMessage.Builder<CheckGroundingResponse.Builder> implements CheckGroundingResponseOrBuilder
 Response message for the
 [GroundedGenerationService.CheckGrounding][google.cloud.discoveryengine.v1beta.GroundedGenerationService.CheckGrounding]
 method.
 
Protobuf type google.cloud.discoveryengine.v1beta.CheckGroundingResponse
  • 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<CheckGroundingResponse.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<CheckGroundingResponse.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<CheckGroundingResponse.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public CheckGroundingResponse.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<CheckGroundingResponse.Builder>
      Throws:
      IOException
    • hasSupportScore

      public boolean hasSupportScore()
       The support score for the input answer candidate.
       Higher the score, higher is the fraction of claims that are supported by
       the provided facts. This is always set when a response is returned.
       
      optional float support_score = 1;
      Specified by:
      hasSupportScore in interface CheckGroundingResponseOrBuilder
      Returns:
      Whether the supportScore field is set.
    • getSupportScore

      public float getSupportScore()
       The support score for the input answer candidate.
       Higher the score, higher is the fraction of claims that are supported by
       the provided facts. This is always set when a response is returned.
       
      optional float support_score = 1;
      Specified by:
      getSupportScore in interface CheckGroundingResponseOrBuilder
      Returns:
      The supportScore.
    • setSupportScore

      public CheckGroundingResponse.Builder setSupportScore(float value)
       The support score for the input answer candidate.
       Higher the score, higher is the fraction of claims that are supported by
       the provided facts. This is always set when a response is returned.
       
      optional float support_score = 1;
      Parameters:
      value - The supportScore to set.
      Returns:
      This builder for chaining.
    • clearSupportScore

      public CheckGroundingResponse.Builder clearSupportScore()
       The support score for the input answer candidate.
       Higher the score, higher is the fraction of claims that are supported by
       the provided facts. This is always set when a response is returned.
       
      optional float support_score = 1;
      Returns:
      This builder for chaining.
    • getCitedChunksList

      public List<FactChunk> getCitedChunksList()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
      Specified by:
      getCitedChunksList in interface CheckGroundingResponseOrBuilder
    • getCitedChunksCount

      public int getCitedChunksCount()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
      Specified by:
      getCitedChunksCount in interface CheckGroundingResponseOrBuilder
    • getCitedChunks

      public FactChunk getCitedChunks(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
      Specified by:
      getCitedChunks in interface CheckGroundingResponseOrBuilder
    • setCitedChunks

      public CheckGroundingResponse.Builder setCitedChunks(int index, FactChunk value)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • setCitedChunks

      public CheckGroundingResponse.Builder setCitedChunks(int index, FactChunk.Builder builderForValue)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • addCitedChunks

      public CheckGroundingResponse.Builder addCitedChunks(FactChunk value)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • addCitedChunks

      public CheckGroundingResponse.Builder addCitedChunks(int index, FactChunk value)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • addCitedChunks

      public CheckGroundingResponse.Builder addCitedChunks(FactChunk.Builder builderForValue)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • addCitedChunks

      public CheckGroundingResponse.Builder addCitedChunks(int index, FactChunk.Builder builderForValue)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • addAllCitedChunks

      public CheckGroundingResponse.Builder addAllCitedChunks(Iterable<? extends FactChunk> values)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • clearCitedChunks

      public CheckGroundingResponse.Builder clearCitedChunks()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • removeCitedChunks

      public CheckGroundingResponse.Builder removeCitedChunks(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • getCitedChunksBuilder

      public FactChunk.Builder getCitedChunksBuilder(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • getCitedChunksOrBuilder

      public FactChunkOrBuilder getCitedChunksOrBuilder(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
      Specified by:
      getCitedChunksOrBuilder in interface CheckGroundingResponseOrBuilder
    • getCitedChunksOrBuilderList

      public List<? extends FactChunkOrBuilder> getCitedChunksOrBuilderList()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
      Specified by:
      getCitedChunksOrBuilderList in interface CheckGroundingResponseOrBuilder
    • addCitedChunksBuilder

      public FactChunk.Builder addCitedChunksBuilder()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • addCitedChunksBuilder

      public FactChunk.Builder addCitedChunksBuilder(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • getCitedChunksBuilderList

      public List<FactChunk.Builder> getCitedChunksBuilderList()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3;
    • getCitedFactsList

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
      Specified by:
      getCitedFactsList in interface CheckGroundingResponseOrBuilder
    • getCitedFactsCount

      public int getCitedFactsCount()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
      Specified by:
      getCitedFactsCount in interface CheckGroundingResponseOrBuilder
    • getCitedFacts

      public CheckGroundingResponse.CheckGroundingFactChunk getCitedFacts(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
      Specified by:
      getCitedFacts in interface CheckGroundingResponseOrBuilder
    • setCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • setCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • addCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • addCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • addCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • addCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • addAllCitedFacts

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • clearCitedFacts

      public CheckGroundingResponse.Builder clearCitedFacts()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • removeCitedFacts

      public CheckGroundingResponse.Builder removeCitedFacts(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • getCitedFactsBuilder

      public CheckGroundingResponse.CheckGroundingFactChunk.Builder getCitedFactsBuilder(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • getCitedFactsOrBuilder

      public CheckGroundingResponse.CheckGroundingFactChunkOrBuilder getCitedFactsOrBuilder(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
      Specified by:
      getCitedFactsOrBuilder in interface CheckGroundingResponseOrBuilder
    • getCitedFactsOrBuilderList

      public List<? extends CheckGroundingResponse.CheckGroundingFactChunkOrBuilder> getCitedFactsOrBuilderList()
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
      Specified by:
      getCitedFactsOrBuilderList in interface CheckGroundingResponseOrBuilder
    • addCitedFactsBuilder

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • addCitedFactsBuilder

      public CheckGroundingResponse.CheckGroundingFactChunk.Builder addCitedFactsBuilder(int index)
       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • getCitedFactsBuilderList

       List of facts cited across all claims in the answer candidate.
       These are derived from the facts supplied in the request.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk cited_facts = 6;
    • getClaimsList

      public List<CheckGroundingResponse.Claim> getClaimsList()
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
      Specified by:
      getClaimsList in interface CheckGroundingResponseOrBuilder
    • getClaimsCount

      public int getClaimsCount()
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
      Specified by:
      getClaimsCount in interface CheckGroundingResponseOrBuilder
    • getClaims

      public CheckGroundingResponse.Claim getClaims(int index)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
      Specified by:
      getClaims in interface CheckGroundingResponseOrBuilder
    • setClaims

      public CheckGroundingResponse.Builder setClaims(int index, CheckGroundingResponse.Claim value)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • setClaims

      public CheckGroundingResponse.Builder setClaims(int index, CheckGroundingResponse.Claim.Builder builderForValue)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • addClaims

       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • addClaims

      public CheckGroundingResponse.Builder addClaims(int index, CheckGroundingResponse.Claim value)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • addClaims

       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • addClaims

      public CheckGroundingResponse.Builder addClaims(int index, CheckGroundingResponse.Claim.Builder builderForValue)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • addAllClaims

      public CheckGroundingResponse.Builder addAllClaims(Iterable<? extends CheckGroundingResponse.Claim> values)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • clearClaims

      public CheckGroundingResponse.Builder clearClaims()
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • removeClaims

      public CheckGroundingResponse.Builder removeClaims(int index)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • getClaimsBuilder

      public CheckGroundingResponse.Claim.Builder getClaimsBuilder(int index)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • getClaimsOrBuilder

      public CheckGroundingResponse.ClaimOrBuilder getClaimsOrBuilder(int index)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
      Specified by:
      getClaimsOrBuilder in interface CheckGroundingResponseOrBuilder
    • getClaimsOrBuilderList

      public List<? extends CheckGroundingResponse.ClaimOrBuilder> getClaimsOrBuilderList()
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
      Specified by:
      getClaimsOrBuilderList in interface CheckGroundingResponseOrBuilder
    • addClaimsBuilder

      public CheckGroundingResponse.Claim.Builder addClaimsBuilder()
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • addClaimsBuilder

      public CheckGroundingResponse.Claim.Builder addClaimsBuilder(int index)
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;
    • getClaimsBuilderList

      public List<CheckGroundingResponse.Claim.Builder> getClaimsBuilderList()
       Claim texts and citation info across all claims in the answer candidate.
       
      repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4;