public final class Message
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
Message |
clone() |
ActionResponse |
getActionResponse()
Input only.
|
List<Annotation> |
getAnnotations()
Output only.
|
String |
getArgumentText()
Output only.
|
List<AttachedGif> |
getAttachedGifs()
Output only.
|
List<Attachment> |
getAttachment()
User-uploaded attachment.
|
List<Card> |
getCards()
Deprecated: Use `cards_v2` instead.
|
List<CardWithId> |
getCardsV2()
An array of [cards](https://developers.google.com/chat/api/reference/rest/v1/cards).
|
String |
getClientAssignedMessageId()
Optional.
|
String |
getCreateTime()
Optional.
|
String |
getDeleteTime()
Output only.
|
DeletionMetadata |
getDeletionMetadata()
Output only.
|
List<EmojiReactionSummary> |
getEmojiReactionSummaries()
Output only.
|
String |
getFallbackText()
A plain-text description of the message's cards, used when the actual cards can't be
displayed—for example, mobile notifications.
|
String |
getFormattedText()
Output only.
|
String |
getLastUpdateTime()
Output only.
|
MatchedUrl |
getMatchedUrl()
Output only.
|
String |
getName()
Resource name of the message.
|
User |
getPrivateMessageViewer()
Immutable.
|
QuotedMessageMetadata |
getQuotedMessageMetadata()
Output only.
|
User |
getSender()
Output only.
|
SlashCommand |
getSlashCommand()
Output only.
|
Space |
getSpace()
If your Chat app [authenticates as a
user](https://developers.google.com/chat/api/guides/auth/users), the output populates the
[space](https://developers.google.com/chat/api/reference/rest/v1/spaces) `name`.
|
String |
getText()
Plain-text body of the message.
|
Thread |
getThread()
The thread the message belongs to.
|
Boolean |
getThreadReply()
Output only.
|
Message |
set(String fieldName,
Object value) |
Message |
setActionResponse(ActionResponse actionResponse)
Input only.
|
Message |
setAnnotations(List<Annotation> annotations)
Output only.
|
Message |
setArgumentText(String argumentText)
Output only.
|
Message |
setAttachedGifs(List<AttachedGif> attachedGifs)
Output only.
|
Message |
setAttachment(List<Attachment> attachment)
User-uploaded attachment.
|
Message |
setCards(List<Card> cards)
Deprecated: Use `cards_v2` instead.
|
Message |
setCardsV2(List<CardWithId> cardsV2)
An array of [cards](https://developers.google.com/chat/api/reference/rest/v1/cards).
|
Message |
setClientAssignedMessageId(String clientAssignedMessageId)
Optional.
|
Message |
setCreateTime(String createTime)
Optional.
|
Message |
setDeleteTime(String deleteTime)
Output only.
|
Message |
setDeletionMetadata(DeletionMetadata deletionMetadata)
Output only.
|
Message |
setEmojiReactionSummaries(List<EmojiReactionSummary> emojiReactionSummaries)
Output only.
|
Message |
setFallbackText(String fallbackText)
A plain-text description of the message's cards, used when the actual cards can't be
displayed—for example, mobile notifications.
|
Message |
setFormattedText(String formattedText)
Output only.
|
Message |
setLastUpdateTime(String lastUpdateTime)
Output only.
|
Message |
setMatchedUrl(MatchedUrl matchedUrl)
Output only.
|
Message |
setName(String name)
Resource name of the message.
|
Message |
setPrivateMessageViewer(User privateMessageViewer)
Immutable.
|
Message |
setQuotedMessageMetadata(QuotedMessageMetadata quotedMessageMetadata)
Output only.
|
Message |
setSender(User sender)
Output only.
|
Message |
setSlashCommand(SlashCommand slashCommand)
Output only.
|
Message |
setSpace(Space space)
If your Chat app [authenticates as a
user](https://developers.google.com/chat/api/guides/auth/users), the output populates the
[space](https://developers.google.com/chat/api/reference/rest/v1/spaces) `name`.
|
Message |
setText(String text)
Plain-text body of the message.
|
Message |
setThread(Thread thread)
The thread the message belongs to.
|
Message |
setThreadReply(Boolean threadReply)
Output only.
|
getFactory, setFactory, toPrettyString, toString
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, isEmpty, keySet, size, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public ActionResponse getActionResponse()
null
for nonepublic Message setActionResponse(ActionResponse actionResponse)
actionResponse
- actionResponse or null
for nonepublic List<Annotation> getAnnotations()
null
for nonepublic Message setAnnotations(List<Annotation> annotations)
annotations
- annotations or null
for nonepublic String getArgumentText()
null
for nonepublic Message setArgumentText(String argumentText)
argumentText
- argumentText or null
for nonepublic List<AttachedGif> getAttachedGifs()
null
for nonepublic Message setAttachedGifs(List<AttachedGif> attachedGifs)
attachedGifs
- attachedGifs or null
for nonepublic List<Attachment> getAttachment()
null
for nonepublic Message setAttachment(List<Attachment> attachment)
attachment
- attachment or null
for nonepublic List<Card> getCards()
null
for nonepublic Message setCards(List<Card> cards)
cards
- cards or null
for nonepublic List<CardWithId> getCardsV2()
null
for nonepublic Message setCardsV2(List<CardWithId> cardsV2)
cardsV2
- cardsV2 or null
for nonepublic String getClientAssignedMessageId()
null
for nonepublic Message setClientAssignedMessageId(String clientAssignedMessageId)
clientAssignedMessageId
- clientAssignedMessageId or null
for nonepublic String getCreateTime()
null
for nonepublic Message setCreateTime(String createTime)
createTime
- createTime or null
for nonepublic String getDeleteTime()
null
for nonepublic Message setDeleteTime(String deleteTime)
deleteTime
- deleteTime or null
for nonepublic DeletionMetadata getDeletionMetadata()
null
for nonepublic Message setDeletionMetadata(DeletionMetadata deletionMetadata)
deletionMetadata
- deletionMetadata or null
for nonepublic List<EmojiReactionSummary> getEmojiReactionSummaries()
null
for nonepublic Message setEmojiReactionSummaries(List<EmojiReactionSummary> emojiReactionSummaries)
emojiReactionSummaries
- emojiReactionSummaries or null
for nonepublic String getFallbackText()
null
for nonepublic Message setFallbackText(String fallbackText)
fallbackText
- fallbackText or null
for nonepublic String getFormattedText()
null
for nonepublic Message setFormattedText(String formattedText)
formattedText
- formattedText or null
for nonepublic String getLastUpdateTime()
null
for nonepublic Message setLastUpdateTime(String lastUpdateTime)
lastUpdateTime
- lastUpdateTime or null
for nonepublic MatchedUrl getMatchedUrl()
null
for nonepublic Message setMatchedUrl(MatchedUrl matchedUrl)
matchedUrl
- matchedUrl or null
for nonepublic String getName()
null
for nonepublic Message setName(String name)
name
- name or null
for nonepublic User getPrivateMessageViewer()
null
for nonepublic Message setPrivateMessageViewer(User privateMessageViewer)
privateMessageViewer
- privateMessageViewer or null
for nonepublic QuotedMessageMetadata getQuotedMessageMetadata()
null
for nonepublic Message setQuotedMessageMetadata(QuotedMessageMetadata quotedMessageMetadata)
quotedMessageMetadata
- quotedMessageMetadata or null
for nonepublic User getSender()
null
for nonepublic Message setSender(User sender)
sender
- sender or null
for nonepublic SlashCommand getSlashCommand()
null
for nonepublic Message setSlashCommand(SlashCommand slashCommand)
slashCommand
- slashCommand or null
for nonepublic Space getSpace()
null
for nonepublic Message setSpace(Space space)
space
- space or null
for nonepublic String getText()
null
for nonepublic Message setText(String text)
text
- text or null
for nonepublic Thread getThread()
null
for nonepublic Message setThread(Thread thread)
thread
- thread or null
for nonepublic Boolean getThreadReply()
null
for nonepublic Message setThreadReply(Boolean threadReply)
threadReply
- threadReply or null
for nonepublic Message set(String fieldName, Object value)
set
in class com.google.api.client.json.GenericJson
public Message clone()
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.