Class: Google::Apps::Chat::V1::Message

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/chat/v1/message.rb

Overview

A message in a Google Chat space.

Instance Attribute Summary collapse

Instance Attribute Details

#accessory_widgets::Array<::Google::Apps::Chat::V1::AccessoryWidget>

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

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#action_response::Google::Apps::Chat::V1::ActionResponse

Returns Input only. Parameters that a Chat app can use to configure how its response is posted.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#annotations::Array<::Google::Apps::Chat::V1::Annotation> (readonly)

Returns Output only. Annotations associated with the text in this message.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#argument_text::String (readonly)

Returns Output only. Plain-text body of the message with all Chat app mentions stripped out.

Returns:

  • (::String)

    Output only. Plain-text body of the message with all Chat app mentions stripped out.



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#attached_gifs::Array<::Google::Apps::Chat::V1::AttachedGif> (readonly)

Returns Output only. GIF images that are attached to the message.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#attachment::Array<::Google::Apps::Chat::V1::Attachment>

Returns Optional. User-uploaded attachment.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#cards::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>

Deprecated.

This field is deprecated and may be removed in the next major version update.

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



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#cards_v2::Array<::Google::Apps::Chat::V1::CardWithId>

Returns Optional. 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 how to create a message that contains cards, see Send a message.

Card builder.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#client_assigned_message_id::String

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



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#create_time::Google::Protobuf::Timestamp

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



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#delete_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.

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.



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#deletion_metadata::Google::Apps::Chat::V1::DeletionMetadata (readonly)

Returns Output only. Information about a deleted message. A message is deleted when delete_time is set.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#emoji_reaction_summaries::Array<::Google::Apps::Chat::V1::EmojiReactionSummary> (readonly)

Returns Output only. The list of emoji reaction summaries on the message.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#fallback_text::String

Returns Optional. A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.

Returns:

  • (::String)

    Optional. A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications.



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#formatted_text::String (readonly)

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

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



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#last_update_time::Google::Protobuf::Timestamp (readonly)

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

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.



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#matched_url::Google::Apps::Chat::V1::MatchedUrl (readonly)

Returns Output only. A URL in spaces.messages.text that matches a link preview pattern. For more information, see Preview links.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#name::String

Returns Identifier. 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)

    Identifier. 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.



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#private_message_viewer::Google::Apps::Chat::V1::User

Returns Optional. 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. To include this field in your request, you must call the Chat API using app authentication and omit the following:

For details, see Send a message privately.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#quoted_message_metadata::Google::Apps::Chat::V1::QuotedMessageMetadata (readonly)

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

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#sender::Google::Apps::Chat::V1::User (readonly)

Returns Output only. The user who created the message. If your Chat app authenticates as a user, the output populates the user name and type.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#slash_command::Google::Apps::Chat::V1::SlashCommand (readonly)

Returns Output only. Slash command information, if applicable.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#space::Google::Apps::Chat::V1::Space (readonly)

Returns Output only. If your Chat app authenticates as a user, the output only populates the space name.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#text::String

Returns Optional. 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 message.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#thread::Google::Apps::Chat::V1::Thread

Returns The thread the message belongs to. For example usage, see Start or reply to a message thread.

Returns:



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#thread_reply::Boolean (readonly)

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

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.



219
220
221
222
# File 'proto_docs/google/chat/v1/message.rb', line 219

class Message
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end