public static final class CheckGroundingResponse.Claim.Builder extends GeneratedMessage.Builder<CheckGroundingResponse.Claim.Builder> implements CheckGroundingResponse.ClaimOrBuilderText and citation info for a claim in the answer candidate.
Protobuf type google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CheckGroundingResponse.Claim.BuilderImplements
CheckGroundingResponse.ClaimOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllCitationIndices(Iterable<? extends Integer> values)
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;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends java.lang.Integer>The citationIndices to add. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
addCitationIndices(int value)
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;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe citationIndices to add. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
build()
public CheckGroundingResponse.Claim build()| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim |
|
buildPartial()
public CheckGroundingResponse.Claim buildPartial()| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim |
|
clear()
public CheckGroundingResponse.Claim.Builder clear()| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
|
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 | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
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 | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
clearEndPos()
public CheckGroundingResponse.Claim.Builder clearEndPos()Position indicating the end of the claim in the answer candidate, exclusive.
optional int32 end_pos = 2;
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
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, anti_citation_indices, and score should not be returned.
optional bool grounding_check_required = 6;
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
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 | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
getCitationIndices(int index)
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;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
int |
The citationIndices at the given index. |
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;
| Returns | |
|---|---|
| Type | Description |
int |
The count of citationIndices. |
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;
| Returns | |
|---|---|
| Type | Description |
List<Integer> |
A list containing the citationIndices. |
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;
| Returns | |
|---|---|
| Type | Description |
String |
The claimText. |
getClaimTextBytes()
public 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;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for claimText. |
getDefaultInstanceForType()
public CheckGroundingResponse.Claim getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getEndPos()
public int getEndPos()Position indicating the end of the claim in the answer candidate, exclusive.
optional int32 end_pos = 2;
| Returns | |
|---|---|
| Type | Description |
int |
The endPos. |
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, anti_citation_indices, and score should not be returned.
optional bool grounding_check_required = 6;
| Returns | |
|---|---|
| Type | Description |
boolean |
The groundingCheckRequired. |
getStartPos()
public int getStartPos()Position indicating the start of the claim in the answer candidate, measured in bytes.
optional int32 start_pos = 1;
| Returns | |
|---|---|
| Type | Description |
int |
The startPos. |
hasEndPos()
public boolean hasEndPos()Position indicating the end of the claim in the answer candidate, exclusive.
optional int32 end_pos = 2;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the endPos field is set. |
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, anti_citation_indices, and score should not be returned.
optional bool grounding_check_required = 6;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the groundingCheckRequired field is set. |
hasStartPos()
public boolean hasStartPos()Position indicating the start of the claim in the answer candidate, measured in bytes.
optional int32 start_pos = 1;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the startPos field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CheckGroundingResponse.Claim other)
public CheckGroundingResponse.Claim.Builder mergeFrom(CheckGroundingResponse.Claim other)| Parameter | |
|---|---|
| Name | Description |
other |
CheckGroundingResponse.Claim |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CheckGroundingResponse.Claim.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CheckGroundingResponse.Claim.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
|
setCitationIndices(int index, int value)
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 | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
intThe citationIndices to set. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
setClaimText(String value)
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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe claimText to set. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
setClaimTextBytes(ByteString value)
public CheckGroundingResponse.Claim.Builder setClaimTextBytes(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;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for claimText to set. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
setEndPos(int value)
public CheckGroundingResponse.Claim.Builder setEndPos(int value)Position indicating the end of the claim in the answer candidate, exclusive.
optional int32 end_pos = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe endPos to set. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
setGroundingCheckRequired(boolean value)
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, anti_citation_indices, and score should not be returned.
optional bool grounding_check_required = 6;
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe groundingCheckRequired to set. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |
setStartPos(int value)
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;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe startPos to set. |
| Returns | |
|---|---|
| Type | Description |
CheckGroundingResponse.Claim.Builder |
This builder for chaining. |