clerk_sdk_rust_community/models/
create_email_request.rs

1/*
2 * Clerk Backend API
3 *
4 * The Clerk REST Backend API, meant to be accessed by backend servers. Please see https://clerk.com/docs for more information.
5 *
6 * The version of the OpenAPI document: v1
7 * Contact: support@clerk.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct CreateEmailRequest {
16    /// The email name portion of the sending email address. <br/>e.g.: `from_email_name=info` will send from info@example.com
17    #[serde(rename = "from_email_name", skip_serializing_if = "Option::is_none")]
18    pub from_email_name: Option<String>,
19    /// The subject of the email.
20    #[serde(rename = "subject", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub subject: Option<Option<String>>,
22    /// The body of the email.
23    #[serde(rename = "body", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub body: Option<Option<String>>,
25    /// The ID of the email address to send to.
26    #[serde(rename = "email_address_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub email_address_id: Option<Option<String>>,
28    /// The slug of the template to use for sending this email
29    #[serde(rename = "template_slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub template_slug: Option<Option<String>>,
31}
32
33impl CreateEmailRequest {
34    pub fn new() -> CreateEmailRequest {
35        CreateEmailRequest {
36            from_email_name: None,
37            subject: None,
38            body: None,
39            email_address_id: None,
40            template_slug: None,
41        }
42    }
43}
44
45