1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use serde::{Serialize, Deserialize};
///Vacation auto-reply settings for an account. These settings correspond to the "Vacation responder" feature in the web interface.
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct SettingsGetVacationResponse {
    ///Flag that controls whether Gmail automatically replies to messages.
    #[serde(rename = "enableAutoReply")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enable_auto_reply: Option<bool>,
    ///An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both `startTime` and `endTime` are specified, `startTime` must precede `endTime`.
    #[serde(rename = "endTime")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub end_time: Option<String>,
    ///Response body in HTML format. Gmail will sanitize the HTML before storing it. If both `response_body_plain_text` and `response_body_html` are specified, `response_body_html` will be used.
    #[serde(rename = "responseBodyHtml")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub response_body_html: Option<String>,
    ///Response body in plain text format. If both `response_body_plain_text` and `response_body_html` are specified, `response_body_html` will be used.
    #[serde(rename = "responseBodyPlainText")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub response_body_plain_text: Option<String>,
    ///Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty.
    #[serde(rename = "responseSubject")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub response_subject: Option<String>,
    ///Flag that determines whether responses are sent to recipients who are not in the user's list of contacts.
    #[serde(rename = "restrictToContacts")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub restrict_to_contacts: Option<bool>,
    ///Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for G Suite users.
    #[serde(rename = "restrictToDomain")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub restrict_to_domain: Option<bool>,
    ///An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both `startTime` and `endTime` are specified, `startTime` must precede `endTime`.
    #[serde(rename = "startTime")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub start_time: Option<String>,
}
impl std::fmt::Display for SettingsGetVacationResponse {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
        write!(f, "{}", serde_json::to_string(self).unwrap())
    }
}