xmtp_proto/gen/
xmtp.device_sync.event_backup.rs

1// This file is @generated by prost-build.
2/// Proto representation of a client record save
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct EventSave {
5    #[prost(int64, tag = "1")]
6    pub created_at_ns: i64,
7    #[prost(string, tag = "2")]
8    pub event: ::prost::alloc::string::String,
9    #[prost(bytes = "vec", tag = "3")]
10    pub details: ::prost::alloc::vec::Vec<u8>,
11    #[prost(bytes = "vec", optional, tag = "4")]
12    pub group_id: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
13    #[prost(enumeration = "EventLevelSave", tag = "5")]
14    pub level: i32,
15    #[prost(string, optional, tag = "6")]
16    pub icon: ::core::option::Option<::prost::alloc::string::String>,
17}
18impl ::prost::Name for EventSave {
19    const NAME: &'static str = "EventSave";
20    const PACKAGE: &'static str = "xmtp.device_sync.event_backup";
21    fn full_name() -> ::prost::alloc::string::String {
22        "xmtp.device_sync.event_backup.EventSave".into()
23    }
24    fn type_url() -> ::prost::alloc::string::String {
25        "/xmtp.device_sync.event_backup.EventSave".into()
26    }
27}
28#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
29#[repr(i32)]
30pub enum EventLevelSave {
31    Unspecified = 0,
32    None = 1,
33    Success = 2,
34    Warn = 3,
35    Error = 4,
36    Fault = 5,
37}
38impl EventLevelSave {
39    /// String value of the enum field names used in the ProtoBuf definition.
40    ///
41    /// The values are not transformed in any way and thus are considered stable
42    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
43    pub fn as_str_name(&self) -> &'static str {
44        match self {
45            Self::Unspecified => "EVENT_LEVEL_SAVE_UNSPECIFIED",
46            Self::None => "EVENT_LEVEL_SAVE_NONE",
47            Self::Success => "EVENT_LEVEL_SAVE_SUCCESS",
48            Self::Warn => "EVENT_LEVEL_SAVE_WARN",
49            Self::Error => "EVENT_LEVEL_SAVE_ERROR",
50            Self::Fault => "EVENT_LEVEL_SAVE_FAULT",
51        }
52    }
53    /// Creates an enum from field names used in the ProtoBuf definition.
54    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
55        match value {
56            "EVENT_LEVEL_SAVE_UNSPECIFIED" => Some(Self::Unspecified),
57            "EVENT_LEVEL_SAVE_NONE" => Some(Self::None),
58            "EVENT_LEVEL_SAVE_SUCCESS" => Some(Self::Success),
59            "EVENT_LEVEL_SAVE_WARN" => Some(Self::Warn),
60            "EVENT_LEVEL_SAVE_ERROR" => Some(Self::Error),
61            "EVENT_LEVEL_SAVE_FAULT" => Some(Self::Fault),
62            _ => None,
63        }
64    }
65}