mailslurp/models/
alias_dto.rs

1/*
2 * MailSlurp API
3 *
4 * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5 *
6 * The version of the OpenAPI document: 6.5.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// AliasDto : Email alias representation
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AliasDto {
17    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
18    pub created_at: Option<String>,
19    /// The alias's email address for receiving email
20    #[serde(rename = "emailAddress", skip_serializing_if = "Option::is_none")]
21    pub email_address: Option<String>,
22    #[serde(rename = "id")]
23    pub id: String,
24    /// Inbox that is associated with the alias
25    #[serde(rename = "inboxId", skip_serializing_if = "Option::is_none")]
26    pub inbox_id: Option<String>,
27    /// Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account
28    #[serde(rename = "isVerified", skip_serializing_if = "Option::is_none")]
29    pub is_verified: Option<bool>,
30    /// The underlying email address that is hidden and will received forwarded email
31    #[serde(rename = "maskedEmailAddress", skip_serializing_if = "Option::is_none")]
32    pub masked_email_address: Option<String>,
33    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
34    pub name: Option<String>,
35    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
36    pub updated_at: Option<String>,
37    /// If alias will generate response threads or not when email are received by it
38    #[serde(rename = "useThreads", skip_serializing_if = "Option::is_none")]
39    pub use_threads: Option<bool>,
40    #[serde(rename = "userId")]
41    pub user_id: String,
42}
43
44impl AliasDto {
45    /// Email alias representation
46    pub fn new(id: String, user_id: String) -> AliasDto {
47        AliasDto {
48            created_at: None,
49            email_address: None,
50            id,
51            inbox_id: None,
52            is_verified: None,
53            masked_email_address: None,
54            name: None,
55            updated_at: None,
56            use_threads: None,
57            user_id,
58        }
59    }
60}
61
62