Class CheckGroundingResponse.Claim (0.41.0)

public static final class CheckGroundingResponse.Claim extends GeneratedMessageV3 implements CheckGroundingResponse.ClaimOrBuilder

Text and citation info for a claim in the answer candidate.

Protobuf type google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim

Static Fields

CITATION_INDICES_FIELD_NUMBER

public static final int CITATION_INDICES_FIELD_NUMBER
Field Value
Type Description
int

CLAIM_TEXT_FIELD_NUMBER

public static final int CLAIM_TEXT_FIELD_NUMBER
Field Value
Type Description
int

END_POS_FIELD_NUMBER

public static final int END_POS_FIELD_NUMBER
Field Value
Type Description
int

GROUNDING_CHECK_REQUIRED_FIELD_NUMBER

public static final int GROUNDING_CHECK_REQUIRED_FIELD_NUMBER
Field Value
Type Description
int

START_POS_FIELD_NUMBER

public static final int START_POS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CheckGroundingResponse.Claim getDefaultInstance()
Returns
Type Description
CheckGroundingResponse.Claim

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CheckGroundingResponse.Claim.Builder newBuilder()
Returns
Type Description
CheckGroundingResponse.Claim.Builder

newBuilder(CheckGroundingResponse.Claim prototype)

public static CheckGroundingResponse.Claim.Builder newBuilder(CheckGroundingResponse.Claim prototype)
Parameter
Name Description
prototype CheckGroundingResponse.Claim
Returns
Type Description
CheckGroundingResponse.Claim.Builder

parseDelimitedFrom(InputStream input)

public static CheckGroundingResponse.Claim parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingResponse.Claim parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CheckGroundingResponse.Claim parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingResponse.Claim parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CheckGroundingResponse.Claim parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingResponse.Claim parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CheckGroundingResponse.Claim parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingResponse.Claim parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CheckGroundingResponse.Claim parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingResponse.Claim parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CheckGroundingResponse.Claim parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CheckGroundingResponse.Claim parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CheckGroundingResponse.Claim
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CheckGroundingResponse.Claim> parser()
Returns
Type Description
Parser<Claim>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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, and anti_citation_indices should not be returned.

optional bool grounding_check_required = 6;

Returns
Type Description
boolean

The groundingCheckRequired.

getParserForType()

public Parser<CheckGroundingResponse.Claim> getParserForType()
Returns
Type Description
Parser<Claim>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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, and anti_citation_indices 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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CheckGroundingResponse.Claim.Builder newBuilderForType()
Returns
Type Description
CheckGroundingResponse.Claim.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CheckGroundingResponse.Claim.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CheckGroundingResponse.Claim.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CheckGroundingResponse.Claim.Builder toBuilder()
Returns
Type Description
CheckGroundingResponse.Claim.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException