Class GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder (0.49.0)

public static final class GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder extends GeneratedMessageV3.Builder<GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder> implements GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupportOrBuilder

Grounding info for a claim in the candidate and its support.

Protobuf type google.cloud.discoveryengine.v1.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

Static Methods

getDescriptor()

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

Methods

addAllSupportChunkIndices(Iterable<? extends Integer> values)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder addAllSupportChunkIndices(Iterable<? extends Integer> values)

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The supportChunkIndices to add.

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

addSupportChunkIndices(int value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder addSupportChunkIndices(int value)

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Parameter
Name Description
value int

The supportChunkIndices to add.

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

build()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport build()
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport

buildPartial()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport buildPartial()
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport

clear()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clear()
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

clearClaimText()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clearClaimText()

Text for the claim in the candidate. Always provided when a support is found.

string claim_text = 1;

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

clearSupportChunkIndices()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clearSupportChunkIndices()

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

clearSupportScore()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clearSupportScore()

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated. Higher value means that the claim is better supported by the chunks.

optional float support_score = 2;

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

clone()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder clone()
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

getClaimText()

public String getClaimText()

Text for the claim in the candidate. Always provided when a support is found.

string claim_text = 1;

Returns
Type Description
String

The claimText.

getClaimTextBytes()

public ByteString getClaimTextBytes()

Text for the claim in the candidate. Always provided when a support is found.

string claim_text = 1;

Returns
Type Description
ByteString

The bytes for claimText.

getDefaultInstanceForType()

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport getDefaultInstanceForType()
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getSupportChunkIndices(int index)

public int getSupportChunkIndices(int index)

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The supportChunkIndices at the given index.

getSupportChunkIndicesCount()

public int getSupportChunkIndicesCount()

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Returns
Type Description
int

The count of supportChunkIndices.

getSupportChunkIndicesList()

public List<Integer> getSupportChunkIndicesList()

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Returns
Type Description
List<Integer>

A list containing the supportChunkIndices.

getSupportScore()

public float getSupportScore()

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated. Higher value means that the claim is better supported by the chunks.

optional float support_score = 2;

Returns
Type Description
float

The supportScore.

hasSupportScore()

public boolean hasSupportScore()

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated. Higher value means that the claim is better supported by the chunks.

optional float support_score = 2;

Returns
Type Description
boolean

Whether the supportScore field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport other)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder mergeFrom(GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport other)
Parameter
Name Description
other GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

setClaimText(String value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setClaimText(String value)

Text for the claim in the candidate. Always provided when a support is found.

string claim_text = 1;

Parameter
Name Description
value String

The claimText to set.

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

setClaimTextBytes(ByteString value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setClaimTextBytes(ByteString value)

Text for the claim in the candidate. Always provided when a support is found.

string claim_text = 1;

Parameter
Name Description
value ByteString

The bytes for claimText to set.

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

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

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides

setSupportChunkIndices(int index, int value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setSupportChunkIndices(int index, int value)

A list of indices (into 'support_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that support_chunks[1], support_chunks[3], support_chunks[4] are the chunks attributed to the claim.

repeated int32 support_chunk_indices = 3;

Parameters
Name Description
index int

The index to set the value at.

value int

The supportChunkIndices to set.

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

setSupportScore(float value)

public GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setSupportScore(float value)

A score in the range of [0, 1] describing how grounded is a specific claim in the support chunks indicated. Higher value means that the claim is better supported by the chunks.

optional float support_score = 2;

Parameter
Name Description
value float

The supportScore to set.

Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport.Builder
Overrides