hanzo_client/models/message_input.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MessageInput {
16 /// From is the number to send FROM, in E.164. It must be one this org holds and it must be sms-capable.
17 #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
18 pub from: Option<String>,
19 /// Media are URLs to attach. A message with any is an MMS to the carrier — the distinction is the carrier's to make, not something the caller declares.
20 #[serde(rename = "media", skip_serializing_if = "Option::is_none")]
21 pub media: Option<Vec<String>>,
22 /// Text is the message body. It may be empty when Media carries the message.
23 #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
24 pub text: Option<String>,
25 /// To is the number to send to, in E.164.
26 #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
27 pub to: Option<String>,
28}
29
30impl MessageInput {
31 pub fn new() -> MessageInput {
32 MessageInput {
33 from: None,
34 media: None,
35 text: None,
36 to: None,
37 }
38 }
39}
40