jmap_client/vacation_response/
get.rs1use crate::{core::get::GetObject, Get, Set};
13
14use super::VacationResponse;
15
16impl VacationResponse<Get> {
17 pub fn id(&self) -> Option<&str> {
18 self.id.as_deref()
19 }
20
21 pub fn is_enabled(&self) -> bool {
22 self.is_enabled.unwrap_or(false)
23 }
24
25 pub fn from_date(&self) -> Option<i64> {
26 self.from_date.as_ref().map(|dt| dt.timestamp())
27 }
28
29 pub fn to_date(&self) -> Option<i64> {
30 self.to_date.as_ref().map(|dt| dt.timestamp())
31 }
32
33 pub fn subject(&self) -> Option<&str> {
34 self.subject.as_deref()
35 }
36
37 pub fn text_body(&self) -> Option<&str> {
38 self.text_body.as_deref()
39 }
40
41 pub fn html_body(&self) -> Option<&str> {
42 self.html_body.as_deref()
43 }
44}
45
46impl GetObject for VacationResponse<Set> {
47 type GetArguments = ();
48}
49
50impl GetObject for VacationResponse<Get> {
51 type GetArguments = ();
52}