public final class Message extends 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
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()
Plain-text body of the message with all bot mentions stripped out.
|
List<Attachment> |
getAttachment()
User uploaded attachment.
|
List<Card> |
getCards()
Rich, formatted and interactive cards that can be used to display UI elements such as:
formatted texts, buttons, clickable images.
|
List<CardWithId> |
getCardsV2()
Rich, formatted and interactive cards that can be used to display UI elements and editable
widgets, such as: formatted text, buttons, clickable images, checkboxes, radio buttons.
|
String |
getCreateTime()
Output only.
|
String |
getFallbackText()
A plain-text description of the message's cards, used when the actual cards cannot be displayed
(e.g.
|
String |
getName() |
String |
getPreviewText()
Text for generating preview chips.
|
User |
getSender()
The user who created the message.
|
SlashCommand |
getSlashCommand()
Slash command information, if applicable.
|
Space |
getSpace()
The space the message belongs to.
|
String |
getText()
Plain-text body of the message.
|
Thread |
getThread()
The thread the message belongs to.
|
Message |
set(String fieldName,
Object value) |
Message |
setActionResponse(ActionResponse actionResponse)
Input only.
|
Message |
setAnnotations(List<Annotation> annotations)
Output only.
|
Message |
setArgumentText(String argumentText)
Plain-text body of the message with all bot mentions stripped out.
|
Message |
setAttachment(List<Attachment> attachment)
User uploaded attachment.
|
Message |
setCards(List<Card> cards)
Rich, formatted and interactive cards that can be used to display UI elements such as:
formatted texts, buttons, clickable images.
|
Message |
setCardsV2(List<CardWithId> cardsV2)
Rich, formatted and interactive cards that can be used to display UI elements and editable
widgets, such as: formatted text, buttons, clickable images, checkboxes, radio buttons.
|
Message |
setCreateTime(String createTime)
Output only.
|
Message |
setFallbackText(String fallbackText)
A plain-text description of the message's cards, used when the actual cards cannot be displayed
(e.g.
|
Message |
setName(String name) |
Message |
setPreviewText(String previewText)
Text for generating preview chips.
|
Message |
setSender(User sender)
The user who created the message.
|
Message |
setSlashCommand(SlashCommand slashCommand)
Slash command information, if applicable.
|
Message |
setSpace(Space space)
The space the message belongs to.
|
Message |
setText(String text)
Plain-text body of the message.
|
Message |
setThread(Thread thread)
The thread the message belongs to.
|
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<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 getCreateTime()
null
for nonepublic Message setCreateTime(String createTime)
createTime
- createTime or null
for nonepublic String getFallbackText()
null
for nonepublic Message setFallbackText(String fallbackText)
fallbackText
- fallbackText or null
for nonepublic String getName()
null
for nonepublic String getPreviewText()
null
for nonepublic Message setPreviewText(String previewText)
previewText
- previewText 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 Message set(String fieldName, Object value)
set
in class GenericJson
public Message clone()
clone
in class GenericJson
Copyright © 2011–2021 Google. All rights reserved.