0.34.0 (latest) 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.1 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.1 0.2.0 0.1.2 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**

- (::Array\<[::Google::Apps::Chat::V1::AccessoryWidget](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-AccessoryWidget)\>) --- 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](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).


  Creating a message with accessory widgets requires [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).

### #accessory_widgets=

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

**Parameter**

- **value** (::Array\<[::Google::Apps::Chat::V1::AccessoryWidget](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-AccessoryWidget)\>) --- 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](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).


  Creating a message with accessory widgets requires [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
**Returns**

- (::Array\<[::Google::Apps::Chat::V1::AccessoryWidget](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-AccessoryWidget)\>) --- 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](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).


  Creating a message with accessory widgets requires [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).

### #action_response

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

**Returns**

- ([::Google::Apps::Chat::V1::ActionResponse](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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

**Parameter**

- **value** ([::Google::Apps::Chat::V1::ActionResponse](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-ActionResponse)) --- Input only. Parameters that a Chat app can use to configure how its response is posted.
**Returns**

- ([::Google::Apps::Chat::V1::ActionResponse](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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>

**Returns**

- (::Array\<[::Google::Apps::Chat::V1::Annotation](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Annotation)\>) --- Output only. Annotations can be associated with the plain-text body of the message or with chips that link to Google Workspace resources like Google Docs or Sheets with `start_index` and `length` of 0.

### #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**

- (::Array\<[::Google::Apps::Chat::V1::AttachedGif](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-AttachedGif)\>) --- Output only. GIF images that are attached to the message.

### #attachment

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

**Returns**

- (::Array\<[::Google::Apps::Chat::V1::Attachment](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Attachment)\>) --- Optional. User-uploaded attachment.

### #attachment=

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

**Parameter**

- **value** (::Array\<[::Google::Apps::Chat::V1::Attachment](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Attachment)\>) --- Optional. User-uploaded attachment.
**Returns**

- (::Array\<[::Google::Apps::Chat::V1::Attachment](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Attachment)\>) --- Optional. User-uploaded attachment.

### #cards

    def cards() -> ::Array<::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card>

**Returns**

- (::Array\<[::Google::Apps::Chat::V1::ContextualAddOnMarkup::Card](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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**

- (::Array\<[::Google::Apps::Chat::V1::CardWithId](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CardWithId)\>) --- Optional. An array of [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).


  Chat apps can create cards with [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  As part of the [Developer Preview
  Program](https://developers.google.com/workspace/preview), if your Chat app
  [authenticates as a
  user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  it can create card messages. If your Chat app is not part of Developer
  Preview Program, it can't create cards with user authentication.

  To learn how to create a message that contains cards, see [Send a
  message](https://developers.google.com/workspace/chat/create-messages).

  [Card builder](https://addons.gsuite.google.com/uikit/builder)

### #cards_v2=

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

**Parameter**

- **value** (::Array\<[::Google::Apps::Chat::V1::CardWithId](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CardWithId)\>) --- Optional. An array of [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).


  Chat apps can create cards with [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  As part of the [Developer Preview
  Program](https://developers.google.com/workspace/preview), if your Chat app
  [authenticates as a
  user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  it can create card messages. If your Chat app is not part of Developer
  Preview Program, it can't create cards with user authentication.

  To learn how to create a message that contains cards, see [Send a
  message](https://developers.google.com/workspace/chat/create-messages).

  [Card builder](https://addons.gsuite.google.com/uikit/builder)
**Returns**

- (::Array\<[::Google::Apps::Chat::V1::CardWithId](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CardWithId)\>) --- Optional. An array of [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).


  Chat apps can create cards with [app
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
  As part of the [Developer Preview
  Program](https://developers.google.com/workspace/preview), if your Chat app
  [authenticates as a
  user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
  it can create card messages. If your Chat app is not part of Developer
  Preview Program, it can't create cards with user authentication.

  To learn how to create a message that contains cards, see [Send a
  message](https://developers.google.com/workspace/chat/create-messages).

  [Card builder](https://addons.gsuite.google.com/uikit/builder)

### #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`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) field when you create the message. For details, see [Name a
  message](https://developers.google.com/workspace/chat/create-messages#name_a_created_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`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) field when you create the message. For details, see [Name a
  message](https://developers.google.com/workspace/chat/create-messages#name_a_created_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`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) field when you create the message. For details, see [Name a
  message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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**

- ([::Google::Apps::Chat::V1::DeletionMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-DeletionMetadata)) --- Output only. Information about a deleted message. A message is deleted when `delete_time` is set.

### #elements

    def elements() -> ::Google::Apps::Chat::V1::Elements

**Returns**

- ([::Google::Apps::Chat::V1::Elements](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Elements)) --- Optional. Additional message components, including inline `citations` (where each citation is associated with a specific portion of the message text) and `cited_sources` (which are general references used to generate the response and are not directly linked to specific segments of the text).


  On input, provide `elements` when creating or updating a message. On
  output, both `citations` and `cited_sources` are populated when reading a
  message that contains them. Callers can read structured citation metadata
  from `elements`, while `formatted_text` also includes inline citation tags
  or source links depending on `markup_syntax`.

  These differ from `annotations`, which are output-only and offer
  supplementary information tied to message fragments or the entire message
  text.

### #elements=

    def elements=(value) -> ::Google::Apps::Chat::V1::Elements

**Parameter**

- **value** ([::Google::Apps::Chat::V1::Elements](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Elements)) --- Optional. Additional message components, including inline `citations` (where each citation is associated with a specific portion of the message text) and `cited_sources` (which are general references used to generate the response and are not directly linked to specific segments of the text).


  On input, provide `elements` when creating or updating a message. On
  output, both `citations` and `cited_sources` are populated when reading a
  message that contains them. Callers can read structured citation metadata
  from `elements`, while `formatted_text` also includes inline citation tags
  or source links depending on `markup_syntax`.

  These differ from `annotations`, which are output-only and offer
  supplementary information tied to message fragments or the entire message
  text.
**Returns**

- ([::Google::Apps::Chat::V1::Elements](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Elements)) --- Optional. Additional message components, including inline `citations` (where each citation is associated with a specific portion of the message text) and `cited_sources` (which are general references used to generate the response and are not directly linked to specific segments of the text).


  On input, provide `elements` when creating or updating a message. On
  output, both `citations` and `cited_sources` are populated when reading a
  message that contains them. Callers can read structured citation metadata
  from `elements`, while `formatted_text` also includes inline citation tags
  or source links depending on `markup_syntax`.

  These differ from `annotations`, which are output-only and offer
  supplementary information tied to message fragments or the entire message
  text.

### #emoji_reaction_summaries

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

**Returns**

- (::Array\<[::Google::Apps::Chat::V1::EmojiReactionSummary](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-EmojiReactionSummary)\>) --- Output only. The list of emoji reaction summaries on the message.

### #fallback_text

    def fallback_text() -> ::String

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

### #fallback_text=

    def fallback_text=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.

### #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](https://developers.google.com/workspace/chat/format-messages)
    for bold, italic, strikethrough, monospace, monospace block, bulleted
    list, and block quote.

  - [User
    mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
    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.

  - Bullet list items using asterisks (`*`)---for example, `* item`.

  For more information, see [View text formatting sent in a
  message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)

### #last_update_time

    def last_update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/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.

### #markup_syntax

    def markup_syntax() -> ::Google::Apps::Chat::V1::MarkupSyntax

**Returns**

- ([::Google::Apps::Chat::V1::MarkupSyntax](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-MarkupSyntax)) --- Optional. Specifies how the server interprets the message `text` field content.

### #markup_syntax=

    def markup_syntax=(value) -> ::Google::Apps::Chat::V1::MarkupSyntax

**Parameter**

- **value** ([::Google::Apps::Chat::V1::MarkupSyntax](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-MarkupSyntax)) --- Optional. Specifies how the server interprets the message `text` field content.
**Returns**

- ([::Google::Apps::Chat::V1::MarkupSyntax](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-MarkupSyntax)) --- Optional. Specifies how the server interprets the message `text` field content.

### #matched_url

    def matched_url() -> ::Google::Apps::Chat::V1::MatchedUrl

**Returns**

- ([::Google::Apps::Chat::V1::MatchedUrl](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-MatchedUrl)) --- Output only. A URL in the Chat message `text` field that matches a link preview pattern. For more information, see [Preview
  links](https://developers.google.com/workspace/chat/preview-links).

### #name

    def name() -> ::String

**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](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::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](https://developers.google.com/workspace/chat/create-messages#name_a_created_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](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).

### #private_message_viewer

    def private_message_viewer() -> ::Google::Apps::Chat::V1::User

**Returns**

- ([::Google::Apps::Chat::V1::User](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User)) --- 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](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and omit the following:


  - [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments)

  For details, see [Send a message
  privately](https://developers.google.com/workspace/chat/create-messages#private).

### #private_message_viewer=

    def private_message_viewer=(value) -> ::Google::Apps::Chat::V1::User

**Parameter**

- **value** ([::Google::Apps::Chat::V1::User](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User)) --- 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](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and omit the following:


  - [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments)

  For details, see [Send a message
  privately](https://developers.google.com/workspace/chat/create-messages#private).
**Returns**

- ([::Google::Apps::Chat::V1::User](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User)) --- 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](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and omit the following:


  - [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments)

  For details, see [Send a message
  privately](https://developers.google.com/workspace/chat/create-messages#private).

### #quoted_message_metadata

    def quoted_message_metadata() -> ::Google::Apps::Chat::V1::QuotedMessageMetadata

**Returns**

- ([::Google::Apps::Chat::V1::QuotedMessageMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-QuotedMessageMetadata)) --- Optional. Information about a message that another message quotes.


  When you create a message, you can quote messages within the same
  thread, or quote a root message to create a new root message.
  However, you can't quote a message reply from a different thread.

  When you update a message, you can't add or replace the
  `quotedMessageMetadata` field, but you can remove it.

  For example usage, see [Quote another
  message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).

### #quoted_message_metadata=

    def quoted_message_metadata=(value) -> ::Google::Apps::Chat::V1::QuotedMessageMetadata

**Parameter**

- **value** ([::Google::Apps::Chat::V1::QuotedMessageMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-QuotedMessageMetadata)) --- Optional. Information about a message that another message quotes.


  When you create a message, you can quote messages within the same
  thread, or quote a root message to create a new root message.
  However, you can't quote a message reply from a different thread.

  When you update a message, you can't add or replace the
  `quotedMessageMetadata` field, but you can remove it.

  For example usage, see [Quote another
  message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).
**Returns**

- ([::Google::Apps::Chat::V1::QuotedMessageMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-QuotedMessageMetadata)) --- Optional. Information about a message that another message quotes.


  When you create a message, you can quote messages within the same
  thread, or quote a root message to create a new root message.
  However, you can't quote a message reply from a different thread.

  When you update a message, you can't add or replace the
  `quotedMessageMetadata` field, but you can remove it.

  For example usage, see [Quote another
  message](https://developers.google.com/workspace/chat/create-messages#quote-a-message).

### #sender

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

**Returns**

- ([::Google::Apps::Chat::V1::User](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-User)) --- Output only. The user who created the message. If your Chat app [authenticates as a
  user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output only populates the [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) `name` and `type` fields for both internal and external users, unless they are members of the space or have a prior affinity, like a direct message (DM) conversation, with the calling user.

### #silent

    def silent() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. Whether this is a silent message. Silent messages are messages where Chat suppresses push notifications for recipients.

### #slash_command

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

**Returns**

- ([::Google::Apps::Chat::V1::SlashCommand](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-SlashCommand)) --- Output only. Slash command information, if applicable.

### #space

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

**Returns**

- ([::Google::Apps::Chat::V1::Space](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Space)) --- Output only. If your Chat app [authenticates as a
  user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output only populates the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) `name`.

### #text

    def text() -> ::String

**Returns**

- (::String) --- Optional. Plain-text body of the message. The first link to an image, video, or web page generates a [preview
  chip](https://developers.google.com/workspace/chat/preview-links). You can also [@mention a Google Chat
  user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), or everyone in the space.


  To learn about creating text messages, see [Send a
  message](https://developers.google.com/workspace/chat/create-messages).

### #text=

    def text=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Plain-text body of the message. The first link to an image, video, or web page generates a [preview
  chip](https://developers.google.com/workspace/chat/preview-links). You can also [@mention a Google Chat
  user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), or everyone in the space.


  To learn about creating text messages, see [Send a
  message](https://developers.google.com/workspace/chat/create-messages).
**Returns**

- (::String) --- Optional. Plain-text body of the message. The first link to an image, video, or web page generates a [preview
  chip](https://developers.google.com/workspace/chat/preview-links). You can also [@mention a Google Chat
  user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), or everyone in the space.


  To learn about creating text messages, see [Send a
  message](https://developers.google.com/workspace/chat/create-messages).

### #thread

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

**Returns**

- ([::Google::Apps::Chat::V1::Thread](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread)) --- The thread the message belongs to. For example usage, see [Start or reply to a message
  thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).

### #thread=

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

**Parameter**

- **value** ([::Google::Apps::Chat::V1::Thread](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread)) --- The thread the message belongs to. For example usage, see [Start or reply to a message
  thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
**Returns**

- ([::Google::Apps::Chat::V1::Thread](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread)) --- The thread the message belongs to. For example usage, see [Start or reply to a message
  thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).

### #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`.