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
Inherited Members
com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
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>
|
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>
|
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
|
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];
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];
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];
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];
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
|
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];
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];
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];
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];
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];
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
|
build()
buildPartial()
public Elements buildPartial()
clear()
public Elements.Builder clear()
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];
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];
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
|
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
|
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];
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];
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
|
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
|
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
|
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];
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];
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
|
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()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(Elements other)
public Elements.Builder mergeFrom(Elements other)
| Parameter |
| Name |
Description |
other |
Elements
|
public Elements.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public Elements.Builder mergeFrom(Message other)
| Parameter |
| Name |
Description |
other |
Message
|
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
|
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
|
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];
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];
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];
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];