Google Chat V1 API - Class Google::Apps::Chat::V1::Message (v0.1.0)

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>
Returns

#accessory_widgets=

def accessory_widgets=(value) -> ::Array<::Google::Apps::Chat::V1::AccessoryWidget>
Parameter
Returns

#action_response

def action_response() -> ::Google::Apps::Chat::V1::ActionResponse
Returns

#action_response=

def action_response=(value) -> ::Google::Apps::Chat::V1::ActionResponse
Parameter
Returns

#annotations

def annotations() -> ::Array<::Google::Apps::Chat::V1::Annotation>
Returns

#argument_text

def argument_text() -> ::String
Returns
  • (::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>
Returns

#attachment

def attachment() -> ::Array<::Google::Apps::Chat::V1::Attachment>
Returns

#attachment=

def attachment=(value) -> ::Array<::Google::Apps::Chat::V1::Attachment>
Parameter
Returns

#cards

def cards() -> ::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>
Returns
  • (::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 and cards_v2 can have a maximum size of 32 KB.

#cards=

def cards=(value) -> ::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>
Parameter
  • 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 and cards_v2 can have a maximum size of 32 KB.

Returns
  • (::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 and cards_v2 can have a maximum size of 32 KB.

#cards_v2

def cards_v2() -> ::Array<::Google::Apps::Chat::V1::CardWithId>
Returns

#cards_v2=

def cards_v2=(value) -> ::Array<::Google::Apps::Chat::V1::CardWithId>
Parameter
Returns

#client_assigned_message_id

def client_assigned_message_id() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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
Returns
  • (::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
Returns

#emoji_reaction_summaries

def emoji_reaction_summaries() -> ::Array<::Google::Apps::Chat::V1::EmojiReactionSummary>
Returns

#fallback_text

def fallback_text() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.
Returns
  • (::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
Returns
  • (::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 as U+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
Returns
  • (::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
Returns

#name

def name() -> ::String
Returns
  • (::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 the clientAssignedMessageId field. For example, spaces/AAAAAAAAAAA/messages/client-custom-name. For details, see Name a message.

#name=

def name=(value) -> ::String
Parameter
  • 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 the clientAssignedMessageId field. For example, spaces/AAAAAAAAAAA/messages/client-custom-name. For details, see Name a message.

Returns
  • (::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 the clientAssignedMessageId 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
Returns
  • (::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
Parameter
  • 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.

Returns
  • (::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
Returns

#sender

def sender() -> ::Google::Apps::Chat::V1::User
Returns

#slash_command

def slash_command() -> ::Google::Apps::Chat::V1::SlashCommand
Returns

#space

def space() -> ::Google::Apps::Chat::V1::Space
Returns

#space=

def space=(value) -> ::Google::Apps::Chat::V1::Space
Parameter
Returns

#text

def text() -> ::String
Returns

#text=

def text=(value) -> ::String
Parameter
Returns

#thread

def thread() -> ::Google::Apps::Chat::V1::Thread
Returns

#thread=

def thread=(value) -> ::Google::Apps::Chat::V1::Thread
Parameter
Returns

#thread_reply

def thread_reply() -> ::Boolean
Returns
  • (::Boolean) — Output only. When true, the message is a response in a reply thread. When false, 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.