xmtp_proto/gen/
xmtp.device_sync.consent_backup.rs1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct ConsentSave {
5 #[prost(enumeration = "ConsentTypeSave", tag = "1")]
6 pub entity_type: i32,
7 #[prost(enumeration = "ConsentStateSave", tag = "2")]
8 pub state: i32,
9 #[prost(string, tag = "3")]
10 pub entity: ::prost::alloc::string::String,
11 #[prost(int64, tag = "4")]
12 pub consented_at_ns: i64,
13}
14impl ::prost::Name for ConsentSave {
15 const NAME: &'static str = "ConsentSave";
16 const PACKAGE: &'static str = "xmtp.device_sync.consent_backup";
17 fn full_name() -> ::prost::alloc::string::String {
18 "xmtp.device_sync.consent_backup.ConsentSave".into()
19 }
20 fn type_url() -> ::prost::alloc::string::String {
21 "/xmtp.device_sync.consent_backup.ConsentSave".into()
22 }
23}
24#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
26#[repr(i32)]
27pub enum ConsentTypeSave {
28 Unspecified = 0,
29 ConversationId = 1,
30 InboxId = 2,
31 #[deprecated]
32 Address = 3,
33}
34impl ConsentTypeSave {
35 pub fn as_str_name(&self) -> &'static str {
40 match self {
41 Self::Unspecified => "CONSENT_TYPE_SAVE_UNSPECIFIED",
42 Self::ConversationId => "CONSENT_TYPE_SAVE_CONVERSATION_ID",
43 Self::InboxId => "CONSENT_TYPE_SAVE_INBOX_ID",
44 #[allow(deprecated)]
45 Self::Address => "CONSENT_TYPE_SAVE_ADDRESS",
46 }
47 }
48 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
50 match value {
51 "CONSENT_TYPE_SAVE_UNSPECIFIED" => Some(Self::Unspecified),
52 "CONSENT_TYPE_SAVE_CONVERSATION_ID" => Some(Self::ConversationId),
53 "CONSENT_TYPE_SAVE_INBOX_ID" => Some(Self::InboxId),
54 "CONSENT_TYPE_SAVE_ADDRESS" => Some(#[allow(deprecated)] Self::Address),
55 _ => None,
56 }
57 }
58}
59#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
61#[repr(i32)]
62pub enum ConsentStateSave {
63 Unspecified = 0,
64 Unknown = 1,
65 Allowed = 2,
66 Denied = 3,
67}
68impl ConsentStateSave {
69 pub fn as_str_name(&self) -> &'static str {
74 match self {
75 Self::Unspecified => "CONSENT_STATE_SAVE_UNSPECIFIED",
76 Self::Unknown => "CONSENT_STATE_SAVE_UNKNOWN",
77 Self::Allowed => "CONSENT_STATE_SAVE_ALLOWED",
78 Self::Denied => "CONSENT_STATE_SAVE_DENIED",
79 }
80 }
81 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
83 match value {
84 "CONSENT_STATE_SAVE_UNSPECIFIED" => Some(Self::Unspecified),
85 "CONSENT_STATE_SAVE_UNKNOWN" => Some(Self::Unknown),
86 "CONSENT_STATE_SAVE_ALLOWED" => Some(Self::Allowed),
87 "CONSENT_STATE_SAVE_DENIED" => Some(Self::Denied),
88 _ => None,
89 }
90 }
91}