Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Chat::V1::Message.
A message in a Google Chat space.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#accessory_widgets
def accessory_widgets() -> ::Array<::Google::Apps::Chat::V1::AccessoryWidget>
-
(::Array<::Google::Apps::Chat::V1::AccessoryWidget>) — One or more interactive widgets that appear at the bottom of a message.
You can add accessory widgets to messages that contain text, cards, or both
text and cards. Not supported for messages that contain dialogs. For
details, see Add interactive widgets at the bottom of a
message.
Creating a message with accessory widgets requires app authentication.
#accessory_widgets=
def accessory_widgets=(value) -> ::Array<::Google::Apps::Chat::V1::AccessoryWidget>
-
value (::Array<::Google::Apps::Chat::V1::AccessoryWidget>) — One or more interactive widgets that appear at the bottom of a message.
You can add accessory widgets to messages that contain text, cards, or both
text and cards. Not supported for messages that contain dialogs. For
details, see Add interactive widgets at the bottom of a
message.
Creating a message with accessory widgets requires app authentication.
-
(::Array<::Google::Apps::Chat::V1::AccessoryWidget>) — One or more interactive widgets that appear at the bottom of a message.
You can add accessory widgets to messages that contain text, cards, or both
text and cards. Not supported for messages that contain dialogs. For
details, see Add interactive widgets at the bottom of a
message.
Creating a message with accessory widgets requires app authentication.
#action_response
def action_response() -> ::Google::Apps::Chat::V1::ActionResponse
- (::Google::Apps::Chat::V1::ActionResponse) — Input only. Parameters that a Chat app can use to configure how its response is posted.
#action_response=
def action_response=(value) -> ::Google::Apps::Chat::V1::ActionResponse
- value (::Google::Apps::Chat::V1::ActionResponse) — Input only. Parameters that a Chat app can use to configure how its response is posted.
- (::Google::Apps::Chat::V1::ActionResponse) — Input only. Parameters that a Chat app can use to configure how its response is posted.
#annotations
def annotations() -> ::Array<::Google::Apps::Chat::V1::Annotation>
-
(::Array<::Google::Apps::Chat::V1::Annotation>) — Output only. Annotations associated with the
text
in this message.
#argument_text
def argument_text() -> ::String
- (::String) — Output only. Plain-text body of the message with all Chat app mentions stripped out.
#attached_gifs
def attached_gifs() -> ::Array<::Google::Apps::Chat::V1::AttachedGif>
- (::Array<::Google::Apps::Chat::V1::AttachedGif>) — Output only. GIF images that are attached to the message.
#attachment
def attachment() -> ::Array<::Google::Apps::Chat::V1::Attachment>
- (::Array<::Google::Apps::Chat::V1::Attachment>) — User-uploaded attachment.
#attachment=
def attachment=(value) -> ::Array<::Google::Apps::Chat::V1::Attachment>
- value (::Array<::Google::Apps::Chat::V1::Attachment>) — User-uploaded attachment.
- (::Array<::Google::Apps::Chat::V1::Attachment>) — User-uploaded attachment.
#cards
def cards() -> ::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>
-
(::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>) — Deprecated: Use
cards_v2
instead.Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message.
cards
andcards_v2
can have a maximum size of 32 KB.
#cards=
def cards=(value) -> ::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>
-
value (::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>) — Deprecated: Use
cards_v2
instead.Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message.
cards
andcards_v2
can have a maximum size of 32 KB.
-
(::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>) — Deprecated: Use
cards_v2
instead.Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message.
cards
andcards_v2
can have a maximum size of 32 KB.
#cards_v2
def cards_v2() -> ::Array<::Google::Apps::Chat::V1::CardWithId>
-
(::Array<::Google::Apps::Chat::V1::CardWithId>) — An array of
cards.
Only Chat apps can create cards. If your Chat app authenticates as a user, the messages can't contain cards.
To learn about cards and how to create them, see Send card messages.
#cards_v2=
def cards_v2=(value) -> ::Array<::Google::Apps::Chat::V1::CardWithId>
-
value (::Array<::Google::Apps::Chat::V1::CardWithId>) — An array of
cards.
Only Chat apps can create cards. If your Chat app authenticates as a user, the messages can't contain cards.
To learn about cards and how to create them, see Send card messages.
-
(::Array<::Google::Apps::Chat::V1::CardWithId>) — An array of
cards.
Only Chat apps can create cards. If your Chat app authenticates as a user, the messages can't contain cards.
To learn about cards and how to create them, see Send card messages.
#client_assigned_message_id
def client_assigned_message_id() -> ::String
-
(::String) — Optional. A custom ID for the message. You can use field to identify a
message, or to get, delete, or update a message. To set a custom ID,
specify the
messageId
field when you create the message. For details, see Name a message.
#client_assigned_message_id=
def client_assigned_message_id=(value) -> ::String
-
value (::String) — Optional. A custom ID for the message. You can use field to identify a
message, or to get, delete, or update a message. To set a custom ID,
specify the
messageId
field when you create the message. For details, see Name a message.
-
(::String) — Optional. A custom ID for the message. You can use field to identify a
message, or to get, delete, or update a message. To set a custom ID,
specify the
messageId
field when you create the message. For details, see Name a message.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
-
(::Google::Protobuf::Timestamp) — Optional. Immutable. For spaces created in Chat, the time at which the
message was created. This field is output only, except when used in import
mode spaces.
For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.
#create_time=
def create_time=(value) -> ::Google::Protobuf::Timestamp
-
value (::Google::Protobuf::Timestamp) — Optional. Immutable. For spaces created in Chat, the time at which the
message was created. This field is output only, except when used in import
mode spaces.
For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.
-
(::Google::Protobuf::Timestamp) — Optional. Immutable. For spaces created in Chat, the time at which the
message was created. This field is output only, except when used in import
mode spaces.
For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.
#delete_time
def delete_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.
#deletion_metadata
def deletion_metadata() -> ::Google::Apps::Chat::V1::DeletionMetadata
-
(::Google::Apps::Chat::V1::DeletionMetadata) — Output only. Information about a deleted message. A message is deleted when
delete_time
is set.
#emoji_reaction_summaries
def emoji_reaction_summaries() -> ::Array<::Google::Apps::Chat::V1::EmojiReactionSummary>
- (::Array<::Google::Apps::Chat::V1::EmojiReactionSummary>) — Output only. The list of emoji reaction summaries on the message.
#fallback_text
def fallback_text() -> ::String
- (::String) — A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.
#fallback_text=
def fallback_text=(value) -> ::String
- value (::String) — A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.
- (::String) — A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.
#formatted_text
def formatted_text() -> ::String
-
(::String) — Output only. Contains the message
text
with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following:Markup syntax for bold, italic, strikethrough, monospace, monospace block, and bulleted list.
User mentions using the format
<users/{user}>
.Custom hyperlinks using the format
<{url}|{rendered_text}>
where the first string is the URL and the second is the rendered text—for example,<http://example.com|custom text>
.Custom emoji using the format
:{emoji_name}:
—for example,:smile:
. This doesn't apply to Unicode emoji, such asU+1F600
for a grinning face emoji.
For more information, see View text formatting sent in a message
#last_update_time
def last_update_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.
#matched_url
def matched_url() -> ::Google::Apps::Chat::V1::MatchedUrl
-
(::Google::Apps::Chat::V1::MatchedUrl) — Output only. A URL in
spaces.messages.text
that matches a link preview pattern. For more information, see Preview links.
#name
def name() -> ::String
-
(::String) — Resource name of the message.
Format:
spaces/{space}/messages/{message}
Where
{space}
is the ID of the space where the message is posted and{message}
is a system-assigned ID for the message. For example,spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
.If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing
{message}
with the value from theclientAssignedMessageId
field. For example,spaces/AAAAAAAAAAA/messages/client-custom-name
. For details, see Name a message.
#name=
def name=(value) -> ::String
-
value (::String) — Resource name of the message.
Format:
spaces/{space}/messages/{message}
Where
{space}
is the ID of the space where the message is posted and{message}
is a system-assigned ID for the message. For example,spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
.If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing
{message}
with the value from theclientAssignedMessageId
field. For example,spaces/AAAAAAAAAAA/messages/client-custom-name
. For details, see Name a message.
-
(::String) — Resource name of the message.
Format:
spaces/{space}/messages/{message}
Where
{space}
is the ID of the space where the message is posted and{message}
is a system-assigned ID for the message. For example,spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
.If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing
{message}
with the value from theclientAssignedMessageId
field. For example,spaces/AAAAAAAAAAA/messages/client-custom-name
. For details, see Name a message.
#private_message_viewer
def private_message_viewer() -> ::Google::Apps::Chat::V1::User
-
(::Google::Apps::Chat::V1::User) — Immutable. Input for creating a message, otherwise output only. The user
that can view the message. When set, the message is private and only
visible to the specified user and the Chat app. Link previews and
attachments aren't supported for private messages.
Only Chat apps can send private messages. If your Chat app authenticates as a user to send a message, the message can't be private and must omit this field.
For details, see Send private messages to Google Chat users.
#private_message_viewer=
def private_message_viewer=(value) -> ::Google::Apps::Chat::V1::User
-
value (::Google::Apps::Chat::V1::User) — Immutable. Input for creating a message, otherwise output only. The user
that can view the message. When set, the message is private and only
visible to the specified user and the Chat app. Link previews and
attachments aren't supported for private messages.
Only Chat apps can send private messages. If your Chat app authenticates as a user to send a message, the message can't be private and must omit this field.
For details, see Send private messages to Google Chat users.
-
(::Google::Apps::Chat::V1::User) — Immutable. Input for creating a message, otherwise output only. The user
that can view the message. When set, the message is private and only
visible to the specified user and the Chat app. Link previews and
attachments aren't supported for private messages.
Only Chat apps can send private messages. If your Chat app authenticates as a user to send a message, the message can't be private and must omit this field.
For details, see Send private messages to Google Chat users.
#quoted_message_metadata
def quoted_message_metadata() -> ::Google::Apps::Chat::V1::QuotedMessageMetadata
- (::Google::Apps::Chat::V1::QuotedMessageMetadata) — Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.
#sender
def sender() -> ::Google::Apps::Chat::V1::User
-
(::Google::Apps::Chat::V1::User) — Output only. The user who created the message.
If your Chat app authenticates as a
user,
the output populates the
user
name
andtype
.
#slash_command
def slash_command() -> ::Google::Apps::Chat::V1::SlashCommand
- (::Google::Apps::Chat::V1::SlashCommand) — Output only. Slash command information, if applicable.
#space
def space() -> ::Google::Apps::Chat::V1::Space
-
(::Google::Apps::Chat::V1::Space) — If your Chat app authenticates as a
user,
the output populates the
space
name
.
#space=
def space=(value) -> ::Google::Apps::Chat::V1::Space
-
value (::Google::Apps::Chat::V1::Space) — If your Chat app authenticates as a
user,
the output populates the
space
name
.
-
(::Google::Apps::Chat::V1::Space) — If your Chat app authenticates as a
user,
the output populates the
space
name
.
#text
def text() -> ::String
-
(::String) — Plain-text body of the message. The first link to an image, video, or web
page generates a
preview chip.
You can also @mention a Google Chat
user,
or everyone in the space.
To learn about creating text messages, see Send a text message.
#text=
def text=(value) -> ::String
-
value (::String) — Plain-text body of the message. The first link to an image, video, or web
page generates a
preview chip.
You can also @mention a Google Chat
user,
or everyone in the space.
To learn about creating text messages, see Send a text message.
-
(::String) — Plain-text body of the message. The first link to an image, video, or web
page generates a
preview chip.
You can also @mention a Google Chat
user,
or everyone in the space.
To learn about creating text messages, see Send a text message.
#thread
def thread() -> ::Google::Apps::Chat::V1::Thread
- (::Google::Apps::Chat::V1::Thread) — The thread the message belongs to. For example usage, see Start or reply to a message thread.
#thread=
def thread=(value) -> ::Google::Apps::Chat::V1::Thread
- value (::Google::Apps::Chat::V1::Thread) — The thread the message belongs to. For example usage, see Start or reply to a message thread.
- (::Google::Apps::Chat::V1::Thread) — The thread the message belongs to. For example usage, see Start or reply to a message thread.
#thread_reply
def thread_reply() -> ::Boolean
-
(::Boolean) — Output only. When
true
, the message is a response in a reply thread. Whenfalse
, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies.If the space doesn't support reply in threads, this field is always
false
.