doc_create.rs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. // This file is generated by rust-protobuf 2.22.1. Do not edit
  2. // @generated
  3. // https://github.com/rust-lang/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![allow(unused_attributes)]
  7. #![cfg_attr(rustfmt, rustfmt::skip)]
  8. #![allow(box_pointers)]
  9. #![allow(dead_code)]
  10. #![allow(missing_docs)]
  11. #![allow(non_camel_case_types)]
  12. #![allow(non_snake_case)]
  13. #![allow(non_upper_case_globals)]
  14. #![allow(trivial_casts)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `doc_create.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;
  21. #[derive(PartialEq,Clone,Default)]
  22. pub struct CreateDocRequest {
  23. // message fields
  24. pub id: ::std::string::String,
  25. pub name: ::std::string::String,
  26. pub desc: ::std::string::String,
  27. pub text: ::std::string::String,
  28. // special fields
  29. pub unknown_fields: ::protobuf::UnknownFields,
  30. pub cached_size: ::protobuf::CachedSize,
  31. }
  32. impl<'a> ::std::default::Default for &'a CreateDocRequest {
  33. fn default() -> &'a CreateDocRequest {
  34. <CreateDocRequest as ::protobuf::Message>::default_instance()
  35. }
  36. }
  37. impl CreateDocRequest {
  38. pub fn new() -> CreateDocRequest {
  39. ::std::default::Default::default()
  40. }
  41. // string id = 1;
  42. pub fn get_id(&self) -> &str {
  43. &self.id
  44. }
  45. pub fn clear_id(&mut self) {
  46. self.id.clear();
  47. }
  48. // Param is passed by value, moved
  49. pub fn set_id(&mut self, v: ::std::string::String) {
  50. self.id = v;
  51. }
  52. // Mutable pointer to the field.
  53. // If field is not initialized, it is initialized with default value first.
  54. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  55. &mut self.id
  56. }
  57. // Take field
  58. pub fn take_id(&mut self) -> ::std::string::String {
  59. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  60. }
  61. // string name = 2;
  62. pub fn get_name(&self) -> &str {
  63. &self.name
  64. }
  65. pub fn clear_name(&mut self) {
  66. self.name.clear();
  67. }
  68. // Param is passed by value, moved
  69. pub fn set_name(&mut self, v: ::std::string::String) {
  70. self.name = v;
  71. }
  72. // Mutable pointer to the field.
  73. // If field is not initialized, it is initialized with default value first.
  74. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  75. &mut self.name
  76. }
  77. // Take field
  78. pub fn take_name(&mut self) -> ::std::string::String {
  79. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  80. }
  81. // string desc = 3;
  82. pub fn get_desc(&self) -> &str {
  83. &self.desc
  84. }
  85. pub fn clear_desc(&mut self) {
  86. self.desc.clear();
  87. }
  88. // Param is passed by value, moved
  89. pub fn set_desc(&mut self, v: ::std::string::String) {
  90. self.desc = v;
  91. }
  92. // Mutable pointer to the field.
  93. // If field is not initialized, it is initialized with default value first.
  94. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  95. &mut self.desc
  96. }
  97. // Take field
  98. pub fn take_desc(&mut self) -> ::std::string::String {
  99. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  100. }
  101. // string text = 4;
  102. pub fn get_text(&self) -> &str {
  103. &self.text
  104. }
  105. pub fn clear_text(&mut self) {
  106. self.text.clear();
  107. }
  108. // Param is passed by value, moved
  109. pub fn set_text(&mut self, v: ::std::string::String) {
  110. self.text = v;
  111. }
  112. // Mutable pointer to the field.
  113. // If field is not initialized, it is initialized with default value first.
  114. pub fn mut_text(&mut self) -> &mut ::std::string::String {
  115. &mut self.text
  116. }
  117. // Take field
  118. pub fn take_text(&mut self) -> ::std::string::String {
  119. ::std::mem::replace(&mut self.text, ::std::string::String::new())
  120. }
  121. }
  122. impl ::protobuf::Message for CreateDocRequest {
  123. fn is_initialized(&self) -> bool {
  124. true
  125. }
  126. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  127. while !is.eof()? {
  128. let (field_number, wire_type) = is.read_tag_unpack()?;
  129. match field_number {
  130. 1 => {
  131. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  132. },
  133. 2 => {
  134. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  135. },
  136. 3 => {
  137. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  138. },
  139. 4 => {
  140. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.text)?;
  141. },
  142. _ => {
  143. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  144. },
  145. };
  146. }
  147. ::std::result::Result::Ok(())
  148. }
  149. // Compute sizes of nested messages
  150. #[allow(unused_variables)]
  151. fn compute_size(&self) -> u32 {
  152. let mut my_size = 0;
  153. if !self.id.is_empty() {
  154. my_size += ::protobuf::rt::string_size(1, &self.id);
  155. }
  156. if !self.name.is_empty() {
  157. my_size += ::protobuf::rt::string_size(2, &self.name);
  158. }
  159. if !self.desc.is_empty() {
  160. my_size += ::protobuf::rt::string_size(3, &self.desc);
  161. }
  162. if !self.text.is_empty() {
  163. my_size += ::protobuf::rt::string_size(4, &self.text);
  164. }
  165. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  166. self.cached_size.set(my_size);
  167. my_size
  168. }
  169. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  170. if !self.id.is_empty() {
  171. os.write_string(1, &self.id)?;
  172. }
  173. if !self.name.is_empty() {
  174. os.write_string(2, &self.name)?;
  175. }
  176. if !self.desc.is_empty() {
  177. os.write_string(3, &self.desc)?;
  178. }
  179. if !self.text.is_empty() {
  180. os.write_string(4, &self.text)?;
  181. }
  182. os.write_unknown_fields(self.get_unknown_fields())?;
  183. ::std::result::Result::Ok(())
  184. }
  185. fn get_cached_size(&self) -> u32 {
  186. self.cached_size.get()
  187. }
  188. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  189. &self.unknown_fields
  190. }
  191. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  192. &mut self.unknown_fields
  193. }
  194. fn as_any(&self) -> &dyn (::std::any::Any) {
  195. self as &dyn (::std::any::Any)
  196. }
  197. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  198. self as &mut dyn (::std::any::Any)
  199. }
  200. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  201. self
  202. }
  203. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  204. Self::descriptor_static()
  205. }
  206. fn new() -> CreateDocRequest {
  207. CreateDocRequest::new()
  208. }
  209. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  210. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  211. descriptor.get(|| {
  212. let mut fields = ::std::vec::Vec::new();
  213. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  214. "id",
  215. |m: &CreateDocRequest| { &m.id },
  216. |m: &mut CreateDocRequest| { &mut m.id },
  217. ));
  218. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  219. "name",
  220. |m: &CreateDocRequest| { &m.name },
  221. |m: &mut CreateDocRequest| { &mut m.name },
  222. ));
  223. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  224. "desc",
  225. |m: &CreateDocRequest| { &m.desc },
  226. |m: &mut CreateDocRequest| { &mut m.desc },
  227. ));
  228. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  229. "text",
  230. |m: &CreateDocRequest| { &m.text },
  231. |m: &mut CreateDocRequest| { &mut m.text },
  232. ));
  233. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateDocRequest>(
  234. "CreateDocRequest",
  235. fields,
  236. file_descriptor_proto()
  237. )
  238. })
  239. }
  240. fn default_instance() -> &'static CreateDocRequest {
  241. static instance: ::protobuf::rt::LazyV2<CreateDocRequest> = ::protobuf::rt::LazyV2::INIT;
  242. instance.get(CreateDocRequest::new)
  243. }
  244. }
  245. impl ::protobuf::Clear for CreateDocRequest {
  246. fn clear(&mut self) {
  247. self.id.clear();
  248. self.name.clear();
  249. self.desc.clear();
  250. self.text.clear();
  251. self.unknown_fields.clear();
  252. }
  253. }
  254. impl ::std::fmt::Debug for CreateDocRequest {
  255. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  256. ::protobuf::text_format::fmt(self, f)
  257. }
  258. }
  259. impl ::protobuf::reflect::ProtobufValue for CreateDocRequest {
  260. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  261. ::protobuf::reflect::ReflectValueRef::Message(self)
  262. }
  263. }
  264. #[derive(PartialEq,Clone,Default)]
  265. pub struct DocInfo {
  266. // message fields
  267. pub id: ::std::string::String,
  268. pub name: ::std::string::String,
  269. pub desc: ::std::string::String,
  270. pub path: ::std::string::String,
  271. // special fields
  272. pub unknown_fields: ::protobuf::UnknownFields,
  273. pub cached_size: ::protobuf::CachedSize,
  274. }
  275. impl<'a> ::std::default::Default for &'a DocInfo {
  276. fn default() -> &'a DocInfo {
  277. <DocInfo as ::protobuf::Message>::default_instance()
  278. }
  279. }
  280. impl DocInfo {
  281. pub fn new() -> DocInfo {
  282. ::std::default::Default::default()
  283. }
  284. // string id = 1;
  285. pub fn get_id(&self) -> &str {
  286. &self.id
  287. }
  288. pub fn clear_id(&mut self) {
  289. self.id.clear();
  290. }
  291. // Param is passed by value, moved
  292. pub fn set_id(&mut self, v: ::std::string::String) {
  293. self.id = v;
  294. }
  295. // Mutable pointer to the field.
  296. // If field is not initialized, it is initialized with default value first.
  297. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  298. &mut self.id
  299. }
  300. // Take field
  301. pub fn take_id(&mut self) -> ::std::string::String {
  302. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  303. }
  304. // string name = 2;
  305. pub fn get_name(&self) -> &str {
  306. &self.name
  307. }
  308. pub fn clear_name(&mut self) {
  309. self.name.clear();
  310. }
  311. // Param is passed by value, moved
  312. pub fn set_name(&mut self, v: ::std::string::String) {
  313. self.name = v;
  314. }
  315. // Mutable pointer to the field.
  316. // If field is not initialized, it is initialized with default value first.
  317. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  318. &mut self.name
  319. }
  320. // Take field
  321. pub fn take_name(&mut self) -> ::std::string::String {
  322. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  323. }
  324. // string desc = 3;
  325. pub fn get_desc(&self) -> &str {
  326. &self.desc
  327. }
  328. pub fn clear_desc(&mut self) {
  329. self.desc.clear();
  330. }
  331. // Param is passed by value, moved
  332. pub fn set_desc(&mut self, v: ::std::string::String) {
  333. self.desc = v;
  334. }
  335. // Mutable pointer to the field.
  336. // If field is not initialized, it is initialized with default value first.
  337. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  338. &mut self.desc
  339. }
  340. // Take field
  341. pub fn take_desc(&mut self) -> ::std::string::String {
  342. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  343. }
  344. // string path = 4;
  345. pub fn get_path(&self) -> &str {
  346. &self.path
  347. }
  348. pub fn clear_path(&mut self) {
  349. self.path.clear();
  350. }
  351. // Param is passed by value, moved
  352. pub fn set_path(&mut self, v: ::std::string::String) {
  353. self.path = v;
  354. }
  355. // Mutable pointer to the field.
  356. // If field is not initialized, it is initialized with default value first.
  357. pub fn mut_path(&mut self) -> &mut ::std::string::String {
  358. &mut self.path
  359. }
  360. // Take field
  361. pub fn take_path(&mut self) -> ::std::string::String {
  362. ::std::mem::replace(&mut self.path, ::std::string::String::new())
  363. }
  364. }
  365. impl ::protobuf::Message for DocInfo {
  366. fn is_initialized(&self) -> bool {
  367. true
  368. }
  369. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  370. while !is.eof()? {
  371. let (field_number, wire_type) = is.read_tag_unpack()?;
  372. match field_number {
  373. 1 => {
  374. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  375. },
  376. 2 => {
  377. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  378. },
  379. 3 => {
  380. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  381. },
  382. 4 => {
  383. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.path)?;
  384. },
  385. _ => {
  386. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  387. },
  388. };
  389. }
  390. ::std::result::Result::Ok(())
  391. }
  392. // Compute sizes of nested messages
  393. #[allow(unused_variables)]
  394. fn compute_size(&self) -> u32 {
  395. let mut my_size = 0;
  396. if !self.id.is_empty() {
  397. my_size += ::protobuf::rt::string_size(1, &self.id);
  398. }
  399. if !self.name.is_empty() {
  400. my_size += ::protobuf::rt::string_size(2, &self.name);
  401. }
  402. if !self.desc.is_empty() {
  403. my_size += ::protobuf::rt::string_size(3, &self.desc);
  404. }
  405. if !self.path.is_empty() {
  406. my_size += ::protobuf::rt::string_size(4, &self.path);
  407. }
  408. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  409. self.cached_size.set(my_size);
  410. my_size
  411. }
  412. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  413. if !self.id.is_empty() {
  414. os.write_string(1, &self.id)?;
  415. }
  416. if !self.name.is_empty() {
  417. os.write_string(2, &self.name)?;
  418. }
  419. if !self.desc.is_empty() {
  420. os.write_string(3, &self.desc)?;
  421. }
  422. if !self.path.is_empty() {
  423. os.write_string(4, &self.path)?;
  424. }
  425. os.write_unknown_fields(self.get_unknown_fields())?;
  426. ::std::result::Result::Ok(())
  427. }
  428. fn get_cached_size(&self) -> u32 {
  429. self.cached_size.get()
  430. }
  431. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  432. &self.unknown_fields
  433. }
  434. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  435. &mut self.unknown_fields
  436. }
  437. fn as_any(&self) -> &dyn (::std::any::Any) {
  438. self as &dyn (::std::any::Any)
  439. }
  440. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  441. self as &mut dyn (::std::any::Any)
  442. }
  443. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  444. self
  445. }
  446. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  447. Self::descriptor_static()
  448. }
  449. fn new() -> DocInfo {
  450. DocInfo::new()
  451. }
  452. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  453. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  454. descriptor.get(|| {
  455. let mut fields = ::std::vec::Vec::new();
  456. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  457. "id",
  458. |m: &DocInfo| { &m.id },
  459. |m: &mut DocInfo| { &mut m.id },
  460. ));
  461. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  462. "name",
  463. |m: &DocInfo| { &m.name },
  464. |m: &mut DocInfo| { &mut m.name },
  465. ));
  466. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  467. "desc",
  468. |m: &DocInfo| { &m.desc },
  469. |m: &mut DocInfo| { &mut m.desc },
  470. ));
  471. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  472. "path",
  473. |m: &DocInfo| { &m.path },
  474. |m: &mut DocInfo| { &mut m.path },
  475. ));
  476. ::protobuf::reflect::MessageDescriptor::new_pb_name::<DocInfo>(
  477. "DocInfo",
  478. fields,
  479. file_descriptor_proto()
  480. )
  481. })
  482. }
  483. fn default_instance() -> &'static DocInfo {
  484. static instance: ::protobuf::rt::LazyV2<DocInfo> = ::protobuf::rt::LazyV2::INIT;
  485. instance.get(DocInfo::new)
  486. }
  487. }
  488. impl ::protobuf::Clear for DocInfo {
  489. fn clear(&mut self) {
  490. self.id.clear();
  491. self.name.clear();
  492. self.desc.clear();
  493. self.path.clear();
  494. self.unknown_fields.clear();
  495. }
  496. }
  497. impl ::std::fmt::Debug for DocInfo {
  498. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  499. ::protobuf::text_format::fmt(self, f)
  500. }
  501. }
  502. impl ::protobuf::reflect::ProtobufValue for DocInfo {
  503. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  504. ::protobuf::reflect::ReflectValueRef::Message(self)
  505. }
  506. }
  507. #[derive(PartialEq,Clone,Default)]
  508. pub struct DocData {
  509. // message fields
  510. pub text: ::std::string::String,
  511. // special fields
  512. pub unknown_fields: ::protobuf::UnknownFields,
  513. pub cached_size: ::protobuf::CachedSize,
  514. }
  515. impl<'a> ::std::default::Default for &'a DocData {
  516. fn default() -> &'a DocData {
  517. <DocData as ::protobuf::Message>::default_instance()
  518. }
  519. }
  520. impl DocData {
  521. pub fn new() -> DocData {
  522. ::std::default::Default::default()
  523. }
  524. // string text = 1;
  525. pub fn get_text(&self) -> &str {
  526. &self.text
  527. }
  528. pub fn clear_text(&mut self) {
  529. self.text.clear();
  530. }
  531. // Param is passed by value, moved
  532. pub fn set_text(&mut self, v: ::std::string::String) {
  533. self.text = v;
  534. }
  535. // Mutable pointer to the field.
  536. // If field is not initialized, it is initialized with default value first.
  537. pub fn mut_text(&mut self) -> &mut ::std::string::String {
  538. &mut self.text
  539. }
  540. // Take field
  541. pub fn take_text(&mut self) -> ::std::string::String {
  542. ::std::mem::replace(&mut self.text, ::std::string::String::new())
  543. }
  544. }
  545. impl ::protobuf::Message for DocData {
  546. fn is_initialized(&self) -> bool {
  547. true
  548. }
  549. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  550. while !is.eof()? {
  551. let (field_number, wire_type) = is.read_tag_unpack()?;
  552. match field_number {
  553. 1 => {
  554. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.text)?;
  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.text.is_empty() {
  568. my_size += ::protobuf::rt::string_size(1, &self.text);
  569. }
  570. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  571. self.cached_size.set(my_size);
  572. my_size
  573. }
  574. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  575. if !self.text.is_empty() {
  576. os.write_string(1, &self.text)?;
  577. }
  578. os.write_unknown_fields(self.get_unknown_fields())?;
  579. ::std::result::Result::Ok(())
  580. }
  581. fn get_cached_size(&self) -> u32 {
  582. self.cached_size.get()
  583. }
  584. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  585. &self.unknown_fields
  586. }
  587. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  588. &mut self.unknown_fields
  589. }
  590. fn as_any(&self) -> &dyn (::std::any::Any) {
  591. self as &dyn (::std::any::Any)
  592. }
  593. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  594. self as &mut dyn (::std::any::Any)
  595. }
  596. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  597. self
  598. }
  599. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  600. Self::descriptor_static()
  601. }
  602. fn new() -> DocData {
  603. DocData::new()
  604. }
  605. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  606. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  607. descriptor.get(|| {
  608. let mut fields = ::std::vec::Vec::new();
  609. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  610. "text",
  611. |m: &DocData| { &m.text },
  612. |m: &mut DocData| { &mut m.text },
  613. ));
  614. ::protobuf::reflect::MessageDescriptor::new_pb_name::<DocData>(
  615. "DocData",
  616. fields,
  617. file_descriptor_proto()
  618. )
  619. })
  620. }
  621. fn default_instance() -> &'static DocData {
  622. static instance: ::protobuf::rt::LazyV2<DocData> = ::protobuf::rt::LazyV2::INIT;
  623. instance.get(DocData::new)
  624. }
  625. }
  626. impl ::protobuf::Clear for DocData {
  627. fn clear(&mut self) {
  628. self.text.clear();
  629. self.unknown_fields.clear();
  630. }
  631. }
  632. impl ::std::fmt::Debug for DocData {
  633. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  634. ::protobuf::text_format::fmt(self, f)
  635. }
  636. }
  637. impl ::protobuf::reflect::ProtobufValue for DocData {
  638. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  639. ::protobuf::reflect::ReflectValueRef::Message(self)
  640. }
  641. }
  642. static file_descriptor_proto_data: &'static [u8] = b"\
  643. \n\x10doc_create.proto\"^\n\x10CreateDocRequest\x12\x0e\n\x02id\x18\x01\
  644. \x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\
  645. \n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\x12\n\x04text\x18\x04\x20\x01\
  646. (\tR\x04text\"U\n\x07DocInfo\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\
  647. \x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\
  648. \x20\x01(\tR\x04desc\x12\x12\n\x04path\x18\x04\x20\x01(\tR\x04path\"\x1d\
  649. \n\x07DocData\x12\x12\n\x04text\x18\x01\x20\x01(\tR\x04textJ\xc9\x04\n\
  650. \x06\x12\x04\0\0\x10\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\
  651. \x12\x04\x02\0\x07\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x18\n\x0b\n\
  652. \x04\x04\0\x02\0\x12\x03\x03\x04\x12\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\
  653. \x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\r\n\x0c\n\x05\x04\
  654. \0\x02\0\x03\x12\x03\x03\x10\x11\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\
  655. \x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\
  656. \0\x02\x01\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\
  657. \x04\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\x05\
  658. \x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\
  659. \x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x12\x13\n\x0b\
  660. \n\x04\x04\0\x02\x03\x12\x03\x06\x04\x14\n\x0c\n\x05\x04\0\x02\x03\x05\
  661. \x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x06\x0b\x0f\n\
  662. \x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x06\x12\x13\n\n\n\x02\x04\x01\x12\
  663. \x04\x08\0\r\x01\n\n\n\x03\x04\x01\x01\x12\x03\x08\x08\x0f\n\x0b\n\x04\
  664. \x04\x01\x02\0\x12\x03\t\x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\t\
  665. \x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\t\x0b\r\n\x0c\n\x05\x04\x01\
  666. \x02\0\x03\x12\x03\t\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\n\x04\
  667. \x14\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\x01\
  668. \x02\x01\x01\x12\x03\n\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\n\
  669. \x12\x13\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x0b\x04\x14\n\x0c\n\x05\x04\
  670. \x01\x02\x02\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\
  671. \x03\x0b\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x0b\x12\x13\n\
  672. \x0b\n\x04\x04\x01\x02\x03\x12\x03\x0c\x04\x14\n\x0c\n\x05\x04\x01\x02\
  673. \x03\x05\x12\x03\x0c\x04\n\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x0c\
  674. \x0b\x0f\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x0c\x12\x13\n\n\n\x02\
  675. \x04\x02\x12\x04\x0e\0\x10\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0e\x08\x0f\
  676. \n\x0b\n\x04\x04\x02\x02\0\x12\x03\x0f\x04\x14\n\x0c\n\x05\x04\x02\x02\0\
  677. \x05\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0f\x0b\x0f\
  678. \n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x0f\x12\x13b\x06proto3\
  679. ";
  680. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  681. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  682. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  683. }
  684. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  685. file_descriptor_proto_lazy.get(|| {
  686. parse_descriptor_proto()
  687. })
  688. }