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 #[deprecated]
21 #[prost(message, tag = "5")]
22 Event(super::event_backup::EventSave),
23 }
24}
25impl ::prost::Name for BackupElement {
26 const NAME: &'static str = "BackupElement";
27 const PACKAGE: &'static str = "xmtp.device_sync";
28 fn full_name() -> ::prost::alloc::string::String {
29 "xmtp.device_sync.BackupElement".into()
30 }
31 fn type_url() -> ::prost::alloc::string::String {
32 "/xmtp.device_sync.BackupElement".into()
33 }
34}
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
38pub struct BackupMetadataSave {
39 #[prost(enumeration = "BackupElementSelection", repeated, tag = "2")]
40 pub elements: ::prost::alloc::vec::Vec<i32>,
41 #[prost(int64, tag = "3")]
42 pub exported_at_ns: i64,
43 #[prost(int64, optional, tag = "4")]
44 pub start_ns: ::core::option::Option<i64>,
45 #[prost(int64, optional, tag = "5")]
46 pub end_ns: ::core::option::Option<i64>,
47}
48impl ::prost::Name for BackupMetadataSave {
49 const NAME: &'static str = "BackupMetadataSave";
50 const PACKAGE: &'static str = "xmtp.device_sync";
51 fn full_name() -> ::prost::alloc::string::String {
52 "xmtp.device_sync.BackupMetadataSave".into()
53 }
54 fn type_url() -> ::prost::alloc::string::String {
55 "/xmtp.device_sync.BackupMetadataSave".into()
56 }
57}
58#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
60pub struct ArchiveOptions {
61 #[prost(enumeration = "BackupElementSelection", repeated, tag = "1")]
62 pub elements: ::prost::alloc::vec::Vec<i32>,
63 #[prost(int64, optional, tag = "2")]
64 pub start_ns: ::core::option::Option<i64>,
65 #[prost(int64, optional, tag = "3")]
66 pub end_ns: ::core::option::Option<i64>,
67 #[prost(bool, tag = "4")]
68 pub exclude_disappearing_messages: bool,
69}
70impl ::prost::Name for ArchiveOptions {
71 const NAME: &'static str = "ArchiveOptions";
72 const PACKAGE: &'static str = "xmtp.device_sync";
73 fn full_name() -> ::prost::alloc::string::String {
74 "xmtp.device_sync.ArchiveOptions".into()
75 }
76 fn type_url() -> ::prost::alloc::string::String {
77 "/xmtp.device_sync.ArchiveOptions".into()
78 }
79}
80#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
82#[repr(i32)]
83pub enum BackupElementSelection {
84 Unspecified = 0,
85 Messages = 1,
86 Consent = 2,
87 #[deprecated]
88 Event = 3,
89}
90impl BackupElementSelection {
91 pub fn as_str_name(&self) -> &'static str {
96 match self {
97 Self::Unspecified => "BACKUP_ELEMENT_SELECTION_UNSPECIFIED",
98 Self::Messages => "BACKUP_ELEMENT_SELECTION_MESSAGES",
99 Self::Consent => "BACKUP_ELEMENT_SELECTION_CONSENT",
100 #[allow(deprecated)]
101 Self::Event => "BACKUP_ELEMENT_SELECTION_EVENT",
102 }
103 }
104 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
106 match value {
107 "BACKUP_ELEMENT_SELECTION_UNSPECIFIED" => Some(Self::Unspecified),
108 "BACKUP_ELEMENT_SELECTION_MESSAGES" => Some(Self::Messages),
109 "BACKUP_ELEMENT_SELECTION_CONSENT" => Some(Self::Consent),
110 "BACKUP_ELEMENT_SELECTION_EVENT" => Some(#[allow(deprecated)] Self::Event),
111 _ => None,
112 }
113 }
114}