playlist4ops.rs 121 KB

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