code.rs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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 `code.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 ErrorCode {
  23. Internal = 0,
  24. UserUnauthorized = 2,
  25. RecordNotFound = 3,
  26. UserIdIsEmpty = 4,
  27. WorkspaceNameInvalid = 100,
  28. WorkspaceIdInvalid = 101,
  29. AppColorStyleInvalid = 102,
  30. WorkspaceDescTooLong = 103,
  31. WorkspaceNameTooLong = 104,
  32. AppIdInvalid = 110,
  33. AppNameInvalid = 111,
  34. ViewNameInvalid = 120,
  35. ViewThumbnailInvalid = 121,
  36. ViewIdInvalid = 122,
  37. ViewDescTooLong = 123,
  38. ViewDataInvalid = 124,
  39. ViewNameTooLong = 125,
  40. ConnectError = 200,
  41. EmailIsEmpty = 300,
  42. EmailFormatInvalid = 301,
  43. EmailAlreadyExists = 302,
  44. PasswordIsEmpty = 303,
  45. PasswordTooLong = 304,
  46. PasswordContainsForbidCharacters = 305,
  47. PasswordFormatInvalid = 306,
  48. PasswordNotMatch = 307,
  49. UserNameTooLong = 308,
  50. UserNameContainForbiddenCharacters = 309,
  51. UserNameIsEmpty = 310,
  52. UserIdInvalid = 311,
  53. UserNotExist = 312,
  54. TextTooLong = 400,
  55. GridIdIsEmpty = 410,
  56. BlockIdIsEmpty = 420,
  57. RowIdIsEmpty = 430,
  58. OptionIdIsEmpty = 431,
  59. FieldIdIsEmpty = 440,
  60. FieldDoesNotExist = 441,
  61. SelectOptionNameIsEmpty = 442,
  62. FieldNotExists = 443,
  63. FieldInvalidOperation = 444,
  64. TypeOptionDataIsEmpty = 450,
  65. InvalidDateTimeFormat = 500,
  66. InvalidData = 1000,
  67. }
  68. impl ::protobuf::ProtobufEnum for ErrorCode {
  69. fn value(&self) -> i32 {
  70. *self as i32
  71. }
  72. fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
  73. match value {
  74. 0 => ::std::option::Option::Some(ErrorCode::Internal),
  75. 2 => ::std::option::Option::Some(ErrorCode::UserUnauthorized),
  76. 3 => ::std::option::Option::Some(ErrorCode::RecordNotFound),
  77. 4 => ::std::option::Option::Some(ErrorCode::UserIdIsEmpty),
  78. 100 => ::std::option::Option::Some(ErrorCode::WorkspaceNameInvalid),
  79. 101 => ::std::option::Option::Some(ErrorCode::WorkspaceIdInvalid),
  80. 102 => ::std::option::Option::Some(ErrorCode::AppColorStyleInvalid),
  81. 103 => ::std::option::Option::Some(ErrorCode::WorkspaceDescTooLong),
  82. 104 => ::std::option::Option::Some(ErrorCode::WorkspaceNameTooLong),
  83. 110 => ::std::option::Option::Some(ErrorCode::AppIdInvalid),
  84. 111 => ::std::option::Option::Some(ErrorCode::AppNameInvalid),
  85. 120 => ::std::option::Option::Some(ErrorCode::ViewNameInvalid),
  86. 121 => ::std::option::Option::Some(ErrorCode::ViewThumbnailInvalid),
  87. 122 => ::std::option::Option::Some(ErrorCode::ViewIdInvalid),
  88. 123 => ::std::option::Option::Some(ErrorCode::ViewDescTooLong),
  89. 124 => ::std::option::Option::Some(ErrorCode::ViewDataInvalid),
  90. 125 => ::std::option::Option::Some(ErrorCode::ViewNameTooLong),
  91. 200 => ::std::option::Option::Some(ErrorCode::ConnectError),
  92. 300 => ::std::option::Option::Some(ErrorCode::EmailIsEmpty),
  93. 301 => ::std::option::Option::Some(ErrorCode::EmailFormatInvalid),
  94. 302 => ::std::option::Option::Some(ErrorCode::EmailAlreadyExists),
  95. 303 => ::std::option::Option::Some(ErrorCode::PasswordIsEmpty),
  96. 304 => ::std::option::Option::Some(ErrorCode::PasswordTooLong),
  97. 305 => ::std::option::Option::Some(ErrorCode::PasswordContainsForbidCharacters),
  98. 306 => ::std::option::Option::Some(ErrorCode::PasswordFormatInvalid),
  99. 307 => ::std::option::Option::Some(ErrorCode::PasswordNotMatch),
  100. 308 => ::std::option::Option::Some(ErrorCode::UserNameTooLong),
  101. 309 => ::std::option::Option::Some(ErrorCode::UserNameContainForbiddenCharacters),
  102. 310 => ::std::option::Option::Some(ErrorCode::UserNameIsEmpty),
  103. 311 => ::std::option::Option::Some(ErrorCode::UserIdInvalid),
  104. 312 => ::std::option::Option::Some(ErrorCode::UserNotExist),
  105. 400 => ::std::option::Option::Some(ErrorCode::TextTooLong),
  106. 410 => ::std::option::Option::Some(ErrorCode::GridIdIsEmpty),
  107. 420 => ::std::option::Option::Some(ErrorCode::BlockIdIsEmpty),
  108. 430 => ::std::option::Option::Some(ErrorCode::RowIdIsEmpty),
  109. 431 => ::std::option::Option::Some(ErrorCode::OptionIdIsEmpty),
  110. 440 => ::std::option::Option::Some(ErrorCode::FieldIdIsEmpty),
  111. 441 => ::std::option::Option::Some(ErrorCode::FieldDoesNotExist),
  112. 442 => ::std::option::Option::Some(ErrorCode::SelectOptionNameIsEmpty),
  113. 443 => ::std::option::Option::Some(ErrorCode::FieldNotExists),
  114. 444 => ::std::option::Option::Some(ErrorCode::FieldInvalidOperation),
  115. 450 => ::std::option::Option::Some(ErrorCode::TypeOptionDataIsEmpty),
  116. 500 => ::std::option::Option::Some(ErrorCode::InvalidDateTimeFormat),
  117. 1000 => ::std::option::Option::Some(ErrorCode::InvalidData),
  118. _ => ::std::option::Option::None
  119. }
  120. }
  121. fn values() -> &'static [Self] {
  122. static values: &'static [ErrorCode] = &[
  123. ErrorCode::Internal,
  124. ErrorCode::UserUnauthorized,
  125. ErrorCode::RecordNotFound,
  126. ErrorCode::UserIdIsEmpty,
  127. ErrorCode::WorkspaceNameInvalid,
  128. ErrorCode::WorkspaceIdInvalid,
  129. ErrorCode::AppColorStyleInvalid,
  130. ErrorCode::WorkspaceDescTooLong,
  131. ErrorCode::WorkspaceNameTooLong,
  132. ErrorCode::AppIdInvalid,
  133. ErrorCode::AppNameInvalid,
  134. ErrorCode::ViewNameInvalid,
  135. ErrorCode::ViewThumbnailInvalid,
  136. ErrorCode::ViewIdInvalid,
  137. ErrorCode::ViewDescTooLong,
  138. ErrorCode::ViewDataInvalid,
  139. ErrorCode::ViewNameTooLong,
  140. ErrorCode::ConnectError,
  141. ErrorCode::EmailIsEmpty,
  142. ErrorCode::EmailFormatInvalid,
  143. ErrorCode::EmailAlreadyExists,
  144. ErrorCode::PasswordIsEmpty,
  145. ErrorCode::PasswordTooLong,
  146. ErrorCode::PasswordContainsForbidCharacters,
  147. ErrorCode::PasswordFormatInvalid,
  148. ErrorCode::PasswordNotMatch,
  149. ErrorCode::UserNameTooLong,
  150. ErrorCode::UserNameContainForbiddenCharacters,
  151. ErrorCode::UserNameIsEmpty,
  152. ErrorCode::UserIdInvalid,
  153. ErrorCode::UserNotExist,
  154. ErrorCode::TextTooLong,
  155. ErrorCode::GridIdIsEmpty,
  156. ErrorCode::BlockIdIsEmpty,
  157. ErrorCode::RowIdIsEmpty,
  158. ErrorCode::OptionIdIsEmpty,
  159. ErrorCode::FieldIdIsEmpty,
  160. ErrorCode::FieldDoesNotExist,
  161. ErrorCode::SelectOptionNameIsEmpty,
  162. ErrorCode::FieldNotExists,
  163. ErrorCode::FieldInvalidOperation,
  164. ErrorCode::TypeOptionDataIsEmpty,
  165. ErrorCode::InvalidDateTimeFormat,
  166. ErrorCode::InvalidData,
  167. ];
  168. values
  169. }
  170. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  171. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  172. descriptor.get(|| {
  173. ::protobuf::reflect::EnumDescriptor::new_pb_name::<ErrorCode>("ErrorCode", file_descriptor_proto())
  174. })
  175. }
  176. }
  177. impl ::std::marker::Copy for ErrorCode {
  178. }
  179. impl ::std::default::Default for ErrorCode {
  180. fn default() -> Self {
  181. ErrorCode::Internal
  182. }
  183. }
  184. impl ::protobuf::reflect::ProtobufValue for ErrorCode {
  185. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  186. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  187. }
  188. }
  189. static file_descriptor_proto_data: &'static [u8] = b"\
  190. \n\ncode.proto*\x81\x08\n\tErrorCode\x12\x0c\n\x08Internal\x10\0\x12\x14\
  191. \n\x10UserUnauthorized\x10\x02\x12\x12\n\x0eRecordNotFound\x10\x03\x12\
  192. \x11\n\rUserIdIsEmpty\x10\x04\x12\x18\n\x14WorkspaceNameInvalid\x10d\x12\
  193. \x16\n\x12WorkspaceIdInvalid\x10e\x12\x18\n\x14AppColorStyleInvalid\x10f\
  194. \x12\x18\n\x14WorkspaceDescTooLong\x10g\x12\x18\n\x14WorkspaceNameTooLon\
  195. g\x10h\x12\x10\n\x0cAppIdInvalid\x10n\x12\x12\n\x0eAppNameInvalid\x10o\
  196. \x12\x13\n\x0fViewNameInvalid\x10x\x12\x18\n\x14ViewThumbnailInvalid\x10\
  197. y\x12\x11\n\rViewIdInvalid\x10z\x12\x13\n\x0fViewDescTooLong\x10{\x12\
  198. \x13\n\x0fViewDataInvalid\x10|\x12\x13\n\x0fViewNameTooLong\x10}\x12\x11\
  199. \n\x0cConnectError\x10\xc8\x01\x12\x11\n\x0cEmailIsEmpty\x10\xac\x02\x12\
  200. \x17\n\x12EmailFormatInvalid\x10\xad\x02\x12\x17\n\x12EmailAlreadyExists\
  201. \x10\xae\x02\x12\x14\n\x0fPasswordIsEmpty\x10\xaf\x02\x12\x14\n\x0fPassw\
  202. ordTooLong\x10\xb0\x02\x12%\n\x20PasswordContainsForbidCharacters\x10\
  203. \xb1\x02\x12\x1a\n\x15PasswordFormatInvalid\x10\xb2\x02\x12\x15\n\x10Pas\
  204. swordNotMatch\x10\xb3\x02\x12\x14\n\x0fUserNameTooLong\x10\xb4\x02\x12'\
  205. \n\"UserNameContainForbiddenCharacters\x10\xb5\x02\x12\x14\n\x0fUserName\
  206. IsEmpty\x10\xb6\x02\x12\x12\n\rUserIdInvalid\x10\xb7\x02\x12\x11\n\x0cUs\
  207. erNotExist\x10\xb8\x02\x12\x10\n\x0bTextTooLong\x10\x90\x03\x12\x12\n\rG\
  208. ridIdIsEmpty\x10\x9a\x03\x12\x13\n\x0eBlockIdIsEmpty\x10\xa4\x03\x12\x11\
  209. \n\x0cRowIdIsEmpty\x10\xae\x03\x12\x14\n\x0fOptionIdIsEmpty\x10\xaf\x03\
  210. \x12\x13\n\x0eFieldIdIsEmpty\x10\xb8\x03\x12\x16\n\x11FieldDoesNotExist\
  211. \x10\xb9\x03\x12\x1c\n\x17SelectOptionNameIsEmpty\x10\xba\x03\x12\x13\n\
  212. \x0eFieldNotExists\x10\xbb\x03\x12\x1a\n\x15FieldInvalidOperation\x10\
  213. \xbc\x03\x12\x1a\n\x15TypeOptionDataIsEmpty\x10\xc2\x03\x12\x1a\n\x15Inv\
  214. alidDateTimeFormat\x10\xf4\x03\x12\x10\n\x0bInvalidData\x10\xe8\x07b\x06\
  215. proto3\
  216. ";
  217. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  218. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  219. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  220. }
  221. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  222. file_descriptor_proto_lazy.get(|| {
  223. parse_descriptor_proto()
  224. })
  225. }