Class CheckGroundingResponse.Claim.Builder (0.51.0)

public static final class CheckGroundingResponse.Claim.Builder extends GeneratedMessageV3.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

Static 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 int

The citationIndices to add.

Returns
Type Description
CheckGroundingResponse.Claim.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CheckGroundingResponse.Claim.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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
Overrides

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.

clearField(Descriptors.FieldDescriptor field)

public CheckGroundingResponse.Claim.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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.

clearOneof(Descriptors.OneofDescriptor oneof)

public CheckGroundingResponse.Claim.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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.

clone()

public CheckGroundingResponse.Claim.Builder clone()
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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 int

The 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
Overrides

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 GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

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
Overrides
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
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CheckGroundingResponse.Claim.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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 int

The index to set the value at.

value int

The 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 String

The 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 ByteString

The 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 int

The endPos to set.

Returns
Type Description
CheckGroundingResponse.Claim.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CheckGroundingResponse.Claim.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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 boolean

The groundingCheckRequired to set.

Returns
Type Description
CheckGroundingResponse.Claim.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CheckGroundingResponse.Claim.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

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 int

The startPos to set.

Returns
Type Description
CheckGroundingResponse.Claim.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CheckGroundingResponse.Claim.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides