dart_notification.rs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // This file is generated by rust-protobuf 2.25.2. Do not edit
  2. // @generated
  3. // https://github.com/rust-lang/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![allow(unused_attributes)]
  7. #![cfg_attr(rustfmt, rustfmt::skip)]
  8. #![allow(box_pointers)]
  9. #![allow(dead_code)]
  10. #![allow(missing_docs)]
  11. #![allow(non_camel_case_types)]
  12. #![allow(non_snake_case)]
  13. #![allow(non_upper_case_globals)]
  14. #![allow(trivial_casts)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `dart_notification.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
  21. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  22. pub enum UserNotification {
  23. Unknown = 0,
  24. UserAuthChanged = 1,
  25. UserProfileUpdated = 2,
  26. UserUnauthorized = 3,
  27. UserWsConnectStateChanged = 4,
  28. }
  29. impl ::protobuf::ProtobufEnum for UserNotification {
  30. fn value(&self) -> i32 {
  31. *self as i32
  32. }
  33. fn from_i32(value: i32) -> ::std::option::Option<UserNotification> {
  34. match value {
  35. 0 => ::std::option::Option::Some(UserNotification::Unknown),
  36. 1 => ::std::option::Option::Some(UserNotification::UserAuthChanged),
  37. 2 => ::std::option::Option::Some(UserNotification::UserProfileUpdated),
  38. 3 => ::std::option::Option::Some(UserNotification::UserUnauthorized),
  39. 4 => ::std::option::Option::Some(UserNotification::UserWsConnectStateChanged),
  40. _ => ::std::option::Option::None
  41. }
  42. }
  43. fn values() -> &'static [Self] {
  44. static values: &'static [UserNotification] = &[
  45. UserNotification::Unknown,
  46. UserNotification::UserAuthChanged,
  47. UserNotification::UserProfileUpdated,
  48. UserNotification::UserUnauthorized,
  49. UserNotification::UserWsConnectStateChanged,
  50. ];
  51. values
  52. }
  53. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  54. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  55. descriptor.get(|| {
  56. ::protobuf::reflect::EnumDescriptor::new_pb_name::<UserNotification>("UserNotification", file_descriptor_proto())
  57. })
  58. }
  59. }
  60. impl ::std::marker::Copy for UserNotification {
  61. }
  62. impl ::std::default::Default for UserNotification {
  63. fn default() -> Self {
  64. UserNotification::Unknown
  65. }
  66. }
  67. impl ::protobuf::reflect::ProtobufValue for UserNotification {
  68. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  69. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  70. }
  71. }
  72. static file_descriptor_proto_data: &'static [u8] = b"\
  73. \n\x17dart_notification.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\
  74. \x07Unknown\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12User\
  75. ProfileUpdated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\
  76. \x19UserWsConnectStateChanged\x10\x04b\x06proto3\
  77. ";
  78. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  79. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  80. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  81. }
  82. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  83. file_descriptor_proto_lazy.get(|| {
  84. parse_descriptor_proto()
  85. })
  86. }