pipedrive_rs/models/
mail_message_item_for_list.rs

1/*
2 * Pipedrive API v1
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct MailMessageItemForList {
16    /// ID of the mail message.
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    /// The array of mail message sender (object)
20    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
21    pub from: Option<Vec<crate::models::MailMessageItemForListAllOfFromInner>>,
22    /// The array of mail message receiver (object)
23    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
24    pub to: Option<Vec<crate::models::MailMessageItemForListAllOfFromInner>>,
25    /// The array of mail message copies (object)
26    #[serde(rename = "cc", skip_serializing_if = "Option::is_none")]
27    pub cc: Option<Vec<crate::models::MailMessageItemForListAllOfFromInner>>,
28    /// The array of mail message blind copies (object)
29    #[serde(rename = "bcc", skip_serializing_if = "Option::is_none")]
30    pub bcc: Option<Vec<crate::models::MailMessageItemForListAllOfFromInner>>,
31    /// The mail message body URL
32    #[serde(rename = "body_url", skip_serializing_if = "Option::is_none")]
33    pub body_url: Option<String>,
34    /// The connection account ID
35    #[serde(rename = "account_id", skip_serializing_if = "Option::is_none")]
36    pub account_id: Option<String>,
37    /// ID of the user whom mail message will be assigned to
38    #[serde(rename = "user_id", skip_serializing_if = "Option::is_none")]
39    pub user_id: Option<i32>,
40    /// ID of the mail message thread
41    #[serde(rename = "mail_thread_id", skip_serializing_if = "Option::is_none")]
42    pub mail_thread_id: Option<i32>,
43    /// The subject of mail message
44    #[serde(rename = "subject", skip_serializing_if = "Option::is_none")]
45    pub subject: Option<String>,
46    /// The snippet of mail message. Snippet length is up to 225 characters.
47    #[serde(rename = "snippet", skip_serializing_if = "Option::is_none")]
48    pub snippet: Option<String>,
49    /// The status of tracking mail message. Value is `null` if tracking is not enabled.
50    #[serde(rename = "mail_tracking_status", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub mail_tracking_status: Option<Option<MailTrackingStatus>>,
52    #[serde(rename = "mail_link_tracking_enabled_flag", skip_serializing_if = "Option::is_none")]
53    pub mail_link_tracking_enabled_flag: Option<MailLinkTrackingEnabledFlag>,
54    #[serde(rename = "read_flag", skip_serializing_if = "Option::is_none")]
55    pub read_flag: Option<ReadFlag>,
56    /// If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`.
57    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
58    pub draft: Option<String>,
59    #[serde(rename = "draft_flag", skip_serializing_if = "Option::is_none")]
60    pub draft_flag: Option<DraftFlag>,
61    #[serde(rename = "synced_flag", skip_serializing_if = "Option::is_none")]
62    pub synced_flag: Option<SyncedFlag>,
63    #[serde(rename = "deleted_flag", skip_serializing_if = "Option::is_none")]
64    pub deleted_flag: Option<DeletedFlag>,
65    #[serde(rename = "has_body_flag", skip_serializing_if = "Option::is_none")]
66    pub has_body_flag: Option<HasBodyFlag>,
67    #[serde(rename = "sent_flag", skip_serializing_if = "Option::is_none")]
68    pub sent_flag: Option<SentFlag>,
69    #[serde(rename = "sent_from_pipedrive_flag", skip_serializing_if = "Option::is_none")]
70    pub sent_from_pipedrive_flag: Option<SentFromPipedriveFlag>,
71    #[serde(rename = "smart_bcc_flag", skip_serializing_if = "Option::is_none")]
72    pub smart_bcc_flag: Option<SmartBccFlag>,
73    /// Creation or receival time of the mail message
74    #[serde(rename = "message_time", skip_serializing_if = "Option::is_none")]
75    pub message_time: Option<String>,
76    /// The insertion into the database time of the mail message
77    #[serde(rename = "add_time", skip_serializing_if = "Option::is_none")]
78    pub add_time: Option<String>,
79    /// The updating time in the database of the mail message
80    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
81    pub update_time: Option<String>,
82    #[serde(rename = "has_attachments_flag", skip_serializing_if = "Option::is_none")]
83    pub has_attachments_flag: Option<HasAttachmentsFlag>,
84    #[serde(rename = "has_inline_attachments_flag", skip_serializing_if = "Option::is_none")]
85    pub has_inline_attachments_flag: Option<HasInlineAttachmentsFlag>,
86    #[serde(rename = "has_real_attachments_flag", skip_serializing_if = "Option::is_none")]
87    pub has_real_attachments_flag: Option<HasRealAttachmentsFlag>,
88    /// The Mail Message ID assigned by the sync provider
89    #[serde(rename = "nylas_id", skip_serializing_if = "Option::is_none")]
90    pub nylas_id: Option<String>,
91    /// The name of the S3 bucket
92    #[serde(rename = "s3_bucket", skip_serializing_if = "Option::is_none")]
93    pub s3_bucket: Option<String>,
94    /// The path of the S3 bucket
95    #[serde(rename = "s3_bucket_path", skip_serializing_if = "Option::is_none")]
96    pub s3_bucket_path: Option<String>,
97    /// If the Mail Message has been deleted on the provider side or not
98    #[serde(rename = "external_deleted_flag", skip_serializing_if = "Option::is_none")]
99    pub external_deleted_flag: Option<bool>,
100    /// The Mail Message ID assigned by the mail user agent
101    #[serde(rename = "mua_message_id", skip_serializing_if = "Option::is_none")]
102    pub mua_message_id: Option<String>,
103    /// The ID of the mail template
104    #[serde(rename = "template_id", skip_serializing_if = "Option::is_none")]
105    pub template_id: Option<i32>,
106    /// The add date and time of the Mail Message
107    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
108    pub timestamp: Option<String>,
109    /// The type of the data item
110    #[serde(rename = "item_type", skip_serializing_if = "Option::is_none")]
111    pub item_type: Option<String>,
112    /// The ID of the company
113    #[serde(rename = "company_id", skip_serializing_if = "Option::is_none")]
114    pub company_id: Option<i32>,
115}
116
117impl MailMessageItemForList {
118    pub fn new() -> MailMessageItemForList {
119        MailMessageItemForList {
120            id: None,
121            from: None,
122            to: None,
123            cc: None,
124            bcc: None,
125            body_url: None,
126            account_id: None,
127            user_id: None,
128            mail_thread_id: None,
129            subject: None,
130            snippet: None,
131            mail_tracking_status: None,
132            mail_link_tracking_enabled_flag: None,
133            read_flag: None,
134            draft: None,
135            draft_flag: None,
136            synced_flag: None,
137            deleted_flag: None,
138            has_body_flag: None,
139            sent_flag: None,
140            sent_from_pipedrive_flag: None,
141            smart_bcc_flag: None,
142            message_time: None,
143            add_time: None,
144            update_time: None,
145            has_attachments_flag: None,
146            has_inline_attachments_flag: None,
147            has_real_attachments_flag: None,
148            nylas_id: None,
149            s3_bucket: None,
150            s3_bucket_path: None,
151            external_deleted_flag: None,
152            mua_message_id: None,
153            template_id: None,
154            timestamp: None,
155            item_type: None,
156            company_id: None,
157        }
158    }
159}
160
161/// The status of tracking mail message. Value is `null` if tracking is not enabled.
162#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
163pub enum MailTrackingStatus {
164    #[serde(rename = "opened")]
165    Opened,
166    #[serde(rename = "not opened")]
167    NotOpened,
168}
169
170impl Default for MailTrackingStatus {
171    fn default() -> MailTrackingStatus {
172        Self::Opened
173    }
174}
175/// 
176#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
177pub enum MailLinkTrackingEnabledFlag {
178    #[serde(rename = "0")]
179    Variant0,
180    #[serde(rename = "1")]
181    Variant1,
182}
183
184impl Default for MailLinkTrackingEnabledFlag {
185    fn default() -> MailLinkTrackingEnabledFlag {
186        Self::Variant0
187    }
188}
189/// 
190#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
191pub enum ReadFlag {
192    #[serde(rename = "0")]
193    Variant0,
194    #[serde(rename = "1")]
195    Variant1,
196}
197
198impl Default for ReadFlag {
199    fn default() -> ReadFlag {
200        Self::Variant0
201    }
202}
203/// 
204#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
205pub enum DraftFlag {
206    #[serde(rename = "0")]
207    Variant0,
208    #[serde(rename = "1")]
209    Variant1,
210}
211
212impl Default for DraftFlag {
213    fn default() -> DraftFlag {
214        Self::Variant0
215    }
216}
217/// 
218#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
219pub enum SyncedFlag {
220    #[serde(rename = "0")]
221    Variant0,
222    #[serde(rename = "1")]
223    Variant1,
224}
225
226impl Default for SyncedFlag {
227    fn default() -> SyncedFlag {
228        Self::Variant0
229    }
230}
231/// 
232#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
233pub enum DeletedFlag {
234    #[serde(rename = "0")]
235    Variant0,
236    #[serde(rename = "1")]
237    Variant1,
238}
239
240impl Default for DeletedFlag {
241    fn default() -> DeletedFlag {
242        Self::Variant0
243    }
244}
245/// 
246#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
247pub enum HasBodyFlag {
248    #[serde(rename = "0")]
249    Variant0,
250    #[serde(rename = "1")]
251    Variant1,
252}
253
254impl Default for HasBodyFlag {
255    fn default() -> HasBodyFlag {
256        Self::Variant0
257    }
258}
259/// 
260#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
261pub enum SentFlag {
262    #[serde(rename = "0")]
263    Variant0,
264    #[serde(rename = "1")]
265    Variant1,
266}
267
268impl Default for SentFlag {
269    fn default() -> SentFlag {
270        Self::Variant0
271    }
272}
273/// 
274#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
275pub enum SentFromPipedriveFlag {
276    #[serde(rename = "0")]
277    Variant0,
278    #[serde(rename = "1")]
279    Variant1,
280}
281
282impl Default for SentFromPipedriveFlag {
283    fn default() -> SentFromPipedriveFlag {
284        Self::Variant0
285    }
286}
287/// 
288#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
289pub enum SmartBccFlag {
290    #[serde(rename = "0")]
291    Variant0,
292    #[serde(rename = "1")]
293    Variant1,
294}
295
296impl Default for SmartBccFlag {
297    fn default() -> SmartBccFlag {
298        Self::Variant0
299    }
300}
301/// 
302#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
303pub enum HasAttachmentsFlag {
304    #[serde(rename = "0")]
305    Variant0,
306    #[serde(rename = "1")]
307    Variant1,
308}
309
310impl Default for HasAttachmentsFlag {
311    fn default() -> HasAttachmentsFlag {
312        Self::Variant0
313    }
314}
315/// 
316#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
317pub enum HasInlineAttachmentsFlag {
318    #[serde(rename = "0")]
319    Variant0,
320    #[serde(rename = "1")]
321    Variant1,
322}
323
324impl Default for HasInlineAttachmentsFlag {
325    fn default() -> HasInlineAttachmentsFlag {
326        Self::Variant0
327    }
328}
329/// 
330#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
331pub enum HasRealAttachmentsFlag {
332    #[serde(rename = "0")]
333    Variant0,
334    #[serde(rename = "1")]
335    Variant1,
336}
337
338impl Default for HasRealAttachmentsFlag {
339    fn default() -> HasRealAttachmentsFlag {
340        Self::Variant0
341    }
342}
343