mercury.rs 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816
  1. // This file is generated by rust-protobuf 2.0.5. Do not edit
  2. // @generated
  3. // https://github.com/Manishearth/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy)]
  6. #![cfg_attr(rustfmt, rustfmt_skip)]
  7. #![allow(box_pointers)]
  8. #![allow(dead_code)]
  9. #![allow(missing_docs)]
  10. #![allow(non_camel_case_types)]
  11. #![allow(non_snake_case)]
  12. #![allow(non_upper_case_globals)]
  13. #![allow(trivial_casts)]
  14. #![allow(unsafe_code)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. use protobuf::Message as Message_imported_for_functions;
  18. use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
  19. #[derive(PartialEq,Clone,Default)]
  20. pub struct MercuryMultiGetRequest {
  21. // message fields
  22. request: ::protobuf::RepeatedField<MercuryRequest>,
  23. // special fields
  24. unknown_fields: ::protobuf::UnknownFields,
  25. cached_size: ::protobuf::CachedSize,
  26. }
  27. impl MercuryMultiGetRequest {
  28. pub fn new() -> MercuryMultiGetRequest {
  29. ::std::default::Default::default()
  30. }
  31. // repeated .MercuryRequest request = 1;
  32. pub fn clear_request(&mut self) {
  33. self.request.clear();
  34. }
  35. // Param is passed by value, moved
  36. pub fn set_request(&mut self, v: ::protobuf::RepeatedField<MercuryRequest>) {
  37. self.request = v;
  38. }
  39. // Mutable pointer to the field.
  40. pub fn mut_request(&mut self) -> &mut ::protobuf::RepeatedField<MercuryRequest> {
  41. &mut self.request
  42. }
  43. // Take field
  44. pub fn take_request(&mut self) -> ::protobuf::RepeatedField<MercuryRequest> {
  45. ::std::mem::replace(&mut self.request, ::protobuf::RepeatedField::new())
  46. }
  47. pub fn get_request(&self) -> &[MercuryRequest] {
  48. &self.request
  49. }
  50. }
  51. impl ::protobuf::Message for MercuryMultiGetRequest {
  52. fn is_initialized(&self) -> bool {
  53. for v in &self.request {
  54. if !v.is_initialized() {
  55. return false;
  56. }
  57. };
  58. true
  59. }
  60. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  61. while !is.eof()? {
  62. let (field_number, wire_type) = is.read_tag_unpack()?;
  63. match field_number {
  64. 1 => {
  65. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.request)?;
  66. },
  67. _ => {
  68. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  69. },
  70. };
  71. }
  72. ::std::result::Result::Ok(())
  73. }
  74. // Compute sizes of nested messages
  75. #[allow(unused_variables)]
  76. fn compute_size(&self) -> u32 {
  77. let mut my_size = 0;
  78. for value in &self.request {
  79. let len = value.compute_size();
  80. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  81. };
  82. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  83. self.cached_size.set(my_size);
  84. my_size
  85. }
  86. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  87. for v in &self.request {
  88. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  89. os.write_raw_varint32(v.get_cached_size())?;
  90. v.write_to_with_cached_sizes(os)?;
  91. };
  92. os.write_unknown_fields(self.get_unknown_fields())?;
  93. ::std::result::Result::Ok(())
  94. }
  95. fn get_cached_size(&self) -> u32 {
  96. self.cached_size.get()
  97. }
  98. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  99. &self.unknown_fields
  100. }
  101. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  102. &mut self.unknown_fields
  103. }
  104. fn as_any(&self) -> &::std::any::Any {
  105. self as &::std::any::Any
  106. }
  107. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  108. self as &mut ::std::any::Any
  109. }
  110. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  111. self
  112. }
  113. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  114. Self::descriptor_static()
  115. }
  116. fn new() -> MercuryMultiGetRequest {
  117. MercuryMultiGetRequest::new()
  118. }
  119. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  120. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  121. lock: ::protobuf::lazy::ONCE_INIT,
  122. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  123. };
  124. unsafe {
  125. descriptor.get(|| {
  126. let mut fields = ::std::vec::Vec::new();
  127. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<MercuryRequest>>(
  128. "request",
  129. |m: &MercuryMultiGetRequest| { &m.request },
  130. |m: &mut MercuryMultiGetRequest| { &mut m.request },
  131. ));
  132. ::protobuf::reflect::MessageDescriptor::new::<MercuryMultiGetRequest>(
  133. "MercuryMultiGetRequest",
  134. fields,
  135. file_descriptor_proto()
  136. )
  137. })
  138. }
  139. }
  140. fn default_instance() -> &'static MercuryMultiGetRequest {
  141. static mut instance: ::protobuf::lazy::Lazy<MercuryMultiGetRequest> = ::protobuf::lazy::Lazy {
  142. lock: ::protobuf::lazy::ONCE_INIT,
  143. ptr: 0 as *const MercuryMultiGetRequest,
  144. };
  145. unsafe {
  146. instance.get(MercuryMultiGetRequest::new)
  147. }
  148. }
  149. }
  150. impl ::protobuf::Clear for MercuryMultiGetRequest {
  151. fn clear(&mut self) {
  152. self.clear_request();
  153. self.unknown_fields.clear();
  154. }
  155. }
  156. impl ::std::fmt::Debug for MercuryMultiGetRequest {
  157. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  158. ::protobuf::text_format::fmt(self, f)
  159. }
  160. }
  161. impl ::protobuf::reflect::ProtobufValue for MercuryMultiGetRequest {
  162. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  163. ::protobuf::reflect::ProtobufValueRef::Message(self)
  164. }
  165. }
  166. #[derive(PartialEq,Clone,Default)]
  167. pub struct MercuryMultiGetReply {
  168. // message fields
  169. reply: ::protobuf::RepeatedField<MercuryReply>,
  170. // special fields
  171. unknown_fields: ::protobuf::UnknownFields,
  172. cached_size: ::protobuf::CachedSize,
  173. }
  174. impl MercuryMultiGetReply {
  175. pub fn new() -> MercuryMultiGetReply {
  176. ::std::default::Default::default()
  177. }
  178. // repeated .MercuryReply reply = 1;
  179. pub fn clear_reply(&mut self) {
  180. self.reply.clear();
  181. }
  182. // Param is passed by value, moved
  183. pub fn set_reply(&mut self, v: ::protobuf::RepeatedField<MercuryReply>) {
  184. self.reply = v;
  185. }
  186. // Mutable pointer to the field.
  187. pub fn mut_reply(&mut self) -> &mut ::protobuf::RepeatedField<MercuryReply> {
  188. &mut self.reply
  189. }
  190. // Take field
  191. pub fn take_reply(&mut self) -> ::protobuf::RepeatedField<MercuryReply> {
  192. ::std::mem::replace(&mut self.reply, ::protobuf::RepeatedField::new())
  193. }
  194. pub fn get_reply(&self) -> &[MercuryReply] {
  195. &self.reply
  196. }
  197. }
  198. impl ::protobuf::Message for MercuryMultiGetReply {
  199. fn is_initialized(&self) -> bool {
  200. for v in &self.reply {
  201. if !v.is_initialized() {
  202. return false;
  203. }
  204. };
  205. true
  206. }
  207. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  208. while !is.eof()? {
  209. let (field_number, wire_type) = is.read_tag_unpack()?;
  210. match field_number {
  211. 1 => {
  212. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.reply)?;
  213. },
  214. _ => {
  215. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  216. },
  217. };
  218. }
  219. ::std::result::Result::Ok(())
  220. }
  221. // Compute sizes of nested messages
  222. #[allow(unused_variables)]
  223. fn compute_size(&self) -> u32 {
  224. let mut my_size = 0;
  225. for value in &self.reply {
  226. let len = value.compute_size();
  227. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  228. };
  229. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  230. self.cached_size.set(my_size);
  231. my_size
  232. }
  233. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  234. for v in &self.reply {
  235. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  236. os.write_raw_varint32(v.get_cached_size())?;
  237. v.write_to_with_cached_sizes(os)?;
  238. };
  239. os.write_unknown_fields(self.get_unknown_fields())?;
  240. ::std::result::Result::Ok(())
  241. }
  242. fn get_cached_size(&self) -> u32 {
  243. self.cached_size.get()
  244. }
  245. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  246. &self.unknown_fields
  247. }
  248. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  249. &mut self.unknown_fields
  250. }
  251. fn as_any(&self) -> &::std::any::Any {
  252. self as &::std::any::Any
  253. }
  254. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  255. self as &mut ::std::any::Any
  256. }
  257. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  258. self
  259. }
  260. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  261. Self::descriptor_static()
  262. }
  263. fn new() -> MercuryMultiGetReply {
  264. MercuryMultiGetReply::new()
  265. }
  266. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  267. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  268. lock: ::protobuf::lazy::ONCE_INIT,
  269. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  270. };
  271. unsafe {
  272. descriptor.get(|| {
  273. let mut fields = ::std::vec::Vec::new();
  274. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<MercuryReply>>(
  275. "reply",
  276. |m: &MercuryMultiGetReply| { &m.reply },
  277. |m: &mut MercuryMultiGetReply| { &mut m.reply },
  278. ));
  279. ::protobuf::reflect::MessageDescriptor::new::<MercuryMultiGetReply>(
  280. "MercuryMultiGetReply",
  281. fields,
  282. file_descriptor_proto()
  283. )
  284. })
  285. }
  286. }
  287. fn default_instance() -> &'static MercuryMultiGetReply {
  288. static mut instance: ::protobuf::lazy::Lazy<MercuryMultiGetReply> = ::protobuf::lazy::Lazy {
  289. lock: ::protobuf::lazy::ONCE_INIT,
  290. ptr: 0 as *const MercuryMultiGetReply,
  291. };
  292. unsafe {
  293. instance.get(MercuryMultiGetReply::new)
  294. }
  295. }
  296. }
  297. impl ::protobuf::Clear for MercuryMultiGetReply {
  298. fn clear(&mut self) {
  299. self.clear_reply();
  300. self.unknown_fields.clear();
  301. }
  302. }
  303. impl ::std::fmt::Debug for MercuryMultiGetReply {
  304. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  305. ::protobuf::text_format::fmt(self, f)
  306. }
  307. }
  308. impl ::protobuf::reflect::ProtobufValue for MercuryMultiGetReply {
  309. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  310. ::protobuf::reflect::ProtobufValueRef::Message(self)
  311. }
  312. }
  313. #[derive(PartialEq,Clone,Default)]
  314. pub struct MercuryRequest {
  315. // message fields
  316. uri: ::protobuf::SingularField<::std::string::String>,
  317. content_type: ::protobuf::SingularField<::std::string::String>,
  318. body: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  319. etag: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  320. // special fields
  321. unknown_fields: ::protobuf::UnknownFields,
  322. cached_size: ::protobuf::CachedSize,
  323. }
  324. impl MercuryRequest {
  325. pub fn new() -> MercuryRequest {
  326. ::std::default::Default::default()
  327. }
  328. // optional string uri = 1;
  329. pub fn clear_uri(&mut self) {
  330. self.uri.clear();
  331. }
  332. pub fn has_uri(&self) -> bool {
  333. self.uri.is_some()
  334. }
  335. // Param is passed by value, moved
  336. pub fn set_uri(&mut self, v: ::std::string::String) {
  337. self.uri = ::protobuf::SingularField::some(v);
  338. }
  339. // Mutable pointer to the field.
  340. // If field is not initialized, it is initialized with default value first.
  341. pub fn mut_uri(&mut self) -> &mut ::std::string::String {
  342. if self.uri.is_none() {
  343. self.uri.set_default();
  344. }
  345. self.uri.as_mut().unwrap()
  346. }
  347. // Take field
  348. pub fn take_uri(&mut self) -> ::std::string::String {
  349. self.uri.take().unwrap_or_else(|| ::std::string::String::new())
  350. }
  351. pub fn get_uri(&self) -> &str {
  352. match self.uri.as_ref() {
  353. Some(v) => &v,
  354. None => "",
  355. }
  356. }
  357. // optional string content_type = 2;
  358. pub fn clear_content_type(&mut self) {
  359. self.content_type.clear();
  360. }
  361. pub fn has_content_type(&self) -> bool {
  362. self.content_type.is_some()
  363. }
  364. // Param is passed by value, moved
  365. pub fn set_content_type(&mut self, v: ::std::string::String) {
  366. self.content_type = ::protobuf::SingularField::some(v);
  367. }
  368. // Mutable pointer to the field.
  369. // If field is not initialized, it is initialized with default value first.
  370. pub fn mut_content_type(&mut self) -> &mut ::std::string::String {
  371. if self.content_type.is_none() {
  372. self.content_type.set_default();
  373. }
  374. self.content_type.as_mut().unwrap()
  375. }
  376. // Take field
  377. pub fn take_content_type(&mut self) -> ::std::string::String {
  378. self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
  379. }
  380. pub fn get_content_type(&self) -> &str {
  381. match self.content_type.as_ref() {
  382. Some(v) => &v,
  383. None => "",
  384. }
  385. }
  386. // optional bytes body = 3;
  387. pub fn clear_body(&mut self) {
  388. self.body.clear();
  389. }
  390. pub fn has_body(&self) -> bool {
  391. self.body.is_some()
  392. }
  393. // Param is passed by value, moved
  394. pub fn set_body(&mut self, v: ::std::vec::Vec<u8>) {
  395. self.body = ::protobuf::SingularField::some(v);
  396. }
  397. // Mutable pointer to the field.
  398. // If field is not initialized, it is initialized with default value first.
  399. pub fn mut_body(&mut self) -> &mut ::std::vec::Vec<u8> {
  400. if self.body.is_none() {
  401. self.body.set_default();
  402. }
  403. self.body.as_mut().unwrap()
  404. }
  405. // Take field
  406. pub fn take_body(&mut self) -> ::std::vec::Vec<u8> {
  407. self.body.take().unwrap_or_else(|| ::std::vec::Vec::new())
  408. }
  409. pub fn get_body(&self) -> &[u8] {
  410. match self.body.as_ref() {
  411. Some(v) => &v,
  412. None => &[],
  413. }
  414. }
  415. // optional bytes etag = 4;
  416. pub fn clear_etag(&mut self) {
  417. self.etag.clear();
  418. }
  419. pub fn has_etag(&self) -> bool {
  420. self.etag.is_some()
  421. }
  422. // Param is passed by value, moved
  423. pub fn set_etag(&mut self, v: ::std::vec::Vec<u8>) {
  424. self.etag = ::protobuf::SingularField::some(v);
  425. }
  426. // Mutable pointer to the field.
  427. // If field is not initialized, it is initialized with default value first.
  428. pub fn mut_etag(&mut self) -> &mut ::std::vec::Vec<u8> {
  429. if self.etag.is_none() {
  430. self.etag.set_default();
  431. }
  432. self.etag.as_mut().unwrap()
  433. }
  434. // Take field
  435. pub fn take_etag(&mut self) -> ::std::vec::Vec<u8> {
  436. self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new())
  437. }
  438. pub fn get_etag(&self) -> &[u8] {
  439. match self.etag.as_ref() {
  440. Some(v) => &v,
  441. None => &[],
  442. }
  443. }
  444. }
  445. impl ::protobuf::Message for MercuryRequest {
  446. fn is_initialized(&self) -> bool {
  447. true
  448. }
  449. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  450. while !is.eof()? {
  451. let (field_number, wire_type) = is.read_tag_unpack()?;
  452. match field_number {
  453. 1 => {
  454. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?;
  455. },
  456. 2 => {
  457. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content_type)?;
  458. },
  459. 3 => {
  460. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.body)?;
  461. },
  462. 4 => {
  463. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.etag)?;
  464. },
  465. _ => {
  466. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  467. },
  468. };
  469. }
  470. ::std::result::Result::Ok(())
  471. }
  472. // Compute sizes of nested messages
  473. #[allow(unused_variables)]
  474. fn compute_size(&self) -> u32 {
  475. let mut my_size = 0;
  476. if let Some(ref v) = self.uri.as_ref() {
  477. my_size += ::protobuf::rt::string_size(1, &v);
  478. }
  479. if let Some(ref v) = self.content_type.as_ref() {
  480. my_size += ::protobuf::rt::string_size(2, &v);
  481. }
  482. if let Some(ref v) = self.body.as_ref() {
  483. my_size += ::protobuf::rt::bytes_size(3, &v);
  484. }
  485. if let Some(ref v) = self.etag.as_ref() {
  486. my_size += ::protobuf::rt::bytes_size(4, &v);
  487. }
  488. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  489. self.cached_size.set(my_size);
  490. my_size
  491. }
  492. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  493. if let Some(ref v) = self.uri.as_ref() {
  494. os.write_string(1, &v)?;
  495. }
  496. if let Some(ref v) = self.content_type.as_ref() {
  497. os.write_string(2, &v)?;
  498. }
  499. if let Some(ref v) = self.body.as_ref() {
  500. os.write_bytes(3, &v)?;
  501. }
  502. if let Some(ref v) = self.etag.as_ref() {
  503. os.write_bytes(4, &v)?;
  504. }
  505. os.write_unknown_fields(self.get_unknown_fields())?;
  506. ::std::result::Result::Ok(())
  507. }
  508. fn get_cached_size(&self) -> u32 {
  509. self.cached_size.get()
  510. }
  511. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  512. &self.unknown_fields
  513. }
  514. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  515. &mut self.unknown_fields
  516. }
  517. fn as_any(&self) -> &::std::any::Any {
  518. self as &::std::any::Any
  519. }
  520. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  521. self as &mut ::std::any::Any
  522. }
  523. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  524. self
  525. }
  526. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  527. Self::descriptor_static()
  528. }
  529. fn new() -> MercuryRequest {
  530. MercuryRequest::new()
  531. }
  532. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  533. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  534. lock: ::protobuf::lazy::ONCE_INIT,
  535. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  536. };
  537. unsafe {
  538. descriptor.get(|| {
  539. let mut fields = ::std::vec::Vec::new();
  540. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  541. "uri",
  542. |m: &MercuryRequest| { &m.uri },
  543. |m: &mut MercuryRequest| { &mut m.uri },
  544. ));
  545. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  546. "content_type",
  547. |m: &MercuryRequest| { &m.content_type },
  548. |m: &mut MercuryRequest| { &mut m.content_type },
  549. ));
  550. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  551. "body",
  552. |m: &MercuryRequest| { &m.body },
  553. |m: &mut MercuryRequest| { &mut m.body },
  554. ));
  555. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  556. "etag",
  557. |m: &MercuryRequest| { &m.etag },
  558. |m: &mut MercuryRequest| { &mut m.etag },
  559. ));
  560. ::protobuf::reflect::MessageDescriptor::new::<MercuryRequest>(
  561. "MercuryRequest",
  562. fields,
  563. file_descriptor_proto()
  564. )
  565. })
  566. }
  567. }
  568. fn default_instance() -> &'static MercuryRequest {
  569. static mut instance: ::protobuf::lazy::Lazy<MercuryRequest> = ::protobuf::lazy::Lazy {
  570. lock: ::protobuf::lazy::ONCE_INIT,
  571. ptr: 0 as *const MercuryRequest,
  572. };
  573. unsafe {
  574. instance.get(MercuryRequest::new)
  575. }
  576. }
  577. }
  578. impl ::protobuf::Clear for MercuryRequest {
  579. fn clear(&mut self) {
  580. self.clear_uri();
  581. self.clear_content_type();
  582. self.clear_body();
  583. self.clear_etag();
  584. self.unknown_fields.clear();
  585. }
  586. }
  587. impl ::std::fmt::Debug for MercuryRequest {
  588. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  589. ::protobuf::text_format::fmt(self, f)
  590. }
  591. }
  592. impl ::protobuf::reflect::ProtobufValue for MercuryRequest {
  593. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  594. ::protobuf::reflect::ProtobufValueRef::Message(self)
  595. }
  596. }
  597. #[derive(PartialEq,Clone,Default)]
  598. pub struct MercuryReply {
  599. // message fields
  600. status_code: ::std::option::Option<i32>,
  601. status_message: ::protobuf::SingularField<::std::string::String>,
  602. cache_policy: ::std::option::Option<MercuryReply_CachePolicy>,
  603. ttl: ::std::option::Option<i32>,
  604. etag: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  605. content_type: ::protobuf::SingularField<::std::string::String>,
  606. body: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  607. // special fields
  608. unknown_fields: ::protobuf::UnknownFields,
  609. cached_size: ::protobuf::CachedSize,
  610. }
  611. impl MercuryReply {
  612. pub fn new() -> MercuryReply {
  613. ::std::default::Default::default()
  614. }
  615. // optional sint32 status_code = 1;
  616. pub fn clear_status_code(&mut self) {
  617. self.status_code = ::std::option::Option::None;
  618. }
  619. pub fn has_status_code(&self) -> bool {
  620. self.status_code.is_some()
  621. }
  622. // Param is passed by value, moved
  623. pub fn set_status_code(&mut self, v: i32) {
  624. self.status_code = ::std::option::Option::Some(v);
  625. }
  626. pub fn get_status_code(&self) -> i32 {
  627. self.status_code.unwrap_or(0)
  628. }
  629. // optional string status_message = 2;
  630. pub fn clear_status_message(&mut self) {
  631. self.status_message.clear();
  632. }
  633. pub fn has_status_message(&self) -> bool {
  634. self.status_message.is_some()
  635. }
  636. // Param is passed by value, moved
  637. pub fn set_status_message(&mut self, v: ::std::string::String) {
  638. self.status_message = ::protobuf::SingularField::some(v);
  639. }
  640. // Mutable pointer to the field.
  641. // If field is not initialized, it is initialized with default value first.
  642. pub fn mut_status_message(&mut self) -> &mut ::std::string::String {
  643. if self.status_message.is_none() {
  644. self.status_message.set_default();
  645. }
  646. self.status_message.as_mut().unwrap()
  647. }
  648. // Take field
  649. pub fn take_status_message(&mut self) -> ::std::string::String {
  650. self.status_message.take().unwrap_or_else(|| ::std::string::String::new())
  651. }
  652. pub fn get_status_message(&self) -> &str {
  653. match self.status_message.as_ref() {
  654. Some(v) => &v,
  655. None => "",
  656. }
  657. }
  658. // optional .MercuryReply.CachePolicy cache_policy = 3;
  659. pub fn clear_cache_policy(&mut self) {
  660. self.cache_policy = ::std::option::Option::None;
  661. }
  662. pub fn has_cache_policy(&self) -> bool {
  663. self.cache_policy.is_some()
  664. }
  665. // Param is passed by value, moved
  666. pub fn set_cache_policy(&mut self, v: MercuryReply_CachePolicy) {
  667. self.cache_policy = ::std::option::Option::Some(v);
  668. }
  669. pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy {
  670. self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO)
  671. }
  672. // optional sint32 ttl = 4;
  673. pub fn clear_ttl(&mut self) {
  674. self.ttl = ::std::option::Option::None;
  675. }
  676. pub fn has_ttl(&self) -> bool {
  677. self.ttl.is_some()
  678. }
  679. // Param is passed by value, moved
  680. pub fn set_ttl(&mut self, v: i32) {
  681. self.ttl = ::std::option::Option::Some(v);
  682. }
  683. pub fn get_ttl(&self) -> i32 {
  684. self.ttl.unwrap_or(0)
  685. }
  686. // optional bytes etag = 5;
  687. pub fn clear_etag(&mut self) {
  688. self.etag.clear();
  689. }
  690. pub fn has_etag(&self) -> bool {
  691. self.etag.is_some()
  692. }
  693. // Param is passed by value, moved
  694. pub fn set_etag(&mut self, v: ::std::vec::Vec<u8>) {
  695. self.etag = ::protobuf::SingularField::some(v);
  696. }
  697. // Mutable pointer to the field.
  698. // If field is not initialized, it is initialized with default value first.
  699. pub fn mut_etag(&mut self) -> &mut ::std::vec::Vec<u8> {
  700. if self.etag.is_none() {
  701. self.etag.set_default();
  702. }
  703. self.etag.as_mut().unwrap()
  704. }
  705. // Take field
  706. pub fn take_etag(&mut self) -> ::std::vec::Vec<u8> {
  707. self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new())
  708. }
  709. pub fn get_etag(&self) -> &[u8] {
  710. match self.etag.as_ref() {
  711. Some(v) => &v,
  712. None => &[],
  713. }
  714. }
  715. // optional string content_type = 6;
  716. pub fn clear_content_type(&mut self) {
  717. self.content_type.clear();
  718. }
  719. pub fn has_content_type(&self) -> bool {
  720. self.content_type.is_some()
  721. }
  722. // Param is passed by value, moved
  723. pub fn set_content_type(&mut self, v: ::std::string::String) {
  724. self.content_type = ::protobuf::SingularField::some(v);
  725. }
  726. // Mutable pointer to the field.
  727. // If field is not initialized, it is initialized with default value first.
  728. pub fn mut_content_type(&mut self) -> &mut ::std::string::String {
  729. if self.content_type.is_none() {
  730. self.content_type.set_default();
  731. }
  732. self.content_type.as_mut().unwrap()
  733. }
  734. // Take field
  735. pub fn take_content_type(&mut self) -> ::std::string::String {
  736. self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
  737. }
  738. pub fn get_content_type(&self) -> &str {
  739. match self.content_type.as_ref() {
  740. Some(v) => &v,
  741. None => "",
  742. }
  743. }
  744. // optional bytes body = 7;
  745. pub fn clear_body(&mut self) {
  746. self.body.clear();
  747. }
  748. pub fn has_body(&self) -> bool {
  749. self.body.is_some()
  750. }
  751. // Param is passed by value, moved
  752. pub fn set_body(&mut self, v: ::std::vec::Vec<u8>) {
  753. self.body = ::protobuf::SingularField::some(v);
  754. }
  755. // Mutable pointer to the field.
  756. // If field is not initialized, it is initialized with default value first.
  757. pub fn mut_body(&mut self) -> &mut ::std::vec::Vec<u8> {
  758. if self.body.is_none() {
  759. self.body.set_default();
  760. }
  761. self.body.as_mut().unwrap()
  762. }
  763. // Take field
  764. pub fn take_body(&mut self) -> ::std::vec::Vec<u8> {
  765. self.body.take().unwrap_or_else(|| ::std::vec::Vec::new())
  766. }
  767. pub fn get_body(&self) -> &[u8] {
  768. match self.body.as_ref() {
  769. Some(v) => &v,
  770. None => &[],
  771. }
  772. }
  773. }
  774. impl ::protobuf::Message for MercuryReply {
  775. fn is_initialized(&self) -> bool {
  776. true
  777. }
  778. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  779. while !is.eof()? {
  780. let (field_number, wire_type) = is.read_tag_unpack()?;
  781. match field_number {
  782. 1 => {
  783. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  784. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  785. }
  786. let tmp = is.read_sint32()?;
  787. self.status_code = ::std::option::Option::Some(tmp);
  788. },
  789. 2 => {
  790. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.status_message)?;
  791. },
  792. 3 => {
  793. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.cache_policy, 3, &mut self.unknown_fields)?
  794. },
  795. 4 => {
  796. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  797. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  798. }
  799. let tmp = is.read_sint32()?;
  800. self.ttl = ::std::option::Option::Some(tmp);
  801. },
  802. 5 => {
  803. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.etag)?;
  804. },
  805. 6 => {
  806. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content_type)?;
  807. },
  808. 7 => {
  809. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.body)?;
  810. },
  811. _ => {
  812. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  813. },
  814. };
  815. }
  816. ::std::result::Result::Ok(())
  817. }
  818. // Compute sizes of nested messages
  819. #[allow(unused_variables)]
  820. fn compute_size(&self) -> u32 {
  821. let mut my_size = 0;
  822. if let Some(v) = self.status_code {
  823. my_size += ::protobuf::rt::value_varint_zigzag_size(1, v);
  824. }
  825. if let Some(ref v) = self.status_message.as_ref() {
  826. my_size += ::protobuf::rt::string_size(2, &v);
  827. }
  828. if let Some(v) = self.cache_policy {
  829. my_size += ::protobuf::rt::enum_size(3, v);
  830. }
  831. if let Some(v) = self.ttl {
  832. my_size += ::protobuf::rt::value_varint_zigzag_size(4, v);
  833. }
  834. if let Some(ref v) = self.etag.as_ref() {
  835. my_size += ::protobuf::rt::bytes_size(5, &v);
  836. }
  837. if let Some(ref v) = self.content_type.as_ref() {
  838. my_size += ::protobuf::rt::string_size(6, &v);
  839. }
  840. if let Some(ref v) = self.body.as_ref() {
  841. my_size += ::protobuf::rt::bytes_size(7, &v);
  842. }
  843. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  844. self.cached_size.set(my_size);
  845. my_size
  846. }
  847. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  848. if let Some(v) = self.status_code {
  849. os.write_sint32(1, v)?;
  850. }
  851. if let Some(ref v) = self.status_message.as_ref() {
  852. os.write_string(2, &v)?;
  853. }
  854. if let Some(v) = self.cache_policy {
  855. os.write_enum(3, v.value())?;
  856. }
  857. if let Some(v) = self.ttl {
  858. os.write_sint32(4, v)?;
  859. }
  860. if let Some(ref v) = self.etag.as_ref() {
  861. os.write_bytes(5, &v)?;
  862. }
  863. if let Some(ref v) = self.content_type.as_ref() {
  864. os.write_string(6, &v)?;
  865. }
  866. if let Some(ref v) = self.body.as_ref() {
  867. os.write_bytes(7, &v)?;
  868. }
  869. os.write_unknown_fields(self.get_unknown_fields())?;
  870. ::std::result::Result::Ok(())
  871. }
  872. fn get_cached_size(&self) -> u32 {
  873. self.cached_size.get()
  874. }
  875. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  876. &self.unknown_fields
  877. }
  878. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  879. &mut self.unknown_fields
  880. }
  881. fn as_any(&self) -> &::std::any::Any {
  882. self as &::std::any::Any
  883. }
  884. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  885. self as &mut ::std::any::Any
  886. }
  887. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  888. self
  889. }
  890. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  891. Self::descriptor_static()
  892. }
  893. fn new() -> MercuryReply {
  894. MercuryReply::new()
  895. }
  896. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  897. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  898. lock: ::protobuf::lazy::ONCE_INIT,
  899. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  900. };
  901. unsafe {
  902. descriptor.get(|| {
  903. let mut fields = ::std::vec::Vec::new();
  904. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>(
  905. "status_code",
  906. |m: &MercuryReply| { &m.status_code },
  907. |m: &mut MercuryReply| { &mut m.status_code },
  908. ));
  909. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  910. "status_message",
  911. |m: &MercuryReply| { &m.status_message },
  912. |m: &mut MercuryReply| { &mut m.status_message },
  913. ));
  914. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MercuryReply_CachePolicy>>(
  915. "cache_policy",
  916. |m: &MercuryReply| { &m.cache_policy },
  917. |m: &mut MercuryReply| { &mut m.cache_policy },
  918. ));
  919. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>(
  920. "ttl",
  921. |m: &MercuryReply| { &m.ttl },
  922. |m: &mut MercuryReply| { &mut m.ttl },
  923. ));
  924. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  925. "etag",
  926. |m: &MercuryReply| { &m.etag },
  927. |m: &mut MercuryReply| { &mut m.etag },
  928. ));
  929. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  930. "content_type",
  931. |m: &MercuryReply| { &m.content_type },
  932. |m: &mut MercuryReply| { &mut m.content_type },
  933. ));
  934. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  935. "body",
  936. |m: &MercuryReply| { &m.body },
  937. |m: &mut MercuryReply| { &mut m.body },
  938. ));
  939. ::protobuf::reflect::MessageDescriptor::new::<MercuryReply>(
  940. "MercuryReply",
  941. fields,
  942. file_descriptor_proto()
  943. )
  944. })
  945. }
  946. }
  947. fn default_instance() -> &'static MercuryReply {
  948. static mut instance: ::protobuf::lazy::Lazy<MercuryReply> = ::protobuf::lazy::Lazy {
  949. lock: ::protobuf::lazy::ONCE_INIT,
  950. ptr: 0 as *const MercuryReply,
  951. };
  952. unsafe {
  953. instance.get(MercuryReply::new)
  954. }
  955. }
  956. }
  957. impl ::protobuf::Clear for MercuryReply {
  958. fn clear(&mut self) {
  959. self.clear_status_code();
  960. self.clear_status_message();
  961. self.clear_cache_policy();
  962. self.clear_ttl();
  963. self.clear_etag();
  964. self.clear_content_type();
  965. self.clear_body();
  966. self.unknown_fields.clear();
  967. }
  968. }
  969. impl ::std::fmt::Debug for MercuryReply {
  970. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  971. ::protobuf::text_format::fmt(self, f)
  972. }
  973. }
  974. impl ::protobuf::reflect::ProtobufValue for MercuryReply {
  975. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  976. ::protobuf::reflect::ProtobufValueRef::Message(self)
  977. }
  978. }
  979. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  980. pub enum MercuryReply_CachePolicy {
  981. CACHE_NO = 1,
  982. CACHE_PRIVATE = 2,
  983. CACHE_PUBLIC = 3,
  984. }
  985. impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy {
  986. fn value(&self) -> i32 {
  987. *self as i32
  988. }
  989. fn from_i32(value: i32) -> ::std::option::Option<MercuryReply_CachePolicy> {
  990. match value {
  991. 1 => ::std::option::Option::Some(MercuryReply_CachePolicy::CACHE_NO),
  992. 2 => ::std::option::Option::Some(MercuryReply_CachePolicy::CACHE_PRIVATE),
  993. 3 => ::std::option::Option::Some(MercuryReply_CachePolicy::CACHE_PUBLIC),
  994. _ => ::std::option::Option::None
  995. }
  996. }
  997. fn values() -> &'static [Self] {
  998. static values: &'static [MercuryReply_CachePolicy] = &[
  999. MercuryReply_CachePolicy::CACHE_NO,
  1000. MercuryReply_CachePolicy::CACHE_PRIVATE,
  1001. MercuryReply_CachePolicy::CACHE_PUBLIC,
  1002. ];
  1003. values
  1004. }
  1005. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  1006. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  1007. lock: ::protobuf::lazy::ONCE_INIT,
  1008. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  1009. };
  1010. unsafe {
  1011. descriptor.get(|| {
  1012. ::protobuf::reflect::EnumDescriptor::new("MercuryReply_CachePolicy", file_descriptor_proto())
  1013. })
  1014. }
  1015. }
  1016. }
  1017. impl ::std::marker::Copy for MercuryReply_CachePolicy {
  1018. }
  1019. impl ::protobuf::reflect::ProtobufValue for MercuryReply_CachePolicy {
  1020. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1021. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  1022. }
  1023. }
  1024. #[derive(PartialEq,Clone,Default)]
  1025. pub struct Header {
  1026. // message fields
  1027. uri: ::protobuf::SingularField<::std::string::String>,
  1028. content_type: ::protobuf::SingularField<::std::string::String>,
  1029. method: ::protobuf::SingularField<::std::string::String>,
  1030. status_code: ::std::option::Option<i32>,
  1031. user_fields: ::protobuf::RepeatedField<UserField>,
  1032. // special fields
  1033. unknown_fields: ::protobuf::UnknownFields,
  1034. cached_size: ::protobuf::CachedSize,
  1035. }
  1036. impl Header {
  1037. pub fn new() -> Header {
  1038. ::std::default::Default::default()
  1039. }
  1040. // optional string uri = 1;
  1041. pub fn clear_uri(&mut self) {
  1042. self.uri.clear();
  1043. }
  1044. pub fn has_uri(&self) -> bool {
  1045. self.uri.is_some()
  1046. }
  1047. // Param is passed by value, moved
  1048. pub fn set_uri(&mut self, v: ::std::string::String) {
  1049. self.uri = ::protobuf::SingularField::some(v);
  1050. }
  1051. // Mutable pointer to the field.
  1052. // If field is not initialized, it is initialized with default value first.
  1053. pub fn mut_uri(&mut self) -> &mut ::std::string::String {
  1054. if self.uri.is_none() {
  1055. self.uri.set_default();
  1056. }
  1057. self.uri.as_mut().unwrap()
  1058. }
  1059. // Take field
  1060. pub fn take_uri(&mut self) -> ::std::string::String {
  1061. self.uri.take().unwrap_or_else(|| ::std::string::String::new())
  1062. }
  1063. pub fn get_uri(&self) -> &str {
  1064. match self.uri.as_ref() {
  1065. Some(v) => &v,
  1066. None => "",
  1067. }
  1068. }
  1069. // optional string content_type = 2;
  1070. pub fn clear_content_type(&mut self) {
  1071. self.content_type.clear();
  1072. }
  1073. pub fn has_content_type(&self) -> bool {
  1074. self.content_type.is_some()
  1075. }
  1076. // Param is passed by value, moved
  1077. pub fn set_content_type(&mut self, v: ::std::string::String) {
  1078. self.content_type = ::protobuf::SingularField::some(v);
  1079. }
  1080. // Mutable pointer to the field.
  1081. // If field is not initialized, it is initialized with default value first.
  1082. pub fn mut_content_type(&mut self) -> &mut ::std::string::String {
  1083. if self.content_type.is_none() {
  1084. self.content_type.set_default();
  1085. }
  1086. self.content_type.as_mut().unwrap()
  1087. }
  1088. // Take field
  1089. pub fn take_content_type(&mut self) -> ::std::string::String {
  1090. self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
  1091. }
  1092. pub fn get_content_type(&self) -> &str {
  1093. match self.content_type.as_ref() {
  1094. Some(v) => &v,
  1095. None => "",
  1096. }
  1097. }
  1098. // optional string method = 3;
  1099. pub fn clear_method(&mut self) {
  1100. self.method.clear();
  1101. }
  1102. pub fn has_method(&self) -> bool {
  1103. self.method.is_some()
  1104. }
  1105. // Param is passed by value, moved
  1106. pub fn set_method(&mut self, v: ::std::string::String) {
  1107. self.method = ::protobuf::SingularField::some(v);
  1108. }
  1109. // Mutable pointer to the field.
  1110. // If field is not initialized, it is initialized with default value first.
  1111. pub fn mut_method(&mut self) -> &mut ::std::string::String {
  1112. if self.method.is_none() {
  1113. self.method.set_default();
  1114. }
  1115. self.method.as_mut().unwrap()
  1116. }
  1117. // Take field
  1118. pub fn take_method(&mut self) -> ::std::string::String {
  1119. self.method.take().unwrap_or_else(|| ::std::string::String::new())
  1120. }
  1121. pub fn get_method(&self) -> &str {
  1122. match self.method.as_ref() {
  1123. Some(v) => &v,
  1124. None => "",
  1125. }
  1126. }
  1127. // optional sint32 status_code = 4;
  1128. pub fn clear_status_code(&mut self) {
  1129. self.status_code = ::std::option::Option::None;
  1130. }
  1131. pub fn has_status_code(&self) -> bool {
  1132. self.status_code.is_some()
  1133. }
  1134. // Param is passed by value, moved
  1135. pub fn set_status_code(&mut self, v: i32) {
  1136. self.status_code = ::std::option::Option::Some(v);
  1137. }
  1138. pub fn get_status_code(&self) -> i32 {
  1139. self.status_code.unwrap_or(0)
  1140. }
  1141. // repeated .UserField user_fields = 6;
  1142. pub fn clear_user_fields(&mut self) {
  1143. self.user_fields.clear();
  1144. }
  1145. // Param is passed by value, moved
  1146. pub fn set_user_fields(&mut self, v: ::protobuf::RepeatedField<UserField>) {
  1147. self.user_fields = v;
  1148. }
  1149. // Mutable pointer to the field.
  1150. pub fn mut_user_fields(&mut self) -> &mut ::protobuf::RepeatedField<UserField> {
  1151. &mut self.user_fields
  1152. }
  1153. // Take field
  1154. pub fn take_user_fields(&mut self) -> ::protobuf::RepeatedField<UserField> {
  1155. ::std::mem::replace(&mut self.user_fields, ::protobuf::RepeatedField::new())
  1156. }
  1157. pub fn get_user_fields(&self) -> &[UserField] {
  1158. &self.user_fields
  1159. }
  1160. }
  1161. impl ::protobuf::Message for Header {
  1162. fn is_initialized(&self) -> bool {
  1163. for v in &self.user_fields {
  1164. if !v.is_initialized() {
  1165. return false;
  1166. }
  1167. };
  1168. true
  1169. }
  1170. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  1171. while !is.eof()? {
  1172. let (field_number, wire_type) = is.read_tag_unpack()?;
  1173. match field_number {
  1174. 1 => {
  1175. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?;
  1176. },
  1177. 2 => {
  1178. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.content_type)?;
  1179. },
  1180. 3 => {
  1181. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.method)?;
  1182. },
  1183. 4 => {
  1184. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1185. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1186. }
  1187. let tmp = is.read_sint32()?;
  1188. self.status_code = ::std::option::Option::Some(tmp);
  1189. },
  1190. 6 => {
  1191. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.user_fields)?;
  1192. },
  1193. _ => {
  1194. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1195. },
  1196. };
  1197. }
  1198. ::std::result::Result::Ok(())
  1199. }
  1200. // Compute sizes of nested messages
  1201. #[allow(unused_variables)]
  1202. fn compute_size(&self) -> u32 {
  1203. let mut my_size = 0;
  1204. if let Some(ref v) = self.uri.as_ref() {
  1205. my_size += ::protobuf::rt::string_size(1, &v);
  1206. }
  1207. if let Some(ref v) = self.content_type.as_ref() {
  1208. my_size += ::protobuf::rt::string_size(2, &v);
  1209. }
  1210. if let Some(ref v) = self.method.as_ref() {
  1211. my_size += ::protobuf::rt::string_size(3, &v);
  1212. }
  1213. if let Some(v) = self.status_code {
  1214. my_size += ::protobuf::rt::value_varint_zigzag_size(4, v);
  1215. }
  1216. for value in &self.user_fields {
  1217. let len = value.compute_size();
  1218. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1219. };
  1220. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1221. self.cached_size.set(my_size);
  1222. my_size
  1223. }
  1224. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  1225. if let Some(ref v) = self.uri.as_ref() {
  1226. os.write_string(1, &v)?;
  1227. }
  1228. if let Some(ref v) = self.content_type.as_ref() {
  1229. os.write_string(2, &v)?;
  1230. }
  1231. if let Some(ref v) = self.method.as_ref() {
  1232. os.write_string(3, &v)?;
  1233. }
  1234. if let Some(v) = self.status_code {
  1235. os.write_sint32(4, v)?;
  1236. }
  1237. for v in &self.user_fields {
  1238. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1239. os.write_raw_varint32(v.get_cached_size())?;
  1240. v.write_to_with_cached_sizes(os)?;
  1241. };
  1242. os.write_unknown_fields(self.get_unknown_fields())?;
  1243. ::std::result::Result::Ok(())
  1244. }
  1245. fn get_cached_size(&self) -> u32 {
  1246. self.cached_size.get()
  1247. }
  1248. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1249. &self.unknown_fields
  1250. }
  1251. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1252. &mut self.unknown_fields
  1253. }
  1254. fn as_any(&self) -> &::std::any::Any {
  1255. self as &::std::any::Any
  1256. }
  1257. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  1258. self as &mut ::std::any::Any
  1259. }
  1260. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  1261. self
  1262. }
  1263. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1264. Self::descriptor_static()
  1265. }
  1266. fn new() -> Header {
  1267. Header::new()
  1268. }
  1269. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1270. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1271. lock: ::protobuf::lazy::ONCE_INIT,
  1272. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1273. };
  1274. unsafe {
  1275. descriptor.get(|| {
  1276. let mut fields = ::std::vec::Vec::new();
  1277. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1278. "uri",
  1279. |m: &Header| { &m.uri },
  1280. |m: &mut Header| { &mut m.uri },
  1281. ));
  1282. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1283. "content_type",
  1284. |m: &Header| { &m.content_type },
  1285. |m: &mut Header| { &mut m.content_type },
  1286. ));
  1287. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1288. "method",
  1289. |m: &Header| { &m.method },
  1290. |m: &mut Header| { &mut m.method },
  1291. ));
  1292. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeSint32>(
  1293. "status_code",
  1294. |m: &Header| { &m.status_code },
  1295. |m: &mut Header| { &mut m.status_code },
  1296. ));
  1297. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<UserField>>(
  1298. "user_fields",
  1299. |m: &Header| { &m.user_fields },
  1300. |m: &mut Header| { &mut m.user_fields },
  1301. ));
  1302. ::protobuf::reflect::MessageDescriptor::new::<Header>(
  1303. "Header",
  1304. fields,
  1305. file_descriptor_proto()
  1306. )
  1307. })
  1308. }
  1309. }
  1310. fn default_instance() -> &'static Header {
  1311. static mut instance: ::protobuf::lazy::Lazy<Header> = ::protobuf::lazy::Lazy {
  1312. lock: ::protobuf::lazy::ONCE_INIT,
  1313. ptr: 0 as *const Header,
  1314. };
  1315. unsafe {
  1316. instance.get(Header::new)
  1317. }
  1318. }
  1319. }
  1320. impl ::protobuf::Clear for Header {
  1321. fn clear(&mut self) {
  1322. self.clear_uri();
  1323. self.clear_content_type();
  1324. self.clear_method();
  1325. self.clear_status_code();
  1326. self.clear_user_fields();
  1327. self.unknown_fields.clear();
  1328. }
  1329. }
  1330. impl ::std::fmt::Debug for Header {
  1331. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  1332. ::protobuf::text_format::fmt(self, f)
  1333. }
  1334. }
  1335. impl ::protobuf::reflect::ProtobufValue for Header {
  1336. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1337. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1338. }
  1339. }
  1340. #[derive(PartialEq,Clone,Default)]
  1341. pub struct UserField {
  1342. // message fields
  1343. key: ::protobuf::SingularField<::std::string::String>,
  1344. value: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1345. // special fields
  1346. unknown_fields: ::protobuf::UnknownFields,
  1347. cached_size: ::protobuf::CachedSize,
  1348. }
  1349. impl UserField {
  1350. pub fn new() -> UserField {
  1351. ::std::default::Default::default()
  1352. }
  1353. // optional string key = 1;
  1354. pub fn clear_key(&mut self) {
  1355. self.key.clear();
  1356. }
  1357. pub fn has_key(&self) -> bool {
  1358. self.key.is_some()
  1359. }
  1360. // Param is passed by value, moved
  1361. pub fn set_key(&mut self, v: ::std::string::String) {
  1362. self.key = ::protobuf::SingularField::some(v);
  1363. }
  1364. // Mutable pointer to the field.
  1365. // If field is not initialized, it is initialized with default value first.
  1366. pub fn mut_key(&mut self) -> &mut ::std::string::String {
  1367. if self.key.is_none() {
  1368. self.key.set_default();
  1369. }
  1370. self.key.as_mut().unwrap()
  1371. }
  1372. // Take field
  1373. pub fn take_key(&mut self) -> ::std::string::String {
  1374. self.key.take().unwrap_or_else(|| ::std::string::String::new())
  1375. }
  1376. pub fn get_key(&self) -> &str {
  1377. match self.key.as_ref() {
  1378. Some(v) => &v,
  1379. None => "",
  1380. }
  1381. }
  1382. // optional bytes value = 2;
  1383. pub fn clear_value(&mut self) {
  1384. self.value.clear();
  1385. }
  1386. pub fn has_value(&self) -> bool {
  1387. self.value.is_some()
  1388. }
  1389. // Param is passed by value, moved
  1390. pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
  1391. self.value = ::protobuf::SingularField::some(v);
  1392. }
  1393. // Mutable pointer to the field.
  1394. // If field is not initialized, it is initialized with default value first.
  1395. pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
  1396. if self.value.is_none() {
  1397. self.value.set_default();
  1398. }
  1399. self.value.as_mut().unwrap()
  1400. }
  1401. // Take field
  1402. pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
  1403. self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1404. }
  1405. pub fn get_value(&self) -> &[u8] {
  1406. match self.value.as_ref() {
  1407. Some(v) => &v,
  1408. None => &[],
  1409. }
  1410. }
  1411. }
  1412. impl ::protobuf::Message for UserField {
  1413. fn is_initialized(&self) -> bool {
  1414. true
  1415. }
  1416. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  1417. while !is.eof()? {
  1418. let (field_number, wire_type) = is.read_tag_unpack()?;
  1419. match field_number {
  1420. 1 => {
  1421. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?;
  1422. },
  1423. 2 => {
  1424. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.value)?;
  1425. },
  1426. _ => {
  1427. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1428. },
  1429. };
  1430. }
  1431. ::std::result::Result::Ok(())
  1432. }
  1433. // Compute sizes of nested messages
  1434. #[allow(unused_variables)]
  1435. fn compute_size(&self) -> u32 {
  1436. let mut my_size = 0;
  1437. if let Some(ref v) = self.key.as_ref() {
  1438. my_size += ::protobuf::rt::string_size(1, &v);
  1439. }
  1440. if let Some(ref v) = self.value.as_ref() {
  1441. my_size += ::protobuf::rt::bytes_size(2, &v);
  1442. }
  1443. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1444. self.cached_size.set(my_size);
  1445. my_size
  1446. }
  1447. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  1448. if let Some(ref v) = self.key.as_ref() {
  1449. os.write_string(1, &v)?;
  1450. }
  1451. if let Some(ref v) = self.value.as_ref() {
  1452. os.write_bytes(2, &v)?;
  1453. }
  1454. os.write_unknown_fields(self.get_unknown_fields())?;
  1455. ::std::result::Result::Ok(())
  1456. }
  1457. fn get_cached_size(&self) -> u32 {
  1458. self.cached_size.get()
  1459. }
  1460. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1461. &self.unknown_fields
  1462. }
  1463. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1464. &mut self.unknown_fields
  1465. }
  1466. fn as_any(&self) -> &::std::any::Any {
  1467. self as &::std::any::Any
  1468. }
  1469. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  1470. self as &mut ::std::any::Any
  1471. }
  1472. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  1473. self
  1474. }
  1475. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1476. Self::descriptor_static()
  1477. }
  1478. fn new() -> UserField {
  1479. UserField::new()
  1480. }
  1481. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1482. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1483. lock: ::protobuf::lazy::ONCE_INIT,
  1484. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1485. };
  1486. unsafe {
  1487. descriptor.get(|| {
  1488. let mut fields = ::std::vec::Vec::new();
  1489. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1490. "key",
  1491. |m: &UserField| { &m.key },
  1492. |m: &mut UserField| { &mut m.key },
  1493. ));
  1494. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1495. "value",
  1496. |m: &UserField| { &m.value },
  1497. |m: &mut UserField| { &mut m.value },
  1498. ));
  1499. ::protobuf::reflect::MessageDescriptor::new::<UserField>(
  1500. "UserField",
  1501. fields,
  1502. file_descriptor_proto()
  1503. )
  1504. })
  1505. }
  1506. }
  1507. fn default_instance() -> &'static UserField {
  1508. static mut instance: ::protobuf::lazy::Lazy<UserField> = ::protobuf::lazy::Lazy {
  1509. lock: ::protobuf::lazy::ONCE_INIT,
  1510. ptr: 0 as *const UserField,
  1511. };
  1512. unsafe {
  1513. instance.get(UserField::new)
  1514. }
  1515. }
  1516. }
  1517. impl ::protobuf::Clear for UserField {
  1518. fn clear(&mut self) {
  1519. self.clear_key();
  1520. self.clear_value();
  1521. self.unknown_fields.clear();
  1522. }
  1523. }
  1524. impl ::std::fmt::Debug for UserField {
  1525. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  1526. ::protobuf::text_format::fmt(self, f)
  1527. }
  1528. }
  1529. impl ::protobuf::reflect::ProtobufValue for UserField {
  1530. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1531. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1532. }
  1533. }
  1534. static file_descriptor_proto_data: &'static [u8] = b"\
  1535. \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12$\n\x07request\
  1536. \x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\x02\x18\0\"8\n\x14MercuryMult\
  1537. iGetReply\x12\x20\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\x02\
  1538. \x18\0\"_\n\x0eMercuryRequest\x12\x0f\n\x03uri\x18\x01\x20\x01(\tB\x02\
  1539. \x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\x18\0\x12\x10\n\
  1540. \x04body\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04etag\x18\x04\x20\
  1541. \x01(\x0cB\x02\x18\0\"\x8d\x02\n\x0cMercuryReply\x12\x17\n\x0bstatus_cod\
  1542. e\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x1a\n\x0estatus_message\x18\x02\
  1543. \x20\x01(\tB\x02\x18\0\x123\n\x0ccache_policy\x18\x03\x20\x01(\x0e2\x19.\
  1544. MercuryReply.CachePolicyB\x02\x18\0\x12\x0f\n\x03ttl\x18\x04\x20\x01(\
  1545. \x11B\x02\x18\0\x12\x10\n\x04etag\x18\x05\x20\x01(\x0cB\x02\x18\0\x12\
  1546. \x18\n\x0ccontent_type\x18\x06\x20\x01(\tB\x02\x18\0\x12\x10\n\x04body\
  1547. \x18\x07\x20\x01(\x0cB\x02\x18\0\"D\n\x0bCachePolicy\x12\x0c\n\x08CACHE_\
  1548. NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\x10\x02\x12\x10\n\x0cCACHE_PUBLIC\
  1549. \x10\x03\x1a\x02\x10\0\"\x85\x01\n\x06Header\x12\x0f\n\x03uri\x18\x01\
  1550. \x20\x01(\tB\x02\x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\
  1551. \x18\0\x12\x12\n\x06method\x18\x03\x20\x01(\tB\x02\x18\0\x12\x17\n\x0bst\
  1552. atus_code\x18\x04\x20\x01(\x11B\x02\x18\0\x12#\n\x0buser_fields\x18\x06\
  1553. \x20\x03(\x0b2\n.UserFieldB\x02\x18\0\"/\n\tUserField\x12\x0f\n\x03key\
  1554. \x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\x0cB\
  1555. \x02\x18\0B\0b\x06proto2\
  1556. ";
  1557. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
  1558. lock: ::protobuf::lazy::ONCE_INIT,
  1559. ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
  1560. };
  1561. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  1562. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  1563. }
  1564. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  1565. unsafe {
  1566. file_descriptor_proto_lazy.get(|| {
  1567. parse_descriptor_proto()
  1568. })
  1569. }
  1570. }