playlist4ops.rs 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742
  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 `playlist4ops.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 Add {
  25. // message fields
  26. fromIndex: ::std::option::Option<i32>,
  27. items: ::protobuf::RepeatedField<super::playlist4content::Item>,
  28. list_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  29. addLast: ::std::option::Option<bool>,
  30. addFirst: ::std::option::Option<bool>,
  31. // special fields
  32. pub unknown_fields: ::protobuf::UnknownFields,
  33. pub cached_size: ::protobuf::CachedSize,
  34. }
  35. impl<'a> ::std::default::Default for &'a Add {
  36. fn default() -> &'a Add {
  37. <Add as ::protobuf::Message>::default_instance()
  38. }
  39. }
  40. impl Add {
  41. pub fn new() -> Add {
  42. ::std::default::Default::default()
  43. }
  44. // optional int32 fromIndex = 1;
  45. pub fn get_fromIndex(&self) -> i32 {
  46. self.fromIndex.unwrap_or(0)
  47. }
  48. pub fn clear_fromIndex(&mut self) {
  49. self.fromIndex = ::std::option::Option::None;
  50. }
  51. pub fn has_fromIndex(&self) -> bool {
  52. self.fromIndex.is_some()
  53. }
  54. // Param is passed by value, moved
  55. pub fn set_fromIndex(&mut self, v: i32) {
  56. self.fromIndex = ::std::option::Option::Some(v);
  57. }
  58. // repeated .Item items = 2;
  59. pub fn get_items(&self) -> &[super::playlist4content::Item] {
  60. &self.items
  61. }
  62. pub fn clear_items(&mut self) {
  63. self.items.clear();
  64. }
  65. // Param is passed by value, moved
  66. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<super::playlist4content::Item>) {
  67. self.items = v;
  68. }
  69. // Mutable pointer to the field.
  70. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<super::playlist4content::Item> {
  71. &mut self.items
  72. }
  73. // Take field
  74. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<super::playlist4content::Item> {
  75. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  76. }
  77. // optional .ListChecksum list_checksum = 3;
  78. pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum {
  79. self.list_checksum
  80. .as_ref()
  81. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  82. }
  83. pub fn clear_list_checksum(&mut self) {
  84. self.list_checksum.clear();
  85. }
  86. pub fn has_list_checksum(&self) -> bool {
  87. self.list_checksum.is_some()
  88. }
  89. // Param is passed by value, moved
  90. pub fn set_list_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  91. self.list_checksum = ::protobuf::SingularPtrField::some(v);
  92. }
  93. // Mutable pointer to the field.
  94. // If field is not initialized, it is initialized with default value first.
  95. pub fn mut_list_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  96. if self.list_checksum.is_none() {
  97. self.list_checksum.set_default();
  98. }
  99. self.list_checksum.as_mut().unwrap()
  100. }
  101. // Take field
  102. pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  103. self.list_checksum
  104. .take()
  105. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  106. }
  107. // optional bool addLast = 4;
  108. pub fn get_addLast(&self) -> bool {
  109. self.addLast.unwrap_or(false)
  110. }
  111. pub fn clear_addLast(&mut self) {
  112. self.addLast = ::std::option::Option::None;
  113. }
  114. pub fn has_addLast(&self) -> bool {
  115. self.addLast.is_some()
  116. }
  117. // Param is passed by value, moved
  118. pub fn set_addLast(&mut self, v: bool) {
  119. self.addLast = ::std::option::Option::Some(v);
  120. }
  121. // optional bool addFirst = 5;
  122. pub fn get_addFirst(&self) -> bool {
  123. self.addFirst.unwrap_or(false)
  124. }
  125. pub fn clear_addFirst(&mut self) {
  126. self.addFirst = ::std::option::Option::None;
  127. }
  128. pub fn has_addFirst(&self) -> bool {
  129. self.addFirst.is_some()
  130. }
  131. // Param is passed by value, moved
  132. pub fn set_addFirst(&mut self, v: bool) {
  133. self.addFirst = ::std::option::Option::Some(v);
  134. }
  135. }
  136. impl ::protobuf::Message for Add {
  137. fn is_initialized(&self) -> bool {
  138. for v in &self.items {
  139. if !v.is_initialized() {
  140. return false;
  141. }
  142. }
  143. for v in &self.list_checksum {
  144. if !v.is_initialized() {
  145. return false;
  146. }
  147. }
  148. true
  149. }
  150. fn merge_from(
  151. &mut self,
  152. is: &mut ::protobuf::CodedInputStream<'_>,
  153. ) -> ::protobuf::ProtobufResult<()> {
  154. while !is.eof()? {
  155. let (field_number, wire_type) = is.read_tag_unpack()?;
  156. match field_number {
  157. 1 => {
  158. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  159. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  160. wire_type,
  161. ));
  162. }
  163. let tmp = is.read_int32()?;
  164. self.fromIndex = ::std::option::Option::Some(tmp);
  165. }
  166. 2 => {
  167. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  168. }
  169. 3 => {
  170. ::protobuf::rt::read_singular_message_into(
  171. wire_type,
  172. is,
  173. &mut self.list_checksum,
  174. )?;
  175. }
  176. 4 => {
  177. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  178. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  179. wire_type,
  180. ));
  181. }
  182. let tmp = is.read_bool()?;
  183. self.addLast = ::std::option::Option::Some(tmp);
  184. }
  185. 5 => {
  186. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  187. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  188. wire_type,
  189. ));
  190. }
  191. let tmp = is.read_bool()?;
  192. self.addFirst = ::std::option::Option::Some(tmp);
  193. }
  194. _ => {
  195. ::protobuf::rt::read_unknown_or_skip_group(
  196. field_number,
  197. wire_type,
  198. is,
  199. self.mut_unknown_fields(),
  200. )?;
  201. }
  202. };
  203. }
  204. ::std::result::Result::Ok(())
  205. }
  206. // Compute sizes of nested messages
  207. #[allow(unused_variables)]
  208. fn compute_size(&self) -> u32 {
  209. let mut my_size = 0;
  210. if let Some(v) = self.fromIndex {
  211. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  212. }
  213. for value in &self.items {
  214. let len = value.compute_size();
  215. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  216. }
  217. if let Some(ref v) = self.list_checksum.as_ref() {
  218. let len = v.compute_size();
  219. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  220. }
  221. if let Some(v) = self.addLast {
  222. my_size += 2;
  223. }
  224. if let Some(v) = self.addFirst {
  225. my_size += 2;
  226. }
  227. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  228. self.cached_size.set(my_size);
  229. my_size
  230. }
  231. fn write_to_with_cached_sizes(
  232. &self,
  233. os: &mut ::protobuf::CodedOutputStream<'_>,
  234. ) -> ::protobuf::ProtobufResult<()> {
  235. if let Some(v) = self.fromIndex {
  236. os.write_int32(1, v)?;
  237. }
  238. for v in &self.items {
  239. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  240. os.write_raw_varint32(v.get_cached_size())?;
  241. v.write_to_with_cached_sizes(os)?;
  242. }
  243. if let Some(ref v) = self.list_checksum.as_ref() {
  244. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  245. os.write_raw_varint32(v.get_cached_size())?;
  246. v.write_to_with_cached_sizes(os)?;
  247. }
  248. if let Some(v) = self.addLast {
  249. os.write_bool(4, v)?;
  250. }
  251. if let Some(v) = self.addFirst {
  252. os.write_bool(5, v)?;
  253. }
  254. os.write_unknown_fields(self.get_unknown_fields())?;
  255. ::std::result::Result::Ok(())
  256. }
  257. fn get_cached_size(&self) -> u32 {
  258. self.cached_size.get()
  259. }
  260. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  261. &self.unknown_fields
  262. }
  263. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  264. &mut self.unknown_fields
  265. }
  266. fn as_any(&self) -> &dyn (::std::any::Any) {
  267. self as &dyn (::std::any::Any)
  268. }
  269. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  270. self as &mut dyn (::std::any::Any)
  271. }
  272. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  273. self
  274. }
  275. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  276. Self::descriptor_static()
  277. }
  278. fn new() -> Add {
  279. Add::new()
  280. }
  281. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  282. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  283. ::protobuf::lazy::Lazy::INIT;
  284. unsafe {
  285. descriptor.get(|| {
  286. let mut fields = ::std::vec::Vec::new();
  287. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  288. _,
  289. ::protobuf::types::ProtobufTypeInt32,
  290. >(
  291. "fromIndex",
  292. |m: &Add| &m.fromIndex,
  293. |m: &mut Add| &mut m.fromIndex,
  294. ));
  295. fields.push(
  296. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  297. _,
  298. ::protobuf::types::ProtobufTypeMessage<super::playlist4content::Item>,
  299. >("items", |m: &Add| &m.items, |m: &mut Add| &mut m.items),
  300. );
  301. fields.push(
  302. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  303. _,
  304. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  305. >(
  306. "list_checksum",
  307. |m: &Add| &m.list_checksum,
  308. |m: &mut Add| &mut m.list_checksum,
  309. ),
  310. );
  311. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  312. _,
  313. ::protobuf::types::ProtobufTypeBool,
  314. >(
  315. "addLast",
  316. |m: &Add| &m.addLast,
  317. |m: &mut Add| &mut m.addLast,
  318. ));
  319. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  320. _,
  321. ::protobuf::types::ProtobufTypeBool,
  322. >(
  323. "addFirst",
  324. |m: &Add| &m.addFirst,
  325. |m: &mut Add| &mut m.addFirst,
  326. ));
  327. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Add>(
  328. "Add",
  329. fields,
  330. file_descriptor_proto(),
  331. )
  332. })
  333. }
  334. }
  335. fn default_instance() -> &'static Add {
  336. static mut instance: ::protobuf::lazy::Lazy<Add> = ::protobuf::lazy::Lazy::INIT;
  337. unsafe { instance.get(Add::new) }
  338. }
  339. }
  340. impl ::protobuf::Clear for Add {
  341. fn clear(&mut self) {
  342. self.fromIndex = ::std::option::Option::None;
  343. self.items.clear();
  344. self.list_checksum.clear();
  345. self.addLast = ::std::option::Option::None;
  346. self.addFirst = ::std::option::Option::None;
  347. self.unknown_fields.clear();
  348. }
  349. }
  350. impl ::std::fmt::Debug for Add {
  351. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  352. ::protobuf::text_format::fmt(self, f)
  353. }
  354. }
  355. impl ::protobuf::reflect::ProtobufValue for Add {
  356. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  357. ::protobuf::reflect::ReflectValueRef::Message(self)
  358. }
  359. }
  360. #[derive(PartialEq, Clone, Default)]
  361. pub struct Rem {
  362. // message fields
  363. fromIndex: ::std::option::Option<i32>,
  364. length: ::std::option::Option<i32>,
  365. items: ::protobuf::RepeatedField<super::playlist4content::Item>,
  366. list_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  367. items_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  368. uris_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  369. itemsAsKey: ::std::option::Option<bool>,
  370. // special fields
  371. pub unknown_fields: ::protobuf::UnknownFields,
  372. pub cached_size: ::protobuf::CachedSize,
  373. }
  374. impl<'a> ::std::default::Default for &'a Rem {
  375. fn default() -> &'a Rem {
  376. <Rem as ::protobuf::Message>::default_instance()
  377. }
  378. }
  379. impl Rem {
  380. pub fn new() -> Rem {
  381. ::std::default::Default::default()
  382. }
  383. // optional int32 fromIndex = 1;
  384. pub fn get_fromIndex(&self) -> i32 {
  385. self.fromIndex.unwrap_or(0)
  386. }
  387. pub fn clear_fromIndex(&mut self) {
  388. self.fromIndex = ::std::option::Option::None;
  389. }
  390. pub fn has_fromIndex(&self) -> bool {
  391. self.fromIndex.is_some()
  392. }
  393. // Param is passed by value, moved
  394. pub fn set_fromIndex(&mut self, v: i32) {
  395. self.fromIndex = ::std::option::Option::Some(v);
  396. }
  397. // optional int32 length = 2;
  398. pub fn get_length(&self) -> i32 {
  399. self.length.unwrap_or(0)
  400. }
  401. pub fn clear_length(&mut self) {
  402. self.length = ::std::option::Option::None;
  403. }
  404. pub fn has_length(&self) -> bool {
  405. self.length.is_some()
  406. }
  407. // Param is passed by value, moved
  408. pub fn set_length(&mut self, v: i32) {
  409. self.length = ::std::option::Option::Some(v);
  410. }
  411. // repeated .Item items = 3;
  412. pub fn get_items(&self) -> &[super::playlist4content::Item] {
  413. &self.items
  414. }
  415. pub fn clear_items(&mut self) {
  416. self.items.clear();
  417. }
  418. // Param is passed by value, moved
  419. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<super::playlist4content::Item>) {
  420. self.items = v;
  421. }
  422. // Mutable pointer to the field.
  423. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<super::playlist4content::Item> {
  424. &mut self.items
  425. }
  426. // Take field
  427. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<super::playlist4content::Item> {
  428. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  429. }
  430. // optional .ListChecksum list_checksum = 4;
  431. pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum {
  432. self.list_checksum
  433. .as_ref()
  434. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  435. }
  436. pub fn clear_list_checksum(&mut self) {
  437. self.list_checksum.clear();
  438. }
  439. pub fn has_list_checksum(&self) -> bool {
  440. self.list_checksum.is_some()
  441. }
  442. // Param is passed by value, moved
  443. pub fn set_list_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  444. self.list_checksum = ::protobuf::SingularPtrField::some(v);
  445. }
  446. // Mutable pointer to the field.
  447. // If field is not initialized, it is initialized with default value first.
  448. pub fn mut_list_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  449. if self.list_checksum.is_none() {
  450. self.list_checksum.set_default();
  451. }
  452. self.list_checksum.as_mut().unwrap()
  453. }
  454. // Take field
  455. pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  456. self.list_checksum
  457. .take()
  458. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  459. }
  460. // optional .ListChecksum items_checksum = 5;
  461. pub fn get_items_checksum(&self) -> &super::playlist4meta::ListChecksum {
  462. self.items_checksum
  463. .as_ref()
  464. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  465. }
  466. pub fn clear_items_checksum(&mut self) {
  467. self.items_checksum.clear();
  468. }
  469. pub fn has_items_checksum(&self) -> bool {
  470. self.items_checksum.is_some()
  471. }
  472. // Param is passed by value, moved
  473. pub fn set_items_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  474. self.items_checksum = ::protobuf::SingularPtrField::some(v);
  475. }
  476. // Mutable pointer to the field.
  477. // If field is not initialized, it is initialized with default value first.
  478. pub fn mut_items_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  479. if self.items_checksum.is_none() {
  480. self.items_checksum.set_default();
  481. }
  482. self.items_checksum.as_mut().unwrap()
  483. }
  484. // Take field
  485. pub fn take_items_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  486. self.items_checksum
  487. .take()
  488. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  489. }
  490. // optional .ListChecksum uris_checksum = 6;
  491. pub fn get_uris_checksum(&self) -> &super::playlist4meta::ListChecksum {
  492. self.uris_checksum
  493. .as_ref()
  494. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  495. }
  496. pub fn clear_uris_checksum(&mut self) {
  497. self.uris_checksum.clear();
  498. }
  499. pub fn has_uris_checksum(&self) -> bool {
  500. self.uris_checksum.is_some()
  501. }
  502. // Param is passed by value, moved
  503. pub fn set_uris_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  504. self.uris_checksum = ::protobuf::SingularPtrField::some(v);
  505. }
  506. // Mutable pointer to the field.
  507. // If field is not initialized, it is initialized with default value first.
  508. pub fn mut_uris_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  509. if self.uris_checksum.is_none() {
  510. self.uris_checksum.set_default();
  511. }
  512. self.uris_checksum.as_mut().unwrap()
  513. }
  514. // Take field
  515. pub fn take_uris_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  516. self.uris_checksum
  517. .take()
  518. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  519. }
  520. // optional bool itemsAsKey = 7;
  521. pub fn get_itemsAsKey(&self) -> bool {
  522. self.itemsAsKey.unwrap_or(false)
  523. }
  524. pub fn clear_itemsAsKey(&mut self) {
  525. self.itemsAsKey = ::std::option::Option::None;
  526. }
  527. pub fn has_itemsAsKey(&self) -> bool {
  528. self.itemsAsKey.is_some()
  529. }
  530. // Param is passed by value, moved
  531. pub fn set_itemsAsKey(&mut self, v: bool) {
  532. self.itemsAsKey = ::std::option::Option::Some(v);
  533. }
  534. }
  535. impl ::protobuf::Message for Rem {
  536. fn is_initialized(&self) -> bool {
  537. for v in &self.items {
  538. if !v.is_initialized() {
  539. return false;
  540. }
  541. }
  542. for v in &self.list_checksum {
  543. if !v.is_initialized() {
  544. return false;
  545. }
  546. }
  547. for v in &self.items_checksum {
  548. if !v.is_initialized() {
  549. return false;
  550. }
  551. }
  552. for v in &self.uris_checksum {
  553. if !v.is_initialized() {
  554. return false;
  555. }
  556. }
  557. true
  558. }
  559. fn merge_from(
  560. &mut self,
  561. is: &mut ::protobuf::CodedInputStream<'_>,
  562. ) -> ::protobuf::ProtobufResult<()> {
  563. while !is.eof()? {
  564. let (field_number, wire_type) = is.read_tag_unpack()?;
  565. match field_number {
  566. 1 => {
  567. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  568. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  569. wire_type,
  570. ));
  571. }
  572. let tmp = is.read_int32()?;
  573. self.fromIndex = ::std::option::Option::Some(tmp);
  574. }
  575. 2 => {
  576. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  577. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  578. wire_type,
  579. ));
  580. }
  581. let tmp = is.read_int32()?;
  582. self.length = ::std::option::Option::Some(tmp);
  583. }
  584. 3 => {
  585. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  586. }
  587. 4 => {
  588. ::protobuf::rt::read_singular_message_into(
  589. wire_type,
  590. is,
  591. &mut self.list_checksum,
  592. )?;
  593. }
  594. 5 => {
  595. ::protobuf::rt::read_singular_message_into(
  596. wire_type,
  597. is,
  598. &mut self.items_checksum,
  599. )?;
  600. }
  601. 6 => {
  602. ::protobuf::rt::read_singular_message_into(
  603. wire_type,
  604. is,
  605. &mut self.uris_checksum,
  606. )?;
  607. }
  608. 7 => {
  609. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  610. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  611. wire_type,
  612. ));
  613. }
  614. let tmp = is.read_bool()?;
  615. self.itemsAsKey = ::std::option::Option::Some(tmp);
  616. }
  617. _ => {
  618. ::protobuf::rt::read_unknown_or_skip_group(
  619. field_number,
  620. wire_type,
  621. is,
  622. self.mut_unknown_fields(),
  623. )?;
  624. }
  625. };
  626. }
  627. ::std::result::Result::Ok(())
  628. }
  629. // Compute sizes of nested messages
  630. #[allow(unused_variables)]
  631. fn compute_size(&self) -> u32 {
  632. let mut my_size = 0;
  633. if let Some(v) = self.fromIndex {
  634. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  635. }
  636. if let Some(v) = self.length {
  637. my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
  638. }
  639. for value in &self.items {
  640. let len = value.compute_size();
  641. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  642. }
  643. if let Some(ref v) = self.list_checksum.as_ref() {
  644. let len = v.compute_size();
  645. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  646. }
  647. if let Some(ref v) = self.items_checksum.as_ref() {
  648. let len = v.compute_size();
  649. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  650. }
  651. if let Some(ref v) = self.uris_checksum.as_ref() {
  652. let len = v.compute_size();
  653. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  654. }
  655. if let Some(v) = self.itemsAsKey {
  656. my_size += 2;
  657. }
  658. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  659. self.cached_size.set(my_size);
  660. my_size
  661. }
  662. fn write_to_with_cached_sizes(
  663. &self,
  664. os: &mut ::protobuf::CodedOutputStream<'_>,
  665. ) -> ::protobuf::ProtobufResult<()> {
  666. if let Some(v) = self.fromIndex {
  667. os.write_int32(1, v)?;
  668. }
  669. if let Some(v) = self.length {
  670. os.write_int32(2, v)?;
  671. }
  672. for v in &self.items {
  673. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  674. os.write_raw_varint32(v.get_cached_size())?;
  675. v.write_to_with_cached_sizes(os)?;
  676. }
  677. if let Some(ref v) = self.list_checksum.as_ref() {
  678. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  679. os.write_raw_varint32(v.get_cached_size())?;
  680. v.write_to_with_cached_sizes(os)?;
  681. }
  682. if let Some(ref v) = self.items_checksum.as_ref() {
  683. os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  684. os.write_raw_varint32(v.get_cached_size())?;
  685. v.write_to_with_cached_sizes(os)?;
  686. }
  687. if let Some(ref v) = self.uris_checksum.as_ref() {
  688. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  689. os.write_raw_varint32(v.get_cached_size())?;
  690. v.write_to_with_cached_sizes(os)?;
  691. }
  692. if let Some(v) = self.itemsAsKey {
  693. os.write_bool(7, v)?;
  694. }
  695. os.write_unknown_fields(self.get_unknown_fields())?;
  696. ::std::result::Result::Ok(())
  697. }
  698. fn get_cached_size(&self) -> u32 {
  699. self.cached_size.get()
  700. }
  701. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  702. &self.unknown_fields
  703. }
  704. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  705. &mut self.unknown_fields
  706. }
  707. fn as_any(&self) -> &dyn (::std::any::Any) {
  708. self as &dyn (::std::any::Any)
  709. }
  710. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  711. self as &mut dyn (::std::any::Any)
  712. }
  713. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  714. self
  715. }
  716. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  717. Self::descriptor_static()
  718. }
  719. fn new() -> Rem {
  720. Rem::new()
  721. }
  722. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  723. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  724. ::protobuf::lazy::Lazy::INIT;
  725. unsafe {
  726. descriptor.get(|| {
  727. let mut fields = ::std::vec::Vec::new();
  728. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  729. _,
  730. ::protobuf::types::ProtobufTypeInt32,
  731. >(
  732. "fromIndex",
  733. |m: &Rem| &m.fromIndex,
  734. |m: &mut Rem| &mut m.fromIndex,
  735. ));
  736. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  737. _,
  738. ::protobuf::types::ProtobufTypeInt32,
  739. >(
  740. "length", |m: &Rem| &m.length, |m: &mut Rem| &mut m.length
  741. ));
  742. fields.push(
  743. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  744. _,
  745. ::protobuf::types::ProtobufTypeMessage<super::playlist4content::Item>,
  746. >("items", |m: &Rem| &m.items, |m: &mut Rem| &mut m.items),
  747. );
  748. fields.push(
  749. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  750. _,
  751. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  752. >(
  753. "list_checksum",
  754. |m: &Rem| &m.list_checksum,
  755. |m: &mut Rem| &mut m.list_checksum,
  756. ),
  757. );
  758. fields.push(
  759. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  760. _,
  761. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  762. >(
  763. "items_checksum",
  764. |m: &Rem| &m.items_checksum,
  765. |m: &mut Rem| &mut m.items_checksum,
  766. ),
  767. );
  768. fields.push(
  769. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  770. _,
  771. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  772. >(
  773. "uris_checksum",
  774. |m: &Rem| &m.uris_checksum,
  775. |m: &mut Rem| &mut m.uris_checksum,
  776. ),
  777. );
  778. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  779. _,
  780. ::protobuf::types::ProtobufTypeBool,
  781. >(
  782. "itemsAsKey",
  783. |m: &Rem| &m.itemsAsKey,
  784. |m: &mut Rem| &mut m.itemsAsKey,
  785. ));
  786. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Rem>(
  787. "Rem",
  788. fields,
  789. file_descriptor_proto(),
  790. )
  791. })
  792. }
  793. }
  794. fn default_instance() -> &'static Rem {
  795. static mut instance: ::protobuf::lazy::Lazy<Rem> = ::protobuf::lazy::Lazy::INIT;
  796. unsafe { instance.get(Rem::new) }
  797. }
  798. }
  799. impl ::protobuf::Clear for Rem {
  800. fn clear(&mut self) {
  801. self.fromIndex = ::std::option::Option::None;
  802. self.length = ::std::option::Option::None;
  803. self.items.clear();
  804. self.list_checksum.clear();
  805. self.items_checksum.clear();
  806. self.uris_checksum.clear();
  807. self.itemsAsKey = ::std::option::Option::None;
  808. self.unknown_fields.clear();
  809. }
  810. }
  811. impl ::std::fmt::Debug for Rem {
  812. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  813. ::protobuf::text_format::fmt(self, f)
  814. }
  815. }
  816. impl ::protobuf::reflect::ProtobufValue for Rem {
  817. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  818. ::protobuf::reflect::ReflectValueRef::Message(self)
  819. }
  820. }
  821. #[derive(PartialEq, Clone, Default)]
  822. pub struct Mov {
  823. // message fields
  824. fromIndex: ::std::option::Option<i32>,
  825. length: ::std::option::Option<i32>,
  826. toIndex: ::std::option::Option<i32>,
  827. list_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  828. items_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  829. uris_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  830. // special fields
  831. pub unknown_fields: ::protobuf::UnknownFields,
  832. pub cached_size: ::protobuf::CachedSize,
  833. }
  834. impl<'a> ::std::default::Default for &'a Mov {
  835. fn default() -> &'a Mov {
  836. <Mov as ::protobuf::Message>::default_instance()
  837. }
  838. }
  839. impl Mov {
  840. pub fn new() -> Mov {
  841. ::std::default::Default::default()
  842. }
  843. // optional int32 fromIndex = 1;
  844. pub fn get_fromIndex(&self) -> i32 {
  845. self.fromIndex.unwrap_or(0)
  846. }
  847. pub fn clear_fromIndex(&mut self) {
  848. self.fromIndex = ::std::option::Option::None;
  849. }
  850. pub fn has_fromIndex(&self) -> bool {
  851. self.fromIndex.is_some()
  852. }
  853. // Param is passed by value, moved
  854. pub fn set_fromIndex(&mut self, v: i32) {
  855. self.fromIndex = ::std::option::Option::Some(v);
  856. }
  857. // optional int32 length = 2;
  858. pub fn get_length(&self) -> i32 {
  859. self.length.unwrap_or(0)
  860. }
  861. pub fn clear_length(&mut self) {
  862. self.length = ::std::option::Option::None;
  863. }
  864. pub fn has_length(&self) -> bool {
  865. self.length.is_some()
  866. }
  867. // Param is passed by value, moved
  868. pub fn set_length(&mut self, v: i32) {
  869. self.length = ::std::option::Option::Some(v);
  870. }
  871. // optional int32 toIndex = 3;
  872. pub fn get_toIndex(&self) -> i32 {
  873. self.toIndex.unwrap_or(0)
  874. }
  875. pub fn clear_toIndex(&mut self) {
  876. self.toIndex = ::std::option::Option::None;
  877. }
  878. pub fn has_toIndex(&self) -> bool {
  879. self.toIndex.is_some()
  880. }
  881. // Param is passed by value, moved
  882. pub fn set_toIndex(&mut self, v: i32) {
  883. self.toIndex = ::std::option::Option::Some(v);
  884. }
  885. // optional .ListChecksum list_checksum = 4;
  886. pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum {
  887. self.list_checksum
  888. .as_ref()
  889. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  890. }
  891. pub fn clear_list_checksum(&mut self) {
  892. self.list_checksum.clear();
  893. }
  894. pub fn has_list_checksum(&self) -> bool {
  895. self.list_checksum.is_some()
  896. }
  897. // Param is passed by value, moved
  898. pub fn set_list_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  899. self.list_checksum = ::protobuf::SingularPtrField::some(v);
  900. }
  901. // Mutable pointer to the field.
  902. // If field is not initialized, it is initialized with default value first.
  903. pub fn mut_list_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  904. if self.list_checksum.is_none() {
  905. self.list_checksum.set_default();
  906. }
  907. self.list_checksum.as_mut().unwrap()
  908. }
  909. // Take field
  910. pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  911. self.list_checksum
  912. .take()
  913. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  914. }
  915. // optional .ListChecksum items_checksum = 5;
  916. pub fn get_items_checksum(&self) -> &super::playlist4meta::ListChecksum {
  917. self.items_checksum
  918. .as_ref()
  919. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  920. }
  921. pub fn clear_items_checksum(&mut self) {
  922. self.items_checksum.clear();
  923. }
  924. pub fn has_items_checksum(&self) -> bool {
  925. self.items_checksum.is_some()
  926. }
  927. // Param is passed by value, moved
  928. pub fn set_items_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  929. self.items_checksum = ::protobuf::SingularPtrField::some(v);
  930. }
  931. // Mutable pointer to the field.
  932. // If field is not initialized, it is initialized with default value first.
  933. pub fn mut_items_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  934. if self.items_checksum.is_none() {
  935. self.items_checksum.set_default();
  936. }
  937. self.items_checksum.as_mut().unwrap()
  938. }
  939. // Take field
  940. pub fn take_items_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  941. self.items_checksum
  942. .take()
  943. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  944. }
  945. // optional .ListChecksum uris_checksum = 6;
  946. pub fn get_uris_checksum(&self) -> &super::playlist4meta::ListChecksum {
  947. self.uris_checksum
  948. .as_ref()
  949. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  950. }
  951. pub fn clear_uris_checksum(&mut self) {
  952. self.uris_checksum.clear();
  953. }
  954. pub fn has_uris_checksum(&self) -> bool {
  955. self.uris_checksum.is_some()
  956. }
  957. // Param is passed by value, moved
  958. pub fn set_uris_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  959. self.uris_checksum = ::protobuf::SingularPtrField::some(v);
  960. }
  961. // Mutable pointer to the field.
  962. // If field is not initialized, it is initialized with default value first.
  963. pub fn mut_uris_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  964. if self.uris_checksum.is_none() {
  965. self.uris_checksum.set_default();
  966. }
  967. self.uris_checksum.as_mut().unwrap()
  968. }
  969. // Take field
  970. pub fn take_uris_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  971. self.uris_checksum
  972. .take()
  973. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  974. }
  975. }
  976. impl ::protobuf::Message for Mov {
  977. fn is_initialized(&self) -> bool {
  978. for v in &self.list_checksum {
  979. if !v.is_initialized() {
  980. return false;
  981. }
  982. }
  983. for v in &self.items_checksum {
  984. if !v.is_initialized() {
  985. return false;
  986. }
  987. }
  988. for v in &self.uris_checksum {
  989. if !v.is_initialized() {
  990. return false;
  991. }
  992. }
  993. true
  994. }
  995. fn merge_from(
  996. &mut self,
  997. is: &mut ::protobuf::CodedInputStream<'_>,
  998. ) -> ::protobuf::ProtobufResult<()> {
  999. while !is.eof()? {
  1000. let (field_number, wire_type) = is.read_tag_unpack()?;
  1001. match field_number {
  1002. 1 => {
  1003. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1004. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1005. wire_type,
  1006. ));
  1007. }
  1008. let tmp = is.read_int32()?;
  1009. self.fromIndex = ::std::option::Option::Some(tmp);
  1010. }
  1011. 2 => {
  1012. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1013. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1014. wire_type,
  1015. ));
  1016. }
  1017. let tmp = is.read_int32()?;
  1018. self.length = ::std::option::Option::Some(tmp);
  1019. }
  1020. 3 => {
  1021. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1022. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1023. wire_type,
  1024. ));
  1025. }
  1026. let tmp = is.read_int32()?;
  1027. self.toIndex = ::std::option::Option::Some(tmp);
  1028. }
  1029. 4 => {
  1030. ::protobuf::rt::read_singular_message_into(
  1031. wire_type,
  1032. is,
  1033. &mut self.list_checksum,
  1034. )?;
  1035. }
  1036. 5 => {
  1037. ::protobuf::rt::read_singular_message_into(
  1038. wire_type,
  1039. is,
  1040. &mut self.items_checksum,
  1041. )?;
  1042. }
  1043. 6 => {
  1044. ::protobuf::rt::read_singular_message_into(
  1045. wire_type,
  1046. is,
  1047. &mut self.uris_checksum,
  1048. )?;
  1049. }
  1050. _ => {
  1051. ::protobuf::rt::read_unknown_or_skip_group(
  1052. field_number,
  1053. wire_type,
  1054. is,
  1055. self.mut_unknown_fields(),
  1056. )?;
  1057. }
  1058. };
  1059. }
  1060. ::std::result::Result::Ok(())
  1061. }
  1062. // Compute sizes of nested messages
  1063. #[allow(unused_variables)]
  1064. fn compute_size(&self) -> u32 {
  1065. let mut my_size = 0;
  1066. if let Some(v) = self.fromIndex {
  1067. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  1068. }
  1069. if let Some(v) = self.length {
  1070. my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
  1071. }
  1072. if let Some(v) = self.toIndex {
  1073. my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
  1074. }
  1075. if let Some(ref v) = self.list_checksum.as_ref() {
  1076. let len = v.compute_size();
  1077. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1078. }
  1079. if let Some(ref v) = self.items_checksum.as_ref() {
  1080. let len = v.compute_size();
  1081. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1082. }
  1083. if let Some(ref v) = self.uris_checksum.as_ref() {
  1084. let len = v.compute_size();
  1085. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1086. }
  1087. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1088. self.cached_size.set(my_size);
  1089. my_size
  1090. }
  1091. fn write_to_with_cached_sizes(
  1092. &self,
  1093. os: &mut ::protobuf::CodedOutputStream<'_>,
  1094. ) -> ::protobuf::ProtobufResult<()> {
  1095. if let Some(v) = self.fromIndex {
  1096. os.write_int32(1, v)?;
  1097. }
  1098. if let Some(v) = self.length {
  1099. os.write_int32(2, v)?;
  1100. }
  1101. if let Some(v) = self.toIndex {
  1102. os.write_int32(3, v)?;
  1103. }
  1104. if let Some(ref v) = self.list_checksum.as_ref() {
  1105. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1106. os.write_raw_varint32(v.get_cached_size())?;
  1107. v.write_to_with_cached_sizes(os)?;
  1108. }
  1109. if let Some(ref v) = self.items_checksum.as_ref() {
  1110. os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1111. os.write_raw_varint32(v.get_cached_size())?;
  1112. v.write_to_with_cached_sizes(os)?;
  1113. }
  1114. if let Some(ref v) = self.uris_checksum.as_ref() {
  1115. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1116. os.write_raw_varint32(v.get_cached_size())?;
  1117. v.write_to_with_cached_sizes(os)?;
  1118. }
  1119. os.write_unknown_fields(self.get_unknown_fields())?;
  1120. ::std::result::Result::Ok(())
  1121. }
  1122. fn get_cached_size(&self) -> u32 {
  1123. self.cached_size.get()
  1124. }
  1125. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1126. &self.unknown_fields
  1127. }
  1128. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1129. &mut self.unknown_fields
  1130. }
  1131. fn as_any(&self) -> &dyn (::std::any::Any) {
  1132. self as &dyn (::std::any::Any)
  1133. }
  1134. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1135. self as &mut dyn (::std::any::Any)
  1136. }
  1137. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1138. self
  1139. }
  1140. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1141. Self::descriptor_static()
  1142. }
  1143. fn new() -> Mov {
  1144. Mov::new()
  1145. }
  1146. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1147. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  1148. ::protobuf::lazy::Lazy::INIT;
  1149. unsafe {
  1150. descriptor.get(|| {
  1151. let mut fields = ::std::vec::Vec::new();
  1152. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1153. _,
  1154. ::protobuf::types::ProtobufTypeInt32,
  1155. >(
  1156. "fromIndex",
  1157. |m: &Mov| &m.fromIndex,
  1158. |m: &mut Mov| &mut m.fromIndex,
  1159. ));
  1160. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1161. _,
  1162. ::protobuf::types::ProtobufTypeInt32,
  1163. >(
  1164. "length", |m: &Mov| &m.length, |m: &mut Mov| &mut m.length
  1165. ));
  1166. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1167. _,
  1168. ::protobuf::types::ProtobufTypeInt32,
  1169. >(
  1170. "toIndex",
  1171. |m: &Mov| &m.toIndex,
  1172. |m: &mut Mov| &mut m.toIndex,
  1173. ));
  1174. fields.push(
  1175. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  1176. _,
  1177. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  1178. >(
  1179. "list_checksum",
  1180. |m: &Mov| &m.list_checksum,
  1181. |m: &mut Mov| &mut m.list_checksum,
  1182. ),
  1183. );
  1184. fields.push(
  1185. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  1186. _,
  1187. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  1188. >(
  1189. "items_checksum",
  1190. |m: &Mov| &m.items_checksum,
  1191. |m: &mut Mov| &mut m.items_checksum,
  1192. ),
  1193. );
  1194. fields.push(
  1195. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  1196. _,
  1197. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  1198. >(
  1199. "uris_checksum",
  1200. |m: &Mov| &m.uris_checksum,
  1201. |m: &mut Mov| &mut m.uris_checksum,
  1202. ),
  1203. );
  1204. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Mov>(
  1205. "Mov",
  1206. fields,
  1207. file_descriptor_proto(),
  1208. )
  1209. })
  1210. }
  1211. }
  1212. fn default_instance() -> &'static Mov {
  1213. static mut instance: ::protobuf::lazy::Lazy<Mov> = ::protobuf::lazy::Lazy::INIT;
  1214. unsafe { instance.get(Mov::new) }
  1215. }
  1216. }
  1217. impl ::protobuf::Clear for Mov {
  1218. fn clear(&mut self) {
  1219. self.fromIndex = ::std::option::Option::None;
  1220. self.length = ::std::option::Option::None;
  1221. self.toIndex = ::std::option::Option::None;
  1222. self.list_checksum.clear();
  1223. self.items_checksum.clear();
  1224. self.uris_checksum.clear();
  1225. self.unknown_fields.clear();
  1226. }
  1227. }
  1228. impl ::std::fmt::Debug for Mov {
  1229. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1230. ::protobuf::text_format::fmt(self, f)
  1231. }
  1232. }
  1233. impl ::protobuf::reflect::ProtobufValue for Mov {
  1234. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1235. ::protobuf::reflect::ReflectValueRef::Message(self)
  1236. }
  1237. }
  1238. #[derive(PartialEq, Clone, Default)]
  1239. pub struct ItemAttributesPartialState {
  1240. // message fields
  1241. values: ::protobuf::SingularPtrField<super::playlist4meta::ItemAttributes>,
  1242. no_value: ::std::vec::Vec<ItemAttributesPartialState_ItemAttributeKind>,
  1243. // special fields
  1244. pub unknown_fields: ::protobuf::UnknownFields,
  1245. pub cached_size: ::protobuf::CachedSize,
  1246. }
  1247. impl<'a> ::std::default::Default for &'a ItemAttributesPartialState {
  1248. fn default() -> &'a ItemAttributesPartialState {
  1249. <ItemAttributesPartialState as ::protobuf::Message>::default_instance()
  1250. }
  1251. }
  1252. impl ItemAttributesPartialState {
  1253. pub fn new() -> ItemAttributesPartialState {
  1254. ::std::default::Default::default()
  1255. }
  1256. // optional .ItemAttributes values = 1;
  1257. pub fn get_values(&self) -> &super::playlist4meta::ItemAttributes {
  1258. self.values
  1259. .as_ref()
  1260. .unwrap_or_else(|| super::playlist4meta::ItemAttributes::default_instance())
  1261. }
  1262. pub fn clear_values(&mut self) {
  1263. self.values.clear();
  1264. }
  1265. pub fn has_values(&self) -> bool {
  1266. self.values.is_some()
  1267. }
  1268. // Param is passed by value, moved
  1269. pub fn set_values(&mut self, v: super::playlist4meta::ItemAttributes) {
  1270. self.values = ::protobuf::SingularPtrField::some(v);
  1271. }
  1272. // Mutable pointer to the field.
  1273. // If field is not initialized, it is initialized with default value first.
  1274. pub fn mut_values(&mut self) -> &mut super::playlist4meta::ItemAttributes {
  1275. if self.values.is_none() {
  1276. self.values.set_default();
  1277. }
  1278. self.values.as_mut().unwrap()
  1279. }
  1280. // Take field
  1281. pub fn take_values(&mut self) -> super::playlist4meta::ItemAttributes {
  1282. self.values
  1283. .take()
  1284. .unwrap_or_else(|| super::playlist4meta::ItemAttributes::new())
  1285. }
  1286. // repeated .ItemAttributesPartialState.ItemAttributeKind no_value = 2;
  1287. pub fn get_no_value(&self) -> &[ItemAttributesPartialState_ItemAttributeKind] {
  1288. &self.no_value
  1289. }
  1290. pub fn clear_no_value(&mut self) {
  1291. self.no_value.clear();
  1292. }
  1293. // Param is passed by value, moved
  1294. pub fn set_no_value(
  1295. &mut self,
  1296. v: ::std::vec::Vec<ItemAttributesPartialState_ItemAttributeKind>,
  1297. ) {
  1298. self.no_value = v;
  1299. }
  1300. // Mutable pointer to the field.
  1301. pub fn mut_no_value(
  1302. &mut self,
  1303. ) -> &mut ::std::vec::Vec<ItemAttributesPartialState_ItemAttributeKind> {
  1304. &mut self.no_value
  1305. }
  1306. // Take field
  1307. pub fn take_no_value(
  1308. &mut self,
  1309. ) -> ::std::vec::Vec<ItemAttributesPartialState_ItemAttributeKind> {
  1310. ::std::mem::replace(&mut self.no_value, ::std::vec::Vec::new())
  1311. }
  1312. }
  1313. impl ::protobuf::Message for ItemAttributesPartialState {
  1314. fn is_initialized(&self) -> bool {
  1315. for v in &self.values {
  1316. if !v.is_initialized() {
  1317. return false;
  1318. }
  1319. }
  1320. true
  1321. }
  1322. fn merge_from(
  1323. &mut self,
  1324. is: &mut ::protobuf::CodedInputStream<'_>,
  1325. ) -> ::protobuf::ProtobufResult<()> {
  1326. while !is.eof()? {
  1327. let (field_number, wire_type) = is.read_tag_unpack()?;
  1328. match field_number {
  1329. 1 => {
  1330. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.values)?;
  1331. }
  1332. 2 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
  1333. wire_type,
  1334. is,
  1335. &mut self.no_value,
  1336. 2,
  1337. &mut self.unknown_fields,
  1338. )?,
  1339. _ => {
  1340. ::protobuf::rt::read_unknown_or_skip_group(
  1341. field_number,
  1342. wire_type,
  1343. is,
  1344. self.mut_unknown_fields(),
  1345. )?;
  1346. }
  1347. };
  1348. }
  1349. ::std::result::Result::Ok(())
  1350. }
  1351. // Compute sizes of nested messages
  1352. #[allow(unused_variables)]
  1353. fn compute_size(&self) -> u32 {
  1354. let mut my_size = 0;
  1355. if let Some(ref v) = self.values.as_ref() {
  1356. let len = v.compute_size();
  1357. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1358. }
  1359. for value in &self.no_value {
  1360. my_size += ::protobuf::rt::enum_size(2, *value);
  1361. }
  1362. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1363. self.cached_size.set(my_size);
  1364. my_size
  1365. }
  1366. fn write_to_with_cached_sizes(
  1367. &self,
  1368. os: &mut ::protobuf::CodedOutputStream<'_>,
  1369. ) -> ::protobuf::ProtobufResult<()> {
  1370. if let Some(ref v) = self.values.as_ref() {
  1371. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1372. os.write_raw_varint32(v.get_cached_size())?;
  1373. v.write_to_with_cached_sizes(os)?;
  1374. }
  1375. for v in &self.no_value {
  1376. os.write_enum(2, v.value())?;
  1377. }
  1378. os.write_unknown_fields(self.get_unknown_fields())?;
  1379. ::std::result::Result::Ok(())
  1380. }
  1381. fn get_cached_size(&self) -> u32 {
  1382. self.cached_size.get()
  1383. }
  1384. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1385. &self.unknown_fields
  1386. }
  1387. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1388. &mut self.unknown_fields
  1389. }
  1390. fn as_any(&self) -> &dyn (::std::any::Any) {
  1391. self as &dyn (::std::any::Any)
  1392. }
  1393. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1394. self as &mut dyn (::std::any::Any)
  1395. }
  1396. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1397. self
  1398. }
  1399. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1400. Self::descriptor_static()
  1401. }
  1402. fn new() -> ItemAttributesPartialState {
  1403. ItemAttributesPartialState::new()
  1404. }
  1405. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1406. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  1407. ::protobuf::lazy::Lazy::INIT;
  1408. unsafe {
  1409. descriptor.get(|| {
  1410. let mut fields = ::std::vec::Vec::new();
  1411. fields.push(
  1412. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  1413. _,
  1414. ::protobuf::types::ProtobufTypeMessage<
  1415. super::playlist4meta::ItemAttributes,
  1416. >,
  1417. >(
  1418. "values",
  1419. |m: &ItemAttributesPartialState| &m.values,
  1420. |m: &mut ItemAttributesPartialState| &mut m.values,
  1421. ),
  1422. );
  1423. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
  1424. _,
  1425. ::protobuf::types::ProtobufTypeEnum<
  1426. ItemAttributesPartialState_ItemAttributeKind,
  1427. >,
  1428. >(
  1429. "no_value",
  1430. |m: &ItemAttributesPartialState| &m.no_value,
  1431. |m: &mut ItemAttributesPartialState| &mut m.no_value,
  1432. ));
  1433. ::protobuf::reflect::MessageDescriptor::new_pb_name::<ItemAttributesPartialState>(
  1434. "ItemAttributesPartialState",
  1435. fields,
  1436. file_descriptor_proto(),
  1437. )
  1438. })
  1439. }
  1440. }
  1441. fn default_instance() -> &'static ItemAttributesPartialState {
  1442. static mut instance: ::protobuf::lazy::Lazy<ItemAttributesPartialState> =
  1443. ::protobuf::lazy::Lazy::INIT;
  1444. unsafe { instance.get(ItemAttributesPartialState::new) }
  1445. }
  1446. }
  1447. impl ::protobuf::Clear for ItemAttributesPartialState {
  1448. fn clear(&mut self) {
  1449. self.values.clear();
  1450. self.no_value.clear();
  1451. self.unknown_fields.clear();
  1452. }
  1453. }
  1454. impl ::std::fmt::Debug for ItemAttributesPartialState {
  1455. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1456. ::protobuf::text_format::fmt(self, f)
  1457. }
  1458. }
  1459. impl ::protobuf::reflect::ProtobufValue for ItemAttributesPartialState {
  1460. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1461. ::protobuf::reflect::ReflectValueRef::Message(self)
  1462. }
  1463. }
  1464. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  1465. pub enum ItemAttributesPartialState_ItemAttributeKind {
  1466. ITEM_UNKNOWN = 0,
  1467. ITEM_ADDED_BY = 1,
  1468. ITEM_TIMESTAMP = 2,
  1469. ITEM_MESSAGE = 3,
  1470. ITEM_SEEN = 4,
  1471. ITEM_DOWNLOAD_COUNT = 5,
  1472. ITEM_DOWNLOAD_FORMAT = 6,
  1473. ITEM_SEVENDIGITAL_ID = 7,
  1474. ITEM_SEVENDIGITAL_LEFT = 8,
  1475. ITEM_SEEN_AT = 9,
  1476. ITEM_PUBLIC = 10,
  1477. }
  1478. impl ::protobuf::ProtobufEnum for ItemAttributesPartialState_ItemAttributeKind {
  1479. fn value(&self) -> i32 {
  1480. *self as i32
  1481. }
  1482. fn from_i32(value: i32) -> ::std::option::Option<ItemAttributesPartialState_ItemAttributeKind> {
  1483. match value {
  1484. 0 => ::std::option::Option::Some(
  1485. ItemAttributesPartialState_ItemAttributeKind::ITEM_UNKNOWN,
  1486. ),
  1487. 1 => ::std::option::Option::Some(
  1488. ItemAttributesPartialState_ItemAttributeKind::ITEM_ADDED_BY,
  1489. ),
  1490. 2 => ::std::option::Option::Some(
  1491. ItemAttributesPartialState_ItemAttributeKind::ITEM_TIMESTAMP,
  1492. ),
  1493. 3 => ::std::option::Option::Some(
  1494. ItemAttributesPartialState_ItemAttributeKind::ITEM_MESSAGE,
  1495. ),
  1496. 4 => {
  1497. ::std::option::Option::Some(ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN)
  1498. }
  1499. 5 => ::std::option::Option::Some(
  1500. ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_COUNT,
  1501. ),
  1502. 6 => ::std::option::Option::Some(
  1503. ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_FORMAT,
  1504. ),
  1505. 7 => ::std::option::Option::Some(
  1506. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_ID,
  1507. ),
  1508. 8 => ::std::option::Option::Some(
  1509. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_LEFT,
  1510. ),
  1511. 9 => ::std::option::Option::Some(
  1512. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN_AT,
  1513. ),
  1514. 10 => ::std::option::Option::Some(
  1515. ItemAttributesPartialState_ItemAttributeKind::ITEM_PUBLIC,
  1516. ),
  1517. _ => ::std::option::Option::None,
  1518. }
  1519. }
  1520. fn values() -> &'static [Self] {
  1521. static values: &'static [ItemAttributesPartialState_ItemAttributeKind] = &[
  1522. ItemAttributesPartialState_ItemAttributeKind::ITEM_UNKNOWN,
  1523. ItemAttributesPartialState_ItemAttributeKind::ITEM_ADDED_BY,
  1524. ItemAttributesPartialState_ItemAttributeKind::ITEM_TIMESTAMP,
  1525. ItemAttributesPartialState_ItemAttributeKind::ITEM_MESSAGE,
  1526. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN,
  1527. ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_COUNT,
  1528. ItemAttributesPartialState_ItemAttributeKind::ITEM_DOWNLOAD_FORMAT,
  1529. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_ID,
  1530. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEVENDIGITAL_LEFT,
  1531. ItemAttributesPartialState_ItemAttributeKind::ITEM_SEEN_AT,
  1532. ItemAttributesPartialState_ItemAttributeKind::ITEM_PUBLIC,
  1533. ];
  1534. values
  1535. }
  1536. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  1537. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  1538. ::protobuf::lazy::Lazy::INIT;
  1539. unsafe {
  1540. descriptor.get(|| {
  1541. ::protobuf::reflect::EnumDescriptor::new_pb_name::<
  1542. ItemAttributesPartialState_ItemAttributeKind,
  1543. >(
  1544. "ItemAttributesPartialState.ItemAttributeKind",
  1545. file_descriptor_proto(),
  1546. )
  1547. })
  1548. }
  1549. }
  1550. }
  1551. impl ::std::marker::Copy for ItemAttributesPartialState_ItemAttributeKind {}
  1552. impl ::std::default::Default for ItemAttributesPartialState_ItemAttributeKind {
  1553. fn default() -> Self {
  1554. ItemAttributesPartialState_ItemAttributeKind::ITEM_UNKNOWN
  1555. }
  1556. }
  1557. impl ::protobuf::reflect::ProtobufValue for ItemAttributesPartialState_ItemAttributeKind {
  1558. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1559. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  1560. }
  1561. }
  1562. #[derive(PartialEq, Clone, Default)]
  1563. pub struct ListAttributesPartialState {
  1564. // message fields
  1565. values: ::protobuf::SingularPtrField<super::playlist4meta::ListAttributes>,
  1566. no_value: ::std::vec::Vec<ListAttributesPartialState_ListAttributeKind>,
  1567. // special fields
  1568. pub unknown_fields: ::protobuf::UnknownFields,
  1569. pub cached_size: ::protobuf::CachedSize,
  1570. }
  1571. impl<'a> ::std::default::Default for &'a ListAttributesPartialState {
  1572. fn default() -> &'a ListAttributesPartialState {
  1573. <ListAttributesPartialState as ::protobuf::Message>::default_instance()
  1574. }
  1575. }
  1576. impl ListAttributesPartialState {
  1577. pub fn new() -> ListAttributesPartialState {
  1578. ::std::default::Default::default()
  1579. }
  1580. // optional .ListAttributes values = 1;
  1581. pub fn get_values(&self) -> &super::playlist4meta::ListAttributes {
  1582. self.values
  1583. .as_ref()
  1584. .unwrap_or_else(|| super::playlist4meta::ListAttributes::default_instance())
  1585. }
  1586. pub fn clear_values(&mut self) {
  1587. self.values.clear();
  1588. }
  1589. pub fn has_values(&self) -> bool {
  1590. self.values.is_some()
  1591. }
  1592. // Param is passed by value, moved
  1593. pub fn set_values(&mut self, v: super::playlist4meta::ListAttributes) {
  1594. self.values = ::protobuf::SingularPtrField::some(v);
  1595. }
  1596. // Mutable pointer to the field.
  1597. // If field is not initialized, it is initialized with default value first.
  1598. pub fn mut_values(&mut self) -> &mut super::playlist4meta::ListAttributes {
  1599. if self.values.is_none() {
  1600. self.values.set_default();
  1601. }
  1602. self.values.as_mut().unwrap()
  1603. }
  1604. // Take field
  1605. pub fn take_values(&mut self) -> super::playlist4meta::ListAttributes {
  1606. self.values
  1607. .take()
  1608. .unwrap_or_else(|| super::playlist4meta::ListAttributes::new())
  1609. }
  1610. // repeated .ListAttributesPartialState.ListAttributeKind no_value = 2;
  1611. pub fn get_no_value(&self) -> &[ListAttributesPartialState_ListAttributeKind] {
  1612. &self.no_value
  1613. }
  1614. pub fn clear_no_value(&mut self) {
  1615. self.no_value.clear();
  1616. }
  1617. // Param is passed by value, moved
  1618. pub fn set_no_value(
  1619. &mut self,
  1620. v: ::std::vec::Vec<ListAttributesPartialState_ListAttributeKind>,
  1621. ) {
  1622. self.no_value = v;
  1623. }
  1624. // Mutable pointer to the field.
  1625. pub fn mut_no_value(
  1626. &mut self,
  1627. ) -> &mut ::std::vec::Vec<ListAttributesPartialState_ListAttributeKind> {
  1628. &mut self.no_value
  1629. }
  1630. // Take field
  1631. pub fn take_no_value(
  1632. &mut self,
  1633. ) -> ::std::vec::Vec<ListAttributesPartialState_ListAttributeKind> {
  1634. ::std::mem::replace(&mut self.no_value, ::std::vec::Vec::new())
  1635. }
  1636. }
  1637. impl ::protobuf::Message for ListAttributesPartialState {
  1638. fn is_initialized(&self) -> bool {
  1639. for v in &self.values {
  1640. if !v.is_initialized() {
  1641. return false;
  1642. }
  1643. }
  1644. true
  1645. }
  1646. fn merge_from(
  1647. &mut self,
  1648. is: &mut ::protobuf::CodedInputStream<'_>,
  1649. ) -> ::protobuf::ProtobufResult<()> {
  1650. while !is.eof()? {
  1651. let (field_number, wire_type) = is.read_tag_unpack()?;
  1652. match field_number {
  1653. 1 => {
  1654. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.values)?;
  1655. }
  1656. 2 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
  1657. wire_type,
  1658. is,
  1659. &mut self.no_value,
  1660. 2,
  1661. &mut self.unknown_fields,
  1662. )?,
  1663. _ => {
  1664. ::protobuf::rt::read_unknown_or_skip_group(
  1665. field_number,
  1666. wire_type,
  1667. is,
  1668. self.mut_unknown_fields(),
  1669. )?;
  1670. }
  1671. };
  1672. }
  1673. ::std::result::Result::Ok(())
  1674. }
  1675. // Compute sizes of nested messages
  1676. #[allow(unused_variables)]
  1677. fn compute_size(&self) -> u32 {
  1678. let mut my_size = 0;
  1679. if let Some(ref v) = self.values.as_ref() {
  1680. let len = v.compute_size();
  1681. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1682. }
  1683. for value in &self.no_value {
  1684. my_size += ::protobuf::rt::enum_size(2, *value);
  1685. }
  1686. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1687. self.cached_size.set(my_size);
  1688. my_size
  1689. }
  1690. fn write_to_with_cached_sizes(
  1691. &self,
  1692. os: &mut ::protobuf::CodedOutputStream<'_>,
  1693. ) -> ::protobuf::ProtobufResult<()> {
  1694. if let Some(ref v) = self.values.as_ref() {
  1695. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1696. os.write_raw_varint32(v.get_cached_size())?;
  1697. v.write_to_with_cached_sizes(os)?;
  1698. }
  1699. for v in &self.no_value {
  1700. os.write_enum(2, v.value())?;
  1701. }
  1702. os.write_unknown_fields(self.get_unknown_fields())?;
  1703. ::std::result::Result::Ok(())
  1704. }
  1705. fn get_cached_size(&self) -> u32 {
  1706. self.cached_size.get()
  1707. }
  1708. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1709. &self.unknown_fields
  1710. }
  1711. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1712. &mut self.unknown_fields
  1713. }
  1714. fn as_any(&self) -> &dyn (::std::any::Any) {
  1715. self as &dyn (::std::any::Any)
  1716. }
  1717. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1718. self as &mut dyn (::std::any::Any)
  1719. }
  1720. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1721. self
  1722. }
  1723. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1724. Self::descriptor_static()
  1725. }
  1726. fn new() -> ListAttributesPartialState {
  1727. ListAttributesPartialState::new()
  1728. }
  1729. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1730. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  1731. ::protobuf::lazy::Lazy::INIT;
  1732. unsafe {
  1733. descriptor.get(|| {
  1734. let mut fields = ::std::vec::Vec::new();
  1735. fields.push(
  1736. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  1737. _,
  1738. ::protobuf::types::ProtobufTypeMessage<
  1739. super::playlist4meta::ListAttributes,
  1740. >,
  1741. >(
  1742. "values",
  1743. |m: &ListAttributesPartialState| &m.values,
  1744. |m: &mut ListAttributesPartialState| &mut m.values,
  1745. ),
  1746. );
  1747. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
  1748. _,
  1749. ::protobuf::types::ProtobufTypeEnum<
  1750. ListAttributesPartialState_ListAttributeKind,
  1751. >,
  1752. >(
  1753. "no_value",
  1754. |m: &ListAttributesPartialState| &m.no_value,
  1755. |m: &mut ListAttributesPartialState| &mut m.no_value,
  1756. ));
  1757. ::protobuf::reflect::MessageDescriptor::new_pb_name::<ListAttributesPartialState>(
  1758. "ListAttributesPartialState",
  1759. fields,
  1760. file_descriptor_proto(),
  1761. )
  1762. })
  1763. }
  1764. }
  1765. fn default_instance() -> &'static ListAttributesPartialState {
  1766. static mut instance: ::protobuf::lazy::Lazy<ListAttributesPartialState> =
  1767. ::protobuf::lazy::Lazy::INIT;
  1768. unsafe { instance.get(ListAttributesPartialState::new) }
  1769. }
  1770. }
  1771. impl ::protobuf::Clear for ListAttributesPartialState {
  1772. fn clear(&mut self) {
  1773. self.values.clear();
  1774. self.no_value.clear();
  1775. self.unknown_fields.clear();
  1776. }
  1777. }
  1778. impl ::std::fmt::Debug for ListAttributesPartialState {
  1779. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1780. ::protobuf::text_format::fmt(self, f)
  1781. }
  1782. }
  1783. impl ::protobuf::reflect::ProtobufValue for ListAttributesPartialState {
  1784. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1785. ::protobuf::reflect::ReflectValueRef::Message(self)
  1786. }
  1787. }
  1788. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  1789. pub enum ListAttributesPartialState_ListAttributeKind {
  1790. LIST_UNKNOWN = 0,
  1791. LIST_NAME = 1,
  1792. LIST_DESCRIPTION = 2,
  1793. LIST_PICTURE = 3,
  1794. LIST_COLLABORATIVE = 4,
  1795. LIST_PL3_VERSION = 5,
  1796. LIST_DELETED_BY_OWNER = 6,
  1797. LIST_RESTRICTED_COLLABORATIVE = 7,
  1798. }
  1799. impl ::protobuf::ProtobufEnum for ListAttributesPartialState_ListAttributeKind {
  1800. fn value(&self) -> i32 {
  1801. *self as i32
  1802. }
  1803. fn from_i32(value: i32) -> ::std::option::Option<ListAttributesPartialState_ListAttributeKind> {
  1804. match value {
  1805. 0 => ::std::option::Option::Some(
  1806. ListAttributesPartialState_ListAttributeKind::LIST_UNKNOWN,
  1807. ),
  1808. 1 => {
  1809. ::std::option::Option::Some(ListAttributesPartialState_ListAttributeKind::LIST_NAME)
  1810. }
  1811. 2 => ::std::option::Option::Some(
  1812. ListAttributesPartialState_ListAttributeKind::LIST_DESCRIPTION,
  1813. ),
  1814. 3 => ::std::option::Option::Some(
  1815. ListAttributesPartialState_ListAttributeKind::LIST_PICTURE,
  1816. ),
  1817. 4 => ::std::option::Option::Some(
  1818. ListAttributesPartialState_ListAttributeKind::LIST_COLLABORATIVE,
  1819. ),
  1820. 5 => ::std::option::Option::Some(
  1821. ListAttributesPartialState_ListAttributeKind::LIST_PL3_VERSION,
  1822. ),
  1823. 6 => ::std::option::Option::Some(
  1824. ListAttributesPartialState_ListAttributeKind::LIST_DELETED_BY_OWNER,
  1825. ),
  1826. 7 => ::std::option::Option::Some(
  1827. ListAttributesPartialState_ListAttributeKind::LIST_RESTRICTED_COLLABORATIVE,
  1828. ),
  1829. _ => ::std::option::Option::None,
  1830. }
  1831. }
  1832. fn values() -> &'static [Self] {
  1833. static values: &'static [ListAttributesPartialState_ListAttributeKind] = &[
  1834. ListAttributesPartialState_ListAttributeKind::LIST_UNKNOWN,
  1835. ListAttributesPartialState_ListAttributeKind::LIST_NAME,
  1836. ListAttributesPartialState_ListAttributeKind::LIST_DESCRIPTION,
  1837. ListAttributesPartialState_ListAttributeKind::LIST_PICTURE,
  1838. ListAttributesPartialState_ListAttributeKind::LIST_COLLABORATIVE,
  1839. ListAttributesPartialState_ListAttributeKind::LIST_PL3_VERSION,
  1840. ListAttributesPartialState_ListAttributeKind::LIST_DELETED_BY_OWNER,
  1841. ListAttributesPartialState_ListAttributeKind::LIST_RESTRICTED_COLLABORATIVE,
  1842. ];
  1843. values
  1844. }
  1845. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  1846. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  1847. ::protobuf::lazy::Lazy::INIT;
  1848. unsafe {
  1849. descriptor.get(|| {
  1850. ::protobuf::reflect::EnumDescriptor::new_pb_name::<
  1851. ListAttributesPartialState_ListAttributeKind,
  1852. >(
  1853. "ListAttributesPartialState.ListAttributeKind",
  1854. file_descriptor_proto(),
  1855. )
  1856. })
  1857. }
  1858. }
  1859. }
  1860. impl ::std::marker::Copy for ListAttributesPartialState_ListAttributeKind {}
  1861. impl ::std::default::Default for ListAttributesPartialState_ListAttributeKind {
  1862. fn default() -> Self {
  1863. ListAttributesPartialState_ListAttributeKind::LIST_UNKNOWN
  1864. }
  1865. }
  1866. impl ::protobuf::reflect::ProtobufValue for ListAttributesPartialState_ListAttributeKind {
  1867. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1868. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  1869. }
  1870. }
  1871. #[derive(PartialEq, Clone, Default)]
  1872. pub struct UpdateItemAttributes {
  1873. // message fields
  1874. index: ::std::option::Option<i32>,
  1875. new_attributes: ::protobuf::SingularPtrField<ItemAttributesPartialState>,
  1876. old_attributes: ::protobuf::SingularPtrField<ItemAttributesPartialState>,
  1877. list_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  1878. old_attributes_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  1879. // special fields
  1880. pub unknown_fields: ::protobuf::UnknownFields,
  1881. pub cached_size: ::protobuf::CachedSize,
  1882. }
  1883. impl<'a> ::std::default::Default for &'a UpdateItemAttributes {
  1884. fn default() -> &'a UpdateItemAttributes {
  1885. <UpdateItemAttributes as ::protobuf::Message>::default_instance()
  1886. }
  1887. }
  1888. impl UpdateItemAttributes {
  1889. pub fn new() -> UpdateItemAttributes {
  1890. ::std::default::Default::default()
  1891. }
  1892. // optional int32 index = 1;
  1893. pub fn get_index(&self) -> i32 {
  1894. self.index.unwrap_or(0)
  1895. }
  1896. pub fn clear_index(&mut self) {
  1897. self.index = ::std::option::Option::None;
  1898. }
  1899. pub fn has_index(&self) -> bool {
  1900. self.index.is_some()
  1901. }
  1902. // Param is passed by value, moved
  1903. pub fn set_index(&mut self, v: i32) {
  1904. self.index = ::std::option::Option::Some(v);
  1905. }
  1906. // optional .ItemAttributesPartialState new_attributes = 2;
  1907. pub fn get_new_attributes(&self) -> &ItemAttributesPartialState {
  1908. self.new_attributes
  1909. .as_ref()
  1910. .unwrap_or_else(|| ItemAttributesPartialState::default_instance())
  1911. }
  1912. pub fn clear_new_attributes(&mut self) {
  1913. self.new_attributes.clear();
  1914. }
  1915. pub fn has_new_attributes(&self) -> bool {
  1916. self.new_attributes.is_some()
  1917. }
  1918. // Param is passed by value, moved
  1919. pub fn set_new_attributes(&mut self, v: ItemAttributesPartialState) {
  1920. self.new_attributes = ::protobuf::SingularPtrField::some(v);
  1921. }
  1922. // Mutable pointer to the field.
  1923. // If field is not initialized, it is initialized with default value first.
  1924. pub fn mut_new_attributes(&mut self) -> &mut ItemAttributesPartialState {
  1925. if self.new_attributes.is_none() {
  1926. self.new_attributes.set_default();
  1927. }
  1928. self.new_attributes.as_mut().unwrap()
  1929. }
  1930. // Take field
  1931. pub fn take_new_attributes(&mut self) -> ItemAttributesPartialState {
  1932. self.new_attributes
  1933. .take()
  1934. .unwrap_or_else(|| ItemAttributesPartialState::new())
  1935. }
  1936. // optional .ItemAttributesPartialState old_attributes = 3;
  1937. pub fn get_old_attributes(&self) -> &ItemAttributesPartialState {
  1938. self.old_attributes
  1939. .as_ref()
  1940. .unwrap_or_else(|| ItemAttributesPartialState::default_instance())
  1941. }
  1942. pub fn clear_old_attributes(&mut self) {
  1943. self.old_attributes.clear();
  1944. }
  1945. pub fn has_old_attributes(&self) -> bool {
  1946. self.old_attributes.is_some()
  1947. }
  1948. // Param is passed by value, moved
  1949. pub fn set_old_attributes(&mut self, v: ItemAttributesPartialState) {
  1950. self.old_attributes = ::protobuf::SingularPtrField::some(v);
  1951. }
  1952. // Mutable pointer to the field.
  1953. // If field is not initialized, it is initialized with default value first.
  1954. pub fn mut_old_attributes(&mut self) -> &mut ItemAttributesPartialState {
  1955. if self.old_attributes.is_none() {
  1956. self.old_attributes.set_default();
  1957. }
  1958. self.old_attributes.as_mut().unwrap()
  1959. }
  1960. // Take field
  1961. pub fn take_old_attributes(&mut self) -> ItemAttributesPartialState {
  1962. self.old_attributes
  1963. .take()
  1964. .unwrap_or_else(|| ItemAttributesPartialState::new())
  1965. }
  1966. // optional .ListChecksum list_checksum = 4;
  1967. pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum {
  1968. self.list_checksum
  1969. .as_ref()
  1970. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  1971. }
  1972. pub fn clear_list_checksum(&mut self) {
  1973. self.list_checksum.clear();
  1974. }
  1975. pub fn has_list_checksum(&self) -> bool {
  1976. self.list_checksum.is_some()
  1977. }
  1978. // Param is passed by value, moved
  1979. pub fn set_list_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  1980. self.list_checksum = ::protobuf::SingularPtrField::some(v);
  1981. }
  1982. // Mutable pointer to the field.
  1983. // If field is not initialized, it is initialized with default value first.
  1984. pub fn mut_list_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  1985. if self.list_checksum.is_none() {
  1986. self.list_checksum.set_default();
  1987. }
  1988. self.list_checksum.as_mut().unwrap()
  1989. }
  1990. // Take field
  1991. pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  1992. self.list_checksum
  1993. .take()
  1994. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  1995. }
  1996. // optional .ListChecksum old_attributes_checksum = 5;
  1997. pub fn get_old_attributes_checksum(&self) -> &super::playlist4meta::ListChecksum {
  1998. self.old_attributes_checksum
  1999. .as_ref()
  2000. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  2001. }
  2002. pub fn clear_old_attributes_checksum(&mut self) {
  2003. self.old_attributes_checksum.clear();
  2004. }
  2005. pub fn has_old_attributes_checksum(&self) -> bool {
  2006. self.old_attributes_checksum.is_some()
  2007. }
  2008. // Param is passed by value, moved
  2009. pub fn set_old_attributes_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  2010. self.old_attributes_checksum = ::protobuf::SingularPtrField::some(v);
  2011. }
  2012. // Mutable pointer to the field.
  2013. // If field is not initialized, it is initialized with default value first.
  2014. pub fn mut_old_attributes_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  2015. if self.old_attributes_checksum.is_none() {
  2016. self.old_attributes_checksum.set_default();
  2017. }
  2018. self.old_attributes_checksum.as_mut().unwrap()
  2019. }
  2020. // Take field
  2021. pub fn take_old_attributes_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  2022. self.old_attributes_checksum
  2023. .take()
  2024. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  2025. }
  2026. }
  2027. impl ::protobuf::Message for UpdateItemAttributes {
  2028. fn is_initialized(&self) -> bool {
  2029. for v in &self.new_attributes {
  2030. if !v.is_initialized() {
  2031. return false;
  2032. }
  2033. }
  2034. for v in &self.old_attributes {
  2035. if !v.is_initialized() {
  2036. return false;
  2037. }
  2038. }
  2039. for v in &self.list_checksum {
  2040. if !v.is_initialized() {
  2041. return false;
  2042. }
  2043. }
  2044. for v in &self.old_attributes_checksum {
  2045. if !v.is_initialized() {
  2046. return false;
  2047. }
  2048. }
  2049. true
  2050. }
  2051. fn merge_from(
  2052. &mut self,
  2053. is: &mut ::protobuf::CodedInputStream<'_>,
  2054. ) -> ::protobuf::ProtobufResult<()> {
  2055. while !is.eof()? {
  2056. let (field_number, wire_type) = is.read_tag_unpack()?;
  2057. match field_number {
  2058. 1 => {
  2059. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2060. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  2061. wire_type,
  2062. ));
  2063. }
  2064. let tmp = is.read_int32()?;
  2065. self.index = ::std::option::Option::Some(tmp);
  2066. }
  2067. 2 => {
  2068. ::protobuf::rt::read_singular_message_into(
  2069. wire_type,
  2070. is,
  2071. &mut self.new_attributes,
  2072. )?;
  2073. }
  2074. 3 => {
  2075. ::protobuf::rt::read_singular_message_into(
  2076. wire_type,
  2077. is,
  2078. &mut self.old_attributes,
  2079. )?;
  2080. }
  2081. 4 => {
  2082. ::protobuf::rt::read_singular_message_into(
  2083. wire_type,
  2084. is,
  2085. &mut self.list_checksum,
  2086. )?;
  2087. }
  2088. 5 => {
  2089. ::protobuf::rt::read_singular_message_into(
  2090. wire_type,
  2091. is,
  2092. &mut self.old_attributes_checksum,
  2093. )?;
  2094. }
  2095. _ => {
  2096. ::protobuf::rt::read_unknown_or_skip_group(
  2097. field_number,
  2098. wire_type,
  2099. is,
  2100. self.mut_unknown_fields(),
  2101. )?;
  2102. }
  2103. };
  2104. }
  2105. ::std::result::Result::Ok(())
  2106. }
  2107. // Compute sizes of nested messages
  2108. #[allow(unused_variables)]
  2109. fn compute_size(&self) -> u32 {
  2110. let mut my_size = 0;
  2111. if let Some(v) = self.index {
  2112. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  2113. }
  2114. if let Some(ref v) = self.new_attributes.as_ref() {
  2115. let len = v.compute_size();
  2116. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2117. }
  2118. if let Some(ref v) = self.old_attributes.as_ref() {
  2119. let len = v.compute_size();
  2120. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2121. }
  2122. if let Some(ref v) = self.list_checksum.as_ref() {
  2123. let len = v.compute_size();
  2124. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2125. }
  2126. if let Some(ref v) = self.old_attributes_checksum.as_ref() {
  2127. let len = v.compute_size();
  2128. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2129. }
  2130. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2131. self.cached_size.set(my_size);
  2132. my_size
  2133. }
  2134. fn write_to_with_cached_sizes(
  2135. &self,
  2136. os: &mut ::protobuf::CodedOutputStream<'_>,
  2137. ) -> ::protobuf::ProtobufResult<()> {
  2138. if let Some(v) = self.index {
  2139. os.write_int32(1, v)?;
  2140. }
  2141. if let Some(ref v) = self.new_attributes.as_ref() {
  2142. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2143. os.write_raw_varint32(v.get_cached_size())?;
  2144. v.write_to_with_cached_sizes(os)?;
  2145. }
  2146. if let Some(ref v) = self.old_attributes.as_ref() {
  2147. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2148. os.write_raw_varint32(v.get_cached_size())?;
  2149. v.write_to_with_cached_sizes(os)?;
  2150. }
  2151. if let Some(ref v) = self.list_checksum.as_ref() {
  2152. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2153. os.write_raw_varint32(v.get_cached_size())?;
  2154. v.write_to_with_cached_sizes(os)?;
  2155. }
  2156. if let Some(ref v) = self.old_attributes_checksum.as_ref() {
  2157. os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2158. os.write_raw_varint32(v.get_cached_size())?;
  2159. v.write_to_with_cached_sizes(os)?;
  2160. }
  2161. os.write_unknown_fields(self.get_unknown_fields())?;
  2162. ::std::result::Result::Ok(())
  2163. }
  2164. fn get_cached_size(&self) -> u32 {
  2165. self.cached_size.get()
  2166. }
  2167. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2168. &self.unknown_fields
  2169. }
  2170. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2171. &mut self.unknown_fields
  2172. }
  2173. fn as_any(&self) -> &dyn (::std::any::Any) {
  2174. self as &dyn (::std::any::Any)
  2175. }
  2176. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2177. self as &mut dyn (::std::any::Any)
  2178. }
  2179. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2180. self
  2181. }
  2182. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2183. Self::descriptor_static()
  2184. }
  2185. fn new() -> UpdateItemAttributes {
  2186. UpdateItemAttributes::new()
  2187. }
  2188. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2189. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  2190. ::protobuf::lazy::Lazy::INIT;
  2191. unsafe {
  2192. descriptor.get(|| {
  2193. let mut fields = ::std::vec::Vec::new();
  2194. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  2195. _,
  2196. ::protobuf::types::ProtobufTypeInt32,
  2197. >(
  2198. "index",
  2199. |m: &UpdateItemAttributes| &m.index,
  2200. |m: &mut UpdateItemAttributes| &mut m.index,
  2201. ));
  2202. fields.push(
  2203. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2204. _,
  2205. ::protobuf::types::ProtobufTypeMessage<ItemAttributesPartialState>,
  2206. >(
  2207. "new_attributes",
  2208. |m: &UpdateItemAttributes| &m.new_attributes,
  2209. |m: &mut UpdateItemAttributes| &mut m.new_attributes,
  2210. ),
  2211. );
  2212. fields.push(
  2213. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2214. _,
  2215. ::protobuf::types::ProtobufTypeMessage<ItemAttributesPartialState>,
  2216. >(
  2217. "old_attributes",
  2218. |m: &UpdateItemAttributes| &m.old_attributes,
  2219. |m: &mut UpdateItemAttributes| &mut m.old_attributes,
  2220. ),
  2221. );
  2222. fields.push(
  2223. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2224. _,
  2225. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  2226. >(
  2227. "list_checksum",
  2228. |m: &UpdateItemAttributes| &m.list_checksum,
  2229. |m: &mut UpdateItemAttributes| &mut m.list_checksum,
  2230. ),
  2231. );
  2232. fields.push(
  2233. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2234. _,
  2235. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  2236. >(
  2237. "old_attributes_checksum",
  2238. |m: &UpdateItemAttributes| &m.old_attributes_checksum,
  2239. |m: &mut UpdateItemAttributes| &mut m.old_attributes_checksum,
  2240. ),
  2241. );
  2242. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateItemAttributes>(
  2243. "UpdateItemAttributes",
  2244. fields,
  2245. file_descriptor_proto(),
  2246. )
  2247. })
  2248. }
  2249. }
  2250. fn default_instance() -> &'static UpdateItemAttributes {
  2251. static mut instance: ::protobuf::lazy::Lazy<UpdateItemAttributes> =
  2252. ::protobuf::lazy::Lazy::INIT;
  2253. unsafe { instance.get(UpdateItemAttributes::new) }
  2254. }
  2255. }
  2256. impl ::protobuf::Clear for UpdateItemAttributes {
  2257. fn clear(&mut self) {
  2258. self.index = ::std::option::Option::None;
  2259. self.new_attributes.clear();
  2260. self.old_attributes.clear();
  2261. self.list_checksum.clear();
  2262. self.old_attributes_checksum.clear();
  2263. self.unknown_fields.clear();
  2264. }
  2265. }
  2266. impl ::std::fmt::Debug for UpdateItemAttributes {
  2267. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2268. ::protobuf::text_format::fmt(self, f)
  2269. }
  2270. }
  2271. impl ::protobuf::reflect::ProtobufValue for UpdateItemAttributes {
  2272. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2273. ::protobuf::reflect::ReflectValueRef::Message(self)
  2274. }
  2275. }
  2276. #[derive(PartialEq, Clone, Default)]
  2277. pub struct UpdateListAttributes {
  2278. // message fields
  2279. new_attributes: ::protobuf::SingularPtrField<ListAttributesPartialState>,
  2280. old_attributes: ::protobuf::SingularPtrField<ListAttributesPartialState>,
  2281. list_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  2282. old_attributes_checksum: ::protobuf::SingularPtrField<super::playlist4meta::ListChecksum>,
  2283. // special fields
  2284. pub unknown_fields: ::protobuf::UnknownFields,
  2285. pub cached_size: ::protobuf::CachedSize,
  2286. }
  2287. impl<'a> ::std::default::Default for &'a UpdateListAttributes {
  2288. fn default() -> &'a UpdateListAttributes {
  2289. <UpdateListAttributes as ::protobuf::Message>::default_instance()
  2290. }
  2291. }
  2292. impl UpdateListAttributes {
  2293. pub fn new() -> UpdateListAttributes {
  2294. ::std::default::Default::default()
  2295. }
  2296. // optional .ListAttributesPartialState new_attributes = 1;
  2297. pub fn get_new_attributes(&self) -> &ListAttributesPartialState {
  2298. self.new_attributes
  2299. .as_ref()
  2300. .unwrap_or_else(|| ListAttributesPartialState::default_instance())
  2301. }
  2302. pub fn clear_new_attributes(&mut self) {
  2303. self.new_attributes.clear();
  2304. }
  2305. pub fn has_new_attributes(&self) -> bool {
  2306. self.new_attributes.is_some()
  2307. }
  2308. // Param is passed by value, moved
  2309. pub fn set_new_attributes(&mut self, v: ListAttributesPartialState) {
  2310. self.new_attributes = ::protobuf::SingularPtrField::some(v);
  2311. }
  2312. // Mutable pointer to the field.
  2313. // If field is not initialized, it is initialized with default value first.
  2314. pub fn mut_new_attributes(&mut self) -> &mut ListAttributesPartialState {
  2315. if self.new_attributes.is_none() {
  2316. self.new_attributes.set_default();
  2317. }
  2318. self.new_attributes.as_mut().unwrap()
  2319. }
  2320. // Take field
  2321. pub fn take_new_attributes(&mut self) -> ListAttributesPartialState {
  2322. self.new_attributes
  2323. .take()
  2324. .unwrap_or_else(|| ListAttributesPartialState::new())
  2325. }
  2326. // optional .ListAttributesPartialState old_attributes = 2;
  2327. pub fn get_old_attributes(&self) -> &ListAttributesPartialState {
  2328. self.old_attributes
  2329. .as_ref()
  2330. .unwrap_or_else(|| ListAttributesPartialState::default_instance())
  2331. }
  2332. pub fn clear_old_attributes(&mut self) {
  2333. self.old_attributes.clear();
  2334. }
  2335. pub fn has_old_attributes(&self) -> bool {
  2336. self.old_attributes.is_some()
  2337. }
  2338. // Param is passed by value, moved
  2339. pub fn set_old_attributes(&mut self, v: ListAttributesPartialState) {
  2340. self.old_attributes = ::protobuf::SingularPtrField::some(v);
  2341. }
  2342. // Mutable pointer to the field.
  2343. // If field is not initialized, it is initialized with default value first.
  2344. pub fn mut_old_attributes(&mut self) -> &mut ListAttributesPartialState {
  2345. if self.old_attributes.is_none() {
  2346. self.old_attributes.set_default();
  2347. }
  2348. self.old_attributes.as_mut().unwrap()
  2349. }
  2350. // Take field
  2351. pub fn take_old_attributes(&mut self) -> ListAttributesPartialState {
  2352. self.old_attributes
  2353. .take()
  2354. .unwrap_or_else(|| ListAttributesPartialState::new())
  2355. }
  2356. // optional .ListChecksum list_checksum = 3;
  2357. pub fn get_list_checksum(&self) -> &super::playlist4meta::ListChecksum {
  2358. self.list_checksum
  2359. .as_ref()
  2360. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  2361. }
  2362. pub fn clear_list_checksum(&mut self) {
  2363. self.list_checksum.clear();
  2364. }
  2365. pub fn has_list_checksum(&self) -> bool {
  2366. self.list_checksum.is_some()
  2367. }
  2368. // Param is passed by value, moved
  2369. pub fn set_list_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  2370. self.list_checksum = ::protobuf::SingularPtrField::some(v);
  2371. }
  2372. // Mutable pointer to the field.
  2373. // If field is not initialized, it is initialized with default value first.
  2374. pub fn mut_list_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  2375. if self.list_checksum.is_none() {
  2376. self.list_checksum.set_default();
  2377. }
  2378. self.list_checksum.as_mut().unwrap()
  2379. }
  2380. // Take field
  2381. pub fn take_list_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  2382. self.list_checksum
  2383. .take()
  2384. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  2385. }
  2386. // optional .ListChecksum old_attributes_checksum = 4;
  2387. pub fn get_old_attributes_checksum(&self) -> &super::playlist4meta::ListChecksum {
  2388. self.old_attributes_checksum
  2389. .as_ref()
  2390. .unwrap_or_else(|| super::playlist4meta::ListChecksum::default_instance())
  2391. }
  2392. pub fn clear_old_attributes_checksum(&mut self) {
  2393. self.old_attributes_checksum.clear();
  2394. }
  2395. pub fn has_old_attributes_checksum(&self) -> bool {
  2396. self.old_attributes_checksum.is_some()
  2397. }
  2398. // Param is passed by value, moved
  2399. pub fn set_old_attributes_checksum(&mut self, v: super::playlist4meta::ListChecksum) {
  2400. self.old_attributes_checksum = ::protobuf::SingularPtrField::some(v);
  2401. }
  2402. // Mutable pointer to the field.
  2403. // If field is not initialized, it is initialized with default value first.
  2404. pub fn mut_old_attributes_checksum(&mut self) -> &mut super::playlist4meta::ListChecksum {
  2405. if self.old_attributes_checksum.is_none() {
  2406. self.old_attributes_checksum.set_default();
  2407. }
  2408. self.old_attributes_checksum.as_mut().unwrap()
  2409. }
  2410. // Take field
  2411. pub fn take_old_attributes_checksum(&mut self) -> super::playlist4meta::ListChecksum {
  2412. self.old_attributes_checksum
  2413. .take()
  2414. .unwrap_or_else(|| super::playlist4meta::ListChecksum::new())
  2415. }
  2416. }
  2417. impl ::protobuf::Message for UpdateListAttributes {
  2418. fn is_initialized(&self) -> bool {
  2419. for v in &self.new_attributes {
  2420. if !v.is_initialized() {
  2421. return false;
  2422. }
  2423. }
  2424. for v in &self.old_attributes {
  2425. if !v.is_initialized() {
  2426. return false;
  2427. }
  2428. }
  2429. for v in &self.list_checksum {
  2430. if !v.is_initialized() {
  2431. return false;
  2432. }
  2433. }
  2434. for v in &self.old_attributes_checksum {
  2435. if !v.is_initialized() {
  2436. return false;
  2437. }
  2438. }
  2439. true
  2440. }
  2441. fn merge_from(
  2442. &mut self,
  2443. is: &mut ::protobuf::CodedInputStream<'_>,
  2444. ) -> ::protobuf::ProtobufResult<()> {
  2445. while !is.eof()? {
  2446. let (field_number, wire_type) = is.read_tag_unpack()?;
  2447. match field_number {
  2448. 1 => {
  2449. ::protobuf::rt::read_singular_message_into(
  2450. wire_type,
  2451. is,
  2452. &mut self.new_attributes,
  2453. )?;
  2454. }
  2455. 2 => {
  2456. ::protobuf::rt::read_singular_message_into(
  2457. wire_type,
  2458. is,
  2459. &mut self.old_attributes,
  2460. )?;
  2461. }
  2462. 3 => {
  2463. ::protobuf::rt::read_singular_message_into(
  2464. wire_type,
  2465. is,
  2466. &mut self.list_checksum,
  2467. )?;
  2468. }
  2469. 4 => {
  2470. ::protobuf::rt::read_singular_message_into(
  2471. wire_type,
  2472. is,
  2473. &mut self.old_attributes_checksum,
  2474. )?;
  2475. }
  2476. _ => {
  2477. ::protobuf::rt::read_unknown_or_skip_group(
  2478. field_number,
  2479. wire_type,
  2480. is,
  2481. self.mut_unknown_fields(),
  2482. )?;
  2483. }
  2484. };
  2485. }
  2486. ::std::result::Result::Ok(())
  2487. }
  2488. // Compute sizes of nested messages
  2489. #[allow(unused_variables)]
  2490. fn compute_size(&self) -> u32 {
  2491. let mut my_size = 0;
  2492. if let Some(ref v) = self.new_attributes.as_ref() {
  2493. let len = v.compute_size();
  2494. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2495. }
  2496. if let Some(ref v) = self.old_attributes.as_ref() {
  2497. let len = v.compute_size();
  2498. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2499. }
  2500. if let Some(ref v) = self.list_checksum.as_ref() {
  2501. let len = v.compute_size();
  2502. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2503. }
  2504. if let Some(ref v) = self.old_attributes_checksum.as_ref() {
  2505. let len = v.compute_size();
  2506. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2507. }
  2508. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2509. self.cached_size.set(my_size);
  2510. my_size
  2511. }
  2512. fn write_to_with_cached_sizes(
  2513. &self,
  2514. os: &mut ::protobuf::CodedOutputStream<'_>,
  2515. ) -> ::protobuf::ProtobufResult<()> {
  2516. if let Some(ref v) = self.new_attributes.as_ref() {
  2517. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2518. os.write_raw_varint32(v.get_cached_size())?;
  2519. v.write_to_with_cached_sizes(os)?;
  2520. }
  2521. if let Some(ref v) = self.old_attributes.as_ref() {
  2522. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2523. os.write_raw_varint32(v.get_cached_size())?;
  2524. v.write_to_with_cached_sizes(os)?;
  2525. }
  2526. if let Some(ref v) = self.list_checksum.as_ref() {
  2527. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2528. os.write_raw_varint32(v.get_cached_size())?;
  2529. v.write_to_with_cached_sizes(os)?;
  2530. }
  2531. if let Some(ref v) = self.old_attributes_checksum.as_ref() {
  2532. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2533. os.write_raw_varint32(v.get_cached_size())?;
  2534. v.write_to_with_cached_sizes(os)?;
  2535. }
  2536. os.write_unknown_fields(self.get_unknown_fields())?;
  2537. ::std::result::Result::Ok(())
  2538. }
  2539. fn get_cached_size(&self) -> u32 {
  2540. self.cached_size.get()
  2541. }
  2542. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2543. &self.unknown_fields
  2544. }
  2545. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2546. &mut self.unknown_fields
  2547. }
  2548. fn as_any(&self) -> &dyn (::std::any::Any) {
  2549. self as &dyn (::std::any::Any)
  2550. }
  2551. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2552. self as &mut dyn (::std::any::Any)
  2553. }
  2554. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2555. self
  2556. }
  2557. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2558. Self::descriptor_static()
  2559. }
  2560. fn new() -> UpdateListAttributes {
  2561. UpdateListAttributes::new()
  2562. }
  2563. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2564. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  2565. ::protobuf::lazy::Lazy::INIT;
  2566. unsafe {
  2567. descriptor.get(|| {
  2568. let mut fields = ::std::vec::Vec::new();
  2569. fields.push(
  2570. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2571. _,
  2572. ::protobuf::types::ProtobufTypeMessage<ListAttributesPartialState>,
  2573. >(
  2574. "new_attributes",
  2575. |m: &UpdateListAttributes| &m.new_attributes,
  2576. |m: &mut UpdateListAttributes| &mut m.new_attributes,
  2577. ),
  2578. );
  2579. fields.push(
  2580. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2581. _,
  2582. ::protobuf::types::ProtobufTypeMessage<ListAttributesPartialState>,
  2583. >(
  2584. "old_attributes",
  2585. |m: &UpdateListAttributes| &m.old_attributes,
  2586. |m: &mut UpdateListAttributes| &mut m.old_attributes,
  2587. ),
  2588. );
  2589. fields.push(
  2590. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2591. _,
  2592. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  2593. >(
  2594. "list_checksum",
  2595. |m: &UpdateListAttributes| &m.list_checksum,
  2596. |m: &mut UpdateListAttributes| &mut m.list_checksum,
  2597. ),
  2598. );
  2599. fields.push(
  2600. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2601. _,
  2602. ::protobuf::types::ProtobufTypeMessage<super::playlist4meta::ListChecksum>,
  2603. >(
  2604. "old_attributes_checksum",
  2605. |m: &UpdateListAttributes| &m.old_attributes_checksum,
  2606. |m: &mut UpdateListAttributes| &mut m.old_attributes_checksum,
  2607. ),
  2608. );
  2609. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateListAttributes>(
  2610. "UpdateListAttributes",
  2611. fields,
  2612. file_descriptor_proto(),
  2613. )
  2614. })
  2615. }
  2616. }
  2617. fn default_instance() -> &'static UpdateListAttributes {
  2618. static mut instance: ::protobuf::lazy::Lazy<UpdateListAttributes> =
  2619. ::protobuf::lazy::Lazy::INIT;
  2620. unsafe { instance.get(UpdateListAttributes::new) }
  2621. }
  2622. }
  2623. impl ::protobuf::Clear for UpdateListAttributes {
  2624. fn clear(&mut self) {
  2625. self.new_attributes.clear();
  2626. self.old_attributes.clear();
  2627. self.list_checksum.clear();
  2628. self.old_attributes_checksum.clear();
  2629. self.unknown_fields.clear();
  2630. }
  2631. }
  2632. impl ::std::fmt::Debug for UpdateListAttributes {
  2633. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2634. ::protobuf::text_format::fmt(self, f)
  2635. }
  2636. }
  2637. impl ::protobuf::reflect::ProtobufValue for UpdateListAttributes {
  2638. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2639. ::protobuf::reflect::ReflectValueRef::Message(self)
  2640. }
  2641. }
  2642. #[derive(PartialEq, Clone, Default)]
  2643. pub struct Op {
  2644. // message fields
  2645. kind: ::std::option::Option<Op_Kind>,
  2646. add: ::protobuf::SingularPtrField<Add>,
  2647. rem: ::protobuf::SingularPtrField<Rem>,
  2648. mov: ::protobuf::SingularPtrField<Mov>,
  2649. update_item_attributes: ::protobuf::SingularPtrField<UpdateItemAttributes>,
  2650. update_list_attributes: ::protobuf::SingularPtrField<UpdateListAttributes>,
  2651. // special fields
  2652. pub unknown_fields: ::protobuf::UnknownFields,
  2653. pub cached_size: ::protobuf::CachedSize,
  2654. }
  2655. impl<'a> ::std::default::Default for &'a Op {
  2656. fn default() -> &'a Op {
  2657. <Op as ::protobuf::Message>::default_instance()
  2658. }
  2659. }
  2660. impl Op {
  2661. pub fn new() -> Op {
  2662. ::std::default::Default::default()
  2663. }
  2664. // optional .Op.Kind kind = 1;
  2665. pub fn get_kind(&self) -> Op_Kind {
  2666. self.kind.unwrap_or(Op_Kind::KIND_UNKNOWN)
  2667. }
  2668. pub fn clear_kind(&mut self) {
  2669. self.kind = ::std::option::Option::None;
  2670. }
  2671. pub fn has_kind(&self) -> bool {
  2672. self.kind.is_some()
  2673. }
  2674. // Param is passed by value, moved
  2675. pub fn set_kind(&mut self, v: Op_Kind) {
  2676. self.kind = ::std::option::Option::Some(v);
  2677. }
  2678. // optional .Add add = 2;
  2679. pub fn get_add(&self) -> &Add {
  2680. self.add.as_ref().unwrap_or_else(|| Add::default_instance())
  2681. }
  2682. pub fn clear_add(&mut self) {
  2683. self.add.clear();
  2684. }
  2685. pub fn has_add(&self) -> bool {
  2686. self.add.is_some()
  2687. }
  2688. // Param is passed by value, moved
  2689. pub fn set_add(&mut self, v: Add) {
  2690. self.add = ::protobuf::SingularPtrField::some(v);
  2691. }
  2692. // Mutable pointer to the field.
  2693. // If field is not initialized, it is initialized with default value first.
  2694. pub fn mut_add(&mut self) -> &mut Add {
  2695. if self.add.is_none() {
  2696. self.add.set_default();
  2697. }
  2698. self.add.as_mut().unwrap()
  2699. }
  2700. // Take field
  2701. pub fn take_add(&mut self) -> Add {
  2702. self.add.take().unwrap_or_else(|| Add::new())
  2703. }
  2704. // optional .Rem rem = 3;
  2705. pub fn get_rem(&self) -> &Rem {
  2706. self.rem.as_ref().unwrap_or_else(|| Rem::default_instance())
  2707. }
  2708. pub fn clear_rem(&mut self) {
  2709. self.rem.clear();
  2710. }
  2711. pub fn has_rem(&self) -> bool {
  2712. self.rem.is_some()
  2713. }
  2714. // Param is passed by value, moved
  2715. pub fn set_rem(&mut self, v: Rem) {
  2716. self.rem = ::protobuf::SingularPtrField::some(v);
  2717. }
  2718. // Mutable pointer to the field.
  2719. // If field is not initialized, it is initialized with default value first.
  2720. pub fn mut_rem(&mut self) -> &mut Rem {
  2721. if self.rem.is_none() {
  2722. self.rem.set_default();
  2723. }
  2724. self.rem.as_mut().unwrap()
  2725. }
  2726. // Take field
  2727. pub fn take_rem(&mut self) -> Rem {
  2728. self.rem.take().unwrap_or_else(|| Rem::new())
  2729. }
  2730. // optional .Mov mov = 4;
  2731. pub fn get_mov(&self) -> &Mov {
  2732. self.mov.as_ref().unwrap_or_else(|| Mov::default_instance())
  2733. }
  2734. pub fn clear_mov(&mut self) {
  2735. self.mov.clear();
  2736. }
  2737. pub fn has_mov(&self) -> bool {
  2738. self.mov.is_some()
  2739. }
  2740. // Param is passed by value, moved
  2741. pub fn set_mov(&mut self, v: Mov) {
  2742. self.mov = ::protobuf::SingularPtrField::some(v);
  2743. }
  2744. // Mutable pointer to the field.
  2745. // If field is not initialized, it is initialized with default value first.
  2746. pub fn mut_mov(&mut self) -> &mut Mov {
  2747. if self.mov.is_none() {
  2748. self.mov.set_default();
  2749. }
  2750. self.mov.as_mut().unwrap()
  2751. }
  2752. // Take field
  2753. pub fn take_mov(&mut self) -> Mov {
  2754. self.mov.take().unwrap_or_else(|| Mov::new())
  2755. }
  2756. // optional .UpdateItemAttributes update_item_attributes = 5;
  2757. pub fn get_update_item_attributes(&self) -> &UpdateItemAttributes {
  2758. self.update_item_attributes
  2759. .as_ref()
  2760. .unwrap_or_else(|| UpdateItemAttributes::default_instance())
  2761. }
  2762. pub fn clear_update_item_attributes(&mut self) {
  2763. self.update_item_attributes.clear();
  2764. }
  2765. pub fn has_update_item_attributes(&self) -> bool {
  2766. self.update_item_attributes.is_some()
  2767. }
  2768. // Param is passed by value, moved
  2769. pub fn set_update_item_attributes(&mut self, v: UpdateItemAttributes) {
  2770. self.update_item_attributes = ::protobuf::SingularPtrField::some(v);
  2771. }
  2772. // Mutable pointer to the field.
  2773. // If field is not initialized, it is initialized with default value first.
  2774. pub fn mut_update_item_attributes(&mut self) -> &mut UpdateItemAttributes {
  2775. if self.update_item_attributes.is_none() {
  2776. self.update_item_attributes.set_default();
  2777. }
  2778. self.update_item_attributes.as_mut().unwrap()
  2779. }
  2780. // Take field
  2781. pub fn take_update_item_attributes(&mut self) -> UpdateItemAttributes {
  2782. self.update_item_attributes
  2783. .take()
  2784. .unwrap_or_else(|| UpdateItemAttributes::new())
  2785. }
  2786. // optional .UpdateListAttributes update_list_attributes = 6;
  2787. pub fn get_update_list_attributes(&self) -> &UpdateListAttributes {
  2788. self.update_list_attributes
  2789. .as_ref()
  2790. .unwrap_or_else(|| UpdateListAttributes::default_instance())
  2791. }
  2792. pub fn clear_update_list_attributes(&mut self) {
  2793. self.update_list_attributes.clear();
  2794. }
  2795. pub fn has_update_list_attributes(&self) -> bool {
  2796. self.update_list_attributes.is_some()
  2797. }
  2798. // Param is passed by value, moved
  2799. pub fn set_update_list_attributes(&mut self, v: UpdateListAttributes) {
  2800. self.update_list_attributes = ::protobuf::SingularPtrField::some(v);
  2801. }
  2802. // Mutable pointer to the field.
  2803. // If field is not initialized, it is initialized with default value first.
  2804. pub fn mut_update_list_attributes(&mut self) -> &mut UpdateListAttributes {
  2805. if self.update_list_attributes.is_none() {
  2806. self.update_list_attributes.set_default();
  2807. }
  2808. self.update_list_attributes.as_mut().unwrap()
  2809. }
  2810. // Take field
  2811. pub fn take_update_list_attributes(&mut self) -> UpdateListAttributes {
  2812. self.update_list_attributes
  2813. .take()
  2814. .unwrap_or_else(|| UpdateListAttributes::new())
  2815. }
  2816. }
  2817. impl ::protobuf::Message for Op {
  2818. fn is_initialized(&self) -> bool {
  2819. for v in &self.add {
  2820. if !v.is_initialized() {
  2821. return false;
  2822. }
  2823. }
  2824. for v in &self.rem {
  2825. if !v.is_initialized() {
  2826. return false;
  2827. }
  2828. }
  2829. for v in &self.mov {
  2830. if !v.is_initialized() {
  2831. return false;
  2832. }
  2833. }
  2834. for v in &self.update_item_attributes {
  2835. if !v.is_initialized() {
  2836. return false;
  2837. }
  2838. }
  2839. for v in &self.update_list_attributes {
  2840. if !v.is_initialized() {
  2841. return false;
  2842. }
  2843. }
  2844. true
  2845. }
  2846. fn merge_from(
  2847. &mut self,
  2848. is: &mut ::protobuf::CodedInputStream<'_>,
  2849. ) -> ::protobuf::ProtobufResult<()> {
  2850. while !is.eof()? {
  2851. let (field_number, wire_type) = is.read_tag_unpack()?;
  2852. match field_number {
  2853. 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  2854. wire_type,
  2855. is,
  2856. &mut self.kind,
  2857. 1,
  2858. &mut self.unknown_fields,
  2859. )?,
  2860. 2 => {
  2861. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.add)?;
  2862. }
  2863. 3 => {
  2864. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rem)?;
  2865. }
  2866. 4 => {
  2867. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.mov)?;
  2868. }
  2869. 5 => {
  2870. ::protobuf::rt::read_singular_message_into(
  2871. wire_type,
  2872. is,
  2873. &mut self.update_item_attributes,
  2874. )?;
  2875. }
  2876. 6 => {
  2877. ::protobuf::rt::read_singular_message_into(
  2878. wire_type,
  2879. is,
  2880. &mut self.update_list_attributes,
  2881. )?;
  2882. }
  2883. _ => {
  2884. ::protobuf::rt::read_unknown_or_skip_group(
  2885. field_number,
  2886. wire_type,
  2887. is,
  2888. self.mut_unknown_fields(),
  2889. )?;
  2890. }
  2891. };
  2892. }
  2893. ::std::result::Result::Ok(())
  2894. }
  2895. // Compute sizes of nested messages
  2896. #[allow(unused_variables)]
  2897. fn compute_size(&self) -> u32 {
  2898. let mut my_size = 0;
  2899. if let Some(v) = self.kind {
  2900. my_size += ::protobuf::rt::enum_size(1, v);
  2901. }
  2902. if let Some(ref v) = self.add.as_ref() {
  2903. let len = v.compute_size();
  2904. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2905. }
  2906. if let Some(ref v) = self.rem.as_ref() {
  2907. let len = v.compute_size();
  2908. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2909. }
  2910. if let Some(ref v) = self.mov.as_ref() {
  2911. let len = v.compute_size();
  2912. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2913. }
  2914. if let Some(ref v) = self.update_item_attributes.as_ref() {
  2915. let len = v.compute_size();
  2916. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2917. }
  2918. if let Some(ref v) = self.update_list_attributes.as_ref() {
  2919. let len = v.compute_size();
  2920. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2921. }
  2922. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2923. self.cached_size.set(my_size);
  2924. my_size
  2925. }
  2926. fn write_to_with_cached_sizes(
  2927. &self,
  2928. os: &mut ::protobuf::CodedOutputStream<'_>,
  2929. ) -> ::protobuf::ProtobufResult<()> {
  2930. if let Some(v) = self.kind {
  2931. os.write_enum(1, v.value())?;
  2932. }
  2933. if let Some(ref v) = self.add.as_ref() {
  2934. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2935. os.write_raw_varint32(v.get_cached_size())?;
  2936. v.write_to_with_cached_sizes(os)?;
  2937. }
  2938. if let Some(ref v) = self.rem.as_ref() {
  2939. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2940. os.write_raw_varint32(v.get_cached_size())?;
  2941. v.write_to_with_cached_sizes(os)?;
  2942. }
  2943. if let Some(ref v) = self.mov.as_ref() {
  2944. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2945. os.write_raw_varint32(v.get_cached_size())?;
  2946. v.write_to_with_cached_sizes(os)?;
  2947. }
  2948. if let Some(ref v) = self.update_item_attributes.as_ref() {
  2949. os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2950. os.write_raw_varint32(v.get_cached_size())?;
  2951. v.write_to_with_cached_sizes(os)?;
  2952. }
  2953. if let Some(ref v) = self.update_list_attributes.as_ref() {
  2954. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2955. os.write_raw_varint32(v.get_cached_size())?;
  2956. v.write_to_with_cached_sizes(os)?;
  2957. }
  2958. os.write_unknown_fields(self.get_unknown_fields())?;
  2959. ::std::result::Result::Ok(())
  2960. }
  2961. fn get_cached_size(&self) -> u32 {
  2962. self.cached_size.get()
  2963. }
  2964. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2965. &self.unknown_fields
  2966. }
  2967. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2968. &mut self.unknown_fields
  2969. }
  2970. fn as_any(&self) -> &dyn (::std::any::Any) {
  2971. self as &dyn (::std::any::Any)
  2972. }
  2973. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2974. self as &mut dyn (::std::any::Any)
  2975. }
  2976. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2977. self
  2978. }
  2979. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2980. Self::descriptor_static()
  2981. }
  2982. fn new() -> Op {
  2983. Op::new()
  2984. }
  2985. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2986. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  2987. ::protobuf::lazy::Lazy::INIT;
  2988. unsafe {
  2989. descriptor.get(|| {
  2990. let mut fields = ::std::vec::Vec::new();
  2991. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  2992. _,
  2993. ::protobuf::types::ProtobufTypeEnum<Op_Kind>,
  2994. >(
  2995. "kind", |m: &Op| &m.kind, |m: &mut Op| &mut m.kind
  2996. ));
  2997. fields.push(
  2998. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2999. _,
  3000. ::protobuf::types::ProtobufTypeMessage<Add>,
  3001. >("add", |m: &Op| &m.add, |m: &mut Op| &mut m.add),
  3002. );
  3003. fields.push(
  3004. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  3005. _,
  3006. ::protobuf::types::ProtobufTypeMessage<Rem>,
  3007. >("rem", |m: &Op| &m.rem, |m: &mut Op| &mut m.rem),
  3008. );
  3009. fields.push(
  3010. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  3011. _,
  3012. ::protobuf::types::ProtobufTypeMessage<Mov>,
  3013. >("mov", |m: &Op| &m.mov, |m: &mut Op| &mut m.mov),
  3014. );
  3015. fields.push(
  3016. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  3017. _,
  3018. ::protobuf::types::ProtobufTypeMessage<UpdateItemAttributes>,
  3019. >(
  3020. "update_item_attributes",
  3021. |m: &Op| &m.update_item_attributes,
  3022. |m: &mut Op| &mut m.update_item_attributes,
  3023. ),
  3024. );
  3025. fields.push(
  3026. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  3027. _,
  3028. ::protobuf::types::ProtobufTypeMessage<UpdateListAttributes>,
  3029. >(
  3030. "update_list_attributes",
  3031. |m: &Op| &m.update_list_attributes,
  3032. |m: &mut Op| &mut m.update_list_attributes,
  3033. ),
  3034. );
  3035. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Op>(
  3036. "Op",
  3037. fields,
  3038. file_descriptor_proto(),
  3039. )
  3040. })
  3041. }
  3042. }
  3043. fn default_instance() -> &'static Op {
  3044. static mut instance: ::protobuf::lazy::Lazy<Op> = ::protobuf::lazy::Lazy::INIT;
  3045. unsafe { instance.get(Op::new) }
  3046. }
  3047. }
  3048. impl ::protobuf::Clear for Op {
  3049. fn clear(&mut self) {
  3050. self.kind = ::std::option::Option::None;
  3051. self.add.clear();
  3052. self.rem.clear();
  3053. self.mov.clear();
  3054. self.update_item_attributes.clear();
  3055. self.update_list_attributes.clear();
  3056. self.unknown_fields.clear();
  3057. }
  3058. }
  3059. impl ::std::fmt::Debug for Op {
  3060. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3061. ::protobuf::text_format::fmt(self, f)
  3062. }
  3063. }
  3064. impl ::protobuf::reflect::ProtobufValue for Op {
  3065. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3066. ::protobuf::reflect::ReflectValueRef::Message(self)
  3067. }
  3068. }
  3069. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  3070. pub enum Op_Kind {
  3071. KIND_UNKNOWN = 0,
  3072. ADD = 2,
  3073. REM = 3,
  3074. MOV = 4,
  3075. UPDATE_ITEM_ATTRIBUTES = 5,
  3076. UPDATE_LIST_ATTRIBUTES = 6,
  3077. }
  3078. impl ::protobuf::ProtobufEnum for Op_Kind {
  3079. fn value(&self) -> i32 {
  3080. *self as i32
  3081. }
  3082. fn from_i32(value: i32) -> ::std::option::Option<Op_Kind> {
  3083. match value {
  3084. 0 => ::std::option::Option::Some(Op_Kind::KIND_UNKNOWN),
  3085. 2 => ::std::option::Option::Some(Op_Kind::ADD),
  3086. 3 => ::std::option::Option::Some(Op_Kind::REM),
  3087. 4 => ::std::option::Option::Some(Op_Kind::MOV),
  3088. 5 => ::std::option::Option::Some(Op_Kind::UPDATE_ITEM_ATTRIBUTES),
  3089. 6 => ::std::option::Option::Some(Op_Kind::UPDATE_LIST_ATTRIBUTES),
  3090. _ => ::std::option::Option::None,
  3091. }
  3092. }
  3093. fn values() -> &'static [Self] {
  3094. static values: &'static [Op_Kind] = &[
  3095. Op_Kind::KIND_UNKNOWN,
  3096. Op_Kind::ADD,
  3097. Op_Kind::REM,
  3098. Op_Kind::MOV,
  3099. Op_Kind::UPDATE_ITEM_ATTRIBUTES,
  3100. Op_Kind::UPDATE_LIST_ATTRIBUTES,
  3101. ];
  3102. values
  3103. }
  3104. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  3105. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  3106. ::protobuf::lazy::Lazy::INIT;
  3107. unsafe {
  3108. descriptor.get(|| {
  3109. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Op_Kind>(
  3110. "Op.Kind",
  3111. file_descriptor_proto(),
  3112. )
  3113. })
  3114. }
  3115. }
  3116. }
  3117. impl ::std::marker::Copy for Op_Kind {}
  3118. impl ::std::default::Default for Op_Kind {
  3119. fn default() -> Self {
  3120. Op_Kind::KIND_UNKNOWN
  3121. }
  3122. }
  3123. impl ::protobuf::reflect::ProtobufValue for Op_Kind {
  3124. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3125. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  3126. }
  3127. }
  3128. #[derive(PartialEq, Clone, Default)]
  3129. pub struct OpList {
  3130. // message fields
  3131. ops: ::protobuf::RepeatedField<Op>,
  3132. // special fields
  3133. pub unknown_fields: ::protobuf::UnknownFields,
  3134. pub cached_size: ::protobuf::CachedSize,
  3135. }
  3136. impl<'a> ::std::default::Default for &'a OpList {
  3137. fn default() -> &'a OpList {
  3138. <OpList as ::protobuf::Message>::default_instance()
  3139. }
  3140. }
  3141. impl OpList {
  3142. pub fn new() -> OpList {
  3143. ::std::default::Default::default()
  3144. }
  3145. // repeated .Op ops = 1;
  3146. pub fn get_ops(&self) -> &[Op] {
  3147. &self.ops
  3148. }
  3149. pub fn clear_ops(&mut self) {
  3150. self.ops.clear();
  3151. }
  3152. // Param is passed by value, moved
  3153. pub fn set_ops(&mut self, v: ::protobuf::RepeatedField<Op>) {
  3154. self.ops = v;
  3155. }
  3156. // Mutable pointer to the field.
  3157. pub fn mut_ops(&mut self) -> &mut ::protobuf::RepeatedField<Op> {
  3158. &mut self.ops
  3159. }
  3160. // Take field
  3161. pub fn take_ops(&mut self) -> ::protobuf::RepeatedField<Op> {
  3162. ::std::mem::replace(&mut self.ops, ::protobuf::RepeatedField::new())
  3163. }
  3164. }
  3165. impl ::protobuf::Message for OpList {
  3166. fn is_initialized(&self) -> bool {
  3167. for v in &self.ops {
  3168. if !v.is_initialized() {
  3169. return false;
  3170. }
  3171. }
  3172. true
  3173. }
  3174. fn merge_from(
  3175. &mut self,
  3176. is: &mut ::protobuf::CodedInputStream<'_>,
  3177. ) -> ::protobuf::ProtobufResult<()> {
  3178. while !is.eof()? {
  3179. let (field_number, wire_type) = is.read_tag_unpack()?;
  3180. match field_number {
  3181. 1 => {
  3182. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.ops)?;
  3183. }
  3184. _ => {
  3185. ::protobuf::rt::read_unknown_or_skip_group(
  3186. field_number,
  3187. wire_type,
  3188. is,
  3189. self.mut_unknown_fields(),
  3190. )?;
  3191. }
  3192. };
  3193. }
  3194. ::std::result::Result::Ok(())
  3195. }
  3196. // Compute sizes of nested messages
  3197. #[allow(unused_variables)]
  3198. fn compute_size(&self) -> u32 {
  3199. let mut my_size = 0;
  3200. for value in &self.ops {
  3201. let len = value.compute_size();
  3202. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3203. }
  3204. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3205. self.cached_size.set(my_size);
  3206. my_size
  3207. }
  3208. fn write_to_with_cached_sizes(
  3209. &self,
  3210. os: &mut ::protobuf::CodedOutputStream<'_>,
  3211. ) -> ::protobuf::ProtobufResult<()> {
  3212. for v in &self.ops {
  3213. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3214. os.write_raw_varint32(v.get_cached_size())?;
  3215. v.write_to_with_cached_sizes(os)?;
  3216. }
  3217. os.write_unknown_fields(self.get_unknown_fields())?;
  3218. ::std::result::Result::Ok(())
  3219. }
  3220. fn get_cached_size(&self) -> u32 {
  3221. self.cached_size.get()
  3222. }
  3223. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3224. &self.unknown_fields
  3225. }
  3226. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3227. &mut self.unknown_fields
  3228. }
  3229. fn as_any(&self) -> &dyn (::std::any::Any) {
  3230. self as &dyn (::std::any::Any)
  3231. }
  3232. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3233. self as &mut dyn (::std::any::Any)
  3234. }
  3235. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3236. self
  3237. }
  3238. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3239. Self::descriptor_static()
  3240. }
  3241. fn new() -> OpList {
  3242. OpList::new()
  3243. }
  3244. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3245. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  3246. ::protobuf::lazy::Lazy::INIT;
  3247. unsafe {
  3248. descriptor.get(|| {
  3249. let mut fields = ::std::vec::Vec::new();
  3250. fields.push(
  3251. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3252. _,
  3253. ::protobuf::types::ProtobufTypeMessage<Op>,
  3254. >("ops", |m: &OpList| &m.ops, |m: &mut OpList| &mut m.ops),
  3255. );
  3256. ::protobuf::reflect::MessageDescriptor::new_pb_name::<OpList>(
  3257. "OpList",
  3258. fields,
  3259. file_descriptor_proto(),
  3260. )
  3261. })
  3262. }
  3263. }
  3264. fn default_instance() -> &'static OpList {
  3265. static mut instance: ::protobuf::lazy::Lazy<OpList> = ::protobuf::lazy::Lazy::INIT;
  3266. unsafe { instance.get(OpList::new) }
  3267. }
  3268. }
  3269. impl ::protobuf::Clear for OpList {
  3270. fn clear(&mut self) {
  3271. self.ops.clear();
  3272. self.unknown_fields.clear();
  3273. }
  3274. }
  3275. impl ::std::fmt::Debug for OpList {
  3276. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3277. ::protobuf::text_format::fmt(self, f)
  3278. }
  3279. }
  3280. impl ::protobuf::reflect::ProtobufValue for OpList {
  3281. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3282. ::protobuf::reflect::ReflectValueRef::Message(self)
  3283. }
  3284. }
  3285. static file_descriptor_proto_data: &'static [u8] = b"\
  3286. \n\x12playlist4ops.proto\x12\0\"\x83\x01\n\x03Add\x12\x13\n\tfromIndex\
  3287. \x18\x01\x20\x01(\x05B\0\x12\x16\n\x05items\x18\x02\x20\x03(\x0b2\x05.It\
  3288. emB\0\x12&\n\rlist_checksum\x18\x03\x20\x01(\x0b2\r.ListChecksumB\0\x12\
  3289. \x11\n\x07addLast\x18\x04\x20\x01(\x08B\0\x12\x12\n\x08addFirst\x18\x05\
  3290. \x20\x01(\x08B\0:\0\"\xd5\x01\n\x03Rem\x12\x13\n\tfromIndex\x18\x01\x20\
  3291. \x01(\x05B\0\x12\x10\n\x06length\x18\x02\x20\x01(\x05B\0\x12\x16\n\x05it\
  3292. ems\x18\x03\x20\x03(\x0b2\x05.ItemB\0\x12&\n\rlist_checksum\x18\x04\x20\
  3293. \x01(\x0b2\r.ListChecksumB\0\x12'\n\x0eitems_checksum\x18\x05\x20\x01(\
  3294. \x0b2\r.ListChecksumB\0\x12&\n\ruris_checksum\x18\x06\x20\x01(\x0b2\r.Li\
  3295. stChecksumB\0\x12\x14\n\nitemsAsKey\x18\x07\x20\x01(\x08B\0:\0\"\xba\x01\
  3296. \n\x03Mov\x12\x13\n\tfromIndex\x18\x01\x20\x01(\x05B\0\x12\x10\n\x06leng\
  3297. th\x18\x02\x20\x01(\x05B\0\x12\x11\n\x07toIndex\x18\x03\x20\x01(\x05B\0\
  3298. \x12&\n\rlist_checksum\x18\x04\x20\x01(\x0b2\r.ListChecksumB\0\x12'\n\
  3299. \x0eitems_checksum\x18\x05\x20\x01(\x0b2\r.ListChecksumB\0\x12&\n\ruris_\
  3300. checksum\x18\x06\x20\x01(\x0b2\r.ListChecksumB\0:\0\"\x82\x03\n\x1aItemA\
  3301. ttributesPartialState\x12!\n\x06values\x18\x01\x20\x01(\x0b2\x0f.ItemAtt\
  3302. ributesB\0\x12A\n\x08no_value\x18\x02\x20\x03(\x0e2-.ItemAttributesParti\
  3303. alState.ItemAttributeKindB\0\"\xfb\x01\n\x11ItemAttributeKind\x12\x10\n\
  3304. \x0cITEM_UNKNOWN\x10\0\x12\x11\n\rITEM_ADDED_BY\x10\x01\x12\x12\n\x0eITE\
  3305. M_TIMESTAMP\x10\x02\x12\x10\n\x0cITEM_MESSAGE\x10\x03\x12\r\n\tITEM_SEEN\
  3306. \x10\x04\x12\x17\n\x13ITEM_DOWNLOAD_COUNT\x10\x05\x12\x18\n\x14ITEM_DOWN\
  3307. LOAD_FORMAT\x10\x06\x12\x18\n\x14ITEM_SEVENDIGITAL_ID\x10\x07\x12\x1a\n\
  3308. \x16ITEM_SEVENDIGITAL_LEFT\x10\x08\x12\x10\n\x0cITEM_SEEN_AT\x10\t\x12\
  3309. \x0f\n\x0bITEM_PUBLIC\x10\n\x1a\0:\0\"\xd1\x02\n\x1aListAttributesPartia\
  3310. lState\x12!\n\x06values\x18\x01\x20\x01(\x0b2\x0f.ListAttributesB\0\x12A\
  3311. \n\x08no_value\x18\x02\x20\x03(\x0e2-.ListAttributesPartialState.ListAtt\
  3312. ributeKindB\0\"\xca\x01\n\x11ListAttributeKind\x12\x10\n\x0cLIST_UNKNOWN\
  3313. \x10\0\x12\r\n\tLIST_NAME\x10\x01\x12\x14\n\x10LIST_DESCRIPTION\x10\x02\
  3314. \x12\x10\n\x0cLIST_PICTURE\x10\x03\x12\x16\n\x12LIST_COLLABORATIVE\x10\
  3315. \x04\x12\x14\n\x10LIST_PL3_VERSION\x10\x05\x12\x19\n\x15LIST_DELETED_BY_\
  3316. OWNER\x10\x06\x12!\n\x1dLIST_RESTRICTED_COLLABORATIVE\x10\x07\x1a\0:\0\"\
  3317. \xf1\x01\n\x14UpdateItemAttributes\x12\x0f\n\x05index\x18\x01\x20\x01(\
  3318. \x05B\0\x125\n\x0enew_attributes\x18\x02\x20\x01(\x0b2\x1b.ItemAttribute\
  3319. sPartialStateB\0\x125\n\x0eold_attributes\x18\x03\x20\x01(\x0b2\x1b.Item\
  3320. AttributesPartialStateB\0\x12&\n\rlist_checksum\x18\x04\x20\x01(\x0b2\r.\
  3321. ListChecksumB\0\x120\n\x17old_attributes_checksum\x18\x05\x20\x01(\x0b2\
  3322. \r.ListChecksumB\0:\0\"\xe0\x01\n\x14UpdateListAttributes\x125\n\x0enew_\
  3323. attributes\x18\x01\x20\x01(\x0b2\x1b.ListAttributesPartialStateB\0\x125\
  3324. \n\x0eold_attributes\x18\x02\x20\x01(\x0b2\x1b.ListAttributesPartialStat\
  3325. eB\0\x12&\n\rlist_checksum\x18\x03\x20\x01(\x0b2\r.ListChecksumB\0\x120\
  3326. \n\x17old_attributes_checksum\x18\x04\x20\x01(\x0b2\r.ListChecksumB\0:\0\
  3327. \"\xc0\x02\n\x02Op\x12\x18\n\x04kind\x18\x01\x20\x01(\x0e2\x08.Op.KindB\
  3328. \0\x12\x13\n\x03add\x18\x02\x20\x01(\x0b2\x04.AddB\0\x12\x13\n\x03rem\
  3329. \x18\x03\x20\x01(\x0b2\x04.RemB\0\x12\x13\n\x03mov\x18\x04\x20\x01(\x0b2\
  3330. \x04.MovB\0\x127\n\x16update_item_attributes\x18\x05\x20\x01(\x0b2\x15.U\
  3331. pdateItemAttributesB\0\x127\n\x16update_list_attributes\x18\x06\x20\x01(\
  3332. \x0b2\x15.UpdateListAttributesB\0\"m\n\x04Kind\x12\x10\n\x0cKIND_UNKNOWN\
  3333. \x10\0\x12\x07\n\x03ADD\x10\x02\x12\x07\n\x03REM\x10\x03\x12\x07\n\x03MO\
  3334. V\x10\x04\x12\x1a\n\x16UPDATE_ITEM_ATTRIBUTES\x10\x05\x12\x1a\n\x16UPDAT\
  3335. E_LIST_ATTRIBUTES\x10\x06\x1a\0:\0\"\x1e\n\x06OpList\x12\x12\n\x03ops\
  3336. \x18\x01\x20\x03(\x0b2\x03.OpB\0:\0B\0b\x06proto2\
  3337. ";
  3338. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<
  3339. ::protobuf::descriptor::FileDescriptorProto,
  3340. > = ::protobuf::lazy::Lazy::INIT;
  3341. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  3342. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  3343. }
  3344. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  3345. unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) }
  3346. }