playlist4changes.rs 128 KB

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