pub struct CreateMessageRequest {
pub parent: String,
pub message: Option<Message>,
pub thread_key: String,
pub request_id: String,
pub message_reply_option: i32,
pub message_id: String,
}
Expand description
Creates a message.
Fields§
§parent: String
Required. The resource name of the space in which to create a message.
Format: spaces/{space}
message: Option<Message>
Required. Message body.
thread_key: String
Optional. Deprecated: Use
[thread.thread_key][google.chat.v1.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][google.chat.v1.Thread.name]. For example usage, see Start or
reply to a message
thread.
request_id: String
Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.
message_reply_option: i32
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.
message_id: 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, butcustom-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.
Implementations§
Source§impl CreateMessageRequest
impl CreateMessageRequest
Sourcepub fn message_reply_option(&self) -> MessageReplyOption
pub fn message_reply_option(&self) -> MessageReplyOption
Returns the enum value of message_reply_option
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_message_reply_option(&mut self, value: MessageReplyOption)
pub fn set_message_reply_option(&mut self, value: MessageReplyOption)
Sets message_reply_option
to the provided enum value.
Trait Implementations§
Source§impl Clone for CreateMessageRequest
impl Clone for CreateMessageRequest
Source§fn clone(&self) -> CreateMessageRequest
fn clone(&self) -> CreateMessageRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateMessageRequest
impl Debug for CreateMessageRequest
Source§impl Default for CreateMessageRequest
impl Default for CreateMessageRequest
Source§impl Message for CreateMessageRequest
impl Message for CreateMessageRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl PartialEq for CreateMessageRequest
impl PartialEq for CreateMessageRequest
impl StructuralPartialEq for CreateMessageRequest
Auto Trait Implementations§
impl Freeze for CreateMessageRequest
impl RefUnwindSafe for CreateMessageRequest
impl Send for CreateMessageRequest
impl Sync for CreateMessageRequest
impl Unpin for CreateMessageRequest
impl UnwindSafe for CreateMessageRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request