1use crate::{core::get::GetObject, Get, Set};
13
14use super::SieveScript;
15
16impl SieveScript<Get> {
17 pub fn id(&self) -> Option<&str> {
18 self.id.as_deref()
19 }
20
21 pub fn take_id(&mut self) -> String {
22 self.id.take().unwrap_or_default()
23 }
24
25 pub fn name(&self) -> Option<&str> {
26 self.name.as_deref()
27 }
28
29 pub fn blob_id(&self) -> Option<&str> {
30 self.blob_id.as_deref()
31 }
32
33 pub fn is_active(&self) -> bool {
34 self.is_active.unwrap_or(false)
35 }
36}
37
38impl GetObject for SieveScript<Set> {
39 type GetArguments = ();
40}
41
42impl GetObject for SieveScript<Get> {
43 type GetArguments = ();
44}