fusionauth_rust_client/models/
email.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.55.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Email : This class is an abstraction of a simple email message.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Email {
17    #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")]
18    pub attachments: Option<Vec<models::Attachment>>,
19    #[serde(rename = "bcc", skip_serializing_if = "Option::is_none")]
20    pub bcc: Option<Vec<models::EmailAddress>>,
21    #[serde(rename = "cc", skip_serializing_if = "Option::is_none")]
22    pub cc: Option<Vec<models::EmailAddress>>,
23    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
24    pub from: Option<Box<models::EmailAddress>>,
25    #[serde(rename = "html", skip_serializing_if = "Option::is_none")]
26    pub html: Option<String>,
27    #[serde(rename = "replyTo", skip_serializing_if = "Option::is_none")]
28    pub reply_to: Option<Box<models::EmailAddress>>,
29    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
30    pub subject: Option<String>,
31    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
32    pub text: Option<String>,
33    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
34    pub to: Option<Vec<models::EmailAddress>>,
35}
36
37impl Email {
38    /// This class is an abstraction of a simple email message.
39    pub fn new() -> Email {
40        Email {
41            attachments: None,
42            bcc: None,
43            cc: None,
44            from: None,
45            html: None,
46            reply_to: None,
47            subject: None,
48            text: None,
49            to: None,
50        }
51    }
52}
53