Class Elements.Builder (0.67.0)

public static final class Elements.Builder extends GeneratedMessage.Builder<Elements.Builder> implements ElementsOrBuilder

Elements are additional message components, including inline citations (where each citation is associated with a specific portion of the message text) and cited_sources (which are general references used to generate the response and are not directly linked to specific segments of the text). Both citations and cited_sources can be provided as input when creating or updating a message and are populated on output when reading a message.

Protobuf type google.chat.v1.Elements

Implements

ElementsOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllCitations(Iterable<? extends Citation> values)

public Elements.Builder addAllCitations(Iterable<? extends Citation> values)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.chat.v1.Citation>
Returns
Type Description
Elements.Builder

addAllCitedSources(Iterable<? extends CitedSource> values)

public Elements.Builder addAllCitedSources(Iterable<? extends CitedSource> values)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.chat.v1.CitedSource>
Returns
Type Description
Elements.Builder

addCitations(Citation value)

public Elements.Builder addCitations(Citation value)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Citation
Returns
Type Description
Elements.Builder

addCitations(Citation.Builder builderForValue)

public Elements.Builder addCitations(Citation.Builder builderForValue)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Citation.Builder
Returns
Type Description
Elements.Builder

addCitations(int index, Citation value)

public Elements.Builder addCitations(int index, Citation value)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Citation
Returns
Type Description
Elements.Builder

addCitations(int index, Citation.Builder builderForValue)

public Elements.Builder addCitations(int index, Citation.Builder builderForValue)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Citation.Builder
Returns
Type Description
Elements.Builder

addCitationsBuilder()

public Citation.Builder addCitationsBuilder()

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Citation.Builder

addCitationsBuilder(int index)

public Citation.Builder addCitationsBuilder(int index)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Citation.Builder

addCitedSources(CitedSource value)

public Elements.Builder addCitedSources(CitedSource value)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CitedSource
Returns
Type Description
Elements.Builder

addCitedSources(CitedSource.Builder builderForValue)

public Elements.Builder addCitedSources(CitedSource.Builder builderForValue)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue CitedSource.Builder
Returns
Type Description
Elements.Builder

addCitedSources(int index, CitedSource value)

public Elements.Builder addCitedSources(int index, CitedSource value)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value CitedSource
Returns
Type Description
Elements.Builder

addCitedSources(int index, CitedSource.Builder builderForValue)

public Elements.Builder addCitedSources(int index, CitedSource.Builder builderForValue)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue CitedSource.Builder
Returns
Type Description
Elements.Builder

addCitedSourcesBuilder()

public CitedSource.Builder addCitedSourcesBuilder()

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CitedSource.Builder

addCitedSourcesBuilder(int index)

public CitedSource.Builder addCitedSourcesBuilder(int index)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CitedSource.Builder

build()

public Elements build()
Returns
Type Description
Elements

buildPartial()

public Elements buildPartial()
Returns
Type Description
Elements

clear()

public Elements.Builder clear()
Returns
Type Description
Elements.Builder
Overrides

clearCitations()

public Elements.Builder clearCitations()

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Elements.Builder

clearCitedSources()

public Elements.Builder clearCitedSources()

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Elements.Builder

getCitations(int index)

public Citation getCitations(int index)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Citation

getCitationsBuilder(int index)

public Citation.Builder getCitationsBuilder(int index)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Citation.Builder

getCitationsBuilderList()

public List<Citation.Builder> getCitationsBuilderList()

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getCitationsCount()

public int getCitationsCount()

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getCitationsList()

public List<Citation> getCitationsList()

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Citation>

getCitationsOrBuilder(int index)

public CitationOrBuilder getCitationsOrBuilder(int index)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CitationOrBuilder

getCitationsOrBuilderList()

public List<? extends CitationOrBuilder> getCitationsOrBuilderList()

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.chat.v1.CitationOrBuilder>

getCitedSources(int index)

public CitedSource getCitedSources(int index)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CitedSource

getCitedSourcesBuilder(int index)

public CitedSource.Builder getCitedSourcesBuilder(int index)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CitedSource.Builder

getCitedSourcesBuilderList()

public List<CitedSource.Builder> getCitedSourcesBuilderList()

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getCitedSourcesCount()

public int getCitedSourcesCount()

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getCitedSourcesList()

public List<CitedSource> getCitedSourcesList()

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<CitedSource>

getCitedSourcesOrBuilder(int index)

public CitedSourceOrBuilder getCitedSourcesOrBuilder(int index)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
CitedSourceOrBuilder

getCitedSourcesOrBuilderList()

public List<? extends CitedSourceOrBuilder> getCitedSourcesOrBuilderList()

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.chat.v1.CitedSourceOrBuilder>

getDefaultInstanceForType()

public Elements getDefaultInstanceForType()
Returns
Type Description
Elements

getDescriptorForType()

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Elements other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

removeCitations(int index)

public Elements.Builder removeCitations(int index)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Elements.Builder

removeCitedSources(int index)

public Elements.Builder removeCitedSources(int index)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Elements.Builder

setCitations(int index, Citation value)

public Elements.Builder setCitations(int index, Citation value)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Citation
Returns
Type Description
Elements.Builder

setCitations(int index, Citation.Builder builderForValue)

public Elements.Builder setCitations(int index, Citation.Builder builderForValue)

Optional. A list of inline citations referenced within the message text (via <chat-citation> tags) that render as interactive hover cards.

repeated .google.chat.v1.Citation citations = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Citation.Builder
Returns
Type Description
Elements.Builder

setCitedSources(int index, CitedSource value)

public Elements.Builder setCitedSources(int index, CitedSource value)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value CitedSource
Returns
Type Description
Elements.Builder

setCitedSources(int index, CitedSource.Builder builderForValue)

public Elements.Builder setCitedSources(int index, CitedSource.Builder builderForValue)

Optional. A list of sources to be displayed under the message as footer links. These are not referenced inline. For inline references, use citations.

repeated .google.chat.v1.CitedSource cited_sources = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue CitedSource.Builder
Returns
Type Description
Elements.Builder