playlist4changes.rs 121 KB

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