Class Citation (0.67.0)

public final class Citation extends GeneratedMessage 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

Implements

CitationOrBuilder

Static Fields

CITED_SOURCES_FIELD_NUMBER

public static final int CITED_SOURCES_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Citation getDefaultInstance()
Returns
Type Description
Citation

getDescriptor()

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

newBuilder()

public static Citation.Builder newBuilder()
Returns
Type Description
Citation.Builder

newBuilder(Citation prototype)

public static Citation.Builder newBuilder(Citation prototype)
Parameter
Name Description
prototype Citation
Returns
Type Description
Citation.Builder

parseDelimitedFrom(InputStream input)

public static Citation parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Citation
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Citation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citation
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Citation parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Citation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Citation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Citation parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Citation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Citation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Citation parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Citation
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Citation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citation
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Citation parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Citation
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Citation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citation
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Citation parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Citation
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Citation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Citation
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Citation> parser()
Returns
Type Description
Parser<Citation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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

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

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.

getParserForType()

public Parser<Citation> getParserForType()
Returns
Type Description
Parser<Citation>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Citation.Builder newBuilderForType()
Returns
Type Description
Citation.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Citation.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Citation.Builder
Overrides

toBuilder()

public Citation.Builder toBuilder()
Returns
Type Description
Citation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException