auth.rs 50 KB

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