Skip to main content

onesignal_rust_api/models/
update_template_request.rs

1/*
2 * OneSignal
3 *
4 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5 *
6 * The version of the OpenAPI document: 5.6.0
7 * Contact: devrel@onesignal.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct UpdateTemplateRequest {
16    /// Updated name of the template.
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    #[serde(rename = "contents", skip_serializing_if = "Option::is_none")]
20    pub contents: Option<Box<crate::models::LanguageStringMap>>,
21    #[serde(rename = "headings", skip_serializing_if = "Option::is_none")]
22    pub headings: Option<Box<crate::models::LanguageStringMap>>,
23    #[serde(rename = "subtitle", skip_serializing_if = "Option::is_none")]
24    pub subtitle: Option<Box<crate::models::LanguageStringMap>>,
25    /// Set true for an Email template.
26    #[serde(rename = "isEmail", skip_serializing_if = "Option::is_none")]
27    pub is_email: Option<bool>,
28    /// Subject of the email.
29    #[serde(rename = "email_subject", skip_serializing_if = "Option::is_none")]
30    pub email_subject: Option<String>,
31    /// Body of the email (HTML supported).
32    #[serde(rename = "email_body", skip_serializing_if = "Option::is_none")]
33    pub email_body: Option<String>,
34    /// BCC recipients for the email template. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email.
35    #[serde(rename = "email_bcc", skip_serializing_if = "Option::is_none")]
36    pub email_bcc: Option<Vec<String>>,
37    /// Set true for an SMS template.
38    #[serde(rename = "isSMS", skip_serializing_if = "Option::is_none")]
39    pub is_sms: Option<bool>,
40    /// JSON string for dynamic content personalization.
41    #[serde(rename = "dynamic_content", skip_serializing_if = "Option::is_none")]
42    pub dynamic_content: Option<String>,
43}
44
45impl UpdateTemplateRequest {
46    pub fn new() -> UpdateTemplateRequest {
47        UpdateTemplateRequest {
48            name: None,
49            contents: None,
50            headings: None,
51            subtitle: None,
52            is_email: None,
53            email_subject: None,
54            email_body: None,
55            email_bcc: None,
56            is_sms: None,
57            dynamic_content: None,
58        }
59    }
60}
61
62