revision.rs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  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 `revision.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 RevId {
  23. // message fields
  24. pub value: i64,
  25. // special fields
  26. pub unknown_fields: ::protobuf::UnknownFields,
  27. pub cached_size: ::protobuf::CachedSize,
  28. }
  29. impl<'a> ::std::default::Default for &'a RevId {
  30. fn default() -> &'a RevId {
  31. <RevId as ::protobuf::Message>::default_instance()
  32. }
  33. }
  34. impl RevId {
  35. pub fn new() -> RevId {
  36. ::std::default::Default::default()
  37. }
  38. // int64 value = 1;
  39. pub fn get_value(&self) -> i64 {
  40. self.value
  41. }
  42. pub fn clear_value(&mut self) {
  43. self.value = 0;
  44. }
  45. // Param is passed by value, moved
  46. pub fn set_value(&mut self, v: i64) {
  47. self.value = v;
  48. }
  49. }
  50. impl ::protobuf::Message for RevId {
  51. fn is_initialized(&self) -> bool {
  52. true
  53. }
  54. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  55. while !is.eof()? {
  56. let (field_number, wire_type) = is.read_tag_unpack()?;
  57. match field_number {
  58. 1 => {
  59. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  60. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  61. }
  62. let tmp = is.read_int64()?;
  63. self.value = tmp;
  64. },
  65. _ => {
  66. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  67. },
  68. };
  69. }
  70. ::std::result::Result::Ok(())
  71. }
  72. // Compute sizes of nested messages
  73. #[allow(unused_variables)]
  74. fn compute_size(&self) -> u32 {
  75. let mut my_size = 0;
  76. if self.value != 0 {
  77. my_size += ::protobuf::rt::value_size(1, self.value, ::protobuf::wire_format::WireTypeVarint);
  78. }
  79. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  80. self.cached_size.set(my_size);
  81. my_size
  82. }
  83. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  84. if self.value != 0 {
  85. os.write_int64(1, self.value)?;
  86. }
  87. os.write_unknown_fields(self.get_unknown_fields())?;
  88. ::std::result::Result::Ok(())
  89. }
  90. fn get_cached_size(&self) -> u32 {
  91. self.cached_size.get()
  92. }
  93. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  94. &self.unknown_fields
  95. }
  96. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  97. &mut self.unknown_fields
  98. }
  99. fn as_any(&self) -> &dyn (::std::any::Any) {
  100. self as &dyn (::std::any::Any)
  101. }
  102. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  103. self as &mut dyn (::std::any::Any)
  104. }
  105. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  106. self
  107. }
  108. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  109. Self::descriptor_static()
  110. }
  111. fn new() -> RevId {
  112. RevId::new()
  113. }
  114. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  115. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  116. descriptor.get(|| {
  117. let mut fields = ::std::vec::Vec::new();
  118. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  119. "value",
  120. |m: &RevId| { &m.value },
  121. |m: &mut RevId| { &mut m.value },
  122. ));
  123. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RevId>(
  124. "RevId",
  125. fields,
  126. file_descriptor_proto()
  127. )
  128. })
  129. }
  130. fn default_instance() -> &'static RevId {
  131. static instance: ::protobuf::rt::LazyV2<RevId> = ::protobuf::rt::LazyV2::INIT;
  132. instance.get(RevId::new)
  133. }
  134. }
  135. impl ::protobuf::Clear for RevId {
  136. fn clear(&mut self) {
  137. self.value = 0;
  138. self.unknown_fields.clear();
  139. }
  140. }
  141. impl ::std::fmt::Debug for RevId {
  142. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  143. ::protobuf::text_format::fmt(self, f)
  144. }
  145. }
  146. impl ::protobuf::reflect::ProtobufValue for RevId {
  147. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  148. ::protobuf::reflect::ReflectValueRef::Message(self)
  149. }
  150. }
  151. #[derive(PartialEq,Clone,Default)]
  152. pub struct Revision {
  153. // message fields
  154. pub base_rev_id: i64,
  155. pub rev_id: i64,
  156. pub delta_data: ::std::vec::Vec<u8>,
  157. pub md5: ::std::string::String,
  158. pub doc_id: ::std::string::String,
  159. pub ty: RevType,
  160. // special fields
  161. pub unknown_fields: ::protobuf::UnknownFields,
  162. pub cached_size: ::protobuf::CachedSize,
  163. }
  164. impl<'a> ::std::default::Default for &'a Revision {
  165. fn default() -> &'a Revision {
  166. <Revision as ::protobuf::Message>::default_instance()
  167. }
  168. }
  169. impl Revision {
  170. pub fn new() -> Revision {
  171. ::std::default::Default::default()
  172. }
  173. // int64 base_rev_id = 1;
  174. pub fn get_base_rev_id(&self) -> i64 {
  175. self.base_rev_id
  176. }
  177. pub fn clear_base_rev_id(&mut self) {
  178. self.base_rev_id = 0;
  179. }
  180. // Param is passed by value, moved
  181. pub fn set_base_rev_id(&mut self, v: i64) {
  182. self.base_rev_id = v;
  183. }
  184. // int64 rev_id = 2;
  185. pub fn get_rev_id(&self) -> i64 {
  186. self.rev_id
  187. }
  188. pub fn clear_rev_id(&mut self) {
  189. self.rev_id = 0;
  190. }
  191. // Param is passed by value, moved
  192. pub fn set_rev_id(&mut self, v: i64) {
  193. self.rev_id = v;
  194. }
  195. // bytes delta_data = 3;
  196. pub fn get_delta_data(&self) -> &[u8] {
  197. &self.delta_data
  198. }
  199. pub fn clear_delta_data(&mut self) {
  200. self.delta_data.clear();
  201. }
  202. // Param is passed by value, moved
  203. pub fn set_delta_data(&mut self, v: ::std::vec::Vec<u8>) {
  204. self.delta_data = v;
  205. }
  206. // Mutable pointer to the field.
  207. // If field is not initialized, it is initialized with default value first.
  208. pub fn mut_delta_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  209. &mut self.delta_data
  210. }
  211. // Take field
  212. pub fn take_delta_data(&mut self) -> ::std::vec::Vec<u8> {
  213. ::std::mem::replace(&mut self.delta_data, ::std::vec::Vec::new())
  214. }
  215. // string md5 = 4;
  216. pub fn get_md5(&self) -> &str {
  217. &self.md5
  218. }
  219. pub fn clear_md5(&mut self) {
  220. self.md5.clear();
  221. }
  222. // Param is passed by value, moved
  223. pub fn set_md5(&mut self, v: ::std::string::String) {
  224. self.md5 = v;
  225. }
  226. // Mutable pointer to the field.
  227. // If field is not initialized, it is initialized with default value first.
  228. pub fn mut_md5(&mut self) -> &mut ::std::string::String {
  229. &mut self.md5
  230. }
  231. // Take field
  232. pub fn take_md5(&mut self) -> ::std::string::String {
  233. ::std::mem::replace(&mut self.md5, ::std::string::String::new())
  234. }
  235. // string doc_id = 5;
  236. pub fn get_doc_id(&self) -> &str {
  237. &self.doc_id
  238. }
  239. pub fn clear_doc_id(&mut self) {
  240. self.doc_id.clear();
  241. }
  242. // Param is passed by value, moved
  243. pub fn set_doc_id(&mut self, v: ::std::string::String) {
  244. self.doc_id = v;
  245. }
  246. // Mutable pointer to the field.
  247. // If field is not initialized, it is initialized with default value first.
  248. pub fn mut_doc_id(&mut self) -> &mut ::std::string::String {
  249. &mut self.doc_id
  250. }
  251. // Take field
  252. pub fn take_doc_id(&mut self) -> ::std::string::String {
  253. ::std::mem::replace(&mut self.doc_id, ::std::string::String::new())
  254. }
  255. // .RevType ty = 6;
  256. pub fn get_ty(&self) -> RevType {
  257. self.ty
  258. }
  259. pub fn clear_ty(&mut self) {
  260. self.ty = RevType::Local;
  261. }
  262. // Param is passed by value, moved
  263. pub fn set_ty(&mut self, v: RevType) {
  264. self.ty = v;
  265. }
  266. }
  267. impl ::protobuf::Message for Revision {
  268. fn is_initialized(&self) -> bool {
  269. true
  270. }
  271. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  272. while !is.eof()? {
  273. let (field_number, wire_type) = is.read_tag_unpack()?;
  274. match field_number {
  275. 1 => {
  276. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  277. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  278. }
  279. let tmp = is.read_int64()?;
  280. self.base_rev_id = tmp;
  281. },
  282. 2 => {
  283. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  284. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  285. }
  286. let tmp = is.read_int64()?;
  287. self.rev_id = tmp;
  288. },
  289. 3 => {
  290. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.delta_data)?;
  291. },
  292. 4 => {
  293. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.md5)?;
  294. },
  295. 5 => {
  296. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?;
  297. },
  298. 6 => {
  299. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 6, &mut self.unknown_fields)?
  300. },
  301. _ => {
  302. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  303. },
  304. };
  305. }
  306. ::std::result::Result::Ok(())
  307. }
  308. // Compute sizes of nested messages
  309. #[allow(unused_variables)]
  310. fn compute_size(&self) -> u32 {
  311. let mut my_size = 0;
  312. if self.base_rev_id != 0 {
  313. my_size += ::protobuf::rt::value_size(1, self.base_rev_id, ::protobuf::wire_format::WireTypeVarint);
  314. }
  315. if self.rev_id != 0 {
  316. my_size += ::protobuf::rt::value_size(2, self.rev_id, ::protobuf::wire_format::WireTypeVarint);
  317. }
  318. if !self.delta_data.is_empty() {
  319. my_size += ::protobuf::rt::bytes_size(3, &self.delta_data);
  320. }
  321. if !self.md5.is_empty() {
  322. my_size += ::protobuf::rt::string_size(4, &self.md5);
  323. }
  324. if !self.doc_id.is_empty() {
  325. my_size += ::protobuf::rt::string_size(5, &self.doc_id);
  326. }
  327. if self.ty != RevType::Local {
  328. my_size += ::protobuf::rt::enum_size(6, self.ty);
  329. }
  330. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  331. self.cached_size.set(my_size);
  332. my_size
  333. }
  334. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  335. if self.base_rev_id != 0 {
  336. os.write_int64(1, self.base_rev_id)?;
  337. }
  338. if self.rev_id != 0 {
  339. os.write_int64(2, self.rev_id)?;
  340. }
  341. if !self.delta_data.is_empty() {
  342. os.write_bytes(3, &self.delta_data)?;
  343. }
  344. if !self.md5.is_empty() {
  345. os.write_string(4, &self.md5)?;
  346. }
  347. if !self.doc_id.is_empty() {
  348. os.write_string(5, &self.doc_id)?;
  349. }
  350. if self.ty != RevType::Local {
  351. os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.ty))?;
  352. }
  353. os.write_unknown_fields(self.get_unknown_fields())?;
  354. ::std::result::Result::Ok(())
  355. }
  356. fn get_cached_size(&self) -> u32 {
  357. self.cached_size.get()
  358. }
  359. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  360. &self.unknown_fields
  361. }
  362. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  363. &mut self.unknown_fields
  364. }
  365. fn as_any(&self) -> &dyn (::std::any::Any) {
  366. self as &dyn (::std::any::Any)
  367. }
  368. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  369. self as &mut dyn (::std::any::Any)
  370. }
  371. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  372. self
  373. }
  374. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  375. Self::descriptor_static()
  376. }
  377. fn new() -> Revision {
  378. Revision::new()
  379. }
  380. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  381. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  382. descriptor.get(|| {
  383. let mut fields = ::std::vec::Vec::new();
  384. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  385. "base_rev_id",
  386. |m: &Revision| { &m.base_rev_id },
  387. |m: &mut Revision| { &mut m.base_rev_id },
  388. ));
  389. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  390. "rev_id",
  391. |m: &Revision| { &m.rev_id },
  392. |m: &mut Revision| { &mut m.rev_id },
  393. ));
  394. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  395. "delta_data",
  396. |m: &Revision| { &m.delta_data },
  397. |m: &mut Revision| { &mut m.delta_data },
  398. ));
  399. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  400. "md5",
  401. |m: &Revision| { &m.md5 },
  402. |m: &mut Revision| { &mut m.md5 },
  403. ));
  404. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  405. "doc_id",
  406. |m: &Revision| { &m.doc_id },
  407. |m: &mut Revision| { &mut m.doc_id },
  408. ));
  409. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<RevType>>(
  410. "ty",
  411. |m: &Revision| { &m.ty },
  412. |m: &mut Revision| { &mut m.ty },
  413. ));
  414. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Revision>(
  415. "Revision",
  416. fields,
  417. file_descriptor_proto()
  418. )
  419. })
  420. }
  421. fn default_instance() -> &'static Revision {
  422. static instance: ::protobuf::rt::LazyV2<Revision> = ::protobuf::rt::LazyV2::INIT;
  423. instance.get(Revision::new)
  424. }
  425. }
  426. impl ::protobuf::Clear for Revision {
  427. fn clear(&mut self) {
  428. self.base_rev_id = 0;
  429. self.rev_id = 0;
  430. self.delta_data.clear();
  431. self.md5.clear();
  432. self.doc_id.clear();
  433. self.ty = RevType::Local;
  434. self.unknown_fields.clear();
  435. }
  436. }
  437. impl ::std::fmt::Debug for Revision {
  438. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  439. ::protobuf::text_format::fmt(self, f)
  440. }
  441. }
  442. impl ::protobuf::reflect::ProtobufValue for Revision {
  443. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  444. ::protobuf::reflect::ReflectValueRef::Message(self)
  445. }
  446. }
  447. #[derive(PartialEq,Clone,Default)]
  448. pub struct RevisionRange {
  449. // message fields
  450. pub doc_id: ::std::string::String,
  451. pub from_rev_id: i64,
  452. pub to_rev_id: i64,
  453. // special fields
  454. pub unknown_fields: ::protobuf::UnknownFields,
  455. pub cached_size: ::protobuf::CachedSize,
  456. }
  457. impl<'a> ::std::default::Default for &'a RevisionRange {
  458. fn default() -> &'a RevisionRange {
  459. <RevisionRange as ::protobuf::Message>::default_instance()
  460. }
  461. }
  462. impl RevisionRange {
  463. pub fn new() -> RevisionRange {
  464. ::std::default::Default::default()
  465. }
  466. // string doc_id = 1;
  467. pub fn get_doc_id(&self) -> &str {
  468. &self.doc_id
  469. }
  470. pub fn clear_doc_id(&mut self) {
  471. self.doc_id.clear();
  472. }
  473. // Param is passed by value, moved
  474. pub fn set_doc_id(&mut self, v: ::std::string::String) {
  475. self.doc_id = v;
  476. }
  477. // Mutable pointer to the field.
  478. // If field is not initialized, it is initialized with default value first.
  479. pub fn mut_doc_id(&mut self) -> &mut ::std::string::String {
  480. &mut self.doc_id
  481. }
  482. // Take field
  483. pub fn take_doc_id(&mut self) -> ::std::string::String {
  484. ::std::mem::replace(&mut self.doc_id, ::std::string::String::new())
  485. }
  486. // int64 from_rev_id = 2;
  487. pub fn get_from_rev_id(&self) -> i64 {
  488. self.from_rev_id
  489. }
  490. pub fn clear_from_rev_id(&mut self) {
  491. self.from_rev_id = 0;
  492. }
  493. // Param is passed by value, moved
  494. pub fn set_from_rev_id(&mut self, v: i64) {
  495. self.from_rev_id = v;
  496. }
  497. // int64 to_rev_id = 3;
  498. pub fn get_to_rev_id(&self) -> i64 {
  499. self.to_rev_id
  500. }
  501. pub fn clear_to_rev_id(&mut self) {
  502. self.to_rev_id = 0;
  503. }
  504. // Param is passed by value, moved
  505. pub fn set_to_rev_id(&mut self, v: i64) {
  506. self.to_rev_id = v;
  507. }
  508. }
  509. impl ::protobuf::Message for RevisionRange {
  510. fn is_initialized(&self) -> bool {
  511. true
  512. }
  513. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  514. while !is.eof()? {
  515. let (field_number, wire_type) = is.read_tag_unpack()?;
  516. match field_number {
  517. 1 => {
  518. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?;
  519. },
  520. 2 => {
  521. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  522. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  523. }
  524. let tmp = is.read_int64()?;
  525. self.from_rev_id = tmp;
  526. },
  527. 3 => {
  528. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  529. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  530. }
  531. let tmp = is.read_int64()?;
  532. self.to_rev_id = tmp;
  533. },
  534. _ => {
  535. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  536. },
  537. };
  538. }
  539. ::std::result::Result::Ok(())
  540. }
  541. // Compute sizes of nested messages
  542. #[allow(unused_variables)]
  543. fn compute_size(&self) -> u32 {
  544. let mut my_size = 0;
  545. if !self.doc_id.is_empty() {
  546. my_size += ::protobuf::rt::string_size(1, &self.doc_id);
  547. }
  548. if self.from_rev_id != 0 {
  549. my_size += ::protobuf::rt::value_size(2, self.from_rev_id, ::protobuf::wire_format::WireTypeVarint);
  550. }
  551. if self.to_rev_id != 0 {
  552. my_size += ::protobuf::rt::value_size(3, self.to_rev_id, ::protobuf::wire_format::WireTypeVarint);
  553. }
  554. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  555. self.cached_size.set(my_size);
  556. my_size
  557. }
  558. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  559. if !self.doc_id.is_empty() {
  560. os.write_string(1, &self.doc_id)?;
  561. }
  562. if self.from_rev_id != 0 {
  563. os.write_int64(2, self.from_rev_id)?;
  564. }
  565. if self.to_rev_id != 0 {
  566. os.write_int64(3, self.to_rev_id)?;
  567. }
  568. os.write_unknown_fields(self.get_unknown_fields())?;
  569. ::std::result::Result::Ok(())
  570. }
  571. fn get_cached_size(&self) -> u32 {
  572. self.cached_size.get()
  573. }
  574. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  575. &self.unknown_fields
  576. }
  577. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  578. &mut self.unknown_fields
  579. }
  580. fn as_any(&self) -> &dyn (::std::any::Any) {
  581. self as &dyn (::std::any::Any)
  582. }
  583. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  584. self as &mut dyn (::std::any::Any)
  585. }
  586. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  587. self
  588. }
  589. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  590. Self::descriptor_static()
  591. }
  592. fn new() -> RevisionRange {
  593. RevisionRange::new()
  594. }
  595. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  596. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  597. descriptor.get(|| {
  598. let mut fields = ::std::vec::Vec::new();
  599. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  600. "doc_id",
  601. |m: &RevisionRange| { &m.doc_id },
  602. |m: &mut RevisionRange| { &mut m.doc_id },
  603. ));
  604. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  605. "from_rev_id",
  606. |m: &RevisionRange| { &m.from_rev_id },
  607. |m: &mut RevisionRange| { &mut m.from_rev_id },
  608. ));
  609. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  610. "to_rev_id",
  611. |m: &RevisionRange| { &m.to_rev_id },
  612. |m: &mut RevisionRange| { &mut m.to_rev_id },
  613. ));
  614. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RevisionRange>(
  615. "RevisionRange",
  616. fields,
  617. file_descriptor_proto()
  618. )
  619. })
  620. }
  621. fn default_instance() -> &'static RevisionRange {
  622. static instance: ::protobuf::rt::LazyV2<RevisionRange> = ::protobuf::rt::LazyV2::INIT;
  623. instance.get(RevisionRange::new)
  624. }
  625. }
  626. impl ::protobuf::Clear for RevisionRange {
  627. fn clear(&mut self) {
  628. self.doc_id.clear();
  629. self.from_rev_id = 0;
  630. self.to_rev_id = 0;
  631. self.unknown_fields.clear();
  632. }
  633. }
  634. impl ::std::fmt::Debug for RevisionRange {
  635. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  636. ::protobuf::text_format::fmt(self, f)
  637. }
  638. }
  639. impl ::protobuf::reflect::ProtobufValue for RevisionRange {
  640. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  641. ::protobuf::reflect::ReflectValueRef::Message(self)
  642. }
  643. }
  644. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  645. pub enum RevType {
  646. Local = 0,
  647. Remote = 1,
  648. }
  649. impl ::protobuf::ProtobufEnum for RevType {
  650. fn value(&self) -> i32 {
  651. *self as i32
  652. }
  653. fn from_i32(value: i32) -> ::std::option::Option<RevType> {
  654. match value {
  655. 0 => ::std::option::Option::Some(RevType::Local),
  656. 1 => ::std::option::Option::Some(RevType::Remote),
  657. _ => ::std::option::Option::None
  658. }
  659. }
  660. fn values() -> &'static [Self] {
  661. static values: &'static [RevType] = &[
  662. RevType::Local,
  663. RevType::Remote,
  664. ];
  665. values
  666. }
  667. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  668. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  669. descriptor.get(|| {
  670. ::protobuf::reflect::EnumDescriptor::new_pb_name::<RevType>("RevType", file_descriptor_proto())
  671. })
  672. }
  673. }
  674. impl ::std::marker::Copy for RevType {
  675. }
  676. impl ::std::default::Default for RevType {
  677. fn default() -> Self {
  678. RevType::Local
  679. }
  680. }
  681. impl ::protobuf::reflect::ProtobufValue for RevType {
  682. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  683. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  684. }
  685. }
  686. static file_descriptor_proto_data: &'static [u8] = b"\
  687. \n\x0erevision.proto\"\x1d\n\x05RevId\x12\x14\n\x05value\x18\x01\x20\x01\
  688. (\x03R\x05value\"\xa3\x01\n\x08Revision\x12\x1e\n\x0bbase_rev_id\x18\x01\
  689. \x20\x01(\x03R\tbaseRevId\x12\x15\n\x06rev_id\x18\x02\x20\x01(\x03R\x05r\
  690. evId\x12\x1d\n\ndelta_data\x18\x03\x20\x01(\x0cR\tdeltaData\x12\x10\n\
  691. \x03md5\x18\x04\x20\x01(\tR\x03md5\x12\x15\n\x06doc_id\x18\x05\x20\x01(\
  692. \tR\x05docId\x12\x18\n\x02ty\x18\x06\x20\x01(\x0e2\x08.RevTypeR\x02ty\"b\
  693. \n\rRevisionRange\x12\x15\n\x06doc_id\x18\x01\x20\x01(\tR\x05docId\x12\
  694. \x1e\n\x0bfrom_rev_id\x18\x02\x20\x01(\x03R\tfromRevId\x12\x1a\n\tto_rev\
  695. _id\x18\x03\x20\x01(\x03R\x07toRevId*\x20\n\x07RevType\x12\t\n\x05Local\
  696. \x10\0\x12\n\n\x06Remote\x10\x01J\xea\x05\n\x06\x12\x04\0\0\x15\x01\n\
  697. \x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\
  698. \n\x03\x04\0\x01\x12\x03\x02\x08\r\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\
  699. \x04\x14\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\t\n\x0c\n\x05\x04\0\
  700. \x02\0\x01\x12\x03\x03\n\x0f\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x12\
  701. \x13\n\n\n\x02\x04\x01\x12\x04\x05\0\x0c\x01\n\n\n\x03\x04\x01\x01\x12\
  702. \x03\x05\x08\x10\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x06\x04\x1a\n\x0c\n\
  703. \x05\x04\x01\x02\0\x05\x12\x03\x06\x04\t\n\x0c\n\x05\x04\x01\x02\0\x01\
  704. \x12\x03\x06\n\x15\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x06\x18\x19\n\
  705. \x0b\n\x04\x04\x01\x02\x01\x12\x03\x07\x04\x15\n\x0c\n\x05\x04\x01\x02\
  706. \x01\x05\x12\x03\x07\x04\t\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x07\n\
  707. \x10\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x07\x13\x14\n\x0b\n\x04\x04\
  708. \x01\x02\x02\x12\x03\x08\x04\x19\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\
  709. \x08\x04\t\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x08\n\x14\n\x0c\n\x05\
  710. \x04\x01\x02\x02\x03\x12\x03\x08\x17\x18\n\x0b\n\x04\x04\x01\x02\x03\x12\
  711. \x03\t\x04\x13\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03\t\x04\n\n\x0c\n\
  712. \x05\x04\x01\x02\x03\x01\x12\x03\t\x0b\x0e\n\x0c\n\x05\x04\x01\x02\x03\
  713. \x03\x12\x03\t\x11\x12\n\x0b\n\x04\x04\x01\x02\x04\x12\x03\n\x04\x16\n\
  714. \x0c\n\x05\x04\x01\x02\x04\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\x01\x02\
  715. \x04\x01\x12\x03\n\x0b\x11\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\x03\n\x14\
  716. \x15\n\x0b\n\x04\x04\x01\x02\x05\x12\x03\x0b\x04\x13\n\x0c\n\x05\x04\x01\
  717. \x02\x05\x06\x12\x03\x0b\x04\x0b\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x03\
  718. \x0b\x0c\x0e\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03\x0b\x11\x12\n\n\n\
  719. \x02\x04\x02\x12\x04\r\0\x11\x01\n\n\n\x03\x04\x02\x01\x12\x03\r\x08\x15\
  720. \n\x0b\n\x04\x04\x02\x02\0\x12\x03\x0e\x04\x16\n\x0c\n\x05\x04\x02\x02\0\
  721. \x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0e\x0b\x11\
  722. \n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x0e\x14\x15\n\x0b\n\x04\x04\x02\
  723. \x02\x01\x12\x03\x0f\x04\x1a\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x0f\
  724. \x04\t\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0f\n\x15\n\x0c\n\x05\x04\
  725. \x02\x02\x01\x03\x12\x03\x0f\x18\x19\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\
  726. \x10\x04\x18\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x10\x04\t\n\x0c\n\
  727. \x05\x04\x02\x02\x02\x01\x12\x03\x10\n\x13\n\x0c\n\x05\x04\x02\x02\x02\
  728. \x03\x12\x03\x10\x16\x17\n\n\n\x02\x05\0\x12\x04\x12\0\x15\x01\n\n\n\x03\
  729. \x05\0\x01\x12\x03\x12\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\x13\x04\
  730. \x0e\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x13\x04\t\n\x0c\n\x05\x05\0\x02\
  731. \0\x02\x12\x03\x13\x0c\r\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x14\x04\x0f\n\
  732. \x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x14\x04\n\n\x0c\n\x05\x05\0\x02\x01\
  733. \x02\x12\x03\x14\r\x0eb\x06proto3\
  734. ";
  735. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  736. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  737. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  738. }
  739. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  740. file_descriptor_proto_lazy.get(|| {
  741. parse_descriptor_proto()
  742. })
  743. }