playlist4content.rs 52 KB

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