public static final class Citation.Builder extends GeneratedMessage.Builder<Citation.Builder> implements CitationOrBuilder Citations are inline references that can provide users more detailed
information about the inline reference. Corresponding inline citations
should be present in the message text in a markup format of
<chat-citation data-id="{id}">{text}</chat-citation>. Citations are
only supported when the message's markup_syntax is set to MARKDOWN.
Unreferenced citations in Elements.citations (those without a matching
<chat-citation> tag in the message text) are ignored and do not cause the
message to be rejected.
Protobuf type google.chat.v1.Citation
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Citation.BuilderImplements
CitationOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllCitedSources(Iterable<? extends CitedSource> values)
public Citation.Builder addAllCitedSources(Iterable<? extends CitedSource> values)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.chat.v1.CitedSource> |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
addCitedSources(CitedSource value)
public Citation.Builder addCitedSources(CitedSource value)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
CitedSource |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
addCitedSources(CitedSource.Builder builderForValue)
public Citation.Builder addCitedSources(CitedSource.Builder builderForValue)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
CitedSource.Builder |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
addCitedSources(int index, CitedSource value)
public Citation.Builder addCitedSources(int index, CitedSource value)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
CitedSource |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
addCitedSources(int index, CitedSource.Builder builderForValue)
public Citation.Builder addCitedSources(int index, CitedSource.Builder builderForValue)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
CitedSource.Builder |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
addCitedSourcesBuilder()
public CitedSource.Builder addCitedSourcesBuilder()Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
CitedSource.Builder |
|
addCitedSourcesBuilder(int index)
public CitedSource.Builder addCitedSourcesBuilder(int index)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CitedSource.Builder |
|
build()
public Citation build()| Returns | |
|---|---|
| Type | Description |
Citation |
|
buildPartial()
public Citation buildPartial()| Returns | |
|---|---|
| Type | Description |
Citation |
|
clear()
public Citation.Builder clear()| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
clearCitedSources()
public Citation.Builder clearCitedSources()Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
clearId()
public Citation.Builder clearId() Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the data-id attribute of the
<chat-citation> tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
This builder for chaining. |
getCitedSources(int index)
public CitedSource getCitedSources(int index)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.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 that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.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 that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getCitedSourcesCount()
public int getCitedSourcesCount()Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getCitedSourcesList()
public List<CitedSource> getCitedSourcesList()Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<CitedSource> |
|
getCitedSourcesOrBuilder(int index)
public CitedSourceOrBuilder getCitedSourcesOrBuilder(int index)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.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 that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.chat.v1.CitedSourceOrBuilder> |
|
getDefaultInstanceForType()
public Citation getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Citation |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getId()
public String getId() Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the data-id attribute of the
<chat-citation> tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The id. |
getIdBytes()
public ByteString getIdBytes() Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the data-id attribute of the
<chat-citation> tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for id. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Citation other)
public Citation.Builder mergeFrom(Citation other)| Parameter | |
|---|---|
| Name | Description |
other |
Citation |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Citation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Citation.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
removeCitedSources(int index)
public Citation.Builder removeCitedSources(int index)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
setCitedSources(int index, CitedSource value)
public Citation.Builder setCitedSources(int index, CitedSource value)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
CitedSource |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
setCitedSources(int index, CitedSource.Builder builderForValue)
public Citation.Builder setCitedSources(int index, CitedSource.Builder builderForValue)Optional. A list of sources that are relevant to the citation. Sources are displayed in the citation hover card.
repeated .google.chat.v1.CitedSource cited_sources = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
CitedSource.Builder |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
|
setId(String value)
public Citation.Builder setId(String value) Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the data-id attribute of the
<chat-citation> tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe id to set. |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
This builder for chaining. |
setIdBytes(ByteString value)
public Citation.Builder setIdBytes(ByteString value) Required. The ID of the citation. This ID is defined by the app creating
the citation and must match the data-id attribute of the
<chat-citation> tag in the message text. Must contain only ASCII letters
and numbers, and less than 63 characters.
string id = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for id to set. |
| Returns | |
|---|---|
| Type | Description |
Citation.Builder |
This builder for chaining. |