mercury.rs 60 KB

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