Class CheckGroundingResponse.Claim.Builder

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

public static final class CheckGroundingResponse.Claim.Builder extends com.google.protobuf.GeneratedMessage.Builder<CheckGroundingResponse.Claim.Builder> implements CheckGroundingResponse.ClaimOrBuilder
 Text and citation info for a claim in the answer candidate.
 
Protobuf type google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim
  • 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.Claim.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.Claim.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.Claim.Builder>
    • getDefaultInstanceForType

      public CheckGroundingResponse.Claim 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 CheckGroundingResponse.Claim buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

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

      public boolean hasStartPos()
       Position indicating the start of the claim in the answer candidate,
       measured in bytes.
       
      optional int32 start_pos = 1;
      Specified by:
      hasStartPos in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      Whether the startPos field is set.
    • getStartPos

      public int getStartPos()
       Position indicating the start of the claim in the answer candidate,
       measured in bytes.
       
      optional int32 start_pos = 1;
      Specified by:
      getStartPos in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      The startPos.
    • setStartPos

      public CheckGroundingResponse.Claim.Builder setStartPos(int value)
       Position indicating the start of the claim in the answer candidate,
       measured in bytes.
       
      optional int32 start_pos = 1;
      Parameters:
      value - The startPos to set.
      Returns:
      This builder for chaining.
    • clearStartPos

      public CheckGroundingResponse.Claim.Builder clearStartPos()
       Position indicating the start of the claim in the answer candidate,
       measured in bytes.
       
      optional int32 start_pos = 1;
      Returns:
      This builder for chaining.
    • hasEndPos

      public boolean hasEndPos()
       Position indicating the end of the claim in the answer candidate,
       exclusive.
       
      optional int32 end_pos = 2;
      Specified by:
      hasEndPos in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      Whether the endPos field is set.
    • getEndPos

      public int getEndPos()
       Position indicating the end of the claim in the answer candidate,
       exclusive.
       
      optional int32 end_pos = 2;
      Specified by:
      getEndPos in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      The endPos.
    • setEndPos

      public CheckGroundingResponse.Claim.Builder setEndPos(int value)
       Position indicating the end of the claim in the answer candidate,
       exclusive.
       
      optional int32 end_pos = 2;
      Parameters:
      value - The endPos to set.
      Returns:
      This builder for chaining.
    • clearEndPos

       Position indicating the end of the claim in the answer candidate,
       exclusive.
       
      optional int32 end_pos = 2;
      Returns:
      This builder for chaining.
    • getClaimText

      public String getClaimText()
       Text for the claim in the answer candidate. Always provided regardless of
       whether citations or anti-citations are found.
       
      string claim_text = 3;
      Specified by:
      getClaimText in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      The claimText.
    • getClaimTextBytes

      public com.google.protobuf.ByteString getClaimTextBytes()
       Text for the claim in the answer candidate. Always provided regardless of
       whether citations or anti-citations are found.
       
      string claim_text = 3;
      Specified by:
      getClaimTextBytes in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      The bytes for claimText.
    • setClaimText

      public CheckGroundingResponse.Claim.Builder setClaimText(String value)
       Text for the claim in the answer candidate. Always provided regardless of
       whether citations or anti-citations are found.
       
      string claim_text = 3;
      Parameters:
      value - The claimText to set.
      Returns:
      This builder for chaining.
    • clearClaimText

      public CheckGroundingResponse.Claim.Builder clearClaimText()
       Text for the claim in the answer candidate. Always provided regardless of
       whether citations or anti-citations are found.
       
      string claim_text = 3;
      Returns:
      This builder for chaining.
    • setClaimTextBytes

      public CheckGroundingResponse.Claim.Builder setClaimTextBytes(com.google.protobuf.ByteString value)
       Text for the claim in the answer candidate. Always provided regardless of
       whether citations or anti-citations are found.
       
      string claim_text = 3;
      Parameters:
      value - The bytes for claimText to set.
      Returns:
      This builder for chaining.
    • getCitationIndicesList

      public List<Integer> getCitationIndicesList()
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Specified by:
      getCitationIndicesList in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      A list containing the citationIndices.
    • getCitationIndicesCount

      public int getCitationIndicesCount()
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Specified by:
      getCitationIndicesCount in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      The count of citationIndices.
    • getCitationIndices

      public int getCitationIndices(int index)
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Specified by:
      getCitationIndices in interface CheckGroundingResponse.ClaimOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The citationIndices at the given index.
    • setCitationIndices

      public CheckGroundingResponse.Claim.Builder setCitationIndices(int index, int value)
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Parameters:
      index - The index to set the value at.
      value - The citationIndices to set.
      Returns:
      This builder for chaining.
    • addCitationIndices

      public CheckGroundingResponse.Claim.Builder addCitationIndices(int value)
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Parameters:
      value - The citationIndices to add.
      Returns:
      This builder for chaining.
    • addAllCitationIndices

      public CheckGroundingResponse.Claim.Builder addAllCitationIndices(Iterable<? extends Integer> values)
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Parameters:
      values - The citationIndices to add.
      Returns:
      This builder for chaining.
    • clearCitationIndices

      public CheckGroundingResponse.Claim.Builder clearCitationIndices()
       A list of indices (into 'cited_chunks') specifying the citations
       associated with the claim. For instance [1,3,4] means that
       cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
       supporting for the claim. A citation to a fact indicates that the claim
       is supported by the fact.
       
      repeated int32 citation_indices = 4;
      Returns:
      This builder for chaining.
    • hasGroundingCheckRequired

      public boolean hasGroundingCheckRequired()
       Indicates that this claim required grounding check. When the system
       decided this claim doesn't require attribution/grounding check, this
       field will be set to false. In that case, no grounding check was done for
       the claim and therefore
       [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices],
       [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
       and
       [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
       should not be returned.
       
      optional bool grounding_check_required = 6;
      Specified by:
      hasGroundingCheckRequired in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      Whether the groundingCheckRequired field is set.
    • getGroundingCheckRequired

      public boolean getGroundingCheckRequired()
       Indicates that this claim required grounding check. When the system
       decided this claim doesn't require attribution/grounding check, this
       field will be set to false. In that case, no grounding check was done for
       the claim and therefore
       [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices],
       [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
       and
       [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
       should not be returned.
       
      optional bool grounding_check_required = 6;
      Specified by:
      getGroundingCheckRequired in interface CheckGroundingResponse.ClaimOrBuilder
      Returns:
      The groundingCheckRequired.
    • setGroundingCheckRequired

      public CheckGroundingResponse.Claim.Builder setGroundingCheckRequired(boolean value)
       Indicates that this claim required grounding check. When the system
       decided this claim doesn't require attribution/grounding check, this
       field will be set to false. In that case, no grounding check was done for
       the claim and therefore
       [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices],
       [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
       and
       [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
       should not be returned.
       
      optional bool grounding_check_required = 6;
      Parameters:
      value - The groundingCheckRequired to set.
      Returns:
      This builder for chaining.
    • clearGroundingCheckRequired

      public CheckGroundingResponse.Claim.Builder clearGroundingCheckRequired()
       Indicates that this claim required grounding check. When the system
       decided this claim doesn't require attribution/grounding check, this
       field will be set to false. In that case, no grounding check was done for
       the claim and therefore
       [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices],
       [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices],
       and
       [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score]
       should not be returned.
       
      optional bool grounding_check_required = 6;
      Returns:
      This builder for chaining.