bitwarden_api_api/models/
push_type.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[repr(i64)]
17#[derive(
18 Clone,
19 Copy,
20 Debug,
21 Eq,
22 PartialEq,
23 Ord,
24 PartialOrd,
25 Hash,
26 serde_repr::Serialize_repr,
27 serde_repr::Deserialize_repr,
28)]
29pub enum PushType {
30 SyncCipherUpdate = 0,
31 SyncCipherCreate = 1,
32 SyncLoginDelete = 2,
33 SyncFolderDelete = 3,
34 SyncCiphers = 4,
35 SyncVault = 5,
36 SyncOrgKeys = 6,
37 SyncFolderCreate = 7,
38 SyncFolderUpdate = 8,
39 SyncCipherDelete = 9,
40 SyncSettings = 10,
41 LogOut = 11,
42 SyncSendCreate = 12,
43 SyncSendUpdate = 13,
44 SyncSendDelete = 14,
45 AuthRequest = 15,
46 AuthRequestResponse = 16,
47 SyncOrganizations = 17,
48 SyncOrganizationStatusChanged = 18,
49 SyncOrganizationCollectionSettingChanged = 19,
50 Notification = 20,
51 NotificationStatus = 21,
52 PendingSecurityTasks = 22,
53}
54
55impl std::fmt::Display for PushType {
56 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
57 match self {
58 Self::SyncCipherUpdate => write!(f, "0"),
59 Self::SyncCipherCreate => write!(f, "1"),
60 Self::SyncLoginDelete => write!(f, "2"),
61 Self::SyncFolderDelete => write!(f, "3"),
62 Self::SyncCiphers => write!(f, "4"),
63 Self::SyncVault => write!(f, "5"),
64 Self::SyncOrgKeys => write!(f, "6"),
65 Self::SyncFolderCreate => write!(f, "7"),
66 Self::SyncFolderUpdate => write!(f, "8"),
67 Self::SyncCipherDelete => write!(f, "9"),
68 Self::SyncSettings => write!(f, "10"),
69 Self::LogOut => write!(f, "11"),
70 Self::SyncSendCreate => write!(f, "12"),
71 Self::SyncSendUpdate => write!(f, "13"),
72 Self::SyncSendDelete => write!(f, "14"),
73 Self::AuthRequest => write!(f, "15"),
74 Self::AuthRequestResponse => write!(f, "16"),
75 Self::SyncOrganizations => write!(f, "17"),
76 Self::SyncOrganizationStatusChanged => write!(f, "18"),
77 Self::SyncOrganizationCollectionSettingChanged => write!(f, "19"),
78 Self::Notification => write!(f, "20"),
79 Self::NotificationStatus => write!(f, "21"),
80 Self::PendingSecurityTasks => write!(f, "22"),
81 }
82 }
83}
84
85impl Default for PushType {
86 fn default() -> PushType {
87 Self::SyncCipherUpdate
88 }
89}