Class Elements (0.67.0)

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

CITATIONS_FIELD_NUMBER

public static final int CITATIONS_FIELD_NUMBER
Field Value
Type Description
int

CITED_SOURCES_FIELD_NUMBER

public static final int CITED_SOURCES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Elements getDefaultInstance()
Returns
Type Description
Elements

getDescriptor()

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

newBuilder()

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

newBuilder(Elements prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

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

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

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

getParserForType()

public Parser<Elements> getParserForType()
Returns
Type Description
Parser<Elements>
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 Elements.Builder newBuilderForType()
Returns
Type Description
Elements.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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