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 Summary
Modifier and TypeMethodDescriptionaddAllCitationIndices(Iterable<? extends Integer> values) A list of indices (into 'cited_chunks') specifying the citations associated with the claim.addCitationIndices(int value) A list of indices (into 'cited_chunks') specifying the citations associated with the claim.build()clear()A list of indices (into 'cited_chunks') specifying the citations associated with the claim.Text for the claim in the answer candidate.Position indicating the end of the claim in the answer candidate, exclusive.Indicates that this claim required grounding check.Position indicating the start of the claim in the answer candidate, measured in bytes.intgetCitationIndices(int index) A list of indices (into 'cited_chunks') specifying the citations associated with the claim.intA list of indices (into 'cited_chunks') specifying the citations associated with the claim.A list of indices (into 'cited_chunks') specifying the citations associated with the claim.Text for the claim in the answer candidate.com.google.protobuf.ByteStringText for the claim in the answer candidate.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintPosition indicating the end of the claim in the answer candidate, exclusive.booleanIndicates that this claim required grounding check.intPosition indicating the start of the claim in the answer candidate, measured in bytes.booleanPosition indicating the end of the claim in the answer candidate, exclusive.booleanIndicates that this claim required grounding check.booleanPosition indicating the start of the claim in the answer candidate, measured in bytes.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCitationIndices(int index, int value) A list of indices (into 'cited_chunks') specifying the citations associated with the claim.setClaimText(String value) Text for the claim in the answer candidate.setClaimTextBytes(com.google.protobuf.ByteString value) Text for the claim in the answer candidate.setEndPos(int value) Position indicating the end of the claim in the answer candidate, exclusive.setGroundingCheckRequired(boolean value) Indicates that this claim required grounding check.setStartPos(int value) Position indicating the start of the claim in the answer candidate, measured in bytes.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingResponse.Claim.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingResponse.Claim.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<CheckGroundingResponse.Claim.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<CheckGroundingResponse.Claim.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
hasStartPosin interfaceCheckGroundingResponse.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:
getStartPosin interfaceCheckGroundingResponse.ClaimOrBuilder- Returns:
- The startPos.
-
setStartPos
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
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:
hasEndPosin interfaceCheckGroundingResponse.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:
getEndPosin interfaceCheckGroundingResponse.ClaimOrBuilder- Returns:
- The endPos.
-
setEndPos
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
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:
getClaimTextin interfaceCheckGroundingResponse.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:
getClaimTextBytesin interfaceCheckGroundingResponse.ClaimOrBuilder- Returns:
- The bytes for claimText.
-
setClaimText
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
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
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
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:
getCitationIndicesListin interfaceCheckGroundingResponse.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:
getCitationIndicesCountin interfaceCheckGroundingResponse.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:
getCitationIndicesin interfaceCheckGroundingResponse.ClaimOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The citationIndices at the given index.
-
setCitationIndices
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
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
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:
hasGroundingCheckRequiredin interfaceCheckGroundingResponse.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:
getGroundingCheckRequiredin interfaceCheckGroundingResponse.ClaimOrBuilder- Returns:
- The groundingCheckRequired.
-
setGroundingCheckRequired
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
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.
-