Struct sendblue::models::message::GroupMessage
source · pub struct GroupMessage {
pub numbers: Option<Vec<PhoneNumber>>,
pub group_id: Option<String>,
pub content: Option<String>,
pub media_url: Option<MediaUrl>,
pub send_style: Option<SendStyle>,
pub status_callback: Option<CallbackUrl>,
}
Expand description
Group message request payload
§Examples
use sendblue::models::GroupMessage;
use sendblue::models::MediaUrl;
use sendblue::models::CallbackUrl;
use sendblue::traits::Url;
let request = GroupMessage {
numbers: Some(vec![phonenumber::parse(None, "+19998887777").unwrap(), phonenumber::parse(None, "+17778889999").unwrap()]),
group_id: None,
content: Some("Hello group!".into()),
media_url: Some(MediaUrl::new("https://picsum.photos/200/300.jpg").unwrap()),
send_style: None,
status_callback: Some(CallbackUrl::new("https://example.com/message-status/1234abcd").unwrap()),
};
Fields§
§numbers: Option<Vec<PhoneNumber>>
An array of E.164-formatted phone numbers of the desired recipients in a group chat.
group_id: Option<String>
The group ID to message an existing group.
content: Option<String>
The content of the message.
media_url: Option<MediaUrl>
A URL to a media file to send to the group.
send_style: Option<SendStyle>
The style of delivery of the message.
status_callback: Option<CallbackUrl>
An endpoint to notify your app of status updates for this message.
Trait Implementations§
source§impl Debug for GroupMessage
impl Debug for GroupMessage
source§impl<'de> Deserialize<'de> for GroupMessage
impl<'de> Deserialize<'de> for GroupMessage
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl SendableMessage for GroupMessage
impl SendableMessage for GroupMessage
fn endpoint() -> &'static str
type ResponseType = GroupMessageResponse
source§impl Serialize for GroupMessage
impl Serialize for GroupMessage
source§impl Validate for GroupMessage
impl Validate for GroupMessage
source§impl<'v_a> ValidateArgs<'v_a> for GroupMessage
impl<'v_a> ValidateArgs<'v_a> for GroupMessage
type Args = ()
fn validate_with_args(&self, args: Self::Args) -> Result<(), ValidationErrors>
Auto Trait Implementations§
impl Freeze for GroupMessage
impl RefUnwindSafe for GroupMessage
impl Send for GroupMessage
impl Sync for GroupMessage
impl Unpin for GroupMessage
impl UnwindSafe for GroupMessage
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
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more