xmtp_proto/gen/
xmtp.device_sync.rs1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct BackupElement {
5 #[prost(oneof = "backup_element::Element", tags = "1, 2, 3, 4, 5")]
6 pub element: ::core::option::Option<backup_element::Element>,
7}
8pub mod backup_element {
10 #[derive(Clone, PartialEq, ::prost::Oneof)]
11 pub enum Element {
12 #[prost(message, tag = "1")]
13 Metadata(super::BackupMetadataSave),
14 #[prost(message, tag = "2")]
15 Group(super::group_backup::GroupSave),
16 #[prost(message, tag = "3")]
17 GroupMessage(super::message_backup::GroupMessageSave),
18 #[prost(message, tag = "4")]
19 Consent(super::consent_backup::ConsentSave),
20 #[prost(message, tag = "5")]
21 Event(super::event_backup::EventSave),
22 }
23}
24impl ::prost::Name for BackupElement {
25 const NAME: &'static str = "BackupElement";
26 const PACKAGE: &'static str = "xmtp.device_sync";
27 fn full_name() -> ::prost::alloc::string::String {
28 "xmtp.device_sync.BackupElement".into()
29 }
30 fn type_url() -> ::prost::alloc::string::String {
31 "/xmtp.device_sync.BackupElement".into()
32 }
33}
34#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
37pub struct BackupMetadataSave {
38 #[prost(enumeration = "BackupElementSelection", repeated, tag = "2")]
39 pub elements: ::prost::alloc::vec::Vec<i32>,
40 #[prost(int64, tag = "3")]
41 pub exported_at_ns: i64,
42 #[prost(int64, optional, tag = "4")]
43 pub start_ns: ::core::option::Option<i64>,
44 #[prost(int64, optional, tag = "5")]
45 pub end_ns: ::core::option::Option<i64>,
46}
47impl ::prost::Name for BackupMetadataSave {
48 const NAME: &'static str = "BackupMetadataSave";
49 const PACKAGE: &'static str = "xmtp.device_sync";
50 fn full_name() -> ::prost::alloc::string::String {
51 "xmtp.device_sync.BackupMetadataSave".into()
52 }
53 fn type_url() -> ::prost::alloc::string::String {
54 "/xmtp.device_sync.BackupMetadataSave".into()
55 }
56}
57#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
59pub struct BackupOptions {
60 #[prost(enumeration = "BackupElementSelection", repeated, tag = "1")]
61 pub elements: ::prost::alloc::vec::Vec<i32>,
62 #[prost(int64, optional, tag = "2")]
63 pub start_ns: ::core::option::Option<i64>,
64 #[prost(int64, optional, tag = "3")]
65 pub end_ns: ::core::option::Option<i64>,
66 #[prost(bool, tag = "4")]
67 pub exclude_disappearing_messages: bool,
68}
69impl ::prost::Name for BackupOptions {
70 const NAME: &'static str = "BackupOptions";
71 const PACKAGE: &'static str = "xmtp.device_sync";
72 fn full_name() -> ::prost::alloc::string::String {
73 "xmtp.device_sync.BackupOptions".into()
74 }
75 fn type_url() -> ::prost::alloc::string::String {
76 "/xmtp.device_sync.BackupOptions".into()
77 }
78}
79#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
81#[repr(i32)]
82pub enum BackupElementSelection {
83 Unspecified = 0,
84 Messages = 1,
85 Consent = 2,
86 Event = 3,
87}
88impl BackupElementSelection {
89 pub fn as_str_name(&self) -> &'static str {
94 match self {
95 Self::Unspecified => "BACKUP_ELEMENT_SELECTION_UNSPECIFIED",
96 Self::Messages => "BACKUP_ELEMENT_SELECTION_MESSAGES",
97 Self::Consent => "BACKUP_ELEMENT_SELECTION_CONSENT",
98 Self::Event => "BACKUP_ELEMENT_SELECTION_EVENT",
99 }
100 }
101 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
103 match value {
104 "BACKUP_ELEMENT_SELECTION_UNSPECIFIED" => Some(Self::Unspecified),
105 "BACKUP_ELEMENT_SELECTION_MESSAGES" => Some(Self::Messages),
106 "BACKUP_ELEMENT_SELECTION_CONSENT" => Some(Self::Consent),
107 "BACKUP_ELEMENT_SELECTION_EVENT" => Some(Self::Event),
108 _ => None,
109 }
110 }
111}