Class Citations.InlineCitation.Builder (0.19.0)

public static final class Citations.InlineCitation.Builder extends GeneratedMessage.Builder<Citations.InlineCitation.Builder> implements Citations.InlineCitationOrBuilder

An inline citation in the response text.

Protobuf type google.cloud.ces.v1beta.Citations.InlineCitation

Static Methods

getDescriptor()

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

Methods

addAllCitedChunkIndices(Iterable<? extends Integer> values)

public Citations.InlineCitation.Builder addAllCitedChunkIndices(Iterable<? extends Integer> values)

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

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

The citedChunkIndices to add.

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

addCitedChunkIndices(int value)

public Citations.InlineCitation.Builder addCitedChunkIndices(int value)

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

Parameter
Name Description
value int

The citedChunkIndices to add.

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

build()

public Citations.InlineCitation build()
Returns
Type Description
Citations.InlineCitation

buildPartial()

public Citations.InlineCitation buildPartial()
Returns
Type Description
Citations.InlineCitation

clear()

public Citations.InlineCitation.Builder clear()
Returns
Type Description
Citations.InlineCitation.Builder
Overrides

clearCitedChunkIndices()

public Citations.InlineCitation.Builder clearCitedChunkIndices()

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

clearEndIndex()

public Citations.InlineCitation.Builder clearEndIndex()

The ending index (in bytes) of the text segment in the agent response.

int32 end_index = 2;

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

clearStartIndex()

public Citations.InlineCitation.Builder clearStartIndex()

The starting index (in bytes) of the text segment in the agent response.

int32 start_index = 1;

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

getCitedChunkIndices(int index)

public int getCitedChunkIndices(int index)

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The citedChunkIndices at the given index.

getCitedChunkIndicesCount()

public int getCitedChunkIndicesCount()

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

Returns
Type Description
int

The count of citedChunkIndices.

getCitedChunkIndicesList()

public List<Integer> getCitedChunkIndicesList()

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

Returns
Type Description
List<Integer>

A list containing the citedChunkIndices.

getDefaultInstanceForType()

public Citations.InlineCitation getDefaultInstanceForType()
Returns
Type Description
Citations.InlineCitation

getDescriptorForType()

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

getEndIndex()

public int getEndIndex()

The ending index (in bytes) of the text segment in the agent response.

int32 end_index = 2;

Returns
Type Description
int

The endIndex.

getStartIndex()

public int getStartIndex()

The starting index (in bytes) of the text segment in the agent response.

int32 start_index = 1;

Returns
Type Description
int

The startIndex.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Citations.InlineCitation other)

public Citations.InlineCitation.Builder mergeFrom(Citations.InlineCitation other)
Parameter
Name Description
other Citations.InlineCitation
Returns
Type Description
Citations.InlineCitation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Citations.InlineCitation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citations.InlineCitation.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Citations.InlineCitation.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Citations.InlineCitation.Builder
Overrides

setCitedChunkIndices(int index, int value)

public Citations.InlineCitation.Builder setCitedChunkIndices(int index, int value)

The indices of the cited chunks that back this text segment. Indices refer to the elements in cited_chunks.

repeated int32 cited_chunk_indices = 3;

Parameters
Name Description
index int

The index to set the value at.

value int

The citedChunkIndices to set.

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

setEndIndex(int value)

public Citations.InlineCitation.Builder setEndIndex(int value)

The ending index (in bytes) of the text segment in the agent response.

int32 end_index = 2;

Parameter
Name Description
value int

The endIndex to set.

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.

setStartIndex(int value)

public Citations.InlineCitation.Builder setStartIndex(int value)

The starting index (in bytes) of the text segment in the agent response.

int32 start_index = 1;

Parameter
Name Description
value int

The startIndex to set.

Returns
Type Description
Citations.InlineCitation.Builder

This builder for chaining.