revision.rs 31 KB

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