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::CreateMessageRequest.

Creates a message.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_message_notification_options

    def create_message_notification_options() -> ::Google::Apps::Chat::V1::CreateMessageNotificationOptions

**Returns**

- ([::Google::Apps::Chat::V1::CreateMessageNotificationOptions](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CreateMessageNotificationOptions)) --- Optional. Controls the notification behavior when the message is posted. To learn more, see [Force notifications or send silent
  messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).

### #create_message_notification_options=

    def create_message_notification_options=(value) -> ::Google::Apps::Chat::V1::CreateMessageNotificationOptions

**Parameter**

- **value** ([::Google::Apps::Chat::V1::CreateMessageNotificationOptions](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CreateMessageNotificationOptions)) --- Optional. Controls the notification behavior when the message is posted. To learn more, see [Force notifications or send silent
  messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).
**Returns**

- ([::Google::Apps::Chat::V1::CreateMessageNotificationOptions](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CreateMessageNotificationOptions)) --- Optional. Controls the notification behavior when the message is posted. To learn more, see [Force notifications or send silent
  messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).

### #message

    def message() -> ::Google::Apps::Chat::V1::Message

**Returns**

- ([::Google::Apps::Chat::V1::Message](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Message)) --- Required. Message body.

### #message=

    def message=(value) -> ::Google::Apps::Chat::V1::Message

**Parameter**

- **value** ([::Google::Apps::Chat::V1::Message](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Message)) --- Required. Message body.
**Returns**

- ([::Google::Apps::Chat::V1::Message](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Message)) --- Required. Message body.

### #message_id

    def message_id() -> ::String

**Returns**

- (::String) --- Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field).


  The value for this field must meet the following requirements:
  - Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not.
  - Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
  - Is unique within a space. A Chat app can't use the same custom ID for different messages.

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

### #message_id=

    def message_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field).


  The value for this field must meet the following requirements:
  - Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not.
  - Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
  - Is unique within a space. A Chat app can't use the same custom ID for different messages.

  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 a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field).


  The value for this field must meet the following requirements:
  - Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not.
  - Contains up to 63 characters and only lowercase letters, numbers, and hyphens.
  - Is unique within a space. A Chat app can't use the same custom ID for different messages.

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

### #message_reply_option

    def message_reply_option() -> ::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption

**Returns**

- ([::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CreateMessageRequest-MessageReplyOption)) --- Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.


  When [responding to user
  interactions](https://developers.google.com/workspace/chat/receive-respond-interactions),
  this field is ignored. For interactions within a thread, the reply is
  created in the same thread. Otherwise, the reply is created as a new
  thread.

### #message_reply_option=

    def message_reply_option=(value) -> ::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption

**Parameter**

- **value** ([::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CreateMessageRequest-MessageReplyOption)) --- Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.


  When [responding to user
  interactions](https://developers.google.com/workspace/chat/receive-respond-interactions),
  this field is ignored. For interactions within a thread, the reply is
  created in the same thread. Otherwise, the reply is created as a new
  thread.
**Returns**

- ([::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-CreateMessageRequest-MessageReplyOption)) --- Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.


  When [responding to user
  interactions](https://developers.google.com/workspace/chat/receive-respond-interactions),
  this field is ignored. For interactions within a thread, the reply is
  created in the same thread. Otherwise, the reply is created as a new
  thread.

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The resource name of the space in which to create a message.

  Format: `spaces/{space}`

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The resource name of the space in which to create a message.


  Format: `spaces/{space}`
**Returns**

- (::String) --- Required. The resource name of the space in which to create a message.

  Format: `spaces/{space}`

### #request_id

    def request_id() -> ::String

**Returns**

- (::String) --- Optional. A unique ID for this request. A random UUID is recommended.
  Specifying a request ID makes the request idempotent, which ensures that
  multiple identical requests with the same request ID result in only a
  single message being created. Subsequent requests with the same request
  ID return the existing message and do not update the message, even if the
  requested details differ from the current state.

  To use this field effectively:
  - Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  - If a message was already created with the provided request ID, the request returns that message. Note that the returned message might not be fully populated; the API echoes the message in your request with the system-assigned resource names populated. To retrieve the latest metadata for the message, call `GetMessage`.
  - Reusing an existing request ID with a different authenticated user results in an error.

### #request_id=

    def request_id=(value) -> ::String

**Parameter**

- **value** (::String) ---

  Optional. A unique ID for this request. A random UUID is recommended.
  Specifying a request ID makes the request idempotent, which ensures that
  multiple identical requests with the same request ID result in only a
  single message being created. Subsequent requests with the same request
  ID return the existing message and do not update the message, even if the
  requested details differ from the current state.

  To use this field effectively:
  - Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  - If a message was already created with the provided request ID, the request returns that message. Note that the returned message might not be fully populated; the API echoes the message in your request with the system-assigned resource names populated. To retrieve the latest metadata for the message, call `GetMessage`.
  - Reusing an existing request ID with a different authenticated user results in an error.
**Returns**

- (::String) --- Optional. A unique ID for this request. A random UUID is recommended.
  Specifying a request ID makes the request idempotent, which ensures that
  multiple identical requests with the same request ID result in only a
  single message being created. Subsequent requests with the same request
  ID return the existing message and do not update the message, even if the
  requested details differ from the current state.

  To use this field effectively:
  - Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
  - If a message was already created with the provided request ID, the request returns that message. Note that the returned message might not be fully populated; the API echoes the message in your request with the system-assigned resource names populated. To retrieve the latest metadata for the message, call `GetMessage`.
  - Reusing an existing request ID with a different authenticated user results in an error.

### #thread_key

    def thread_key() -> ::String

**Returns**

- (::String) --- Optional. Deprecated: Use [thread.thread_key](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread#Google__Apps__Chat__V1__Thread_thread_key_instance_ "Google::Apps::Chat::V1::Thread#thread_key (method)") instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the [thread.name](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread#Google__Apps__Chat__V1__Thread_name_instance_ "Google::Apps::Chat::V1::Thread#name (method)"). For example usage, see [Start or
  reply to a message
  thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).

### #thread_key=

    def thread_key=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Deprecated: Use [thread.thread_key](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread#Google__Apps__Chat__V1__Thread_thread_key_instance_ "Google::Apps::Chat::V1::Thread#thread_key (method)") instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the [thread.name](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread#Google__Apps__Chat__V1__Thread_name_instance_ "Google::Apps::Chat::V1::Thread#name (method)"). For example usage, see [Start or
  reply to a message
  thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
**Returns**

- (::String) --- Optional. Deprecated: Use [thread.thread_key](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread#Google__Apps__Chat__V1__Thread_thread_key_instance_ "Google::Apps::Chat::V1::Thread#thread_key (method)") instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the [thread.name](https://docs.cloud.google.com/ruby/docs/reference/google-apps-chat-v1/latest/Google-Apps-Chat-V1-Thread#Google__Apps__Chat__V1__Thread_name_instance_ "Google::Apps::Chat::V1::Thread#name (method)"). For example usage, see [Start or
  reply to a message
  thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).