mailslurp/models/
thread_projection.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/// ThreadProjection : A thread is a message thread created for a message received by an alias
12
13
14
15#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ThreadProjection {
17    #[serde(rename = "aliasId")]
18    pub alias_id: String,
19    #[serde(rename = "bcc", skip_serializing_if = "Option::is_none")]
20    pub bcc: Option<Vec<String>>,
21    #[serde(rename = "cc", skip_serializing_if = "Option::is_none")]
22    pub cc: Option<Vec<String>>,
23    #[serde(rename = "createdAt")]
24    pub created_at: String,
25    #[serde(rename = "id")]
26    pub id: String,
27    #[serde(rename = "inboxId")]
28    pub inbox_id: String,
29    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
32    pub subject: Option<String>,
33    #[serde(rename = "to")]
34    pub to: Vec<String>,
35    #[serde(rename = "updatedAt")]
36    pub updated_at: String,
37    #[serde(rename = "userId")]
38    pub user_id: String,
39}
40
41impl ThreadProjection {
42    /// A thread is a message thread created for a message received by an alias
43    pub fn new(alias_id: String, created_at: String, id: String, inbox_id: String, to: Vec<String>, updated_at: String, user_id: String) -> ThreadProjection {
44        ThreadProjection {
45            alias_id,
46            bcc: None,
47            cc: None,
48            created_at,
49            id,
50            inbox_id,
51            name: None,
52            subject: None,
53            to,
54            updated_at,
55            user_id,
56        }
57    }
58}
59
60