Skip to main content

bitwarden_importers/importers/keeper/proto/
notification_center.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3pub struct EncryptedData {
4    #[prost(int32, tag = "1")]
5    pub version: i32,
6    #[prost(bytes = "vec", tag = "2")]
7    pub data: ::prost::alloc::vec::Vec<u8>,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct Notification {
11    #[prost(enumeration = "NotificationType", tag = "1")]
12    pub r#type: i32,
13    #[prost(enumeration = "NotificationCategory", tag = "2")]
14    pub category: i32,
15    #[prost(message, optional, tag = "3")]
16    pub sender: ::core::option::Option<super::graph_sync::GraphSyncRef>,
17    #[prost(string, tag = "4")]
18    pub sender_full_name: ::prost::alloc::string::String,
19    #[prost(message, optional, tag = "5")]
20    pub encrypted_data: ::core::option::Option<EncryptedData>,
21    #[prost(message, repeated, tag = "6")]
22    pub refs: ::prost::alloc::vec::Vec<super::graph_sync::GraphSyncRef>,
23    #[prost(enumeration = "NotificationCategory", repeated, tag = "7")]
24    pub categories: ::prost::alloc::vec::Vec<i32>,
25}
26#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
27pub struct NotificationReadMark {
28    #[prost(bytes = "vec", tag = "1")]
29    pub uid: ::prost::alloc::vec::Vec<u8>,
30    #[prost(int64, tag = "2")]
31    pub notification_edge_id: i64,
32    #[prost(int64, tag = "3")]
33    pub mark_edge_id: i64,
34    #[prost(enumeration = "NotificationReadStatus", tag = "4")]
35    pub read_status: i32,
36}
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct NotificationContent {
39    #[prost(int32, repeated, tag = "5")]
40    pub client_type_i_ds: ::prost::alloc::vec::Vec<i32>,
41    #[prost(int64, repeated, tag = "6")]
42    pub device_i_ds: ::prost::alloc::vec::Vec<i64>,
43    #[prost(oneof = "notification_content::Type", tags = "1, 2, 3, 4")]
44    pub r#type: ::core::option::Option<notification_content::Type>,
45}
46/// Nested message and enum types in `NotificationContent`.
47pub mod notification_content {
48    #[derive(Clone, PartialEq, ::prost::Oneof)]
49    pub enum Type {
50        #[prost(message, tag = "1")]
51        Notification(super::Notification),
52        #[prost(enumeration = "super::NotificationReadStatus", tag = "2")]
53        ReadStatus(i32),
54        #[prost(enumeration = "super::NotificationApprovalStatus", tag = "3")]
55        ApprovalStatus(i32),
56        #[prost(bool, tag = "4")]
57        TrimmingPoint(bool),
58    }
59}
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct NotificationWrapper {
62    #[prost(bytes = "vec", tag = "1")]
63    pub uid: ::prost::alloc::vec::Vec<u8>,
64    #[prost(message, optional, tag = "2")]
65    pub content: ::core::option::Option<NotificationContent>,
66    #[prost(int64, tag = "3")]
67    pub timestamp: i64,
68}
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct NotificationSync {
71    #[prost(message, repeated, tag = "1")]
72    pub data: ::prost::alloc::vec::Vec<NotificationWrapper>,
73    #[prost(int64, tag = "2")]
74    pub sync_point: i64,
75    #[prost(bool, tag = "3")]
76    pub has_more: bool,
77}
78#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
79pub struct ReadStatusUpdate {
80    #[prost(bytes = "vec", tag = "1")]
81    pub notification_uid: ::prost::alloc::vec::Vec<u8>,
82    #[prost(enumeration = "NotificationReadStatus", tag = "2")]
83    pub status: i32,
84}
85#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
86pub struct ApprovalStatusUpdate {
87    #[prost(bytes = "vec", tag = "1")]
88    pub notification_uid: ::prost::alloc::vec::Vec<u8>,
89    #[prost(enumeration = "NotificationApprovalStatus", tag = "2")]
90    pub status: i32,
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct ProcessMarkReadEventsRequest {
94    #[prost(message, repeated, tag = "1")]
95    pub read_status_update: ::prost::alloc::vec::Vec<ReadStatusUpdate>,
96}
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct NotificationSendRequest {
99    #[prost(message, repeated, tag = "1")]
100    pub recipients: ::prost::alloc::vec::Vec<super::graph_sync::GraphSyncRef>,
101    #[prost(message, optional, tag = "2")]
102    pub notification: ::core::option::Option<Notification>,
103    #[prost(int32, repeated, tag = "3")]
104    pub client_type_i_ds: ::prost::alloc::vec::Vec<i32>,
105    #[prost(int64, repeated, tag = "4")]
106    pub device_i_ds: ::prost::alloc::vec::Vec<i64>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct NotificationsSendRequest {
110    #[prost(message, repeated, tag = "1")]
111    pub notifications: ::prost::alloc::vec::Vec<NotificationSendRequest>,
112}
113#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
114pub struct NotificationSyncRequest {
115    #[prost(int64, tag = "1")]
116    pub sync_point: i64,
117}
118#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
119#[repr(i32)]
120pub enum NotificationCategory {
121    NcUnspecified = 0,
122    NcAccount = 1,
123    NcSharing = 2,
124    NcEnterprise = 3,
125    NcSecurity = 4,
126    NcRequest = 5,
127    NcSystem = 6,
128    NcPromotion = 7,
129}
130impl NotificationCategory {
131    /// String value of the enum field names used in the ProtoBuf definition.
132    ///
133    /// The values are not transformed in any way and thus are considered stable
134    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
135    pub fn as_str_name(&self) -> &'static str {
136        match self {
137            Self::NcUnspecified => "NC_UNSPECIFIED",
138            Self::NcAccount => "NC_ACCOUNT",
139            Self::NcSharing => "NC_SHARING",
140            Self::NcEnterprise => "NC_ENTERPRISE",
141            Self::NcSecurity => "NC_SECURITY",
142            Self::NcRequest => "NC_REQUEST",
143            Self::NcSystem => "NC_SYSTEM",
144            Self::NcPromotion => "NC_PROMOTION",
145        }
146    }
147    /// Creates an enum from field names used in the ProtoBuf definition.
148    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
149        match value {
150            "NC_UNSPECIFIED" => Some(Self::NcUnspecified),
151            "NC_ACCOUNT" => Some(Self::NcAccount),
152            "NC_SHARING" => Some(Self::NcSharing),
153            "NC_ENTERPRISE" => Some(Self::NcEnterprise),
154            "NC_SECURITY" => Some(Self::NcSecurity),
155            "NC_REQUEST" => Some(Self::NcRequest),
156            "NC_SYSTEM" => Some(Self::NcSystem),
157            "NC_PROMOTION" => Some(Self::NcPromotion),
158            _ => None,
159        }
160    }
161}
162#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
163#[repr(i32)]
164pub enum NotificationType {
165    NtUnspecified = 0,
166    NtAlert = 1,
167    NtDeviceApproval = 2,
168    NtMasterPassUpdated = 3,
169    NtShareApproval = 4,
170    NtShareApprovalApproved = 5,
171    NtShared = 6,
172    NtTransferred = 7,
173    NtLicenseLimitReached = 8,
174    NtApprovalRequest = 9,
175    NtApprovedResponse = 10,
176    NtDeniedResponse = 11,
177    Nt2faConfigured = 12,
178    NtShareApprovalDenied = 13,
179}
180impl NotificationType {
181    /// String value of the enum field names used in the ProtoBuf definition.
182    ///
183    /// The values are not transformed in any way and thus are considered stable
184    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
185    pub fn as_str_name(&self) -> &'static str {
186        match self {
187            Self::NtUnspecified => "NT_UNSPECIFIED",
188            Self::NtAlert => "NT_ALERT",
189            Self::NtDeviceApproval => "NT_DEVICE_APPROVAL",
190            Self::NtMasterPassUpdated => "NT_MASTER_PASS_UPDATED",
191            Self::NtShareApproval => "NT_SHARE_APPROVAL",
192            Self::NtShareApprovalApproved => "NT_SHARE_APPROVAL_APPROVED",
193            Self::NtShared => "NT_SHARED",
194            Self::NtTransferred => "NT_TRANSFERRED",
195            Self::NtLicenseLimitReached => "NT_LICENSE_LIMIT_REACHED",
196            Self::NtApprovalRequest => "NT_APPROVAL_REQUEST",
197            Self::NtApprovedResponse => "NT_APPROVED_RESPONSE",
198            Self::NtDeniedResponse => "NT_DENIED_RESPONSE",
199            Self::Nt2faConfigured => "NT_2FA_CONFIGURED",
200            Self::NtShareApprovalDenied => "NT_SHARE_APPROVAL_DENIED",
201        }
202    }
203    /// Creates an enum from field names used in the ProtoBuf definition.
204    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
205        match value {
206            "NT_UNSPECIFIED" => Some(Self::NtUnspecified),
207            "NT_ALERT" => Some(Self::NtAlert),
208            "NT_DEVICE_APPROVAL" => Some(Self::NtDeviceApproval),
209            "NT_MASTER_PASS_UPDATED" => Some(Self::NtMasterPassUpdated),
210            "NT_SHARE_APPROVAL" => Some(Self::NtShareApproval),
211            "NT_SHARE_APPROVAL_APPROVED" => Some(Self::NtShareApprovalApproved),
212            "NT_SHARED" => Some(Self::NtShared),
213            "NT_TRANSFERRED" => Some(Self::NtTransferred),
214            "NT_LICENSE_LIMIT_REACHED" => Some(Self::NtLicenseLimitReached),
215            "NT_APPROVAL_REQUEST" => Some(Self::NtApprovalRequest),
216            "NT_APPROVED_RESPONSE" => Some(Self::NtApprovedResponse),
217            "NT_DENIED_RESPONSE" => Some(Self::NtDeniedResponse),
218            "NT_2FA_CONFIGURED" => Some(Self::Nt2faConfigured),
219            "NT_SHARE_APPROVAL_DENIED" => Some(Self::NtShareApprovalDenied),
220            _ => None,
221        }
222    }
223}
224#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
225#[repr(i32)]
226pub enum NotificationReadStatus {
227    NrsUnspecified = 0,
228    NrsLast = 1,
229    NrsRead = 2,
230    NrsUnread = 3,
231}
232impl NotificationReadStatus {
233    /// String value of the enum field names used in the ProtoBuf definition.
234    ///
235    /// The values are not transformed in any way and thus are considered stable
236    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
237    pub fn as_str_name(&self) -> &'static str {
238        match self {
239            Self::NrsUnspecified => "NRS_UNSPECIFIED",
240            Self::NrsLast => "NRS_LAST",
241            Self::NrsRead => "NRS_READ",
242            Self::NrsUnread => "NRS_UNREAD",
243        }
244    }
245    /// Creates an enum from field names used in the ProtoBuf definition.
246    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
247        match value {
248            "NRS_UNSPECIFIED" => Some(Self::NrsUnspecified),
249            "NRS_LAST" => Some(Self::NrsLast),
250            "NRS_READ" => Some(Self::NrsRead),
251            "NRS_UNREAD" => Some(Self::NrsUnread),
252            _ => None,
253        }
254    }
255}
256#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
257#[repr(i32)]
258pub enum NotificationApprovalStatus {
259    NasUnspecified = 0,
260    NasApproved = 1,
261    NasDenied = 2,
262    NasLostApprovalRights = 3,
263    NasLostAccess = 4,
264}
265impl NotificationApprovalStatus {
266    /// String value of the enum field names used in the ProtoBuf definition.
267    ///
268    /// The values are not transformed in any way and thus are considered stable
269    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
270    pub fn as_str_name(&self) -> &'static str {
271        match self {
272            Self::NasUnspecified => "NAS_UNSPECIFIED",
273            Self::NasApproved => "NAS_APPROVED",
274            Self::NasDenied => "NAS_DENIED",
275            Self::NasLostApprovalRights => "NAS_LOST_APPROVAL_RIGHTS",
276            Self::NasLostAccess => "NAS_LOST_ACCESS",
277        }
278    }
279    /// Creates an enum from field names used in the ProtoBuf definition.
280    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
281        match value {
282            "NAS_UNSPECIFIED" => Some(Self::NasUnspecified),
283            "NAS_APPROVED" => Some(Self::NasApproved),
284            "NAS_DENIED" => Some(Self::NasDenied),
285            "NAS_LOST_APPROVAL_RIGHTS" => Some(Self::NasLostApprovalRights),
286            "NAS_LOST_ACCESS" => Some(Self::NasLostAccess),
287            _ => None,
288        }
289    }
290}