clerk-sdk-rust-community 1.0.4

The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
Documentation
/*
 * Clerk Backend API
 *
 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
 *
 * The version of the OpenAPI document: v1
 * Contact: support@clerk.dev
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UpsertTemplateRequest {
    /// The user-friendly name of the template
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The email subject. Applicable only to email templates.
    #[serde(rename = "subject", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub subject: Option<Option<String>>,
    /// The editor markup used to generate the body of the template
    #[serde(rename = "markup", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub markup: Option<Option<String>>,
    /// The template body before variable interpolation
    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
    pub body: Option<String>,
    /// Whether Clerk should deliver emails or SMS messages based on the current template
    #[serde(rename = "delivered_by_clerk", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub delivered_by_clerk: Option<Option<bool>>,
    /// The local part of the From email address that will be used for emails. For example, in the address 'hello@example.com', the local part is 'hello'. Applicable only to email templates.
    #[serde(rename = "from_email_name", skip_serializing_if = "Option::is_none")]
    pub from_email_name: Option<String>,
}

impl UpsertTemplateRequest {
    pub fn new() -> UpsertTemplateRequest {
        UpsertTemplateRequest {
            name: None,
            subject: None,
            markup: None,
            body: None,
            delivered_by_clerk: None,
            from_email_name: None,
        }
    }
}