user_detail.rs 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367
  1. // This file is generated by rust-protobuf 2.22.1. 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 `user_detail.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;
  21. #[derive(PartialEq,Clone,Default)]
  22. pub struct UserToken {
  23. // message fields
  24. pub token: ::std::string::String,
  25. // special fields
  26. pub unknown_fields: ::protobuf::UnknownFields,
  27. pub cached_size: ::protobuf::CachedSize,
  28. }
  29. impl<'a> ::std::default::Default for &'a UserToken {
  30. fn default() -> &'a UserToken {
  31. <UserToken as ::protobuf::Message>::default_instance()
  32. }
  33. }
  34. impl UserToken {
  35. pub fn new() -> UserToken {
  36. ::std::default::Default::default()
  37. }
  38. // string token = 1;
  39. pub fn get_token(&self) -> &str {
  40. &self.token
  41. }
  42. pub fn clear_token(&mut self) {
  43. self.token.clear();
  44. }
  45. // Param is passed by value, moved
  46. pub fn set_token(&mut self, v: ::std::string::String) {
  47. self.token = v;
  48. }
  49. // Mutable pointer to the field.
  50. // If field is not initialized, it is initialized with default value first.
  51. pub fn mut_token(&mut self) -> &mut ::std::string::String {
  52. &mut self.token
  53. }
  54. // Take field
  55. pub fn take_token(&mut self) -> ::std::string::String {
  56. ::std::mem::replace(&mut self.token, ::std::string::String::new())
  57. }
  58. }
  59. impl ::protobuf::Message for UserToken {
  60. fn is_initialized(&self) -> bool {
  61. true
  62. }
  63. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  64. while !is.eof()? {
  65. let (field_number, wire_type) = is.read_tag_unpack()?;
  66. match field_number {
  67. 1 => {
  68. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.token)?;
  69. },
  70. _ => {
  71. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  72. },
  73. };
  74. }
  75. ::std::result::Result::Ok(())
  76. }
  77. // Compute sizes of nested messages
  78. #[allow(unused_variables)]
  79. fn compute_size(&self) -> u32 {
  80. let mut my_size = 0;
  81. if !self.token.is_empty() {
  82. my_size += ::protobuf::rt::string_size(1, &self.token);
  83. }
  84. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  85. self.cached_size.set(my_size);
  86. my_size
  87. }
  88. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  89. if !self.token.is_empty() {
  90. os.write_string(1, &self.token)?;
  91. }
  92. os.write_unknown_fields(self.get_unknown_fields())?;
  93. ::std::result::Result::Ok(())
  94. }
  95. fn get_cached_size(&self) -> u32 {
  96. self.cached_size.get()
  97. }
  98. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  99. &self.unknown_fields
  100. }
  101. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  102. &mut self.unknown_fields
  103. }
  104. fn as_any(&self) -> &dyn (::std::any::Any) {
  105. self as &dyn (::std::any::Any)
  106. }
  107. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  108. self as &mut dyn (::std::any::Any)
  109. }
  110. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  111. self
  112. }
  113. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  114. Self::descriptor_static()
  115. }
  116. fn new() -> UserToken {
  117. UserToken::new()
  118. }
  119. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  120. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  121. descriptor.get(|| {
  122. let mut fields = ::std::vec::Vec::new();
  123. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  124. "token",
  125. |m: &UserToken| { &m.token },
  126. |m: &mut UserToken| { &mut m.token },
  127. ));
  128. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserToken>(
  129. "UserToken",
  130. fields,
  131. file_descriptor_proto()
  132. )
  133. })
  134. }
  135. fn default_instance() -> &'static UserToken {
  136. static instance: ::protobuf::rt::LazyV2<UserToken> = ::protobuf::rt::LazyV2::INIT;
  137. instance.get(UserToken::new)
  138. }
  139. }
  140. impl ::protobuf::Clear for UserToken {
  141. fn clear(&mut self) {
  142. self.token.clear();
  143. self.unknown_fields.clear();
  144. }
  145. }
  146. impl ::std::fmt::Debug for UserToken {
  147. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  148. ::protobuf::text_format::fmt(self, f)
  149. }
  150. }
  151. impl ::protobuf::reflect::ProtobufValue for UserToken {
  152. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  153. ::protobuf::reflect::ReflectValueRef::Message(self)
  154. }
  155. }
  156. #[derive(PartialEq,Clone,Default)]
  157. pub struct UserDetail {
  158. // message fields
  159. pub id: ::std::string::String,
  160. pub email: ::std::string::String,
  161. pub name: ::std::string::String,
  162. // special fields
  163. pub unknown_fields: ::protobuf::UnknownFields,
  164. pub cached_size: ::protobuf::CachedSize,
  165. }
  166. impl<'a> ::std::default::Default for &'a UserDetail {
  167. fn default() -> &'a UserDetail {
  168. <UserDetail as ::protobuf::Message>::default_instance()
  169. }
  170. }
  171. impl UserDetail {
  172. pub fn new() -> UserDetail {
  173. ::std::default::Default::default()
  174. }
  175. // string id = 1;
  176. pub fn get_id(&self) -> &str {
  177. &self.id
  178. }
  179. pub fn clear_id(&mut self) {
  180. self.id.clear();
  181. }
  182. // Param is passed by value, moved
  183. pub fn set_id(&mut self, v: ::std::string::String) {
  184. self.id = v;
  185. }
  186. // Mutable pointer to the field.
  187. // If field is not initialized, it is initialized with default value first.
  188. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  189. &mut self.id
  190. }
  191. // Take field
  192. pub fn take_id(&mut self) -> ::std::string::String {
  193. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  194. }
  195. // string email = 2;
  196. pub fn get_email(&self) -> &str {
  197. &self.email
  198. }
  199. pub fn clear_email(&mut self) {
  200. self.email.clear();
  201. }
  202. // Param is passed by value, moved
  203. pub fn set_email(&mut self, v: ::std::string::String) {
  204. self.email = v;
  205. }
  206. // Mutable pointer to the field.
  207. // If field is not initialized, it is initialized with default value first.
  208. pub fn mut_email(&mut self) -> &mut ::std::string::String {
  209. &mut self.email
  210. }
  211. // Take field
  212. pub fn take_email(&mut self) -> ::std::string::String {
  213. ::std::mem::replace(&mut self.email, ::std::string::String::new())
  214. }
  215. // string name = 3;
  216. pub fn get_name(&self) -> &str {
  217. &self.name
  218. }
  219. pub fn clear_name(&mut self) {
  220. self.name.clear();
  221. }
  222. // Param is passed by value, moved
  223. pub fn set_name(&mut self, v: ::std::string::String) {
  224. self.name = v;
  225. }
  226. // Mutable pointer to the field.
  227. // If field is not initialized, it is initialized with default value first.
  228. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  229. &mut self.name
  230. }
  231. // Take field
  232. pub fn take_name(&mut self) -> ::std::string::String {
  233. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  234. }
  235. }
  236. impl ::protobuf::Message for UserDetail {
  237. fn is_initialized(&self) -> bool {
  238. true
  239. }
  240. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  241. while !is.eof()? {
  242. let (field_number, wire_type) = is.read_tag_unpack()?;
  243. match field_number {
  244. 1 => {
  245. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  246. },
  247. 2 => {
  248. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.email)?;
  249. },
  250. 3 => {
  251. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  252. },
  253. _ => {
  254. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  255. },
  256. };
  257. }
  258. ::std::result::Result::Ok(())
  259. }
  260. // Compute sizes of nested messages
  261. #[allow(unused_variables)]
  262. fn compute_size(&self) -> u32 {
  263. let mut my_size = 0;
  264. if !self.id.is_empty() {
  265. my_size += ::protobuf::rt::string_size(1, &self.id);
  266. }
  267. if !self.email.is_empty() {
  268. my_size += ::protobuf::rt::string_size(2, &self.email);
  269. }
  270. if !self.name.is_empty() {
  271. my_size += ::protobuf::rt::string_size(3, &self.name);
  272. }
  273. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  274. self.cached_size.set(my_size);
  275. my_size
  276. }
  277. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  278. if !self.id.is_empty() {
  279. os.write_string(1, &self.id)?;
  280. }
  281. if !self.email.is_empty() {
  282. os.write_string(2, &self.email)?;
  283. }
  284. if !self.name.is_empty() {
  285. os.write_string(3, &self.name)?;
  286. }
  287. os.write_unknown_fields(self.get_unknown_fields())?;
  288. ::std::result::Result::Ok(())
  289. }
  290. fn get_cached_size(&self) -> u32 {
  291. self.cached_size.get()
  292. }
  293. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  294. &self.unknown_fields
  295. }
  296. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  297. &mut self.unknown_fields
  298. }
  299. fn as_any(&self) -> &dyn (::std::any::Any) {
  300. self as &dyn (::std::any::Any)
  301. }
  302. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  303. self as &mut dyn (::std::any::Any)
  304. }
  305. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  306. self
  307. }
  308. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  309. Self::descriptor_static()
  310. }
  311. fn new() -> UserDetail {
  312. UserDetail::new()
  313. }
  314. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  315. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  316. descriptor.get(|| {
  317. let mut fields = ::std::vec::Vec::new();
  318. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  319. "id",
  320. |m: &UserDetail| { &m.id },
  321. |m: &mut UserDetail| { &mut m.id },
  322. ));
  323. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  324. "email",
  325. |m: &UserDetail| { &m.email },
  326. |m: &mut UserDetail| { &mut m.email },
  327. ));
  328. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  329. "name",
  330. |m: &UserDetail| { &m.name },
  331. |m: &mut UserDetail| { &mut m.name },
  332. ));
  333. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UserDetail>(
  334. "UserDetail",
  335. fields,
  336. file_descriptor_proto()
  337. )
  338. })
  339. }
  340. fn default_instance() -> &'static UserDetail {
  341. static instance: ::protobuf::rt::LazyV2<UserDetail> = ::protobuf::rt::LazyV2::INIT;
  342. instance.get(UserDetail::new)
  343. }
  344. }
  345. impl ::protobuf::Clear for UserDetail {
  346. fn clear(&mut self) {
  347. self.id.clear();
  348. self.email.clear();
  349. self.name.clear();
  350. self.unknown_fields.clear();
  351. }
  352. }
  353. impl ::std::fmt::Debug for UserDetail {
  354. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  355. ::protobuf::text_format::fmt(self, f)
  356. }
  357. }
  358. impl ::protobuf::reflect::ProtobufValue for UserDetail {
  359. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  360. ::protobuf::reflect::ReflectValueRef::Message(self)
  361. }
  362. }
  363. #[derive(PartialEq,Clone,Default)]
  364. pub struct UpdateUserRequest {
  365. // message fields
  366. pub id: ::std::string::String,
  367. // message oneof groups
  368. pub one_of_name: ::std::option::Option<UpdateUserRequest_oneof_one_of_name>,
  369. pub one_of_email: ::std::option::Option<UpdateUserRequest_oneof_one_of_email>,
  370. pub one_of_password: ::std::option::Option<UpdateUserRequest_oneof_one_of_password>,
  371. // special fields
  372. pub unknown_fields: ::protobuf::UnknownFields,
  373. pub cached_size: ::protobuf::CachedSize,
  374. }
  375. impl<'a> ::std::default::Default for &'a UpdateUserRequest {
  376. fn default() -> &'a UpdateUserRequest {
  377. <UpdateUserRequest as ::protobuf::Message>::default_instance()
  378. }
  379. }
  380. #[derive(Clone,PartialEq,Debug)]
  381. pub enum UpdateUserRequest_oneof_one_of_name {
  382. name(::std::string::String),
  383. }
  384. #[derive(Clone,PartialEq,Debug)]
  385. pub enum UpdateUserRequest_oneof_one_of_email {
  386. email(::std::string::String),
  387. }
  388. #[derive(Clone,PartialEq,Debug)]
  389. pub enum UpdateUserRequest_oneof_one_of_password {
  390. password(::std::string::String),
  391. }
  392. impl UpdateUserRequest {
  393. pub fn new() -> UpdateUserRequest {
  394. ::std::default::Default::default()
  395. }
  396. // string id = 1;
  397. pub fn get_id(&self) -> &str {
  398. &self.id
  399. }
  400. pub fn clear_id(&mut self) {
  401. self.id.clear();
  402. }
  403. // Param is passed by value, moved
  404. pub fn set_id(&mut self, v: ::std::string::String) {
  405. self.id = v;
  406. }
  407. // Mutable pointer to the field.
  408. // If field is not initialized, it is initialized with default value first.
  409. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  410. &mut self.id
  411. }
  412. // Take field
  413. pub fn take_id(&mut self) -> ::std::string::String {
  414. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  415. }
  416. // string name = 2;
  417. pub fn get_name(&self) -> &str {
  418. match self.one_of_name {
  419. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(ref v)) => v,
  420. _ => "",
  421. }
  422. }
  423. pub fn clear_name(&mut self) {
  424. self.one_of_name = ::std::option::Option::None;
  425. }
  426. pub fn has_name(&self) -> bool {
  427. match self.one_of_name {
  428. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(..)) => true,
  429. _ => false,
  430. }
  431. }
  432. // Param is passed by value, moved
  433. pub fn set_name(&mut self, v: ::std::string::String) {
  434. self.one_of_name = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(v))
  435. }
  436. // Mutable pointer to the field.
  437. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  438. if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(_)) = self.one_of_name {
  439. } else {
  440. self.one_of_name = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(::std::string::String::new()));
  441. }
  442. match self.one_of_name {
  443. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(ref mut v)) => v,
  444. _ => panic!(),
  445. }
  446. }
  447. // Take field
  448. pub fn take_name(&mut self) -> ::std::string::String {
  449. if self.has_name() {
  450. match self.one_of_name.take() {
  451. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(v)) => v,
  452. _ => panic!(),
  453. }
  454. } else {
  455. ::std::string::String::new()
  456. }
  457. }
  458. // string email = 3;
  459. pub fn get_email(&self) -> &str {
  460. match self.one_of_email {
  461. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(ref v)) => v,
  462. _ => "",
  463. }
  464. }
  465. pub fn clear_email(&mut self) {
  466. self.one_of_email = ::std::option::Option::None;
  467. }
  468. pub fn has_email(&self) -> bool {
  469. match self.one_of_email {
  470. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(..)) => true,
  471. _ => false,
  472. }
  473. }
  474. // Param is passed by value, moved
  475. pub fn set_email(&mut self, v: ::std::string::String) {
  476. self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(v))
  477. }
  478. // Mutable pointer to the field.
  479. pub fn mut_email(&mut self) -> &mut ::std::string::String {
  480. if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(_)) = self.one_of_email {
  481. } else {
  482. self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(::std::string::String::new()));
  483. }
  484. match self.one_of_email {
  485. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(ref mut v)) => v,
  486. _ => panic!(),
  487. }
  488. }
  489. // Take field
  490. pub fn take_email(&mut self) -> ::std::string::String {
  491. if self.has_email() {
  492. match self.one_of_email.take() {
  493. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(v)) => v,
  494. _ => panic!(),
  495. }
  496. } else {
  497. ::std::string::String::new()
  498. }
  499. }
  500. // string password = 4;
  501. pub fn get_password(&self) -> &str {
  502. match self.one_of_password {
  503. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(ref v)) => v,
  504. _ => "",
  505. }
  506. }
  507. pub fn clear_password(&mut self) {
  508. self.one_of_password = ::std::option::Option::None;
  509. }
  510. pub fn has_password(&self) -> bool {
  511. match self.one_of_password {
  512. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(..)) => true,
  513. _ => false,
  514. }
  515. }
  516. // Param is passed by value, moved
  517. pub fn set_password(&mut self, v: ::std::string::String) {
  518. self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(v))
  519. }
  520. // Mutable pointer to the field.
  521. pub fn mut_password(&mut self) -> &mut ::std::string::String {
  522. if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(_)) = self.one_of_password {
  523. } else {
  524. self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(::std::string::String::new()));
  525. }
  526. match self.one_of_password {
  527. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(ref mut v)) => v,
  528. _ => panic!(),
  529. }
  530. }
  531. // Take field
  532. pub fn take_password(&mut self) -> ::std::string::String {
  533. if self.has_password() {
  534. match self.one_of_password.take() {
  535. ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(v)) => v,
  536. _ => panic!(),
  537. }
  538. } else {
  539. ::std::string::String::new()
  540. }
  541. }
  542. }
  543. impl ::protobuf::Message for UpdateUserRequest {
  544. fn is_initialized(&self) -> bool {
  545. true
  546. }
  547. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  548. while !is.eof()? {
  549. let (field_number, wire_type) = is.read_tag_unpack()?;
  550. match field_number {
  551. 1 => {
  552. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  553. },
  554. 2 => {
  555. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  556. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  557. }
  558. self.one_of_name = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(is.read_string()?));
  559. },
  560. 3 => {
  561. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  562. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  563. }
  564. self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(is.read_string()?));
  565. },
  566. 4 => {
  567. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  568. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  569. }
  570. self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(is.read_string()?));
  571. },
  572. _ => {
  573. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  574. },
  575. };
  576. }
  577. ::std::result::Result::Ok(())
  578. }
  579. // Compute sizes of nested messages
  580. #[allow(unused_variables)]
  581. fn compute_size(&self) -> u32 {
  582. let mut my_size = 0;
  583. if !self.id.is_empty() {
  584. my_size += ::protobuf::rt::string_size(1, &self.id);
  585. }
  586. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  587. match v {
  588. &UpdateUserRequest_oneof_one_of_name::name(ref v) => {
  589. my_size += ::protobuf::rt::string_size(2, &v);
  590. },
  591. };
  592. }
  593. if let ::std::option::Option::Some(ref v) = self.one_of_email {
  594. match v {
  595. &UpdateUserRequest_oneof_one_of_email::email(ref v) => {
  596. my_size += ::protobuf::rt::string_size(3, &v);
  597. },
  598. };
  599. }
  600. if let ::std::option::Option::Some(ref v) = self.one_of_password {
  601. match v {
  602. &UpdateUserRequest_oneof_one_of_password::password(ref v) => {
  603. my_size += ::protobuf::rt::string_size(4, &v);
  604. },
  605. };
  606. }
  607. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  608. self.cached_size.set(my_size);
  609. my_size
  610. }
  611. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  612. if !self.id.is_empty() {
  613. os.write_string(1, &self.id)?;
  614. }
  615. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  616. match v {
  617. &UpdateUserRequest_oneof_one_of_name::name(ref v) => {
  618. os.write_string(2, v)?;
  619. },
  620. };
  621. }
  622. if let ::std::option::Option::Some(ref v) = self.one_of_email {
  623. match v {
  624. &UpdateUserRequest_oneof_one_of_email::email(ref v) => {
  625. os.write_string(3, v)?;
  626. },
  627. };
  628. }
  629. if let ::std::option::Option::Some(ref v) = self.one_of_password {
  630. match v {
  631. &UpdateUserRequest_oneof_one_of_password::password(ref v) => {
  632. os.write_string(4, v)?;
  633. },
  634. };
  635. }
  636. os.write_unknown_fields(self.get_unknown_fields())?;
  637. ::std::result::Result::Ok(())
  638. }
  639. fn get_cached_size(&self) -> u32 {
  640. self.cached_size.get()
  641. }
  642. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  643. &self.unknown_fields
  644. }
  645. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  646. &mut self.unknown_fields
  647. }
  648. fn as_any(&self) -> &dyn (::std::any::Any) {
  649. self as &dyn (::std::any::Any)
  650. }
  651. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  652. self as &mut dyn (::std::any::Any)
  653. }
  654. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  655. self
  656. }
  657. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  658. Self::descriptor_static()
  659. }
  660. fn new() -> UpdateUserRequest {
  661. UpdateUserRequest::new()
  662. }
  663. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  664. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  665. descriptor.get(|| {
  666. let mut fields = ::std::vec::Vec::new();
  667. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  668. "id",
  669. |m: &UpdateUserRequest| { &m.id },
  670. |m: &mut UpdateUserRequest| { &mut m.id },
  671. ));
  672. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  673. "name",
  674. UpdateUserRequest::has_name,
  675. UpdateUserRequest::get_name,
  676. ));
  677. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  678. "email",
  679. UpdateUserRequest::has_email,
  680. UpdateUserRequest::get_email,
  681. ));
  682. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  683. "password",
  684. UpdateUserRequest::has_password,
  685. UpdateUserRequest::get_password,
  686. ));
  687. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserRequest>(
  688. "UpdateUserRequest",
  689. fields,
  690. file_descriptor_proto()
  691. )
  692. })
  693. }
  694. fn default_instance() -> &'static UpdateUserRequest {
  695. static instance: ::protobuf::rt::LazyV2<UpdateUserRequest> = ::protobuf::rt::LazyV2::INIT;
  696. instance.get(UpdateUserRequest::new)
  697. }
  698. }
  699. impl ::protobuf::Clear for UpdateUserRequest {
  700. fn clear(&mut self) {
  701. self.id.clear();
  702. self.one_of_name = ::std::option::Option::None;
  703. self.one_of_email = ::std::option::Option::None;
  704. self.one_of_password = ::std::option::Option::None;
  705. self.unknown_fields.clear();
  706. }
  707. }
  708. impl ::std::fmt::Debug for UpdateUserRequest {
  709. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  710. ::protobuf::text_format::fmt(self, f)
  711. }
  712. }
  713. impl ::protobuf::reflect::ProtobufValue for UpdateUserRequest {
  714. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  715. ::protobuf::reflect::ReflectValueRef::Message(self)
  716. }
  717. }
  718. #[derive(PartialEq,Clone,Default)]
  719. pub struct UpdateUserParams {
  720. // message fields
  721. pub id: ::std::string::String,
  722. // message oneof groups
  723. pub one_of_name: ::std::option::Option<UpdateUserParams_oneof_one_of_name>,
  724. pub one_of_email: ::std::option::Option<UpdateUserParams_oneof_one_of_email>,
  725. pub one_of_password: ::std::option::Option<UpdateUserParams_oneof_one_of_password>,
  726. // special fields
  727. pub unknown_fields: ::protobuf::UnknownFields,
  728. pub cached_size: ::protobuf::CachedSize,
  729. }
  730. impl<'a> ::std::default::Default for &'a UpdateUserParams {
  731. fn default() -> &'a UpdateUserParams {
  732. <UpdateUserParams as ::protobuf::Message>::default_instance()
  733. }
  734. }
  735. #[derive(Clone,PartialEq,Debug)]
  736. pub enum UpdateUserParams_oneof_one_of_name {
  737. name(::std::string::String),
  738. }
  739. #[derive(Clone,PartialEq,Debug)]
  740. pub enum UpdateUserParams_oneof_one_of_email {
  741. email(::std::string::String),
  742. }
  743. #[derive(Clone,PartialEq,Debug)]
  744. pub enum UpdateUserParams_oneof_one_of_password {
  745. password(::std::string::String),
  746. }
  747. impl UpdateUserParams {
  748. pub fn new() -> UpdateUserParams {
  749. ::std::default::Default::default()
  750. }
  751. // string id = 1;
  752. pub fn get_id(&self) -> &str {
  753. &self.id
  754. }
  755. pub fn clear_id(&mut self) {
  756. self.id.clear();
  757. }
  758. // Param is passed by value, moved
  759. pub fn set_id(&mut self, v: ::std::string::String) {
  760. self.id = v;
  761. }
  762. // Mutable pointer to the field.
  763. // If field is not initialized, it is initialized with default value first.
  764. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  765. &mut self.id
  766. }
  767. // Take field
  768. pub fn take_id(&mut self) -> ::std::string::String {
  769. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  770. }
  771. // string name = 2;
  772. pub fn get_name(&self) -> &str {
  773. match self.one_of_name {
  774. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(ref v)) => v,
  775. _ => "",
  776. }
  777. }
  778. pub fn clear_name(&mut self) {
  779. self.one_of_name = ::std::option::Option::None;
  780. }
  781. pub fn has_name(&self) -> bool {
  782. match self.one_of_name {
  783. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(..)) => true,
  784. _ => false,
  785. }
  786. }
  787. // Param is passed by value, moved
  788. pub fn set_name(&mut self, v: ::std::string::String) {
  789. self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(v))
  790. }
  791. // Mutable pointer to the field.
  792. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  793. if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(_)) = self.one_of_name {
  794. } else {
  795. self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(::std::string::String::new()));
  796. }
  797. match self.one_of_name {
  798. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(ref mut v)) => v,
  799. _ => panic!(),
  800. }
  801. }
  802. // Take field
  803. pub fn take_name(&mut self) -> ::std::string::String {
  804. if self.has_name() {
  805. match self.one_of_name.take() {
  806. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(v)) => v,
  807. _ => panic!(),
  808. }
  809. } else {
  810. ::std::string::String::new()
  811. }
  812. }
  813. // string email = 3;
  814. pub fn get_email(&self) -> &str {
  815. match self.one_of_email {
  816. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(ref v)) => v,
  817. _ => "",
  818. }
  819. }
  820. pub fn clear_email(&mut self) {
  821. self.one_of_email = ::std::option::Option::None;
  822. }
  823. pub fn has_email(&self) -> bool {
  824. match self.one_of_email {
  825. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(..)) => true,
  826. _ => false,
  827. }
  828. }
  829. // Param is passed by value, moved
  830. pub fn set_email(&mut self, v: ::std::string::String) {
  831. self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(v))
  832. }
  833. // Mutable pointer to the field.
  834. pub fn mut_email(&mut self) -> &mut ::std::string::String {
  835. if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(_)) = self.one_of_email {
  836. } else {
  837. self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(::std::string::String::new()));
  838. }
  839. match self.one_of_email {
  840. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(ref mut v)) => v,
  841. _ => panic!(),
  842. }
  843. }
  844. // Take field
  845. pub fn take_email(&mut self) -> ::std::string::String {
  846. if self.has_email() {
  847. match self.one_of_email.take() {
  848. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(v)) => v,
  849. _ => panic!(),
  850. }
  851. } else {
  852. ::std::string::String::new()
  853. }
  854. }
  855. // string password = 4;
  856. pub fn get_password(&self) -> &str {
  857. match self.one_of_password {
  858. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(ref v)) => v,
  859. _ => "",
  860. }
  861. }
  862. pub fn clear_password(&mut self) {
  863. self.one_of_password = ::std::option::Option::None;
  864. }
  865. pub fn has_password(&self) -> bool {
  866. match self.one_of_password {
  867. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(..)) => true,
  868. _ => false,
  869. }
  870. }
  871. // Param is passed by value, moved
  872. pub fn set_password(&mut self, v: ::std::string::String) {
  873. self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(v))
  874. }
  875. // Mutable pointer to the field.
  876. pub fn mut_password(&mut self) -> &mut ::std::string::String {
  877. if let ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(_)) = self.one_of_password {
  878. } else {
  879. self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(::std::string::String::new()));
  880. }
  881. match self.one_of_password {
  882. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(ref mut v)) => v,
  883. _ => panic!(),
  884. }
  885. }
  886. // Take field
  887. pub fn take_password(&mut self) -> ::std::string::String {
  888. if self.has_password() {
  889. match self.one_of_password.take() {
  890. ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(v)) => v,
  891. _ => panic!(),
  892. }
  893. } else {
  894. ::std::string::String::new()
  895. }
  896. }
  897. }
  898. impl ::protobuf::Message for UpdateUserParams {
  899. fn is_initialized(&self) -> bool {
  900. true
  901. }
  902. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  903. while !is.eof()? {
  904. let (field_number, wire_type) = is.read_tag_unpack()?;
  905. match field_number {
  906. 1 => {
  907. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  908. },
  909. 2 => {
  910. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  911. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  912. }
  913. self.one_of_name = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_name::name(is.read_string()?));
  914. },
  915. 3 => {
  916. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  917. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  918. }
  919. self.one_of_email = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_email::email(is.read_string()?));
  920. },
  921. 4 => {
  922. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  923. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  924. }
  925. self.one_of_password = ::std::option::Option::Some(UpdateUserParams_oneof_one_of_password::password(is.read_string()?));
  926. },
  927. _ => {
  928. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  929. },
  930. };
  931. }
  932. ::std::result::Result::Ok(())
  933. }
  934. // Compute sizes of nested messages
  935. #[allow(unused_variables)]
  936. fn compute_size(&self) -> u32 {
  937. let mut my_size = 0;
  938. if !self.id.is_empty() {
  939. my_size += ::protobuf::rt::string_size(1, &self.id);
  940. }
  941. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  942. match v {
  943. &UpdateUserParams_oneof_one_of_name::name(ref v) => {
  944. my_size += ::protobuf::rt::string_size(2, &v);
  945. },
  946. };
  947. }
  948. if let ::std::option::Option::Some(ref v) = self.one_of_email {
  949. match v {
  950. &UpdateUserParams_oneof_one_of_email::email(ref v) => {
  951. my_size += ::protobuf::rt::string_size(3, &v);
  952. },
  953. };
  954. }
  955. if let ::std::option::Option::Some(ref v) = self.one_of_password {
  956. match v {
  957. &UpdateUserParams_oneof_one_of_password::password(ref v) => {
  958. my_size += ::protobuf::rt::string_size(4, &v);
  959. },
  960. };
  961. }
  962. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  963. self.cached_size.set(my_size);
  964. my_size
  965. }
  966. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  967. if !self.id.is_empty() {
  968. os.write_string(1, &self.id)?;
  969. }
  970. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  971. match v {
  972. &UpdateUserParams_oneof_one_of_name::name(ref v) => {
  973. os.write_string(2, v)?;
  974. },
  975. };
  976. }
  977. if let ::std::option::Option::Some(ref v) = self.one_of_email {
  978. match v {
  979. &UpdateUserParams_oneof_one_of_email::email(ref v) => {
  980. os.write_string(3, v)?;
  981. },
  982. };
  983. }
  984. if let ::std::option::Option::Some(ref v) = self.one_of_password {
  985. match v {
  986. &UpdateUserParams_oneof_one_of_password::password(ref v) => {
  987. os.write_string(4, v)?;
  988. },
  989. };
  990. }
  991. os.write_unknown_fields(self.get_unknown_fields())?;
  992. ::std::result::Result::Ok(())
  993. }
  994. fn get_cached_size(&self) -> u32 {
  995. self.cached_size.get()
  996. }
  997. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  998. &self.unknown_fields
  999. }
  1000. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1001. &mut self.unknown_fields
  1002. }
  1003. fn as_any(&self) -> &dyn (::std::any::Any) {
  1004. self as &dyn (::std::any::Any)
  1005. }
  1006. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1007. self as &mut dyn (::std::any::Any)
  1008. }
  1009. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1010. self
  1011. }
  1012. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1013. Self::descriptor_static()
  1014. }
  1015. fn new() -> UpdateUserParams {
  1016. UpdateUserParams::new()
  1017. }
  1018. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1019. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1020. descriptor.get(|| {
  1021. let mut fields = ::std::vec::Vec::new();
  1022. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1023. "id",
  1024. |m: &UpdateUserParams| { &m.id },
  1025. |m: &mut UpdateUserParams| { &mut m.id },
  1026. ));
  1027. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1028. "name",
  1029. UpdateUserParams::has_name,
  1030. UpdateUserParams::get_name,
  1031. ));
  1032. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1033. "email",
  1034. UpdateUserParams::has_email,
  1035. UpdateUserParams::get_email,
  1036. ));
  1037. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1038. "password",
  1039. UpdateUserParams::has_password,
  1040. UpdateUserParams::get_password,
  1041. ));
  1042. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserParams>(
  1043. "UpdateUserParams",
  1044. fields,
  1045. file_descriptor_proto()
  1046. )
  1047. })
  1048. }
  1049. fn default_instance() -> &'static UpdateUserParams {
  1050. static instance: ::protobuf::rt::LazyV2<UpdateUserParams> = ::protobuf::rt::LazyV2::INIT;
  1051. instance.get(UpdateUserParams::new)
  1052. }
  1053. }
  1054. impl ::protobuf::Clear for UpdateUserParams {
  1055. fn clear(&mut self) {
  1056. self.id.clear();
  1057. self.one_of_name = ::std::option::Option::None;
  1058. self.one_of_email = ::std::option::Option::None;
  1059. self.one_of_password = ::std::option::Option::None;
  1060. self.unknown_fields.clear();
  1061. }
  1062. }
  1063. impl ::std::fmt::Debug for UpdateUserParams {
  1064. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1065. ::protobuf::text_format::fmt(self, f)
  1066. }
  1067. }
  1068. impl ::protobuf::reflect::ProtobufValue for UpdateUserParams {
  1069. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1070. ::protobuf::reflect::ReflectValueRef::Message(self)
  1071. }
  1072. }
  1073. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  1074. pub enum UserStatus {
  1075. Unknown = 0,
  1076. Login = 1,
  1077. Expired = 2,
  1078. }
  1079. impl ::protobuf::ProtobufEnum for UserStatus {
  1080. fn value(&self) -> i32 {
  1081. *self as i32
  1082. }
  1083. fn from_i32(value: i32) -> ::std::option::Option<UserStatus> {
  1084. match value {
  1085. 0 => ::std::option::Option::Some(UserStatus::Unknown),
  1086. 1 => ::std::option::Option::Some(UserStatus::Login),
  1087. 2 => ::std::option::Option::Some(UserStatus::Expired),
  1088. _ => ::std::option::Option::None
  1089. }
  1090. }
  1091. fn values() -> &'static [Self] {
  1092. static values: &'static [UserStatus] = &[
  1093. UserStatus::Unknown,
  1094. UserStatus::Login,
  1095. UserStatus::Expired,
  1096. ];
  1097. values
  1098. }
  1099. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  1100. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1101. descriptor.get(|| {
  1102. ::protobuf::reflect::EnumDescriptor::new_pb_name::<UserStatus>("UserStatus", file_descriptor_proto())
  1103. })
  1104. }
  1105. }
  1106. impl ::std::marker::Copy for UserStatus {
  1107. }
  1108. impl ::std::default::Default for UserStatus {
  1109. fn default() -> Self {
  1110. UserStatus::Unknown
  1111. }
  1112. }
  1113. impl ::protobuf::reflect::ProtobufValue for UserStatus {
  1114. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1115. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  1116. }
  1117. }
  1118. static file_descriptor_proto_data: &'static [u8] = b"\
  1119. \n\x11user_detail.proto\"!\n\tUserToken\x12\x14\n\x05token\x18\x01\x20\
  1120. \x01(\tR\x05token\"F\n\nUserDetail\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\
  1121. \x02id\x12\x14\n\x05email\x18\x02\x20\x01(\tR\x05email\x12\x12\n\x04name\
  1122. \x18\x03\x20\x01(\tR\x04name\"\xa1\x01\n\x11UpdateUserRequest\x12\x0e\n\
  1123. \x02id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0\
  1124. R\x04name\x12\x16\n\x05email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\
  1125. \x08password\x18\x04\x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\
  1126. \x0e\n\x0cone_of_emailB\x11\n\x0fone_of_password\"\xa0\x01\n\x10UpdateUs\
  1127. erParams\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\
  1128. \x02\x20\x01(\tH\0R\x04name\x12\x16\n\x05email\x18\x03\x20\x01(\tH\x01R\
  1129. \x05email\x12\x1c\n\x08password\x18\x04\x20\x01(\tH\x02R\x08passwordB\r\
  1130. \n\x0bone_of_nameB\x0e\n\x0cone_of_emailB\x11\n\x0fone_of_password*1\n\n\
  1131. UserStatus\x12\x0b\n\x07Unknown\x10\0\x12\t\n\x05Login\x10\x01\x12\x0b\n\
  1132. \x07Expired\x10\x02J\xbb\x08\n\x06\x12\x04\0\0\x1a\x01\n\x08\n\x01\x0c\
  1133. \x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x04\0\
  1134. \x01\x12\x03\x02\x08\x11\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x15\n\
  1135. \x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\
  1136. \x12\x03\x03\x0b\x10\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x13\x14\n\n\
  1137. \n\x02\x04\x01\x12\x04\x05\0\t\x01\n\n\n\x03\x04\x01\x01\x12\x03\x05\x08\
  1138. \x12\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x06\x04\x12\n\x0c\n\x05\x04\x01\
  1139. \x02\0\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x06\
  1140. \x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x06\x10\x11\n\x0b\n\x04\x04\
  1141. \x01\x02\x01\x12\x03\x07\x04\x15\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\
  1142. \x07\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x07\x0b\x10\n\x0c\n\
  1143. \x05\x04\x01\x02\x01\x03\x12\x03\x07\x13\x14\n\x0b\n\x04\x04\x01\x02\x02\
  1144. \x12\x03\x08\x04\x14\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\x08\x04\n\n\
  1145. \x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x08\x0b\x0f\n\x0c\n\x05\x04\x01\
  1146. \x02\x02\x03\x12\x03\x08\x12\x13\n\n\n\x02\x04\x02\x12\x04\n\0\x0f\x01\n\
  1147. \n\n\x03\x04\x02\x01\x12\x03\n\x08\x19\n\x0b\n\x04\x04\x02\x02\0\x12\x03\
  1148. \x0b\x04\x12\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\
  1149. \x04\x02\x02\0\x01\x12\x03\x0b\x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\
  1150. \x03\x0b\x10\x11\n\x0b\n\x04\x04\x02\x08\0\x12\x03\x0c\x04*\n\x0c\n\x05\
  1151. \x04\x02\x08\0\x01\x12\x03\x0c\n\x15\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\
  1152. \x0c\x18(\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x0c\x18\x1e\n\x0c\n\
  1153. \x05\x04\x02\x02\x01\x01\x12\x03\x0c\x1f#\n\x0c\n\x05\x04\x02\x02\x01\
  1154. \x03\x12\x03\x0c&'\n\x0b\n\x04\x04\x02\x08\x01\x12\x03\r\x04,\n\x0c\n\
  1155. \x05\x04\x02\x08\x01\x01\x12\x03\r\n\x16\n\x0b\n\x04\x04\x02\x02\x02\x12\
  1156. \x03\r\x19*\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\r\x19\x1f\n\x0c\n\
  1157. \x05\x04\x02\x02\x02\x01\x12\x03\r\x20%\n\x0c\n\x05\x04\x02\x02\x02\x03\
  1158. \x12\x03\r()\n\x0b\n\x04\x04\x02\x08\x02\x12\x03\x0e\x042\n\x0c\n\x05\
  1159. \x04\x02\x08\x02\x01\x12\x03\x0e\n\x19\n\x0b\n\x04\x04\x02\x02\x03\x12\
  1160. \x03\x0e\x1c0\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x0e\x1c\"\n\x0c\n\
  1161. \x05\x04\x02\x02\x03\x01\x12\x03\x0e#+\n\x0c\n\x05\x04\x02\x02\x03\x03\
  1162. \x12\x03\x0e./\n\n\n\x02\x04\x03\x12\x04\x10\0\x15\x01\n\n\n\x03\x04\x03\
  1163. \x01\x12\x03\x10\x08\x18\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x11\x04\x12\n\
  1164. \x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\x03\x02\0\
  1165. \x01\x12\x03\x11\x0b\r\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x11\x10\x11\
  1166. \n\x0b\n\x04\x04\x03\x08\0\x12\x03\x12\x04*\n\x0c\n\x05\x04\x03\x08\0\
  1167. \x01\x12\x03\x12\n\x15\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x12\x18(\n\
  1168. \x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x12\x18\x1e\n\x0c\n\x05\x04\x03\
  1169. \x02\x01\x01\x12\x03\x12\x1f#\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\
  1170. \x12&'\n\x0b\n\x04\x04\x03\x08\x01\x12\x03\x13\x04,\n\x0c\n\x05\x04\x03\
  1171. \x08\x01\x01\x12\x03\x13\n\x16\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x13\
  1172. \x19*\n\x0c\n\x05\x04\x03\x02\x02\x05\x12\x03\x13\x19\x1f\n\x0c\n\x05\
  1173. \x04\x03\x02\x02\x01\x12\x03\x13\x20%\n\x0c\n\x05\x04\x03\x02\x02\x03\
  1174. \x12\x03\x13()\n\x0b\n\x04\x04\x03\x08\x02\x12\x03\x14\x042\n\x0c\n\x05\
  1175. \x04\x03\x08\x02\x01\x12\x03\x14\n\x19\n\x0b\n\x04\x04\x03\x02\x03\x12\
  1176. \x03\x14\x1c0\n\x0c\n\x05\x04\x03\x02\x03\x05\x12\x03\x14\x1c\"\n\x0c\n\
  1177. \x05\x04\x03\x02\x03\x01\x12\x03\x14#+\n\x0c\n\x05\x04\x03\x02\x03\x03\
  1178. \x12\x03\x14./\n\n\n\x02\x05\0\x12\x04\x16\0\x1a\x01\n\n\n\x03\x05\0\x01\
  1179. \x12\x03\x16\x05\x0f\n\x0b\n\x04\x05\0\x02\0\x12\x03\x17\x04\x10\n\x0c\n\
  1180. \x05\x05\0\x02\0\x01\x12\x03\x17\x04\x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\
  1181. \x03\x17\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x18\x04\x0e\n\x0c\n\
  1182. \x05\x05\0\x02\x01\x01\x12\x03\x18\x04\t\n\x0c\n\x05\x05\0\x02\x01\x02\
  1183. \x12\x03\x18\x0c\r\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x19\x04\x10\n\x0c\n\
  1184. \x05\x05\0\x02\x02\x01\x12\x03\x19\x04\x0b\n\x0c\n\x05\x05\0\x02\x02\x02\
  1185. \x12\x03\x19\x0e\x0fb\x06proto3\
  1186. ";
  1187. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  1188. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  1189. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  1190. }
  1191. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  1192. file_descriptor_proto_lazy.get(|| {
  1193. parse_descriptor_proto()
  1194. })
  1195. }