Struct google_api_proto::google::chat::v1::CreateMessageRequest
source · 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.
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
source§fn eq(&self, other: &CreateMessageRequest) -> bool
fn eq(&self, other: &CreateMessageRequest) -> bool
self
and other
values to be equal, and is used
by ==
.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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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