event_map.rs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 `event_map.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 UserEvent {
  23. InitUser = 0,
  24. SignIn = 1,
  25. SignUp = 2,
  26. SignOut = 3,
  27. UpdateUser = 4,
  28. GetUserProfile = 5,
  29. CheckUser = 6,
  30. SetAppearanceSetting = 7,
  31. GetAppearanceSetting = 8,
  32. }
  33. impl ::protobuf::ProtobufEnum for UserEvent {
  34. fn value(&self) -> i32 {
  35. *self as i32
  36. }
  37. fn from_i32(value: i32) -> ::std::option::Option<UserEvent> {
  38. match value {
  39. 0 => ::std::option::Option::Some(UserEvent::InitUser),
  40. 1 => ::std::option::Option::Some(UserEvent::SignIn),
  41. 2 => ::std::option::Option::Some(UserEvent::SignUp),
  42. 3 => ::std::option::Option::Some(UserEvent::SignOut),
  43. 4 => ::std::option::Option::Some(UserEvent::UpdateUser),
  44. 5 => ::std::option::Option::Some(UserEvent::GetUserProfile),
  45. 6 => ::std::option::Option::Some(UserEvent::CheckUser),
  46. 7 => ::std::option::Option::Some(UserEvent::SetAppearanceSetting),
  47. 8 => ::std::option::Option::Some(UserEvent::GetAppearanceSetting),
  48. _ => ::std::option::Option::None
  49. }
  50. }
  51. fn values() -> &'static [Self] {
  52. static values: &'static [UserEvent] = &[
  53. UserEvent::InitUser,
  54. UserEvent::SignIn,
  55. UserEvent::SignUp,
  56. UserEvent::SignOut,
  57. UserEvent::UpdateUser,
  58. UserEvent::GetUserProfile,
  59. UserEvent::CheckUser,
  60. UserEvent::SetAppearanceSetting,
  61. UserEvent::GetAppearanceSetting,
  62. ];
  63. values
  64. }
  65. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  66. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  67. descriptor.get(|| {
  68. ::protobuf::reflect::EnumDescriptor::new_pb_name::<UserEvent>("UserEvent", file_descriptor_proto())
  69. })
  70. }
  71. }
  72. impl ::std::marker::Copy for UserEvent {
  73. }
  74. impl ::std::default::Default for UserEvent {
  75. fn default() -> Self {
  76. UserEvent::InitUser
  77. }
  78. }
  79. impl ::protobuf::reflect::ProtobufValue for UserEvent {
  80. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  81. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  82. }
  83. }
  84. static file_descriptor_proto_data: &'static [u8] = b"\
  85. \n\x0fevent_map.proto*\xa5\x01\n\tUserEvent\x12\x0c\n\x08InitUser\x10\0\
  86. \x12\n\n\x06SignIn\x10\x01\x12\n\n\x06SignUp\x10\x02\x12\x0b\n\x07SignOu\
  87. t\x10\x03\x12\x0e\n\nUpdateUser\x10\x04\x12\x12\n\x0eGetUserProfile\x10\
  88. \x05\x12\r\n\tCheckUser\x10\x06\x12\x18\n\x14SetAppearanceSetting\x10\
  89. \x07\x12\x18\n\x14GetAppearanceSetting\x10\x08b\x06proto3\
  90. ";
  91. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  92. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  93. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  94. }
  95. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  96. file_descriptor_proto_lazy.get(|| {
  97. parse_descriptor_proto()
  98. })
  99. }