bitwarden_api_api/models/
event_type.rs

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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

use crate::models;

///
#[repr(i64)]
#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    PartialEq,
    Ord,
    PartialOrd,
    Hash,
    serde_repr::Serialize_repr,
    serde_repr::Deserialize_repr,
)]
pub enum EventType {
    User_LoggedIn = 1000,
    User_ChangedPassword = 1001,
    User_Updated2fa = 1002,
    User_Disabled2fa = 1003,
    User_Recovered2fa = 1004,
    User_FailedLogIn = 1005,
    User_FailedLogIn2fa = 1006,
    User_ClientExportedVault = 1007,
    User_UpdatedTempPassword = 1008,
    User_MigratedKeyToKeyConnector = 1009,
    User_RequestedDeviceApproval = 1010,
    User_TdeOffboardingPasswordSet = 1011,
    Cipher_Created = 1100,
    Cipher_Updated = 1101,
    Cipher_Deleted = 1102,
    Cipher_AttachmentCreated = 1103,
    Cipher_AttachmentDeleted = 1104,
    Cipher_Shared = 1105,
    Cipher_UpdatedCollections = 1106,
    Cipher_ClientViewed = 1107,
    Cipher_ClientToggledPasswordVisible = 1108,
    Cipher_ClientToggledHiddenFieldVisible = 1109,
    Cipher_ClientToggledCardCodeVisible = 1110,
    Cipher_ClientCopiedPassword = 1111,
    Cipher_ClientCopiedHiddenField = 1112,
    Cipher_ClientCopiedCardCode = 1113,
    Cipher_ClientAutofilled = 1114,
    Cipher_SoftDeleted = 1115,
    Cipher_Restored = 1116,
    Cipher_ClientToggledCardNumberVisible = 1117,
    Collection_Created = 1300,
    Collection_Updated = 1301,
    Collection_Deleted = 1302,
    Group_Created = 1400,
    Group_Updated = 1401,
    Group_Deleted = 1402,
    OrganizationUser_Invited = 1500,
    OrganizationUser_Confirmed = 1501,
    OrganizationUser_Updated = 1502,
    OrganizationUser_Removed = 1503,
    OrganizationUser_UpdatedGroups = 1504,
    OrganizationUser_UnlinkedSso = 1505,
    OrganizationUser_ResetPassword_Enroll = 1506,
    OrganizationUser_ResetPassword_Withdraw = 1507,
    OrganizationUser_AdminResetPassword = 1508,
    OrganizationUser_ResetSsoLink = 1509,
    OrganizationUser_FirstSsoLogin = 1510,
    OrganizationUser_Revoked = 1511,
    OrganizationUser_Restored = 1512,
    OrganizationUser_ApprovedAuthRequest = 1513,
    OrganizationUser_RejectedAuthRequest = 1514,
    OrganizationUser_Deleted = 1515,
    OrganizationUser_Left = 1516,
    Organization_Updated = 1600,
    Organization_PurgedVault = 1601,
    Organization_ClientExportedVault = 1602,
    Organization_VaultAccessed = 1603,
    Organization_EnabledSso = 1604,
    Organization_DisabledSso = 1605,
    Organization_EnabledKeyConnector = 1606,
    Organization_DisabledKeyConnector = 1607,
    Organization_SponsorshipsSynced = 1608,
    Organization_CollectionManagement_Updated = 1609,
    Policy_Updated = 1700,
    ProviderUser_Invited = 1800,
    ProviderUser_Confirmed = 1801,
    ProviderUser_Updated = 1802,
    ProviderUser_Removed = 1803,
    ProviderOrganization_Created = 1900,
    ProviderOrganization_Added = 1901,
    ProviderOrganization_Removed = 1902,
    ProviderOrganization_VaultAccessed = 1903,
    OrganizationDomain_Added = 2000,
    OrganizationDomain_Removed = 2001,
    OrganizationDomain_Verified = 2002,
    OrganizationDomain_NotVerified = 2003,
    Secret_Retrieved = 2100,
}

impl std::fmt::Display for EventType {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::User_LoggedIn => write!(f, "1000"),
            Self::User_ChangedPassword => write!(f, "1001"),
            Self::User_Updated2fa => write!(f, "1002"),
            Self::User_Disabled2fa => write!(f, "1003"),
            Self::User_Recovered2fa => write!(f, "1004"),
            Self::User_FailedLogIn => write!(f, "1005"),
            Self::User_FailedLogIn2fa => write!(f, "1006"),
            Self::User_ClientExportedVault => write!(f, "1007"),
            Self::User_UpdatedTempPassword => write!(f, "1008"),
            Self::User_MigratedKeyToKeyConnector => write!(f, "1009"),
            Self::User_RequestedDeviceApproval => write!(f, "1010"),
            Self::User_TdeOffboardingPasswordSet => write!(f, "1011"),
            Self::Cipher_Created => write!(f, "1100"),
            Self::Cipher_Updated => write!(f, "1101"),
            Self::Cipher_Deleted => write!(f, "1102"),
            Self::Cipher_AttachmentCreated => write!(f, "1103"),
            Self::Cipher_AttachmentDeleted => write!(f, "1104"),
            Self::Cipher_Shared => write!(f, "1105"),
            Self::Cipher_UpdatedCollections => write!(f, "1106"),
            Self::Cipher_ClientViewed => write!(f, "1107"),
            Self::Cipher_ClientToggledPasswordVisible => write!(f, "1108"),
            Self::Cipher_ClientToggledHiddenFieldVisible => write!(f, "1109"),
            Self::Cipher_ClientToggledCardCodeVisible => write!(f, "1110"),
            Self::Cipher_ClientCopiedPassword => write!(f, "1111"),
            Self::Cipher_ClientCopiedHiddenField => write!(f, "1112"),
            Self::Cipher_ClientCopiedCardCode => write!(f, "1113"),
            Self::Cipher_ClientAutofilled => write!(f, "1114"),
            Self::Cipher_SoftDeleted => write!(f, "1115"),
            Self::Cipher_Restored => write!(f, "1116"),
            Self::Cipher_ClientToggledCardNumberVisible => write!(f, "1117"),
            Self::Collection_Created => write!(f, "1300"),
            Self::Collection_Updated => write!(f, "1301"),
            Self::Collection_Deleted => write!(f, "1302"),
            Self::Group_Created => write!(f, "1400"),
            Self::Group_Updated => write!(f, "1401"),
            Self::Group_Deleted => write!(f, "1402"),
            Self::OrganizationUser_Invited => write!(f, "1500"),
            Self::OrganizationUser_Confirmed => write!(f, "1501"),
            Self::OrganizationUser_Updated => write!(f, "1502"),
            Self::OrganizationUser_Removed => write!(f, "1503"),
            Self::OrganizationUser_UpdatedGroups => write!(f, "1504"),
            Self::OrganizationUser_UnlinkedSso => write!(f, "1505"),
            Self::OrganizationUser_ResetPassword_Enroll => write!(f, "1506"),
            Self::OrganizationUser_ResetPassword_Withdraw => write!(f, "1507"),
            Self::OrganizationUser_AdminResetPassword => write!(f, "1508"),
            Self::OrganizationUser_ResetSsoLink => write!(f, "1509"),
            Self::OrganizationUser_FirstSsoLogin => write!(f, "1510"),
            Self::OrganizationUser_Revoked => write!(f, "1511"),
            Self::OrganizationUser_Restored => write!(f, "1512"),
            Self::OrganizationUser_ApprovedAuthRequest => write!(f, "1513"),
            Self::OrganizationUser_RejectedAuthRequest => write!(f, "1514"),
            Self::OrganizationUser_Deleted => write!(f, "1515"),
            Self::OrganizationUser_Left => write!(f, "1516"),
            Self::Organization_Updated => write!(f, "1600"),
            Self::Organization_PurgedVault => write!(f, "1601"),
            Self::Organization_ClientExportedVault => write!(f, "1602"),
            Self::Organization_VaultAccessed => write!(f, "1603"),
            Self::Organization_EnabledSso => write!(f, "1604"),
            Self::Organization_DisabledSso => write!(f, "1605"),
            Self::Organization_EnabledKeyConnector => write!(f, "1606"),
            Self::Organization_DisabledKeyConnector => write!(f, "1607"),
            Self::Organization_SponsorshipsSynced => write!(f, "1608"),
            Self::Organization_CollectionManagement_Updated => write!(f, "1609"),
            Self::Policy_Updated => write!(f, "1700"),
            Self::ProviderUser_Invited => write!(f, "1800"),
            Self::ProviderUser_Confirmed => write!(f, "1801"),
            Self::ProviderUser_Updated => write!(f, "1802"),
            Self::ProviderUser_Removed => write!(f, "1803"),
            Self::ProviderOrganization_Created => write!(f, "1900"),
            Self::ProviderOrganization_Added => write!(f, "1901"),
            Self::ProviderOrganization_Removed => write!(f, "1902"),
            Self::ProviderOrganization_VaultAccessed => write!(f, "1903"),
            Self::OrganizationDomain_Added => write!(f, "2000"),
            Self::OrganizationDomain_Removed => write!(f, "2001"),
            Self::OrganizationDomain_Verified => write!(f, "2002"),
            Self::OrganizationDomain_NotVerified => write!(f, "2003"),
            Self::Secret_Retrieved => write!(f, "2100"),
        }
    }
}

impl Default for EventType {
    fn default() -> EventType {
        Self::User_LoggedIn
    }
}