user_profile.rs 43 KB

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