Class: Google::Apps::Chat::V1::CreateMessageRequest
- Inherits:
-
Object
- Object
- Google::Apps::Chat::V1::CreateMessageRequest
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/chat/v1/message.rb
Overview
Creates a message.
Defined Under Namespace
Modules: MessageReplyOption
Instance Attribute Summary collapse
-
#create_message_notification_options ⇒ ::Google::Apps::Chat::V1::CreateMessageNotificationOptions
Optional.
-
#message ⇒ ::Google::Apps::Chat::V1::Message
Required.
-
#message_id ⇒ ::String
Optional.
-
#message_reply_option ⇒ ::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption
Optional.
-
#parent ⇒ ::String
Required.
-
#request_id ⇒ ::String
Optional.
-
#thread_key ⇒ ::String
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
Instance Attribute Details
#create_message_notification_options ⇒ ::Google::Apps::Chat::V1::CreateMessageNotificationOptions
Returns Optional. Controls the notification behavior when the message is posted. To learn more, see Force notifications or send silent messages.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |
#message ⇒ ::Google::Apps::Chat::V1::Message
Returns Required. Message body.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |
#message_id ⇒ ::String
Returns 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-nameis a valid custom ID, butcustom-nameis 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.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |
#message_reply_option ⇒ ::Google::Apps::Chat::V1::CreateMessageRequest::MessageReplyOption
Returns Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.
When responding to user 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.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |
#parent ⇒ ::String
Returns Required. The resource name of the space in which to create a message.
Format: spaces/{space}.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |
#request_id ⇒ ::String
Returns 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.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |
#thread_key ⇒ ::String
This field is deprecated and may be removed in the next major version update.
Returns Optional. Deprecated: Use
thread.thread_key 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. For example usage, see Start or
reply to a message
thread.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
# File 'proto_docs/google/chat/v1/message.rb', line 624 class CreateMessageRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specifies how to reply to a message. # More states might be added in the future. module MessageReplyOption # Default. Starts a new thread. Using this option ignores any [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`} that's included. MESSAGE_REPLY_OPTION_UNSPECIFIED = 0 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If it fails, the # message starts a new thread instead. REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1 # Creates the message as a reply to the thread specified by [thread # ID][google.chat.v1.Thread.name] or # {::Google::Apps::Chat::V1::Thread#thread_key `thread_key`}. If a new `thread_key` # is used, a new thread is created. If the message creation fails, a # `NOT_FOUND` error is returned instead. REPLY_MESSAGE_OR_FAIL = 2 end end |