playlist4content.rs 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457
  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 `playlist4content.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 Item {
  25. // message fields
  26. uri: ::protobuf::SingularField<::std::string::String>,
  27. attributes: ::protobuf::SingularPtrField<super::playlist4meta::ItemAttributes>,
  28. // special fields
  29. pub unknown_fields: ::protobuf::UnknownFields,
  30. pub cached_size: ::protobuf::CachedSize,
  31. }
  32. impl<'a> ::std::default::Default for &'a Item {
  33. fn default() -> &'a Item {
  34. <Item as ::protobuf::Message>::default_instance()
  35. }
  36. }
  37. impl Item {
  38. pub fn new() -> Item {
  39. ::std::default::Default::default()
  40. }
  41. // optional string uri = 1;
  42. pub fn get_uri(&self) -> &str {
  43. match self.uri.as_ref() {
  44. Some(v) => &v,
  45. None => "",
  46. }
  47. }
  48. pub fn clear_uri(&mut self) {
  49. self.uri.clear();
  50. }
  51. pub fn has_uri(&self) -> bool {
  52. self.uri.is_some()
  53. }
  54. // Param is passed by value, moved
  55. pub fn set_uri(&mut self, v: ::std::string::String) {
  56. self.uri = ::protobuf::SingularField::some(v);
  57. }
  58. // Mutable pointer to the field.
  59. // If field is not initialized, it is initialized with default value first.
  60. pub fn mut_uri(&mut self) -> &mut ::std::string::String {
  61. if self.uri.is_none() {
  62. self.uri.set_default();
  63. }
  64. self.uri.as_mut().unwrap()
  65. }
  66. // Take field
  67. pub fn take_uri(&mut self) -> ::std::string::String {
  68. self.uri.take().unwrap_or_else(|| ::std::string::String::new())
  69. }
  70. // optional .ItemAttributes attributes = 2;
  71. pub fn get_attributes(&self) -> &super::playlist4meta::ItemAttributes {
  72. self.attributes.as_ref().unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance())
  73. }
  74. pub fn clear_attributes(&mut self) {
  75. self.attributes.clear();
  76. }
  77. pub fn has_attributes(&self) -> bool {
  78. self.attributes.is_some()
  79. }
  80. // Param is passed by value, moved
  81. pub fn set_attributes(&mut self, v: super::playlist4meta::ItemAttributes) {
  82. self.attributes = ::protobuf::SingularPtrField::some(v);
  83. }
  84. // Mutable pointer to the field.
  85. // If field is not initialized, it is initialized with default value first.
  86. pub fn mut_attributes(&mut self) -> &mut super::playlist4meta::ItemAttributes {
  87. if self.attributes.is_none() {
  88. self.attributes.set_default();
  89. }
  90. self.attributes.as_mut().unwrap()
  91. }
  92. // Take field
  93. pub fn take_attributes(&mut self) -> super::playlist4meta::ItemAttributes {
  94. self.attributes.take().unwrap_or_else(|| super::playlist4meta::ItemAttributes::new())
  95. }
  96. }
  97. impl ::protobuf::Message for Item {
  98. fn is_initialized(&self) -> bool {
  99. for v in &self.attributes {
  100. if !v.is_initialized() {
  101. return false;
  102. }
  103. };
  104. true
  105. }
  106. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  107. while !is.eof()? {
  108. let (field_number, wire_type) = is.read_tag_unpack()?;
  109. match field_number {
  110. 1 => {
  111. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?;
  112. },
  113. 2 => {
  114. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.attributes)?;
  115. },
  116. _ => {
  117. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  118. },
  119. };
  120. }
  121. ::std::result::Result::Ok(())
  122. }
  123. // Compute sizes of nested messages
  124. #[allow(unused_variables)]
  125. fn compute_size(&self) -> u32 {
  126. let mut my_size = 0;
  127. if let Some(ref v) = self.uri.as_ref() {
  128. my_size += ::protobuf::rt::string_size(1, &v);
  129. }
  130. if let Some(ref v) = self.attributes.as_ref() {
  131. let len = v.compute_size();
  132. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  133. }
  134. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  135. self.cached_size.set(my_size);
  136. my_size
  137. }
  138. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  139. if let Some(ref v) = self.uri.as_ref() {
  140. os.write_string(1, &v)?;
  141. }
  142. if let Some(ref v) = self.attributes.as_ref() {
  143. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  144. os.write_raw_varint32(v.get_cached_size())?;
  145. v.write_to_with_cached_sizes(os)?;
  146. }
  147. os.write_unknown_fields(self.get_unknown_fields())?;
  148. ::std::result::Result::Ok(())
  149. }
  150. fn get_cached_size(&self) -> u32 {
  151. self.cached_size.get()
  152. }
  153. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  154. &self.unknown_fields
  155. }
  156. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  157. &mut self.unknown_fields
  158. }
  159. fn as_any(&self) -> &dyn (::std::any::Any) {
  160. self as &dyn (::std::any::Any)
  161. }
  162. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  163. self as &mut dyn (::std::any::Any)
  164. }
  165. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  166. self
  167. }
  168. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  169. Self::descriptor_static()
  170. }
  171. fn new() -> Item {
  172. Item::new()
  173. }
  174. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  175. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  176. lock: ::protobuf::lazy::ONCE_INIT,
  177. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  178. };
  179. unsafe {
  180. descriptor.get(|| {
  181. let mut fields = ::std::vec::Vec::new();
  182. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  183. "uri",
  184. |m: &Item| { &m.uri },
  185. |m: &mut Item| { &mut m.uri },
  186. ));
  187. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ItemAttributes>>(
  188. "attributes",
  189. |m: &Item| { &m.attributes },
  190. |m: &mut Item| { &mut m.attributes },
  191. ));
  192. ::protobuf::reflect::MessageDescriptor::new::<Item>(
  193. "Item",
  194. fields,
  195. file_descriptor_proto()
  196. )
  197. })
  198. }
  199. }
  200. fn default_instance() -> &'static Item {
  201. static mut instance: ::protobuf::lazy::Lazy<Item> = ::protobuf::lazy::Lazy {
  202. lock: ::protobuf::lazy::ONCE_INIT,
  203. ptr: 0 as *const Item,
  204. };
  205. unsafe {
  206. instance.get(Item::new)
  207. }
  208. }
  209. }
  210. impl ::protobuf::Clear for Item {
  211. fn clear(&mut self) {
  212. self.uri.clear();
  213. self.attributes.clear();
  214. self.unknown_fields.clear();
  215. }
  216. }
  217. impl ::std::fmt::Debug for Item {
  218. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  219. ::protobuf::text_format::fmt(self, f)
  220. }
  221. }
  222. impl ::protobuf::reflect::ProtobufValue for Item {
  223. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  224. ::protobuf::reflect::ProtobufValueRef::Message(self)
  225. }
  226. }
  227. #[derive(PartialEq,Clone,Default)]
  228. pub struct ListItems {
  229. // message fields
  230. pos: ::std::option::Option<i32>,
  231. truncated: ::std::option::Option<bool>,
  232. items: ::protobuf::RepeatedField<Item>,
  233. // special fields
  234. pub unknown_fields: ::protobuf::UnknownFields,
  235. pub cached_size: ::protobuf::CachedSize,
  236. }
  237. impl<'a> ::std::default::Default for &'a ListItems {
  238. fn default() -> &'a ListItems {
  239. <ListItems as ::protobuf::Message>::default_instance()
  240. }
  241. }
  242. impl ListItems {
  243. pub fn new() -> ListItems {
  244. ::std::default::Default::default()
  245. }
  246. // optional int32 pos = 1;
  247. pub fn get_pos(&self) -> i32 {
  248. self.pos.unwrap_or(0)
  249. }
  250. pub fn clear_pos(&mut self) {
  251. self.pos = ::std::option::Option::None;
  252. }
  253. pub fn has_pos(&self) -> bool {
  254. self.pos.is_some()
  255. }
  256. // Param is passed by value, moved
  257. pub fn set_pos(&mut self, v: i32) {
  258. self.pos = ::std::option::Option::Some(v);
  259. }
  260. // optional bool truncated = 2;
  261. pub fn get_truncated(&self) -> bool {
  262. self.truncated.unwrap_or(false)
  263. }
  264. pub fn clear_truncated(&mut self) {
  265. self.truncated = ::std::option::Option::None;
  266. }
  267. pub fn has_truncated(&self) -> bool {
  268. self.truncated.is_some()
  269. }
  270. // Param is passed by value, moved
  271. pub fn set_truncated(&mut self, v: bool) {
  272. self.truncated = ::std::option::Option::Some(v);
  273. }
  274. // repeated .Item items = 3;
  275. pub fn get_items(&self) -> &[Item] {
  276. &self.items
  277. }
  278. pub fn clear_items(&mut self) {
  279. self.items.clear();
  280. }
  281. // Param is passed by value, moved
  282. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Item>) {
  283. self.items = v;
  284. }
  285. // Mutable pointer to the field.
  286. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Item> {
  287. &mut self.items
  288. }
  289. // Take field
  290. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Item> {
  291. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  292. }
  293. }
  294. impl ::protobuf::Message for ListItems {
  295. fn is_initialized(&self) -> bool {
  296. for v in &self.items {
  297. if !v.is_initialized() {
  298. return false;
  299. }
  300. };
  301. true
  302. }
  303. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  304. while !is.eof()? {
  305. let (field_number, wire_type) = is.read_tag_unpack()?;
  306. match field_number {
  307. 1 => {
  308. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  309. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  310. }
  311. let tmp = is.read_int32()?;
  312. self.pos = ::std::option::Option::Some(tmp);
  313. },
  314. 2 => {
  315. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  316. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  317. }
  318. let tmp = is.read_bool()?;
  319. self.truncated = ::std::option::Option::Some(tmp);
  320. },
  321. 3 => {
  322. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  323. },
  324. _ => {
  325. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  326. },
  327. };
  328. }
  329. ::std::result::Result::Ok(())
  330. }
  331. // Compute sizes of nested messages
  332. #[allow(unused_variables)]
  333. fn compute_size(&self) -> u32 {
  334. let mut my_size = 0;
  335. if let Some(v) = self.pos {
  336. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  337. }
  338. if let Some(v) = self.truncated {
  339. my_size += 2;
  340. }
  341. for value in &self.items {
  342. let len = value.compute_size();
  343. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  344. };
  345. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  346. self.cached_size.set(my_size);
  347. my_size
  348. }
  349. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  350. if let Some(v) = self.pos {
  351. os.write_int32(1, v)?;
  352. }
  353. if let Some(v) = self.truncated {
  354. os.write_bool(2, v)?;
  355. }
  356. for v in &self.items {
  357. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  358. os.write_raw_varint32(v.get_cached_size())?;
  359. v.write_to_with_cached_sizes(os)?;
  360. };
  361. os.write_unknown_fields(self.get_unknown_fields())?;
  362. ::std::result::Result::Ok(())
  363. }
  364. fn get_cached_size(&self) -> u32 {
  365. self.cached_size.get()
  366. }
  367. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  368. &self.unknown_fields
  369. }
  370. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  371. &mut self.unknown_fields
  372. }
  373. fn as_any(&self) -> &dyn (::std::any::Any) {
  374. self as &dyn (::std::any::Any)
  375. }
  376. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  377. self as &mut dyn (::std::any::Any)
  378. }
  379. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  380. self
  381. }
  382. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  383. Self::descriptor_static()
  384. }
  385. fn new() -> ListItems {
  386. ListItems::new()
  387. }
  388. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  389. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  390. lock: ::protobuf::lazy::ONCE_INIT,
  391. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  392. };
  393. unsafe {
  394. descriptor.get(|| {
  395. let mut fields = ::std::vec::Vec::new();
  396. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  397. "pos",
  398. |m: &ListItems| { &m.pos },
  399. |m: &mut ListItems| { &mut m.pos },
  400. ));
  401. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  402. "truncated",
  403. |m: &ListItems| { &m.truncated },
  404. |m: &mut ListItems| { &mut m.truncated },
  405. ));
  406. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Item>>(
  407. "items",
  408. |m: &ListItems| { &m.items },
  409. |m: &mut ListItems| { &mut m.items },
  410. ));
  411. ::protobuf::reflect::MessageDescriptor::new::<ListItems>(
  412. "ListItems",
  413. fields,
  414. file_descriptor_proto()
  415. )
  416. })
  417. }
  418. }
  419. fn default_instance() -> &'static ListItems {
  420. static mut instance: ::protobuf::lazy::Lazy<ListItems> = ::protobuf::lazy::Lazy {
  421. lock: ::protobuf::lazy::ONCE_INIT,
  422. ptr: 0 as *const ListItems,
  423. };
  424. unsafe {
  425. instance.get(ListItems::new)
  426. }
  427. }
  428. }
  429. impl ::protobuf::Clear for ListItems {
  430. fn clear(&mut self) {
  431. self.pos = ::std::option::Option::None;
  432. self.truncated = ::std::option::Option::None;
  433. self.items.clear();
  434. self.unknown_fields.clear();
  435. }
  436. }
  437. impl ::std::fmt::Debug for ListItems {
  438. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  439. ::protobuf::text_format::fmt(self, f)
  440. }
  441. }
  442. impl ::protobuf::reflect::ProtobufValue for ListItems {
  443. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  444. ::protobuf::reflect::ProtobufValueRef::Message(self)
  445. }
  446. }
  447. #[derive(PartialEq,Clone,Default)]
  448. pub struct ContentRange {
  449. // message fields
  450. pos: ::std::option::Option<i32>,
  451. length: ::std::option::Option<i32>,
  452. // special fields
  453. pub unknown_fields: ::protobuf::UnknownFields,
  454. pub cached_size: ::protobuf::CachedSize,
  455. }
  456. impl<'a> ::std::default::Default for &'a ContentRange {
  457. fn default() -> &'a ContentRange {
  458. <ContentRange as ::protobuf::Message>::default_instance()
  459. }
  460. }
  461. impl ContentRange {
  462. pub fn new() -> ContentRange {
  463. ::std::default::Default::default()
  464. }
  465. // optional int32 pos = 1;
  466. pub fn get_pos(&self) -> i32 {
  467. self.pos.unwrap_or(0)
  468. }
  469. pub fn clear_pos(&mut self) {
  470. self.pos = ::std::option::Option::None;
  471. }
  472. pub fn has_pos(&self) -> bool {
  473. self.pos.is_some()
  474. }
  475. // Param is passed by value, moved
  476. pub fn set_pos(&mut self, v: i32) {
  477. self.pos = ::std::option::Option::Some(v);
  478. }
  479. // optional int32 length = 2;
  480. pub fn get_length(&self) -> i32 {
  481. self.length.unwrap_or(0)
  482. }
  483. pub fn clear_length(&mut self) {
  484. self.length = ::std::option::Option::None;
  485. }
  486. pub fn has_length(&self) -> bool {
  487. self.length.is_some()
  488. }
  489. // Param is passed by value, moved
  490. pub fn set_length(&mut self, v: i32) {
  491. self.length = ::std::option::Option::Some(v);
  492. }
  493. }
  494. impl ::protobuf::Message for ContentRange {
  495. fn is_initialized(&self) -> bool {
  496. true
  497. }
  498. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  499. while !is.eof()? {
  500. let (field_number, wire_type) = is.read_tag_unpack()?;
  501. match field_number {
  502. 1 => {
  503. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  504. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  505. }
  506. let tmp = is.read_int32()?;
  507. self.pos = ::std::option::Option::Some(tmp);
  508. },
  509. 2 => {
  510. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  511. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  512. }
  513. let tmp = is.read_int32()?;
  514. self.length = ::std::option::Option::Some(tmp);
  515. },
  516. _ => {
  517. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  518. },
  519. };
  520. }
  521. ::std::result::Result::Ok(())
  522. }
  523. // Compute sizes of nested messages
  524. #[allow(unused_variables)]
  525. fn compute_size(&self) -> u32 {
  526. let mut my_size = 0;
  527. if let Some(v) = self.pos {
  528. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  529. }
  530. if let Some(v) = self.length {
  531. my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
  532. }
  533. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  534. self.cached_size.set(my_size);
  535. my_size
  536. }
  537. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  538. if let Some(v) = self.pos {
  539. os.write_int32(1, v)?;
  540. }
  541. if let Some(v) = self.length {
  542. os.write_int32(2, v)?;
  543. }
  544. os.write_unknown_fields(self.get_unknown_fields())?;
  545. ::std::result::Result::Ok(())
  546. }
  547. fn get_cached_size(&self) -> u32 {
  548. self.cached_size.get()
  549. }
  550. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  551. &self.unknown_fields
  552. }
  553. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  554. &mut self.unknown_fields
  555. }
  556. fn as_any(&self) -> &dyn (::std::any::Any) {
  557. self as &dyn (::std::any::Any)
  558. }
  559. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  560. self as &mut dyn (::std::any::Any)
  561. }
  562. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  563. self
  564. }
  565. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  566. Self::descriptor_static()
  567. }
  568. fn new() -> ContentRange {
  569. ContentRange::new()
  570. }
  571. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  572. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  573. lock: ::protobuf::lazy::ONCE_INIT,
  574. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  575. };
  576. unsafe {
  577. descriptor.get(|| {
  578. let mut fields = ::std::vec::Vec::new();
  579. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  580. "pos",
  581. |m: &ContentRange| { &m.pos },
  582. |m: &mut ContentRange| { &mut m.pos },
  583. ));
  584. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  585. "length",
  586. |m: &ContentRange| { &m.length },
  587. |m: &mut ContentRange| { &mut m.length },
  588. ));
  589. ::protobuf::reflect::MessageDescriptor::new::<ContentRange>(
  590. "ContentRange",
  591. fields,
  592. file_descriptor_proto()
  593. )
  594. })
  595. }
  596. }
  597. fn default_instance() -> &'static ContentRange {
  598. static mut instance: ::protobuf::lazy::Lazy<ContentRange> = ::protobuf::lazy::Lazy {
  599. lock: ::protobuf::lazy::ONCE_INIT,
  600. ptr: 0 as *const ContentRange,
  601. };
  602. unsafe {
  603. instance.get(ContentRange::new)
  604. }
  605. }
  606. }
  607. impl ::protobuf::Clear for ContentRange {
  608. fn clear(&mut self) {
  609. self.pos = ::std::option::Option::None;
  610. self.length = ::std::option::Option::None;
  611. self.unknown_fields.clear();
  612. }
  613. }
  614. impl ::std::fmt::Debug for ContentRange {
  615. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  616. ::protobuf::text_format::fmt(self, f)
  617. }
  618. }
  619. impl ::protobuf::reflect::ProtobufValue for ContentRange {
  620. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  621. ::protobuf::reflect::ProtobufValueRef::Message(self)
  622. }
  623. }
  624. #[derive(PartialEq,Clone,Default)]
  625. pub struct ListContentSelection {
  626. // message fields
  627. wantRevision: ::std::option::Option<bool>,
  628. wantLength: ::std::option::Option<bool>,
  629. wantAttributes: ::std::option::Option<bool>,
  630. wantChecksum: ::std::option::Option<bool>,
  631. wantContent: ::std::option::Option<bool>,
  632. contentRange: ::protobuf::SingularPtrField<ContentRange>,
  633. wantDiff: ::std::option::Option<bool>,
  634. baseRevision: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  635. hintRevision: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  636. wantNothingIfUpToDate: ::std::option::Option<bool>,
  637. wantResolveAction: ::std::option::Option<bool>,
  638. issues: ::protobuf::RepeatedField<super::playlist4issues::ClientIssue>,
  639. resolveAction: ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction>,
  640. // special fields
  641. pub unknown_fields: ::protobuf::UnknownFields,
  642. pub cached_size: ::protobuf::CachedSize,
  643. }
  644. impl<'a> ::std::default::Default for &'a ListContentSelection {
  645. fn default() -> &'a ListContentSelection {
  646. <ListContentSelection as ::protobuf::Message>::default_instance()
  647. }
  648. }
  649. impl ListContentSelection {
  650. pub fn new() -> ListContentSelection {
  651. ::std::default::Default::default()
  652. }
  653. // optional bool wantRevision = 1;
  654. pub fn get_wantRevision(&self) -> bool {
  655. self.wantRevision.unwrap_or(false)
  656. }
  657. pub fn clear_wantRevision(&mut self) {
  658. self.wantRevision = ::std::option::Option::None;
  659. }
  660. pub fn has_wantRevision(&self) -> bool {
  661. self.wantRevision.is_some()
  662. }
  663. // Param is passed by value, moved
  664. pub fn set_wantRevision(&mut self, v: bool) {
  665. self.wantRevision = ::std::option::Option::Some(v);
  666. }
  667. // optional bool wantLength = 2;
  668. pub fn get_wantLength(&self) -> bool {
  669. self.wantLength.unwrap_or(false)
  670. }
  671. pub fn clear_wantLength(&mut self) {
  672. self.wantLength = ::std::option::Option::None;
  673. }
  674. pub fn has_wantLength(&self) -> bool {
  675. self.wantLength.is_some()
  676. }
  677. // Param is passed by value, moved
  678. pub fn set_wantLength(&mut self, v: bool) {
  679. self.wantLength = ::std::option::Option::Some(v);
  680. }
  681. // optional bool wantAttributes = 3;
  682. pub fn get_wantAttributes(&self) -> bool {
  683. self.wantAttributes.unwrap_or(false)
  684. }
  685. pub fn clear_wantAttributes(&mut self) {
  686. self.wantAttributes = ::std::option::Option::None;
  687. }
  688. pub fn has_wantAttributes(&self) -> bool {
  689. self.wantAttributes.is_some()
  690. }
  691. // Param is passed by value, moved
  692. pub fn set_wantAttributes(&mut self, v: bool) {
  693. self.wantAttributes = ::std::option::Option::Some(v);
  694. }
  695. // optional bool wantChecksum = 4;
  696. pub fn get_wantChecksum(&self) -> bool {
  697. self.wantChecksum.unwrap_or(false)
  698. }
  699. pub fn clear_wantChecksum(&mut self) {
  700. self.wantChecksum = ::std::option::Option::None;
  701. }
  702. pub fn has_wantChecksum(&self) -> bool {
  703. self.wantChecksum.is_some()
  704. }
  705. // Param is passed by value, moved
  706. pub fn set_wantChecksum(&mut self, v: bool) {
  707. self.wantChecksum = ::std::option::Option::Some(v);
  708. }
  709. // optional bool wantContent = 5;
  710. pub fn get_wantContent(&self) -> bool {
  711. self.wantContent.unwrap_or(false)
  712. }
  713. pub fn clear_wantContent(&mut self) {
  714. self.wantContent = ::std::option::Option::None;
  715. }
  716. pub fn has_wantContent(&self) -> bool {
  717. self.wantContent.is_some()
  718. }
  719. // Param is passed by value, moved
  720. pub fn set_wantContent(&mut self, v: bool) {
  721. self.wantContent = ::std::option::Option::Some(v);
  722. }
  723. // optional .ContentRange contentRange = 6;
  724. pub fn get_contentRange(&self) -> &ContentRange {
  725. self.contentRange.as_ref().unwrap_or_else(|| ContentRange::default_instance())
  726. }
  727. pub fn clear_contentRange(&mut self) {
  728. self.contentRange.clear();
  729. }
  730. pub fn has_contentRange(&self) -> bool {
  731. self.contentRange.is_some()
  732. }
  733. // Param is passed by value, moved
  734. pub fn set_contentRange(&mut self, v: ContentRange) {
  735. self.contentRange = ::protobuf::SingularPtrField::some(v);
  736. }
  737. // Mutable pointer to the field.
  738. // If field is not initialized, it is initialized with default value first.
  739. pub fn mut_contentRange(&mut self) -> &mut ContentRange {
  740. if self.contentRange.is_none() {
  741. self.contentRange.set_default();
  742. }
  743. self.contentRange.as_mut().unwrap()
  744. }
  745. // Take field
  746. pub fn take_contentRange(&mut self) -> ContentRange {
  747. self.contentRange.take().unwrap_or_else(|| ContentRange::new())
  748. }
  749. // optional bool wantDiff = 7;
  750. pub fn get_wantDiff(&self) -> bool {
  751. self.wantDiff.unwrap_or(false)
  752. }
  753. pub fn clear_wantDiff(&mut self) {
  754. self.wantDiff = ::std::option::Option::None;
  755. }
  756. pub fn has_wantDiff(&self) -> bool {
  757. self.wantDiff.is_some()
  758. }
  759. // Param is passed by value, moved
  760. pub fn set_wantDiff(&mut self, v: bool) {
  761. self.wantDiff = ::std::option::Option::Some(v);
  762. }
  763. // optional bytes baseRevision = 8;
  764. pub fn get_baseRevision(&self) -> &[u8] {
  765. match self.baseRevision.as_ref() {
  766. Some(v) => &v,
  767. None => &[],
  768. }
  769. }
  770. pub fn clear_baseRevision(&mut self) {
  771. self.baseRevision.clear();
  772. }
  773. pub fn has_baseRevision(&self) -> bool {
  774. self.baseRevision.is_some()
  775. }
  776. // Param is passed by value, moved
  777. pub fn set_baseRevision(&mut self, v: ::std::vec::Vec<u8>) {
  778. self.baseRevision = ::protobuf::SingularField::some(v);
  779. }
  780. // Mutable pointer to the field.
  781. // If field is not initialized, it is initialized with default value first.
  782. pub fn mut_baseRevision(&mut self) -> &mut ::std::vec::Vec<u8> {
  783. if self.baseRevision.is_none() {
  784. self.baseRevision.set_default();
  785. }
  786. self.baseRevision.as_mut().unwrap()
  787. }
  788. // Take field
  789. pub fn take_baseRevision(&mut self) -> ::std::vec::Vec<u8> {
  790. self.baseRevision.take().unwrap_or_else(|| ::std::vec::Vec::new())
  791. }
  792. // optional bytes hintRevision = 9;
  793. pub fn get_hintRevision(&self) -> &[u8] {
  794. match self.hintRevision.as_ref() {
  795. Some(v) => &v,
  796. None => &[],
  797. }
  798. }
  799. pub fn clear_hintRevision(&mut self) {
  800. self.hintRevision.clear();
  801. }
  802. pub fn has_hintRevision(&self) -> bool {
  803. self.hintRevision.is_some()
  804. }
  805. // Param is passed by value, moved
  806. pub fn set_hintRevision(&mut self, v: ::std::vec::Vec<u8>) {
  807. self.hintRevision = ::protobuf::SingularField::some(v);
  808. }
  809. // Mutable pointer to the field.
  810. // If field is not initialized, it is initialized with default value first.
  811. pub fn mut_hintRevision(&mut self) -> &mut ::std::vec::Vec<u8> {
  812. if self.hintRevision.is_none() {
  813. self.hintRevision.set_default();
  814. }
  815. self.hintRevision.as_mut().unwrap()
  816. }
  817. // Take field
  818. pub fn take_hintRevision(&mut self) -> ::std::vec::Vec<u8> {
  819. self.hintRevision.take().unwrap_or_else(|| ::std::vec::Vec::new())
  820. }
  821. // optional bool wantNothingIfUpToDate = 10;
  822. pub fn get_wantNothingIfUpToDate(&self) -> bool {
  823. self.wantNothingIfUpToDate.unwrap_or(false)
  824. }
  825. pub fn clear_wantNothingIfUpToDate(&mut self) {
  826. self.wantNothingIfUpToDate = ::std::option::Option::None;
  827. }
  828. pub fn has_wantNothingIfUpToDate(&self) -> bool {
  829. self.wantNothingIfUpToDate.is_some()
  830. }
  831. // Param is passed by value, moved
  832. pub fn set_wantNothingIfUpToDate(&mut self, v: bool) {
  833. self.wantNothingIfUpToDate = ::std::option::Option::Some(v);
  834. }
  835. // optional bool wantResolveAction = 12;
  836. pub fn get_wantResolveAction(&self) -> bool {
  837. self.wantResolveAction.unwrap_or(false)
  838. }
  839. pub fn clear_wantResolveAction(&mut self) {
  840. self.wantResolveAction = ::std::option::Option::None;
  841. }
  842. pub fn has_wantResolveAction(&self) -> bool {
  843. self.wantResolveAction.is_some()
  844. }
  845. // Param is passed by value, moved
  846. pub fn set_wantResolveAction(&mut self, v: bool) {
  847. self.wantResolveAction = ::std::option::Option::Some(v);
  848. }
  849. // repeated .ClientIssue issues = 13;
  850. pub fn get_issues(&self) -> &[super::playlist4issues::ClientIssue] {
  851. &self.issues
  852. }
  853. pub fn clear_issues(&mut self) {
  854. self.issues.clear();
  855. }
  856. // Param is passed by value, moved
  857. pub fn set_issues(&mut self, v: ::protobuf::RepeatedField<super::playlist4issues::ClientIssue>) {
  858. self.issues = v;
  859. }
  860. // Mutable pointer to the field.
  861. pub fn mut_issues(&mut self) -> &mut ::protobuf::RepeatedField<super::playlist4issues::ClientIssue> {
  862. &mut self.issues
  863. }
  864. // Take field
  865. pub fn take_issues(&mut self) -> ::protobuf::RepeatedField<super::playlist4issues::ClientIssue> {
  866. ::std::mem::replace(&mut self.issues, ::protobuf::RepeatedField::new())
  867. }
  868. // repeated .ClientResolveAction resolveAction = 14;
  869. pub fn get_resolveAction(&self) -> &[super::playlist4issues::ClientResolveAction] {
  870. &self.resolveAction
  871. }
  872. pub fn clear_resolveAction(&mut self) {
  873. self.resolveAction.clear();
  874. }
  875. // Param is passed by value, moved
  876. pub fn set_resolveAction(&mut self, v: ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction>) {
  877. self.resolveAction = v;
  878. }
  879. // Mutable pointer to the field.
  880. pub fn mut_resolveAction(&mut self) -> &mut ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction> {
  881. &mut self.resolveAction
  882. }
  883. // Take field
  884. pub fn take_resolveAction(&mut self) -> ::protobuf::RepeatedField<super::playlist4issues::ClientResolveAction> {
  885. ::std::mem::replace(&mut self.resolveAction, ::protobuf::RepeatedField::new())
  886. }
  887. }
  888. impl ::protobuf::Message for ListContentSelection {
  889. fn is_initialized(&self) -> bool {
  890. for v in &self.contentRange {
  891. if !v.is_initialized() {
  892. return false;
  893. }
  894. };
  895. for v in &self.issues {
  896. if !v.is_initialized() {
  897. return false;
  898. }
  899. };
  900. for v in &self.resolveAction {
  901. if !v.is_initialized() {
  902. return false;
  903. }
  904. };
  905. true
  906. }
  907. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  908. while !is.eof()? {
  909. let (field_number, wire_type) = is.read_tag_unpack()?;
  910. match field_number {
  911. 1 => {
  912. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  913. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  914. }
  915. let tmp = is.read_bool()?;
  916. self.wantRevision = ::std::option::Option::Some(tmp);
  917. },
  918. 2 => {
  919. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  920. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  921. }
  922. let tmp = is.read_bool()?;
  923. self.wantLength = ::std::option::Option::Some(tmp);
  924. },
  925. 3 => {
  926. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  927. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  928. }
  929. let tmp = is.read_bool()?;
  930. self.wantAttributes = ::std::option::Option::Some(tmp);
  931. },
  932. 4 => {
  933. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  934. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  935. }
  936. let tmp = is.read_bool()?;
  937. self.wantChecksum = ::std::option::Option::Some(tmp);
  938. },
  939. 5 => {
  940. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  941. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  942. }
  943. let tmp = is.read_bool()?;
  944. self.wantContent = ::std::option::Option::Some(tmp);
  945. },
  946. 6 => {
  947. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.contentRange)?;
  948. },
  949. 7 => {
  950. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  951. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  952. }
  953. let tmp = is.read_bool()?;
  954. self.wantDiff = ::std::option::Option::Some(tmp);
  955. },
  956. 8 => {
  957. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.baseRevision)?;
  958. },
  959. 9 => {
  960. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hintRevision)?;
  961. },
  962. 10 => {
  963. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  964. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  965. }
  966. let tmp = is.read_bool()?;
  967. self.wantNothingIfUpToDate = ::std::option::Option::Some(tmp);
  968. },
  969. 12 => {
  970. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  971. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  972. }
  973. let tmp = is.read_bool()?;
  974. self.wantResolveAction = ::std::option::Option::Some(tmp);
  975. },
  976. 13 => {
  977. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.issues)?;
  978. },
  979. 14 => {
  980. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.resolveAction)?;
  981. },
  982. _ => {
  983. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  984. },
  985. };
  986. }
  987. ::std::result::Result::Ok(())
  988. }
  989. // Compute sizes of nested messages
  990. #[allow(unused_variables)]
  991. fn compute_size(&self) -> u32 {
  992. let mut my_size = 0;
  993. if let Some(v) = self.wantRevision {
  994. my_size += 2;
  995. }
  996. if let Some(v) = self.wantLength {
  997. my_size += 2;
  998. }
  999. if let Some(v) = self.wantAttributes {
  1000. my_size += 2;
  1001. }
  1002. if let Some(v) = self.wantChecksum {
  1003. my_size += 2;
  1004. }
  1005. if let Some(v) = self.wantContent {
  1006. my_size += 2;
  1007. }
  1008. if let Some(ref v) = self.contentRange.as_ref() {
  1009. let len = v.compute_size();
  1010. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1011. }
  1012. if let Some(v) = self.wantDiff {
  1013. my_size += 2;
  1014. }
  1015. if let Some(ref v) = self.baseRevision.as_ref() {
  1016. my_size += ::protobuf::rt::bytes_size(8, &v);
  1017. }
  1018. if let Some(ref v) = self.hintRevision.as_ref() {
  1019. my_size += ::protobuf::rt::bytes_size(9, &v);
  1020. }
  1021. if let Some(v) = self.wantNothingIfUpToDate {
  1022. my_size += 2;
  1023. }
  1024. if let Some(v) = self.wantResolveAction {
  1025. my_size += 2;
  1026. }
  1027. for value in &self.issues {
  1028. let len = value.compute_size();
  1029. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1030. };
  1031. for value in &self.resolveAction {
  1032. let len = value.compute_size();
  1033. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1034. };
  1035. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1036. self.cached_size.set(my_size);
  1037. my_size
  1038. }
  1039. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1040. if let Some(v) = self.wantRevision {
  1041. os.write_bool(1, v)?;
  1042. }
  1043. if let Some(v) = self.wantLength {
  1044. os.write_bool(2, v)?;
  1045. }
  1046. if let Some(v) = self.wantAttributes {
  1047. os.write_bool(3, v)?;
  1048. }
  1049. if let Some(v) = self.wantChecksum {
  1050. os.write_bool(4, v)?;
  1051. }
  1052. if let Some(v) = self.wantContent {
  1053. os.write_bool(5, v)?;
  1054. }
  1055. if let Some(ref v) = self.contentRange.as_ref() {
  1056. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1057. os.write_raw_varint32(v.get_cached_size())?;
  1058. v.write_to_with_cached_sizes(os)?;
  1059. }
  1060. if let Some(v) = self.wantDiff {
  1061. os.write_bool(7, v)?;
  1062. }
  1063. if let Some(ref v) = self.baseRevision.as_ref() {
  1064. os.write_bytes(8, &v)?;
  1065. }
  1066. if let Some(ref v) = self.hintRevision.as_ref() {
  1067. os.write_bytes(9, &v)?;
  1068. }
  1069. if let Some(v) = self.wantNothingIfUpToDate {
  1070. os.write_bool(10, v)?;
  1071. }
  1072. if let Some(v) = self.wantResolveAction {
  1073. os.write_bool(12, v)?;
  1074. }
  1075. for v in &self.issues {
  1076. os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1077. os.write_raw_varint32(v.get_cached_size())?;
  1078. v.write_to_with_cached_sizes(os)?;
  1079. };
  1080. for v in &self.resolveAction {
  1081. os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1082. os.write_raw_varint32(v.get_cached_size())?;
  1083. v.write_to_with_cached_sizes(os)?;
  1084. };
  1085. os.write_unknown_fields(self.get_unknown_fields())?;
  1086. ::std::result::Result::Ok(())
  1087. }
  1088. fn get_cached_size(&self) -> u32 {
  1089. self.cached_size.get()
  1090. }
  1091. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1092. &self.unknown_fields
  1093. }
  1094. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1095. &mut self.unknown_fields
  1096. }
  1097. fn as_any(&self) -> &dyn (::std::any::Any) {
  1098. self as &dyn (::std::any::Any)
  1099. }
  1100. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1101. self as &mut dyn (::std::any::Any)
  1102. }
  1103. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1104. self
  1105. }
  1106. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1107. Self::descriptor_static()
  1108. }
  1109. fn new() -> ListContentSelection {
  1110. ListContentSelection::new()
  1111. }
  1112. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1113. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1114. lock: ::protobuf::lazy::ONCE_INIT,
  1115. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1116. };
  1117. unsafe {
  1118. descriptor.get(|| {
  1119. let mut fields = ::std::vec::Vec::new();
  1120. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1121. "wantRevision",
  1122. |m: &ListContentSelection| { &m.wantRevision },
  1123. |m: &mut ListContentSelection| { &mut m.wantRevision },
  1124. ));
  1125. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1126. "wantLength",
  1127. |m: &ListContentSelection| { &m.wantLength },
  1128. |m: &mut ListContentSelection| { &mut m.wantLength },
  1129. ));
  1130. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1131. "wantAttributes",
  1132. |m: &ListContentSelection| { &m.wantAttributes },
  1133. |m: &mut ListContentSelection| { &mut m.wantAttributes },
  1134. ));
  1135. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1136. "wantChecksum",
  1137. |m: &ListContentSelection| { &m.wantChecksum },
  1138. |m: &mut ListContentSelection| { &mut m.wantChecksum },
  1139. ));
  1140. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1141. "wantContent",
  1142. |m: &ListContentSelection| { &m.wantContent },
  1143. |m: &mut ListContentSelection| { &mut m.wantContent },
  1144. ));
  1145. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ContentRange>>(
  1146. "contentRange",
  1147. |m: &ListContentSelection| { &m.contentRange },
  1148. |m: &mut ListContentSelection| { &mut m.contentRange },
  1149. ));
  1150. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1151. "wantDiff",
  1152. |m: &ListContentSelection| { &m.wantDiff },
  1153. |m: &mut ListContentSelection| { &mut m.wantDiff },
  1154. ));
  1155. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1156. "baseRevision",
  1157. |m: &ListContentSelection| { &m.baseRevision },
  1158. |m: &mut ListContentSelection| { &mut m.baseRevision },
  1159. ));
  1160. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1161. "hintRevision",
  1162. |m: &ListContentSelection| { &m.hintRevision },
  1163. |m: &mut ListContentSelection| { &mut m.hintRevision },
  1164. ));
  1165. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1166. "wantNothingIfUpToDate",
  1167. |m: &ListContentSelection| { &m.wantNothingIfUpToDate },
  1168. |m: &mut ListContentSelection| { &mut m.wantNothingIfUpToDate },
  1169. ));
  1170. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1171. "wantResolveAction",
  1172. |m: &ListContentSelection| { &m.wantResolveAction },
  1173. |m: &mut ListContentSelection| { &mut m.wantResolveAction },
  1174. ));
  1175. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::playlist4issues::ClientIssue>>(
  1176. "issues",
  1177. |m: &ListContentSelection| { &m.issues },
  1178. |m: &mut ListContentSelection| { &mut m.issues },
  1179. ));
  1180. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::playlist4issues::ClientResolveAction>>(
  1181. "resolveAction",
  1182. |m: &ListContentSelection| { &m.resolveAction },
  1183. |m: &mut ListContentSelection| { &mut m.resolveAction },
  1184. ));
  1185. ::protobuf::reflect::MessageDescriptor::new::<ListContentSelection>(
  1186. "ListContentSelection",
  1187. fields,
  1188. file_descriptor_proto()
  1189. )
  1190. })
  1191. }
  1192. }
  1193. fn default_instance() -> &'static ListContentSelection {
  1194. static mut instance: ::protobuf::lazy::Lazy<ListContentSelection> = ::protobuf::lazy::Lazy {
  1195. lock: ::protobuf::lazy::ONCE_INIT,
  1196. ptr: 0 as *const ListContentSelection,
  1197. };
  1198. unsafe {
  1199. instance.get(ListContentSelection::new)
  1200. }
  1201. }
  1202. }
  1203. impl ::protobuf::Clear for ListContentSelection {
  1204. fn clear(&mut self) {
  1205. self.wantRevision = ::std::option::Option::None;
  1206. self.wantLength = ::std::option::Option::None;
  1207. self.wantAttributes = ::std::option::Option::None;
  1208. self.wantChecksum = ::std::option::Option::None;
  1209. self.wantContent = ::std::option::Option::None;
  1210. self.contentRange.clear();
  1211. self.wantDiff = ::std::option::Option::None;
  1212. self.baseRevision.clear();
  1213. self.hintRevision.clear();
  1214. self.wantNothingIfUpToDate = ::std::option::Option::None;
  1215. self.wantResolveAction = ::std::option::Option::None;
  1216. self.issues.clear();
  1217. self.resolveAction.clear();
  1218. self.unknown_fields.clear();
  1219. }
  1220. }
  1221. impl ::std::fmt::Debug for ListContentSelection {
  1222. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1223. ::protobuf::text_format::fmt(self, f)
  1224. }
  1225. }
  1226. impl ::protobuf::reflect::ProtobufValue for ListContentSelection {
  1227. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1228. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1229. }
  1230. }
  1231. static file_descriptor_proto_data: &'static [u8] = b"\
  1232. \n\x16playlist4content.proto\x12\0\">\n\x04Item\x12\r\n\x03uri\x18\x01\
  1233. \x20\x01(\tB\0\x12%\n\nattributes\x18\x02\x20\x01(\x0b2\x0f.ItemAttribut\
  1234. esB\0:\0\"I\n\tListItems\x12\r\n\x03pos\x18\x01\x20\x01(\x05B\0\x12\x13\
  1235. \n\ttruncated\x18\x02\x20\x01(\x08B\0\x12\x16\n\x05items\x18\x03\x20\x03\
  1236. (\x0b2\x05.ItemB\0:\0\"1\n\x0cContentRange\x12\r\n\x03pos\x18\x01\x20\
  1237. \x01(\x05B\0\x12\x10\n\x06length\x18\x02\x20\x01(\x05B\0:\0\"\x87\x03\n\
  1238. \x14ListContentSelection\x12\x16\n\x0cwantRevision\x18\x01\x20\x01(\x08B\
  1239. \0\x12\x14\n\nwantLength\x18\x02\x20\x01(\x08B\0\x12\x18\n\x0ewantAttrib\
  1240. utes\x18\x03\x20\x01(\x08B\0\x12\x16\n\x0cwantChecksum\x18\x04\x20\x01(\
  1241. \x08B\0\x12\x15\n\x0bwantContent\x18\x05\x20\x01(\x08B\0\x12%\n\x0cconte\
  1242. ntRange\x18\x06\x20\x01(\x0b2\r.ContentRangeB\0\x12\x12\n\x08wantDiff\
  1243. \x18\x07\x20\x01(\x08B\0\x12\x16\n\x0cbaseRevision\x18\x08\x20\x01(\x0cB\
  1244. \0\x12\x16\n\x0chintRevision\x18\t\x20\x01(\x0cB\0\x12\x1f\n\x15wantNoth\
  1245. ingIfUpToDate\x18\n\x20\x01(\x08B\0\x12\x1b\n\x11wantResolveAction\x18\
  1246. \x0c\x20\x01(\x08B\0\x12\x1e\n\x06issues\x18\r\x20\x03(\x0b2\x0c.ClientI\
  1247. ssueB\0\x12-\n\rresolveAction\x18\x0e\x20\x03(\x0b2\x14.ClientResolveAct\
  1248. ionB\0:\0B\0b\x06proto2\
  1249. ";
  1250. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
  1251. lock: ::protobuf::lazy::ONCE_INIT,
  1252. ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
  1253. };
  1254. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  1255. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  1256. }
  1257. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  1258. unsafe {
  1259. file_descriptor_proto_lazy.get(|| {
  1260. parse_descriptor_proto()
  1261. })
  1262. }
  1263. }