doc_create.rs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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 view_id: ::std::string::String,
  25. pub name: ::std::string::String,
  26. // special fields
  27. pub unknown_fields: ::protobuf::UnknownFields,
  28. pub cached_size: ::protobuf::CachedSize,
  29. }
  30. impl<'a> ::std::default::Default for &'a CreateDocRequest {
  31. fn default() -> &'a CreateDocRequest {
  32. <CreateDocRequest as ::protobuf::Message>::default_instance()
  33. }
  34. }
  35. impl CreateDocRequest {
  36. pub fn new() -> CreateDocRequest {
  37. ::std::default::Default::default()
  38. }
  39. // string view_id = 1;
  40. pub fn get_view_id(&self) -> &str {
  41. &self.view_id
  42. }
  43. pub fn clear_view_id(&mut self) {
  44. self.view_id.clear();
  45. }
  46. // Param is passed by value, moved
  47. pub fn set_view_id(&mut self, v: ::std::string::String) {
  48. self.view_id = v;
  49. }
  50. // Mutable pointer to the field.
  51. // If field is not initialized, it is initialized with default value first.
  52. pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
  53. &mut self.view_id
  54. }
  55. // Take field
  56. pub fn take_view_id(&mut self) -> ::std::string::String {
  57. ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
  58. }
  59. // string name = 2;
  60. pub fn get_name(&self) -> &str {
  61. &self.name
  62. }
  63. pub fn clear_name(&mut self) {
  64. self.name.clear();
  65. }
  66. // Param is passed by value, moved
  67. pub fn set_name(&mut self, v: ::std::string::String) {
  68. self.name = v;
  69. }
  70. // Mutable pointer to the field.
  71. // If field is not initialized, it is initialized with default value first.
  72. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  73. &mut self.name
  74. }
  75. // Take field
  76. pub fn take_name(&mut self) -> ::std::string::String {
  77. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  78. }
  79. }
  80. impl ::protobuf::Message for CreateDocRequest {
  81. fn is_initialized(&self) -> bool {
  82. true
  83. }
  84. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  85. while !is.eof()? {
  86. let (field_number, wire_type) = is.read_tag_unpack()?;
  87. match field_number {
  88. 1 => {
  89. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_id)?;
  90. },
  91. 2 => {
  92. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  93. },
  94. _ => {
  95. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  96. },
  97. };
  98. }
  99. ::std::result::Result::Ok(())
  100. }
  101. // Compute sizes of nested messages
  102. #[allow(unused_variables)]
  103. fn compute_size(&self) -> u32 {
  104. let mut my_size = 0;
  105. if !self.view_id.is_empty() {
  106. my_size += ::protobuf::rt::string_size(1, &self.view_id);
  107. }
  108. if !self.name.is_empty() {
  109. my_size += ::protobuf::rt::string_size(2, &self.name);
  110. }
  111. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  112. self.cached_size.set(my_size);
  113. my_size
  114. }
  115. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  116. if !self.view_id.is_empty() {
  117. os.write_string(1, &self.view_id)?;
  118. }
  119. if !self.name.is_empty() {
  120. os.write_string(2, &self.name)?;
  121. }
  122. os.write_unknown_fields(self.get_unknown_fields())?;
  123. ::std::result::Result::Ok(())
  124. }
  125. fn get_cached_size(&self) -> u32 {
  126. self.cached_size.get()
  127. }
  128. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  129. &self.unknown_fields
  130. }
  131. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  132. &mut self.unknown_fields
  133. }
  134. fn as_any(&self) -> &dyn (::std::any::Any) {
  135. self as &dyn (::std::any::Any)
  136. }
  137. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  138. self as &mut dyn (::std::any::Any)
  139. }
  140. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  141. self
  142. }
  143. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  144. Self::descriptor_static()
  145. }
  146. fn new() -> CreateDocRequest {
  147. CreateDocRequest::new()
  148. }
  149. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  150. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  151. descriptor.get(|| {
  152. let mut fields = ::std::vec::Vec::new();
  153. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  154. "view_id",
  155. |m: &CreateDocRequest| { &m.view_id },
  156. |m: &mut CreateDocRequest| { &mut m.view_id },
  157. ));
  158. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  159. "name",
  160. |m: &CreateDocRequest| { &m.name },
  161. |m: &mut CreateDocRequest| { &mut m.name },
  162. ));
  163. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateDocRequest>(
  164. "CreateDocRequest",
  165. fields,
  166. file_descriptor_proto()
  167. )
  168. })
  169. }
  170. fn default_instance() -> &'static CreateDocRequest {
  171. static instance: ::protobuf::rt::LazyV2<CreateDocRequest> = ::protobuf::rt::LazyV2::INIT;
  172. instance.get(CreateDocRequest::new)
  173. }
  174. }
  175. impl ::protobuf::Clear for CreateDocRequest {
  176. fn clear(&mut self) {
  177. self.view_id.clear();
  178. self.name.clear();
  179. self.unknown_fields.clear();
  180. }
  181. }
  182. impl ::std::fmt::Debug for CreateDocRequest {
  183. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  184. ::protobuf::text_format::fmt(self, f)
  185. }
  186. }
  187. impl ::protobuf::reflect::ProtobufValue for CreateDocRequest {
  188. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  189. ::protobuf::reflect::ReflectValueRef::Message(self)
  190. }
  191. }
  192. #[derive(PartialEq,Clone,Default)]
  193. pub struct Doc {
  194. // message fields
  195. pub id: ::std::string::String,
  196. pub name: ::std::string::String,
  197. pub view_id: ::std::string::String,
  198. // special fields
  199. pub unknown_fields: ::protobuf::UnknownFields,
  200. pub cached_size: ::protobuf::CachedSize,
  201. }
  202. impl<'a> ::std::default::Default for &'a Doc {
  203. fn default() -> &'a Doc {
  204. <Doc as ::protobuf::Message>::default_instance()
  205. }
  206. }
  207. impl Doc {
  208. pub fn new() -> Doc {
  209. ::std::default::Default::default()
  210. }
  211. // string id = 1;
  212. pub fn get_id(&self) -> &str {
  213. &self.id
  214. }
  215. pub fn clear_id(&mut self) {
  216. self.id.clear();
  217. }
  218. // Param is passed by value, moved
  219. pub fn set_id(&mut self, v: ::std::string::String) {
  220. self.id = v;
  221. }
  222. // Mutable pointer to the field.
  223. // If field is not initialized, it is initialized with default value first.
  224. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  225. &mut self.id
  226. }
  227. // Take field
  228. pub fn take_id(&mut self) -> ::std::string::String {
  229. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  230. }
  231. // string name = 2;
  232. pub fn get_name(&self) -> &str {
  233. &self.name
  234. }
  235. pub fn clear_name(&mut self) {
  236. self.name.clear();
  237. }
  238. // Param is passed by value, moved
  239. pub fn set_name(&mut self, v: ::std::string::String) {
  240. self.name = v;
  241. }
  242. // Mutable pointer to the field.
  243. // If field is not initialized, it is initialized with default value first.
  244. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  245. &mut self.name
  246. }
  247. // Take field
  248. pub fn take_name(&mut self) -> ::std::string::String {
  249. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  250. }
  251. // string view_id = 3;
  252. pub fn get_view_id(&self) -> &str {
  253. &self.view_id
  254. }
  255. pub fn clear_view_id(&mut self) {
  256. self.view_id.clear();
  257. }
  258. // Param is passed by value, moved
  259. pub fn set_view_id(&mut self, v: ::std::string::String) {
  260. self.view_id = v;
  261. }
  262. // Mutable pointer to the field.
  263. // If field is not initialized, it is initialized with default value first.
  264. pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
  265. &mut self.view_id
  266. }
  267. // Take field
  268. pub fn take_view_id(&mut self) -> ::std::string::String {
  269. ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
  270. }
  271. }
  272. impl ::protobuf::Message for Doc {
  273. fn is_initialized(&self) -> bool {
  274. true
  275. }
  276. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  277. while !is.eof()? {
  278. let (field_number, wire_type) = is.read_tag_unpack()?;
  279. match field_number {
  280. 1 => {
  281. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  282. },
  283. 2 => {
  284. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  285. },
  286. 3 => {
  287. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_id)?;
  288. },
  289. _ => {
  290. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  291. },
  292. };
  293. }
  294. ::std::result::Result::Ok(())
  295. }
  296. // Compute sizes of nested messages
  297. #[allow(unused_variables)]
  298. fn compute_size(&self) -> u32 {
  299. let mut my_size = 0;
  300. if !self.id.is_empty() {
  301. my_size += ::protobuf::rt::string_size(1, &self.id);
  302. }
  303. if !self.name.is_empty() {
  304. my_size += ::protobuf::rt::string_size(2, &self.name);
  305. }
  306. if !self.view_id.is_empty() {
  307. my_size += ::protobuf::rt::string_size(3, &self.view_id);
  308. }
  309. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  310. self.cached_size.set(my_size);
  311. my_size
  312. }
  313. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  314. if !self.id.is_empty() {
  315. os.write_string(1, &self.id)?;
  316. }
  317. if !self.name.is_empty() {
  318. os.write_string(2, &self.name)?;
  319. }
  320. if !self.view_id.is_empty() {
  321. os.write_string(3, &self.view_id)?;
  322. }
  323. os.write_unknown_fields(self.get_unknown_fields())?;
  324. ::std::result::Result::Ok(())
  325. }
  326. fn get_cached_size(&self) -> u32 {
  327. self.cached_size.get()
  328. }
  329. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  330. &self.unknown_fields
  331. }
  332. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  333. &mut self.unknown_fields
  334. }
  335. fn as_any(&self) -> &dyn (::std::any::Any) {
  336. self as &dyn (::std::any::Any)
  337. }
  338. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  339. self as &mut dyn (::std::any::Any)
  340. }
  341. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  342. self
  343. }
  344. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  345. Self::descriptor_static()
  346. }
  347. fn new() -> Doc {
  348. Doc::new()
  349. }
  350. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  351. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  352. descriptor.get(|| {
  353. let mut fields = ::std::vec::Vec::new();
  354. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  355. "id",
  356. |m: &Doc| { &m.id },
  357. |m: &mut Doc| { &mut m.id },
  358. ));
  359. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  360. "name",
  361. |m: &Doc| { &m.name },
  362. |m: &mut Doc| { &mut m.name },
  363. ));
  364. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  365. "view_id",
  366. |m: &Doc| { &m.view_id },
  367. |m: &mut Doc| { &mut m.view_id },
  368. ));
  369. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Doc>(
  370. "Doc",
  371. fields,
  372. file_descriptor_proto()
  373. )
  374. })
  375. }
  376. fn default_instance() -> &'static Doc {
  377. static instance: ::protobuf::rt::LazyV2<Doc> = ::protobuf::rt::LazyV2::INIT;
  378. instance.get(Doc::new)
  379. }
  380. }
  381. impl ::protobuf::Clear for Doc {
  382. fn clear(&mut self) {
  383. self.id.clear();
  384. self.name.clear();
  385. self.view_id.clear();
  386. self.unknown_fields.clear();
  387. }
  388. }
  389. impl ::std::fmt::Debug for Doc {
  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 Doc {
  395. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  396. ::protobuf::reflect::ReflectValueRef::Message(self)
  397. }
  398. }
  399. static file_descriptor_proto_data: &'static [u8] = b"\
  400. \n\x10doc_create.proto\"?\n\x10CreateDocRequest\x12\x17\n\x07view_id\x18\
  401. \x01\x20\x01(\tR\x06viewId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\
  402. \"B\n\x03Doc\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\
  403. \x18\x02\x20\x01(\tR\x04name\x12\x17\n\x07view_id\x18\x03\x20\x01(\tR\
  404. \x06viewIdJ\xd5\x02\n\x06\x12\x04\0\0\n\x01\n\x08\n\x01\x0c\x12\x03\0\0\
  405. \x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\x03\x04\0\x01\x12\x03\
  406. \x02\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x17\n\x0c\n\x05\x04\
  407. \0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\
  408. \x0b\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x15\x16\n\x0b\n\x04\x04\
  409. \0\x02\x01\x12\x03\x04\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\
  410. \x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\
  411. \0\x02\x01\x03\x12\x03\x04\x12\x13\n\n\n\x02\x04\x01\x12\x04\x06\0\n\x01\
  412. \n\n\n\x03\x04\x01\x01\x12\x03\x06\x08\x0b\n\x0b\n\x04\x04\x01\x02\0\x12\
  413. \x03\x07\x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x07\x04\n\n\x0c\n\
  414. \x05\x04\x01\x02\0\x01\x12\x03\x07\x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\
  415. \x12\x03\x07\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x08\x04\x14\n\
  416. \x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\
  417. \x01\x01\x12\x03\x08\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x08\
  418. \x12\x13\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\t\x04\x17\n\x0c\n\x05\x04\
  419. \x01\x02\x02\x05\x12\x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\
  420. \t\x0b\x12\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\t\x15\x16b\x06proto3\
  421. ";
  422. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  423. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  424. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  425. }
  426. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  427. file_descriptor_proto_lazy.get(|| {
  428. parse_descriptor_proto()
  429. })
  430. }