spirc.rs 176 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904
  1. // This file is generated. Do not edit
  2. // @generated
  3. // https://github.com/Manishearth/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy)]
  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. use protobuf::Message as Message_imported_for_functions;
  18. use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
  19. #[derive(PartialEq,Clone,Default)]
  20. pub struct Frame {
  21. // message fields
  22. version: ::std::option::Option<u32>,
  23. ident: ::protobuf::SingularField<::std::string::String>,
  24. protocol_version: ::protobuf::SingularField<::std::string::String>,
  25. seq_nr: ::std::option::Option<u32>,
  26. typ: ::std::option::Option<MessageType>,
  27. device_state: ::protobuf::SingularPtrField<DeviceState>,
  28. goodbye: ::protobuf::SingularPtrField<Goodbye>,
  29. state: ::protobuf::SingularPtrField<State>,
  30. position: ::std::option::Option<u32>,
  31. volume: ::std::option::Option<u32>,
  32. state_update_id: ::std::option::Option<i64>,
  33. recipient: ::protobuf::RepeatedField<::std::string::String>,
  34. context_player_state: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  35. new_name: ::protobuf::SingularField<::std::string::String>,
  36. metadata: ::protobuf::SingularPtrField<Metadata>,
  37. // special fields
  38. unknown_fields: ::protobuf::UnknownFields,
  39. cached_size: ::protobuf::CachedSize,
  40. }
  41. // see codegen.rs for the explanation why impl Sync explicitly
  42. unsafe impl ::std::marker::Sync for Frame {}
  43. impl Frame {
  44. pub fn new() -> Frame {
  45. ::std::default::Default::default()
  46. }
  47. pub fn default_instance() -> &'static Frame {
  48. static mut instance: ::protobuf::lazy::Lazy<Frame> = ::protobuf::lazy::Lazy {
  49. lock: ::protobuf::lazy::ONCE_INIT,
  50. ptr: 0 as *const Frame,
  51. };
  52. unsafe {
  53. instance.get(Frame::new)
  54. }
  55. }
  56. // optional uint32 version = 1;
  57. pub fn clear_version(&mut self) {
  58. self.version = ::std::option::Option::None;
  59. }
  60. pub fn has_version(&self) -> bool {
  61. self.version.is_some()
  62. }
  63. // Param is passed by value, moved
  64. pub fn set_version(&mut self, v: u32) {
  65. self.version = ::std::option::Option::Some(v);
  66. }
  67. pub fn get_version(&self) -> u32 {
  68. self.version.unwrap_or(0)
  69. }
  70. fn get_version_for_reflect(&self) -> &::std::option::Option<u32> {
  71. &self.version
  72. }
  73. fn mut_version_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  74. &mut self.version
  75. }
  76. // optional string ident = 2;
  77. pub fn clear_ident(&mut self) {
  78. self.ident.clear();
  79. }
  80. pub fn has_ident(&self) -> bool {
  81. self.ident.is_some()
  82. }
  83. // Param is passed by value, moved
  84. pub fn set_ident(&mut self, v: ::std::string::String) {
  85. self.ident = ::protobuf::SingularField::some(v);
  86. }
  87. // Mutable pointer to the field.
  88. // If field is not initialized, it is initialized with default value first.
  89. pub fn mut_ident(&mut self) -> &mut ::std::string::String {
  90. if self.ident.is_none() {
  91. self.ident.set_default();
  92. }
  93. self.ident.as_mut().unwrap()
  94. }
  95. // Take field
  96. pub fn take_ident(&mut self) -> ::std::string::String {
  97. self.ident.take().unwrap_or_else(|| ::std::string::String::new())
  98. }
  99. pub fn get_ident(&self) -> &str {
  100. match self.ident.as_ref() {
  101. Some(v) => &v,
  102. None => "",
  103. }
  104. }
  105. fn get_ident_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  106. &self.ident
  107. }
  108. fn mut_ident_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  109. &mut self.ident
  110. }
  111. // optional string protocol_version = 3;
  112. pub fn clear_protocol_version(&mut self) {
  113. self.protocol_version.clear();
  114. }
  115. pub fn has_protocol_version(&self) -> bool {
  116. self.protocol_version.is_some()
  117. }
  118. // Param is passed by value, moved
  119. pub fn set_protocol_version(&mut self, v: ::std::string::String) {
  120. self.protocol_version = ::protobuf::SingularField::some(v);
  121. }
  122. // Mutable pointer to the field.
  123. // If field is not initialized, it is initialized with default value first.
  124. pub fn mut_protocol_version(&mut self) -> &mut ::std::string::String {
  125. if self.protocol_version.is_none() {
  126. self.protocol_version.set_default();
  127. }
  128. self.protocol_version.as_mut().unwrap()
  129. }
  130. // Take field
  131. pub fn take_protocol_version(&mut self) -> ::std::string::String {
  132. self.protocol_version.take().unwrap_or_else(|| ::std::string::String::new())
  133. }
  134. pub fn get_protocol_version(&self) -> &str {
  135. match self.protocol_version.as_ref() {
  136. Some(v) => &v,
  137. None => "",
  138. }
  139. }
  140. fn get_protocol_version_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  141. &self.protocol_version
  142. }
  143. fn mut_protocol_version_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  144. &mut self.protocol_version
  145. }
  146. // optional uint32 seq_nr = 4;
  147. pub fn clear_seq_nr(&mut self) {
  148. self.seq_nr = ::std::option::Option::None;
  149. }
  150. pub fn has_seq_nr(&self) -> bool {
  151. self.seq_nr.is_some()
  152. }
  153. // Param is passed by value, moved
  154. pub fn set_seq_nr(&mut self, v: u32) {
  155. self.seq_nr = ::std::option::Option::Some(v);
  156. }
  157. pub fn get_seq_nr(&self) -> u32 {
  158. self.seq_nr.unwrap_or(0)
  159. }
  160. fn get_seq_nr_for_reflect(&self) -> &::std::option::Option<u32> {
  161. &self.seq_nr
  162. }
  163. fn mut_seq_nr_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  164. &mut self.seq_nr
  165. }
  166. // optional .MessageType typ = 5;
  167. pub fn clear_typ(&mut self) {
  168. self.typ = ::std::option::Option::None;
  169. }
  170. pub fn has_typ(&self) -> bool {
  171. self.typ.is_some()
  172. }
  173. // Param is passed by value, moved
  174. pub fn set_typ(&mut self, v: MessageType) {
  175. self.typ = ::std::option::Option::Some(v);
  176. }
  177. pub fn get_typ(&self) -> MessageType {
  178. self.typ.unwrap_or(MessageType::kMessageTypeHello)
  179. }
  180. fn get_typ_for_reflect(&self) -> &::std::option::Option<MessageType> {
  181. &self.typ
  182. }
  183. fn mut_typ_for_reflect(&mut self) -> &mut ::std::option::Option<MessageType> {
  184. &mut self.typ
  185. }
  186. // optional .DeviceState device_state = 7;
  187. pub fn clear_device_state(&mut self) {
  188. self.device_state.clear();
  189. }
  190. pub fn has_device_state(&self) -> bool {
  191. self.device_state.is_some()
  192. }
  193. // Param is passed by value, moved
  194. pub fn set_device_state(&mut self, v: DeviceState) {
  195. self.device_state = ::protobuf::SingularPtrField::some(v);
  196. }
  197. // Mutable pointer to the field.
  198. // If field is not initialized, it is initialized with default value first.
  199. pub fn mut_device_state(&mut self) -> &mut DeviceState {
  200. if self.device_state.is_none() {
  201. self.device_state.set_default();
  202. }
  203. self.device_state.as_mut().unwrap()
  204. }
  205. // Take field
  206. pub fn take_device_state(&mut self) -> DeviceState {
  207. self.device_state.take().unwrap_or_else(|| DeviceState::new())
  208. }
  209. pub fn get_device_state(&self) -> &DeviceState {
  210. self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance())
  211. }
  212. fn get_device_state_for_reflect(&self) -> &::protobuf::SingularPtrField<DeviceState> {
  213. &self.device_state
  214. }
  215. fn mut_device_state_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<DeviceState> {
  216. &mut self.device_state
  217. }
  218. // optional .Goodbye goodbye = 11;
  219. pub fn clear_goodbye(&mut self) {
  220. self.goodbye.clear();
  221. }
  222. pub fn has_goodbye(&self) -> bool {
  223. self.goodbye.is_some()
  224. }
  225. // Param is passed by value, moved
  226. pub fn set_goodbye(&mut self, v: Goodbye) {
  227. self.goodbye = ::protobuf::SingularPtrField::some(v);
  228. }
  229. // Mutable pointer to the field.
  230. // If field is not initialized, it is initialized with default value first.
  231. pub fn mut_goodbye(&mut self) -> &mut Goodbye {
  232. if self.goodbye.is_none() {
  233. self.goodbye.set_default();
  234. }
  235. self.goodbye.as_mut().unwrap()
  236. }
  237. // Take field
  238. pub fn take_goodbye(&mut self) -> Goodbye {
  239. self.goodbye.take().unwrap_or_else(|| Goodbye::new())
  240. }
  241. pub fn get_goodbye(&self) -> &Goodbye {
  242. self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance())
  243. }
  244. fn get_goodbye_for_reflect(&self) -> &::protobuf::SingularPtrField<Goodbye> {
  245. &self.goodbye
  246. }
  247. fn mut_goodbye_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<Goodbye> {
  248. &mut self.goodbye
  249. }
  250. // optional .State state = 12;
  251. pub fn clear_state(&mut self) {
  252. self.state.clear();
  253. }
  254. pub fn has_state(&self) -> bool {
  255. self.state.is_some()
  256. }
  257. // Param is passed by value, moved
  258. pub fn set_state(&mut self, v: State) {
  259. self.state = ::protobuf::SingularPtrField::some(v);
  260. }
  261. // Mutable pointer to the field.
  262. // If field is not initialized, it is initialized with default value first.
  263. pub fn mut_state(&mut self) -> &mut State {
  264. if self.state.is_none() {
  265. self.state.set_default();
  266. }
  267. self.state.as_mut().unwrap()
  268. }
  269. // Take field
  270. pub fn take_state(&mut self) -> State {
  271. self.state.take().unwrap_or_else(|| State::new())
  272. }
  273. pub fn get_state(&self) -> &State {
  274. self.state.as_ref().unwrap_or_else(|| State::default_instance())
  275. }
  276. fn get_state_for_reflect(&self) -> &::protobuf::SingularPtrField<State> {
  277. &self.state
  278. }
  279. fn mut_state_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<State> {
  280. &mut self.state
  281. }
  282. // optional uint32 position = 13;
  283. pub fn clear_position(&mut self) {
  284. self.position = ::std::option::Option::None;
  285. }
  286. pub fn has_position(&self) -> bool {
  287. self.position.is_some()
  288. }
  289. // Param is passed by value, moved
  290. pub fn set_position(&mut self, v: u32) {
  291. self.position = ::std::option::Option::Some(v);
  292. }
  293. pub fn get_position(&self) -> u32 {
  294. self.position.unwrap_or(0)
  295. }
  296. fn get_position_for_reflect(&self) -> &::std::option::Option<u32> {
  297. &self.position
  298. }
  299. fn mut_position_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  300. &mut self.position
  301. }
  302. // optional uint32 volume = 14;
  303. pub fn clear_volume(&mut self) {
  304. self.volume = ::std::option::Option::None;
  305. }
  306. pub fn has_volume(&self) -> bool {
  307. self.volume.is_some()
  308. }
  309. // Param is passed by value, moved
  310. pub fn set_volume(&mut self, v: u32) {
  311. self.volume = ::std::option::Option::Some(v);
  312. }
  313. pub fn get_volume(&self) -> u32 {
  314. self.volume.unwrap_or(0)
  315. }
  316. fn get_volume_for_reflect(&self) -> &::std::option::Option<u32> {
  317. &self.volume
  318. }
  319. fn mut_volume_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  320. &mut self.volume
  321. }
  322. // optional int64 state_update_id = 17;
  323. pub fn clear_state_update_id(&mut self) {
  324. self.state_update_id = ::std::option::Option::None;
  325. }
  326. pub fn has_state_update_id(&self) -> bool {
  327. self.state_update_id.is_some()
  328. }
  329. // Param is passed by value, moved
  330. pub fn set_state_update_id(&mut self, v: i64) {
  331. self.state_update_id = ::std::option::Option::Some(v);
  332. }
  333. pub fn get_state_update_id(&self) -> i64 {
  334. self.state_update_id.unwrap_or(0)
  335. }
  336. fn get_state_update_id_for_reflect(&self) -> &::std::option::Option<i64> {
  337. &self.state_update_id
  338. }
  339. fn mut_state_update_id_for_reflect(&mut self) -> &mut ::std::option::Option<i64> {
  340. &mut self.state_update_id
  341. }
  342. // repeated string recipient = 18;
  343. pub fn clear_recipient(&mut self) {
  344. self.recipient.clear();
  345. }
  346. // Param is passed by value, moved
  347. pub fn set_recipient(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  348. self.recipient = v;
  349. }
  350. // Mutable pointer to the field.
  351. pub fn mut_recipient(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  352. &mut self.recipient
  353. }
  354. // Take field
  355. pub fn take_recipient(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  356. ::std::mem::replace(&mut self.recipient, ::protobuf::RepeatedField::new())
  357. }
  358. pub fn get_recipient(&self) -> &[::std::string::String] {
  359. &self.recipient
  360. }
  361. fn get_recipient_for_reflect(&self) -> &::protobuf::RepeatedField<::std::string::String> {
  362. &self.recipient
  363. }
  364. fn mut_recipient_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  365. &mut self.recipient
  366. }
  367. // optional bytes context_player_state = 19;
  368. pub fn clear_context_player_state(&mut self) {
  369. self.context_player_state.clear();
  370. }
  371. pub fn has_context_player_state(&self) -> bool {
  372. self.context_player_state.is_some()
  373. }
  374. // Param is passed by value, moved
  375. pub fn set_context_player_state(&mut self, v: ::std::vec::Vec<u8>) {
  376. self.context_player_state = ::protobuf::SingularField::some(v);
  377. }
  378. // Mutable pointer to the field.
  379. // If field is not initialized, it is initialized with default value first.
  380. pub fn mut_context_player_state(&mut self) -> &mut ::std::vec::Vec<u8> {
  381. if self.context_player_state.is_none() {
  382. self.context_player_state.set_default();
  383. }
  384. self.context_player_state.as_mut().unwrap()
  385. }
  386. // Take field
  387. pub fn take_context_player_state(&mut self) -> ::std::vec::Vec<u8> {
  388. self.context_player_state.take().unwrap_or_else(|| ::std::vec::Vec::new())
  389. }
  390. pub fn get_context_player_state(&self) -> &[u8] {
  391. match self.context_player_state.as_ref() {
  392. Some(v) => &v,
  393. None => &[],
  394. }
  395. }
  396. fn get_context_player_state_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
  397. &self.context_player_state
  398. }
  399. fn mut_context_player_state_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
  400. &mut self.context_player_state
  401. }
  402. // optional string new_name = 20;
  403. pub fn clear_new_name(&mut self) {
  404. self.new_name.clear();
  405. }
  406. pub fn has_new_name(&self) -> bool {
  407. self.new_name.is_some()
  408. }
  409. // Param is passed by value, moved
  410. pub fn set_new_name(&mut self, v: ::std::string::String) {
  411. self.new_name = ::protobuf::SingularField::some(v);
  412. }
  413. // Mutable pointer to the field.
  414. // If field is not initialized, it is initialized with default value first.
  415. pub fn mut_new_name(&mut self) -> &mut ::std::string::String {
  416. if self.new_name.is_none() {
  417. self.new_name.set_default();
  418. }
  419. self.new_name.as_mut().unwrap()
  420. }
  421. // Take field
  422. pub fn take_new_name(&mut self) -> ::std::string::String {
  423. self.new_name.take().unwrap_or_else(|| ::std::string::String::new())
  424. }
  425. pub fn get_new_name(&self) -> &str {
  426. match self.new_name.as_ref() {
  427. Some(v) => &v,
  428. None => "",
  429. }
  430. }
  431. fn get_new_name_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  432. &self.new_name
  433. }
  434. fn mut_new_name_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  435. &mut self.new_name
  436. }
  437. // optional .Metadata metadata = 25;
  438. pub fn clear_metadata(&mut self) {
  439. self.metadata.clear();
  440. }
  441. pub fn has_metadata(&self) -> bool {
  442. self.metadata.is_some()
  443. }
  444. // Param is passed by value, moved
  445. pub fn set_metadata(&mut self, v: Metadata) {
  446. self.metadata = ::protobuf::SingularPtrField::some(v);
  447. }
  448. // Mutable pointer to the field.
  449. // If field is not initialized, it is initialized with default value first.
  450. pub fn mut_metadata(&mut self) -> &mut Metadata {
  451. if self.metadata.is_none() {
  452. self.metadata.set_default();
  453. }
  454. self.metadata.as_mut().unwrap()
  455. }
  456. // Take field
  457. pub fn take_metadata(&mut self) -> Metadata {
  458. self.metadata.take().unwrap_or_else(|| Metadata::new())
  459. }
  460. pub fn get_metadata(&self) -> &Metadata {
  461. self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance())
  462. }
  463. fn get_metadata_for_reflect(&self) -> &::protobuf::SingularPtrField<Metadata> {
  464. &self.metadata
  465. }
  466. fn mut_metadata_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<Metadata> {
  467. &mut self.metadata
  468. }
  469. }
  470. impl ::protobuf::Message for Frame {
  471. fn is_initialized(&self) -> bool {
  472. for v in &self.device_state {
  473. if !v.is_initialized() {
  474. return false;
  475. }
  476. };
  477. for v in &self.goodbye {
  478. if !v.is_initialized() {
  479. return false;
  480. }
  481. };
  482. for v in &self.state {
  483. if !v.is_initialized() {
  484. return false;
  485. }
  486. };
  487. for v in &self.metadata {
  488. if !v.is_initialized() {
  489. return false;
  490. }
  491. };
  492. true
  493. }
  494. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  495. while !is.eof()? {
  496. let (field_number, wire_type) = is.read_tag_unpack()?;
  497. match field_number {
  498. 1 => {
  499. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  500. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  501. }
  502. let tmp = is.read_uint32()?;
  503. self.version = ::std::option::Option::Some(tmp);
  504. },
  505. 2 => {
  506. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.ident)?;
  507. },
  508. 3 => {
  509. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.protocol_version)?;
  510. },
  511. 4 => {
  512. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  513. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  514. }
  515. let tmp = is.read_uint32()?;
  516. self.seq_nr = ::std::option::Option::Some(tmp);
  517. },
  518. 5 => {
  519. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  520. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  521. }
  522. let tmp = is.read_enum()?;
  523. self.typ = ::std::option::Option::Some(tmp);
  524. },
  525. 7 => {
  526. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.device_state)?;
  527. },
  528. 11 => {
  529. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.goodbye)?;
  530. },
  531. 12 => {
  532. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.state)?;
  533. },
  534. 13 => {
  535. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  536. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  537. }
  538. let tmp = is.read_uint32()?;
  539. self.position = ::std::option::Option::Some(tmp);
  540. },
  541. 14 => {
  542. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  543. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  544. }
  545. let tmp = is.read_uint32()?;
  546. self.volume = ::std::option::Option::Some(tmp);
  547. },
  548. 17 => {
  549. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  550. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  551. }
  552. let tmp = is.read_int64()?;
  553. self.state_update_id = ::std::option::Option::Some(tmp);
  554. },
  555. 18 => {
  556. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.recipient)?;
  557. },
  558. 19 => {
  559. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.context_player_state)?;
  560. },
  561. 20 => {
  562. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.new_name)?;
  563. },
  564. 25 => {
  565. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.metadata)?;
  566. },
  567. _ => {
  568. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  569. },
  570. };
  571. }
  572. ::std::result::Result::Ok(())
  573. }
  574. // Compute sizes of nested messages
  575. #[allow(unused_variables)]
  576. fn compute_size(&self) -> u32 {
  577. let mut my_size = 0;
  578. if let Some(v) = self.version {
  579. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  580. }
  581. if let Some(ref v) = self.ident.as_ref() {
  582. my_size += ::protobuf::rt::string_size(2, &v);
  583. }
  584. if let Some(ref v) = self.protocol_version.as_ref() {
  585. my_size += ::protobuf::rt::string_size(3, &v);
  586. }
  587. if let Some(v) = self.seq_nr {
  588. my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
  589. }
  590. if let Some(v) = self.typ {
  591. my_size += ::protobuf::rt::enum_size(5, v);
  592. }
  593. if let Some(ref v) = self.device_state.as_ref() {
  594. let len = v.compute_size();
  595. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  596. }
  597. if let Some(ref v) = self.goodbye.as_ref() {
  598. let len = v.compute_size();
  599. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  600. }
  601. if let Some(ref v) = self.state.as_ref() {
  602. let len = v.compute_size();
  603. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  604. }
  605. if let Some(v) = self.position {
  606. my_size += ::protobuf::rt::value_size(13, v, ::protobuf::wire_format::WireTypeVarint);
  607. }
  608. if let Some(v) = self.volume {
  609. my_size += ::protobuf::rt::value_size(14, v, ::protobuf::wire_format::WireTypeVarint);
  610. }
  611. if let Some(v) = self.state_update_id {
  612. my_size += ::protobuf::rt::value_size(17, v, ::protobuf::wire_format::WireTypeVarint);
  613. }
  614. for value in &self.recipient {
  615. my_size += ::protobuf::rt::string_size(18, &value);
  616. };
  617. if let Some(ref v) = self.context_player_state.as_ref() {
  618. my_size += ::protobuf::rt::bytes_size(19, &v);
  619. }
  620. if let Some(ref v) = self.new_name.as_ref() {
  621. my_size += ::protobuf::rt::string_size(20, &v);
  622. }
  623. if let Some(ref v) = self.metadata.as_ref() {
  624. let len = v.compute_size();
  625. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  626. }
  627. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  628. self.cached_size.set(my_size);
  629. my_size
  630. }
  631. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  632. if let Some(v) = self.version {
  633. os.write_uint32(1, v)?;
  634. }
  635. if let Some(ref v) = self.ident.as_ref() {
  636. os.write_string(2, &v)?;
  637. }
  638. if let Some(ref v) = self.protocol_version.as_ref() {
  639. os.write_string(3, &v)?;
  640. }
  641. if let Some(v) = self.seq_nr {
  642. os.write_uint32(4, v)?;
  643. }
  644. if let Some(v) = self.typ {
  645. os.write_enum(5, v.value())?;
  646. }
  647. if let Some(ref v) = self.device_state.as_ref() {
  648. os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  649. os.write_raw_varint32(v.get_cached_size())?;
  650. v.write_to_with_cached_sizes(os)?;
  651. }
  652. if let Some(ref v) = self.goodbye.as_ref() {
  653. os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  654. os.write_raw_varint32(v.get_cached_size())?;
  655. v.write_to_with_cached_sizes(os)?;
  656. }
  657. if let Some(ref v) = self.state.as_ref() {
  658. os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  659. os.write_raw_varint32(v.get_cached_size())?;
  660. v.write_to_with_cached_sizes(os)?;
  661. }
  662. if let Some(v) = self.position {
  663. os.write_uint32(13, v)?;
  664. }
  665. if let Some(v) = self.volume {
  666. os.write_uint32(14, v)?;
  667. }
  668. if let Some(v) = self.state_update_id {
  669. os.write_int64(17, v)?;
  670. }
  671. for v in &self.recipient {
  672. os.write_string(18, &v)?;
  673. };
  674. if let Some(ref v) = self.context_player_state.as_ref() {
  675. os.write_bytes(19, &v)?;
  676. }
  677. if let Some(ref v) = self.new_name.as_ref() {
  678. os.write_string(20, &v)?;
  679. }
  680. if let Some(ref v) = self.metadata.as_ref() {
  681. os.write_tag(25, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  682. os.write_raw_varint32(v.get_cached_size())?;
  683. v.write_to_with_cached_sizes(os)?;
  684. }
  685. os.write_unknown_fields(self.get_unknown_fields())?;
  686. ::std::result::Result::Ok(())
  687. }
  688. fn get_cached_size(&self) -> u32 {
  689. self.cached_size.get()
  690. }
  691. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  692. &self.unknown_fields
  693. }
  694. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  695. &mut self.unknown_fields
  696. }
  697. fn as_any(&self) -> &::std::any::Any {
  698. self as &::std::any::Any
  699. }
  700. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  701. self as &mut ::std::any::Any
  702. }
  703. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  704. self
  705. }
  706. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  707. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  708. }
  709. }
  710. impl ::protobuf::MessageStatic for Frame {
  711. fn new() -> Frame {
  712. Frame::new()
  713. }
  714. fn descriptor_static(_: ::std::option::Option<Frame>) -> &'static ::protobuf::reflect::MessageDescriptor {
  715. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  716. lock: ::protobuf::lazy::ONCE_INIT,
  717. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  718. };
  719. unsafe {
  720. descriptor.get(|| {
  721. let mut fields = ::std::vec::Vec::new();
  722. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  723. "version",
  724. Frame::get_version_for_reflect,
  725. Frame::mut_version_for_reflect,
  726. ));
  727. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  728. "ident",
  729. Frame::get_ident_for_reflect,
  730. Frame::mut_ident_for_reflect,
  731. ));
  732. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  733. "protocol_version",
  734. Frame::get_protocol_version_for_reflect,
  735. Frame::mut_protocol_version_for_reflect,
  736. ));
  737. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  738. "seq_nr",
  739. Frame::get_seq_nr_for_reflect,
  740. Frame::mut_seq_nr_for_reflect,
  741. ));
  742. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MessageType>>(
  743. "typ",
  744. Frame::get_typ_for_reflect,
  745. Frame::mut_typ_for_reflect,
  746. ));
  747. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<DeviceState>>(
  748. "device_state",
  749. Frame::get_device_state_for_reflect,
  750. Frame::mut_device_state_for_reflect,
  751. ));
  752. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Goodbye>>(
  753. "goodbye",
  754. Frame::get_goodbye_for_reflect,
  755. Frame::mut_goodbye_for_reflect,
  756. ));
  757. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<State>>(
  758. "state",
  759. Frame::get_state_for_reflect,
  760. Frame::mut_state_for_reflect,
  761. ));
  762. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  763. "position",
  764. Frame::get_position_for_reflect,
  765. Frame::mut_position_for_reflect,
  766. ));
  767. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  768. "volume",
  769. Frame::get_volume_for_reflect,
  770. Frame::mut_volume_for_reflect,
  771. ));
  772. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  773. "state_update_id",
  774. Frame::get_state_update_id_for_reflect,
  775. Frame::mut_state_update_id_for_reflect,
  776. ));
  777. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  778. "recipient",
  779. Frame::get_recipient_for_reflect,
  780. Frame::mut_recipient_for_reflect,
  781. ));
  782. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  783. "context_player_state",
  784. Frame::get_context_player_state_for_reflect,
  785. Frame::mut_context_player_state_for_reflect,
  786. ));
  787. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  788. "new_name",
  789. Frame::get_new_name_for_reflect,
  790. Frame::mut_new_name_for_reflect,
  791. ));
  792. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Metadata>>(
  793. "metadata",
  794. Frame::get_metadata_for_reflect,
  795. Frame::mut_metadata_for_reflect,
  796. ));
  797. ::protobuf::reflect::MessageDescriptor::new::<Frame>(
  798. "Frame",
  799. fields,
  800. file_descriptor_proto()
  801. )
  802. })
  803. }
  804. }
  805. }
  806. impl ::protobuf::Clear for Frame {
  807. fn clear(&mut self) {
  808. self.clear_version();
  809. self.clear_ident();
  810. self.clear_protocol_version();
  811. self.clear_seq_nr();
  812. self.clear_typ();
  813. self.clear_device_state();
  814. self.clear_goodbye();
  815. self.clear_state();
  816. self.clear_position();
  817. self.clear_volume();
  818. self.clear_state_update_id();
  819. self.clear_recipient();
  820. self.clear_context_player_state();
  821. self.clear_new_name();
  822. self.clear_metadata();
  823. self.unknown_fields.clear();
  824. }
  825. }
  826. impl ::std::fmt::Debug for Frame {
  827. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  828. ::protobuf::text_format::fmt(self, f)
  829. }
  830. }
  831. impl ::protobuf::reflect::ProtobufValue for Frame {
  832. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  833. ::protobuf::reflect::ProtobufValueRef::Message(self)
  834. }
  835. }
  836. #[derive(PartialEq,Clone,Default)]
  837. pub struct DeviceState {
  838. // message fields
  839. sw_version: ::protobuf::SingularField<::std::string::String>,
  840. is_active: ::std::option::Option<bool>,
  841. can_play: ::std::option::Option<bool>,
  842. volume: ::std::option::Option<u32>,
  843. name: ::protobuf::SingularField<::std::string::String>,
  844. error_code: ::std::option::Option<u32>,
  845. became_active_at: ::std::option::Option<i64>,
  846. error_message: ::protobuf::SingularField<::std::string::String>,
  847. capabilities: ::protobuf::RepeatedField<Capability>,
  848. context_player_error: ::protobuf::SingularField<::std::string::String>,
  849. metadata: ::protobuf::RepeatedField<Metadata>,
  850. // special fields
  851. unknown_fields: ::protobuf::UnknownFields,
  852. cached_size: ::protobuf::CachedSize,
  853. }
  854. // see codegen.rs for the explanation why impl Sync explicitly
  855. unsafe impl ::std::marker::Sync for DeviceState {}
  856. impl DeviceState {
  857. pub fn new() -> DeviceState {
  858. ::std::default::Default::default()
  859. }
  860. pub fn default_instance() -> &'static DeviceState {
  861. static mut instance: ::protobuf::lazy::Lazy<DeviceState> = ::protobuf::lazy::Lazy {
  862. lock: ::protobuf::lazy::ONCE_INIT,
  863. ptr: 0 as *const DeviceState,
  864. };
  865. unsafe {
  866. instance.get(DeviceState::new)
  867. }
  868. }
  869. // optional string sw_version = 1;
  870. pub fn clear_sw_version(&mut self) {
  871. self.sw_version.clear();
  872. }
  873. pub fn has_sw_version(&self) -> bool {
  874. self.sw_version.is_some()
  875. }
  876. // Param is passed by value, moved
  877. pub fn set_sw_version(&mut self, v: ::std::string::String) {
  878. self.sw_version = ::protobuf::SingularField::some(v);
  879. }
  880. // Mutable pointer to the field.
  881. // If field is not initialized, it is initialized with default value first.
  882. pub fn mut_sw_version(&mut self) -> &mut ::std::string::String {
  883. if self.sw_version.is_none() {
  884. self.sw_version.set_default();
  885. }
  886. self.sw_version.as_mut().unwrap()
  887. }
  888. // Take field
  889. pub fn take_sw_version(&mut self) -> ::std::string::String {
  890. self.sw_version.take().unwrap_or_else(|| ::std::string::String::new())
  891. }
  892. pub fn get_sw_version(&self) -> &str {
  893. match self.sw_version.as_ref() {
  894. Some(v) => &v,
  895. None => "",
  896. }
  897. }
  898. fn get_sw_version_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  899. &self.sw_version
  900. }
  901. fn mut_sw_version_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  902. &mut self.sw_version
  903. }
  904. // optional bool is_active = 10;
  905. pub fn clear_is_active(&mut self) {
  906. self.is_active = ::std::option::Option::None;
  907. }
  908. pub fn has_is_active(&self) -> bool {
  909. self.is_active.is_some()
  910. }
  911. // Param is passed by value, moved
  912. pub fn set_is_active(&mut self, v: bool) {
  913. self.is_active = ::std::option::Option::Some(v);
  914. }
  915. pub fn get_is_active(&self) -> bool {
  916. self.is_active.unwrap_or(false)
  917. }
  918. fn get_is_active_for_reflect(&self) -> &::std::option::Option<bool> {
  919. &self.is_active
  920. }
  921. fn mut_is_active_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
  922. &mut self.is_active
  923. }
  924. // optional bool can_play = 11;
  925. pub fn clear_can_play(&mut self) {
  926. self.can_play = ::std::option::Option::None;
  927. }
  928. pub fn has_can_play(&self) -> bool {
  929. self.can_play.is_some()
  930. }
  931. // Param is passed by value, moved
  932. pub fn set_can_play(&mut self, v: bool) {
  933. self.can_play = ::std::option::Option::Some(v);
  934. }
  935. pub fn get_can_play(&self) -> bool {
  936. self.can_play.unwrap_or(false)
  937. }
  938. fn get_can_play_for_reflect(&self) -> &::std::option::Option<bool> {
  939. &self.can_play
  940. }
  941. fn mut_can_play_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
  942. &mut self.can_play
  943. }
  944. // optional uint32 volume = 12;
  945. pub fn clear_volume(&mut self) {
  946. self.volume = ::std::option::Option::None;
  947. }
  948. pub fn has_volume(&self) -> bool {
  949. self.volume.is_some()
  950. }
  951. // Param is passed by value, moved
  952. pub fn set_volume(&mut self, v: u32) {
  953. self.volume = ::std::option::Option::Some(v);
  954. }
  955. pub fn get_volume(&self) -> u32 {
  956. self.volume.unwrap_or(0)
  957. }
  958. fn get_volume_for_reflect(&self) -> &::std::option::Option<u32> {
  959. &self.volume
  960. }
  961. fn mut_volume_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  962. &mut self.volume
  963. }
  964. // optional string name = 13;
  965. pub fn clear_name(&mut self) {
  966. self.name.clear();
  967. }
  968. pub fn has_name(&self) -> bool {
  969. self.name.is_some()
  970. }
  971. // Param is passed by value, moved
  972. pub fn set_name(&mut self, v: ::std::string::String) {
  973. self.name = ::protobuf::SingularField::some(v);
  974. }
  975. // Mutable pointer to the field.
  976. // If field is not initialized, it is initialized with default value first.
  977. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  978. if self.name.is_none() {
  979. self.name.set_default();
  980. }
  981. self.name.as_mut().unwrap()
  982. }
  983. // Take field
  984. pub fn take_name(&mut self) -> ::std::string::String {
  985. self.name.take().unwrap_or_else(|| ::std::string::String::new())
  986. }
  987. pub fn get_name(&self) -> &str {
  988. match self.name.as_ref() {
  989. Some(v) => &v,
  990. None => "",
  991. }
  992. }
  993. fn get_name_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  994. &self.name
  995. }
  996. fn mut_name_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  997. &mut self.name
  998. }
  999. // optional uint32 error_code = 14;
  1000. pub fn clear_error_code(&mut self) {
  1001. self.error_code = ::std::option::Option::None;
  1002. }
  1003. pub fn has_error_code(&self) -> bool {
  1004. self.error_code.is_some()
  1005. }
  1006. // Param is passed by value, moved
  1007. pub fn set_error_code(&mut self, v: u32) {
  1008. self.error_code = ::std::option::Option::Some(v);
  1009. }
  1010. pub fn get_error_code(&self) -> u32 {
  1011. self.error_code.unwrap_or(0)
  1012. }
  1013. fn get_error_code_for_reflect(&self) -> &::std::option::Option<u32> {
  1014. &self.error_code
  1015. }
  1016. fn mut_error_code_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  1017. &mut self.error_code
  1018. }
  1019. // optional int64 became_active_at = 15;
  1020. pub fn clear_became_active_at(&mut self) {
  1021. self.became_active_at = ::std::option::Option::None;
  1022. }
  1023. pub fn has_became_active_at(&self) -> bool {
  1024. self.became_active_at.is_some()
  1025. }
  1026. // Param is passed by value, moved
  1027. pub fn set_became_active_at(&mut self, v: i64) {
  1028. self.became_active_at = ::std::option::Option::Some(v);
  1029. }
  1030. pub fn get_became_active_at(&self) -> i64 {
  1031. self.became_active_at.unwrap_or(0)
  1032. }
  1033. fn get_became_active_at_for_reflect(&self) -> &::std::option::Option<i64> {
  1034. &self.became_active_at
  1035. }
  1036. fn mut_became_active_at_for_reflect(&mut self) -> &mut ::std::option::Option<i64> {
  1037. &mut self.became_active_at
  1038. }
  1039. // optional string error_message = 16;
  1040. pub fn clear_error_message(&mut self) {
  1041. self.error_message.clear();
  1042. }
  1043. pub fn has_error_message(&self) -> bool {
  1044. self.error_message.is_some()
  1045. }
  1046. // Param is passed by value, moved
  1047. pub fn set_error_message(&mut self, v: ::std::string::String) {
  1048. self.error_message = ::protobuf::SingularField::some(v);
  1049. }
  1050. // Mutable pointer to the field.
  1051. // If field is not initialized, it is initialized with default value first.
  1052. pub fn mut_error_message(&mut self) -> &mut ::std::string::String {
  1053. if self.error_message.is_none() {
  1054. self.error_message.set_default();
  1055. }
  1056. self.error_message.as_mut().unwrap()
  1057. }
  1058. // Take field
  1059. pub fn take_error_message(&mut self) -> ::std::string::String {
  1060. self.error_message.take().unwrap_or_else(|| ::std::string::String::new())
  1061. }
  1062. pub fn get_error_message(&self) -> &str {
  1063. match self.error_message.as_ref() {
  1064. Some(v) => &v,
  1065. None => "",
  1066. }
  1067. }
  1068. fn get_error_message_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  1069. &self.error_message
  1070. }
  1071. fn mut_error_message_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  1072. &mut self.error_message
  1073. }
  1074. // repeated .Capability capabilities = 17;
  1075. pub fn clear_capabilities(&mut self) {
  1076. self.capabilities.clear();
  1077. }
  1078. // Param is passed by value, moved
  1079. pub fn set_capabilities(&mut self, v: ::protobuf::RepeatedField<Capability>) {
  1080. self.capabilities = v;
  1081. }
  1082. // Mutable pointer to the field.
  1083. pub fn mut_capabilities(&mut self) -> &mut ::protobuf::RepeatedField<Capability> {
  1084. &mut self.capabilities
  1085. }
  1086. // Take field
  1087. pub fn take_capabilities(&mut self) -> ::protobuf::RepeatedField<Capability> {
  1088. ::std::mem::replace(&mut self.capabilities, ::protobuf::RepeatedField::new())
  1089. }
  1090. pub fn get_capabilities(&self) -> &[Capability] {
  1091. &self.capabilities
  1092. }
  1093. fn get_capabilities_for_reflect(&self) -> &::protobuf::RepeatedField<Capability> {
  1094. &self.capabilities
  1095. }
  1096. fn mut_capabilities_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<Capability> {
  1097. &mut self.capabilities
  1098. }
  1099. // optional string context_player_error = 20;
  1100. pub fn clear_context_player_error(&mut self) {
  1101. self.context_player_error.clear();
  1102. }
  1103. pub fn has_context_player_error(&self) -> bool {
  1104. self.context_player_error.is_some()
  1105. }
  1106. // Param is passed by value, moved
  1107. pub fn set_context_player_error(&mut self, v: ::std::string::String) {
  1108. self.context_player_error = ::protobuf::SingularField::some(v);
  1109. }
  1110. // Mutable pointer to the field.
  1111. // If field is not initialized, it is initialized with default value first.
  1112. pub fn mut_context_player_error(&mut self) -> &mut ::std::string::String {
  1113. if self.context_player_error.is_none() {
  1114. self.context_player_error.set_default();
  1115. }
  1116. self.context_player_error.as_mut().unwrap()
  1117. }
  1118. // Take field
  1119. pub fn take_context_player_error(&mut self) -> ::std::string::String {
  1120. self.context_player_error.take().unwrap_or_else(|| ::std::string::String::new())
  1121. }
  1122. pub fn get_context_player_error(&self) -> &str {
  1123. match self.context_player_error.as_ref() {
  1124. Some(v) => &v,
  1125. None => "",
  1126. }
  1127. }
  1128. fn get_context_player_error_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  1129. &self.context_player_error
  1130. }
  1131. fn mut_context_player_error_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  1132. &mut self.context_player_error
  1133. }
  1134. // repeated .Metadata metadata = 25;
  1135. pub fn clear_metadata(&mut self) {
  1136. self.metadata.clear();
  1137. }
  1138. // Param is passed by value, moved
  1139. pub fn set_metadata(&mut self, v: ::protobuf::RepeatedField<Metadata>) {
  1140. self.metadata = v;
  1141. }
  1142. // Mutable pointer to the field.
  1143. pub fn mut_metadata(&mut self) -> &mut ::protobuf::RepeatedField<Metadata> {
  1144. &mut self.metadata
  1145. }
  1146. // Take field
  1147. pub fn take_metadata(&mut self) -> ::protobuf::RepeatedField<Metadata> {
  1148. ::std::mem::replace(&mut self.metadata, ::protobuf::RepeatedField::new())
  1149. }
  1150. pub fn get_metadata(&self) -> &[Metadata] {
  1151. &self.metadata
  1152. }
  1153. fn get_metadata_for_reflect(&self) -> &::protobuf::RepeatedField<Metadata> {
  1154. &self.metadata
  1155. }
  1156. fn mut_metadata_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<Metadata> {
  1157. &mut self.metadata
  1158. }
  1159. }
  1160. impl ::protobuf::Message for DeviceState {
  1161. fn is_initialized(&self) -> bool {
  1162. for v in &self.capabilities {
  1163. if !v.is_initialized() {
  1164. return false;
  1165. }
  1166. };
  1167. for v in &self.metadata {
  1168. if !v.is_initialized() {
  1169. return false;
  1170. }
  1171. };
  1172. true
  1173. }
  1174. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  1175. while !is.eof()? {
  1176. let (field_number, wire_type) = is.read_tag_unpack()?;
  1177. match field_number {
  1178. 1 => {
  1179. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.sw_version)?;
  1180. },
  1181. 10 => {
  1182. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1183. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1184. }
  1185. let tmp = is.read_bool()?;
  1186. self.is_active = ::std::option::Option::Some(tmp);
  1187. },
  1188. 11 => {
  1189. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1190. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1191. }
  1192. let tmp = is.read_bool()?;
  1193. self.can_play = ::std::option::Option::Some(tmp);
  1194. },
  1195. 12 => {
  1196. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1197. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1198. }
  1199. let tmp = is.read_uint32()?;
  1200. self.volume = ::std::option::Option::Some(tmp);
  1201. },
  1202. 13 => {
  1203. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  1204. },
  1205. 14 => {
  1206. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1207. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1208. }
  1209. let tmp = is.read_uint32()?;
  1210. self.error_code = ::std::option::Option::Some(tmp);
  1211. },
  1212. 15 => {
  1213. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1214. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1215. }
  1216. let tmp = is.read_int64()?;
  1217. self.became_active_at = ::std::option::Option::Some(tmp);
  1218. },
  1219. 16 => {
  1220. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.error_message)?;
  1221. },
  1222. 17 => {
  1223. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.capabilities)?;
  1224. },
  1225. 20 => {
  1226. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_player_error)?;
  1227. },
  1228. 25 => {
  1229. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metadata)?;
  1230. },
  1231. _ => {
  1232. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1233. },
  1234. };
  1235. }
  1236. ::std::result::Result::Ok(())
  1237. }
  1238. // Compute sizes of nested messages
  1239. #[allow(unused_variables)]
  1240. fn compute_size(&self) -> u32 {
  1241. let mut my_size = 0;
  1242. if let Some(ref v) = self.sw_version.as_ref() {
  1243. my_size += ::protobuf::rt::string_size(1, &v);
  1244. }
  1245. if let Some(v) = self.is_active {
  1246. my_size += 2;
  1247. }
  1248. if let Some(v) = self.can_play {
  1249. my_size += 2;
  1250. }
  1251. if let Some(v) = self.volume {
  1252. my_size += ::protobuf::rt::value_size(12, v, ::protobuf::wire_format::WireTypeVarint);
  1253. }
  1254. if let Some(ref v) = self.name.as_ref() {
  1255. my_size += ::protobuf::rt::string_size(13, &v);
  1256. }
  1257. if let Some(v) = self.error_code {
  1258. my_size += ::protobuf::rt::value_size(14, v, ::protobuf::wire_format::WireTypeVarint);
  1259. }
  1260. if let Some(v) = self.became_active_at {
  1261. my_size += ::protobuf::rt::value_size(15, v, ::protobuf::wire_format::WireTypeVarint);
  1262. }
  1263. if let Some(ref v) = self.error_message.as_ref() {
  1264. my_size += ::protobuf::rt::string_size(16, &v);
  1265. }
  1266. for value in &self.capabilities {
  1267. let len = value.compute_size();
  1268. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1269. };
  1270. if let Some(ref v) = self.context_player_error.as_ref() {
  1271. my_size += ::protobuf::rt::string_size(20, &v);
  1272. }
  1273. for value in &self.metadata {
  1274. let len = value.compute_size();
  1275. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1276. };
  1277. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1278. self.cached_size.set(my_size);
  1279. my_size
  1280. }
  1281. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  1282. if let Some(ref v) = self.sw_version.as_ref() {
  1283. os.write_string(1, &v)?;
  1284. }
  1285. if let Some(v) = self.is_active {
  1286. os.write_bool(10, v)?;
  1287. }
  1288. if let Some(v) = self.can_play {
  1289. os.write_bool(11, v)?;
  1290. }
  1291. if let Some(v) = self.volume {
  1292. os.write_uint32(12, v)?;
  1293. }
  1294. if let Some(ref v) = self.name.as_ref() {
  1295. os.write_string(13, &v)?;
  1296. }
  1297. if let Some(v) = self.error_code {
  1298. os.write_uint32(14, v)?;
  1299. }
  1300. if let Some(v) = self.became_active_at {
  1301. os.write_int64(15, v)?;
  1302. }
  1303. if let Some(ref v) = self.error_message.as_ref() {
  1304. os.write_string(16, &v)?;
  1305. }
  1306. for v in &self.capabilities {
  1307. os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1308. os.write_raw_varint32(v.get_cached_size())?;
  1309. v.write_to_with_cached_sizes(os)?;
  1310. };
  1311. if let Some(ref v) = self.context_player_error.as_ref() {
  1312. os.write_string(20, &v)?;
  1313. }
  1314. for v in &self.metadata {
  1315. os.write_tag(25, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1316. os.write_raw_varint32(v.get_cached_size())?;
  1317. v.write_to_with_cached_sizes(os)?;
  1318. };
  1319. os.write_unknown_fields(self.get_unknown_fields())?;
  1320. ::std::result::Result::Ok(())
  1321. }
  1322. fn get_cached_size(&self) -> u32 {
  1323. self.cached_size.get()
  1324. }
  1325. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1326. &self.unknown_fields
  1327. }
  1328. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1329. &mut self.unknown_fields
  1330. }
  1331. fn as_any(&self) -> &::std::any::Any {
  1332. self as &::std::any::Any
  1333. }
  1334. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  1335. self as &mut ::std::any::Any
  1336. }
  1337. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  1338. self
  1339. }
  1340. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1341. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  1342. }
  1343. }
  1344. impl ::protobuf::MessageStatic for DeviceState {
  1345. fn new() -> DeviceState {
  1346. DeviceState::new()
  1347. }
  1348. fn descriptor_static(_: ::std::option::Option<DeviceState>) -> &'static ::protobuf::reflect::MessageDescriptor {
  1349. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1350. lock: ::protobuf::lazy::ONCE_INIT,
  1351. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1352. };
  1353. unsafe {
  1354. descriptor.get(|| {
  1355. let mut fields = ::std::vec::Vec::new();
  1356. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1357. "sw_version",
  1358. DeviceState::get_sw_version_for_reflect,
  1359. DeviceState::mut_sw_version_for_reflect,
  1360. ));
  1361. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1362. "is_active",
  1363. DeviceState::get_is_active_for_reflect,
  1364. DeviceState::mut_is_active_for_reflect,
  1365. ));
  1366. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1367. "can_play",
  1368. DeviceState::get_can_play_for_reflect,
  1369. DeviceState::mut_can_play_for_reflect,
  1370. ));
  1371. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  1372. "volume",
  1373. DeviceState::get_volume_for_reflect,
  1374. DeviceState::mut_volume_for_reflect,
  1375. ));
  1376. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1377. "name",
  1378. DeviceState::get_name_for_reflect,
  1379. DeviceState::mut_name_for_reflect,
  1380. ));
  1381. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  1382. "error_code",
  1383. DeviceState::get_error_code_for_reflect,
  1384. DeviceState::mut_error_code_for_reflect,
  1385. ));
  1386. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  1387. "became_active_at",
  1388. DeviceState::get_became_active_at_for_reflect,
  1389. DeviceState::mut_became_active_at_for_reflect,
  1390. ));
  1391. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1392. "error_message",
  1393. DeviceState::get_error_message_for_reflect,
  1394. DeviceState::mut_error_message_for_reflect,
  1395. ));
  1396. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Capability>>(
  1397. "capabilities",
  1398. DeviceState::get_capabilities_for_reflect,
  1399. DeviceState::mut_capabilities_for_reflect,
  1400. ));
  1401. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1402. "context_player_error",
  1403. DeviceState::get_context_player_error_for_reflect,
  1404. DeviceState::mut_context_player_error_for_reflect,
  1405. ));
  1406. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Metadata>>(
  1407. "metadata",
  1408. DeviceState::get_metadata_for_reflect,
  1409. DeviceState::mut_metadata_for_reflect,
  1410. ));
  1411. ::protobuf::reflect::MessageDescriptor::new::<DeviceState>(
  1412. "DeviceState",
  1413. fields,
  1414. file_descriptor_proto()
  1415. )
  1416. })
  1417. }
  1418. }
  1419. }
  1420. impl ::protobuf::Clear for DeviceState {
  1421. fn clear(&mut self) {
  1422. self.clear_sw_version();
  1423. self.clear_is_active();
  1424. self.clear_can_play();
  1425. self.clear_volume();
  1426. self.clear_name();
  1427. self.clear_error_code();
  1428. self.clear_became_active_at();
  1429. self.clear_error_message();
  1430. self.clear_capabilities();
  1431. self.clear_context_player_error();
  1432. self.clear_metadata();
  1433. self.unknown_fields.clear();
  1434. }
  1435. }
  1436. impl ::std::fmt::Debug for DeviceState {
  1437. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  1438. ::protobuf::text_format::fmt(self, f)
  1439. }
  1440. }
  1441. impl ::protobuf::reflect::ProtobufValue for DeviceState {
  1442. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1443. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1444. }
  1445. }
  1446. #[derive(PartialEq,Clone,Default)]
  1447. pub struct Capability {
  1448. // message fields
  1449. typ: ::std::option::Option<CapabilityType>,
  1450. intValue: ::std::vec::Vec<i64>,
  1451. stringValue: ::protobuf::RepeatedField<::std::string::String>,
  1452. // special fields
  1453. unknown_fields: ::protobuf::UnknownFields,
  1454. cached_size: ::protobuf::CachedSize,
  1455. }
  1456. // see codegen.rs for the explanation why impl Sync explicitly
  1457. unsafe impl ::std::marker::Sync for Capability {}
  1458. impl Capability {
  1459. pub fn new() -> Capability {
  1460. ::std::default::Default::default()
  1461. }
  1462. pub fn default_instance() -> &'static Capability {
  1463. static mut instance: ::protobuf::lazy::Lazy<Capability> = ::protobuf::lazy::Lazy {
  1464. lock: ::protobuf::lazy::ONCE_INIT,
  1465. ptr: 0 as *const Capability,
  1466. };
  1467. unsafe {
  1468. instance.get(Capability::new)
  1469. }
  1470. }
  1471. // optional .CapabilityType typ = 1;
  1472. pub fn clear_typ(&mut self) {
  1473. self.typ = ::std::option::Option::None;
  1474. }
  1475. pub fn has_typ(&self) -> bool {
  1476. self.typ.is_some()
  1477. }
  1478. // Param is passed by value, moved
  1479. pub fn set_typ(&mut self, v: CapabilityType) {
  1480. self.typ = ::std::option::Option::Some(v);
  1481. }
  1482. pub fn get_typ(&self) -> CapabilityType {
  1483. self.typ.unwrap_or(CapabilityType::kSupportedContexts)
  1484. }
  1485. fn get_typ_for_reflect(&self) -> &::std::option::Option<CapabilityType> {
  1486. &self.typ
  1487. }
  1488. fn mut_typ_for_reflect(&mut self) -> &mut ::std::option::Option<CapabilityType> {
  1489. &mut self.typ
  1490. }
  1491. // repeated int64 intValue = 2;
  1492. pub fn clear_intValue(&mut self) {
  1493. self.intValue.clear();
  1494. }
  1495. // Param is passed by value, moved
  1496. pub fn set_intValue(&mut self, v: ::std::vec::Vec<i64>) {
  1497. self.intValue = v;
  1498. }
  1499. // Mutable pointer to the field.
  1500. pub fn mut_intValue(&mut self) -> &mut ::std::vec::Vec<i64> {
  1501. &mut self.intValue
  1502. }
  1503. // Take field
  1504. pub fn take_intValue(&mut self) -> ::std::vec::Vec<i64> {
  1505. ::std::mem::replace(&mut self.intValue, ::std::vec::Vec::new())
  1506. }
  1507. pub fn get_intValue(&self) -> &[i64] {
  1508. &self.intValue
  1509. }
  1510. fn get_intValue_for_reflect(&self) -> &::std::vec::Vec<i64> {
  1511. &self.intValue
  1512. }
  1513. fn mut_intValue_for_reflect(&mut self) -> &mut ::std::vec::Vec<i64> {
  1514. &mut self.intValue
  1515. }
  1516. // repeated string stringValue = 3;
  1517. pub fn clear_stringValue(&mut self) {
  1518. self.stringValue.clear();
  1519. }
  1520. // Param is passed by value, moved
  1521. pub fn set_stringValue(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  1522. self.stringValue = v;
  1523. }
  1524. // Mutable pointer to the field.
  1525. pub fn mut_stringValue(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  1526. &mut self.stringValue
  1527. }
  1528. // Take field
  1529. pub fn take_stringValue(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  1530. ::std::mem::replace(&mut self.stringValue, ::protobuf::RepeatedField::new())
  1531. }
  1532. pub fn get_stringValue(&self) -> &[::std::string::String] {
  1533. &self.stringValue
  1534. }
  1535. fn get_stringValue_for_reflect(&self) -> &::protobuf::RepeatedField<::std::string::String> {
  1536. &self.stringValue
  1537. }
  1538. fn mut_stringValue_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  1539. &mut self.stringValue
  1540. }
  1541. }
  1542. impl ::protobuf::Message for Capability {
  1543. fn is_initialized(&self) -> bool {
  1544. true
  1545. }
  1546. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  1547. while !is.eof()? {
  1548. let (field_number, wire_type) = is.read_tag_unpack()?;
  1549. match field_number {
  1550. 1 => {
  1551. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1552. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1553. }
  1554. let tmp = is.read_enum()?;
  1555. self.typ = ::std::option::Option::Some(tmp);
  1556. },
  1557. 2 => {
  1558. ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.intValue)?;
  1559. },
  1560. 3 => {
  1561. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.stringValue)?;
  1562. },
  1563. _ => {
  1564. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1565. },
  1566. };
  1567. }
  1568. ::std::result::Result::Ok(())
  1569. }
  1570. // Compute sizes of nested messages
  1571. #[allow(unused_variables)]
  1572. fn compute_size(&self) -> u32 {
  1573. let mut my_size = 0;
  1574. if let Some(v) = self.typ {
  1575. my_size += ::protobuf::rt::enum_size(1, v);
  1576. }
  1577. for value in &self.intValue {
  1578. my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint);
  1579. };
  1580. for value in &self.stringValue {
  1581. my_size += ::protobuf::rt::string_size(3, &value);
  1582. };
  1583. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1584. self.cached_size.set(my_size);
  1585. my_size
  1586. }
  1587. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  1588. if let Some(v) = self.typ {
  1589. os.write_enum(1, v.value())?;
  1590. }
  1591. for v in &self.intValue {
  1592. os.write_int64(2, *v)?;
  1593. };
  1594. for v in &self.stringValue {
  1595. os.write_string(3, &v)?;
  1596. };
  1597. os.write_unknown_fields(self.get_unknown_fields())?;
  1598. ::std::result::Result::Ok(())
  1599. }
  1600. fn get_cached_size(&self) -> u32 {
  1601. self.cached_size.get()
  1602. }
  1603. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1604. &self.unknown_fields
  1605. }
  1606. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1607. &mut self.unknown_fields
  1608. }
  1609. fn as_any(&self) -> &::std::any::Any {
  1610. self as &::std::any::Any
  1611. }
  1612. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  1613. self as &mut ::std::any::Any
  1614. }
  1615. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  1616. self
  1617. }
  1618. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1619. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  1620. }
  1621. }
  1622. impl ::protobuf::MessageStatic for Capability {
  1623. fn new() -> Capability {
  1624. Capability::new()
  1625. }
  1626. fn descriptor_static(_: ::std::option::Option<Capability>) -> &'static ::protobuf::reflect::MessageDescriptor {
  1627. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1628. lock: ::protobuf::lazy::ONCE_INIT,
  1629. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1630. };
  1631. unsafe {
  1632. descriptor.get(|| {
  1633. let mut fields = ::std::vec::Vec::new();
  1634. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<CapabilityType>>(
  1635. "typ",
  1636. Capability::get_typ_for_reflect,
  1637. Capability::mut_typ_for_reflect,
  1638. ));
  1639. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  1640. "intValue",
  1641. Capability::get_intValue_for_reflect,
  1642. Capability::mut_intValue_for_reflect,
  1643. ));
  1644. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1645. "stringValue",
  1646. Capability::get_stringValue_for_reflect,
  1647. Capability::mut_stringValue_for_reflect,
  1648. ));
  1649. ::protobuf::reflect::MessageDescriptor::new::<Capability>(
  1650. "Capability",
  1651. fields,
  1652. file_descriptor_proto()
  1653. )
  1654. })
  1655. }
  1656. }
  1657. }
  1658. impl ::protobuf::Clear for Capability {
  1659. fn clear(&mut self) {
  1660. self.clear_typ();
  1661. self.clear_intValue();
  1662. self.clear_stringValue();
  1663. self.unknown_fields.clear();
  1664. }
  1665. }
  1666. impl ::std::fmt::Debug for Capability {
  1667. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  1668. ::protobuf::text_format::fmt(self, f)
  1669. }
  1670. }
  1671. impl ::protobuf::reflect::ProtobufValue for Capability {
  1672. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1673. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1674. }
  1675. }
  1676. #[derive(PartialEq,Clone,Default)]
  1677. pub struct Goodbye {
  1678. // message fields
  1679. reason: ::protobuf::SingularField<::std::string::String>,
  1680. // special fields
  1681. unknown_fields: ::protobuf::UnknownFields,
  1682. cached_size: ::protobuf::CachedSize,
  1683. }
  1684. // see codegen.rs for the explanation why impl Sync explicitly
  1685. unsafe impl ::std::marker::Sync for Goodbye {}
  1686. impl Goodbye {
  1687. pub fn new() -> Goodbye {
  1688. ::std::default::Default::default()
  1689. }
  1690. pub fn default_instance() -> &'static Goodbye {
  1691. static mut instance: ::protobuf::lazy::Lazy<Goodbye> = ::protobuf::lazy::Lazy {
  1692. lock: ::protobuf::lazy::ONCE_INIT,
  1693. ptr: 0 as *const Goodbye,
  1694. };
  1695. unsafe {
  1696. instance.get(Goodbye::new)
  1697. }
  1698. }
  1699. // optional string reason = 1;
  1700. pub fn clear_reason(&mut self) {
  1701. self.reason.clear();
  1702. }
  1703. pub fn has_reason(&self) -> bool {
  1704. self.reason.is_some()
  1705. }
  1706. // Param is passed by value, moved
  1707. pub fn set_reason(&mut self, v: ::std::string::String) {
  1708. self.reason = ::protobuf::SingularField::some(v);
  1709. }
  1710. // Mutable pointer to the field.
  1711. // If field is not initialized, it is initialized with default value first.
  1712. pub fn mut_reason(&mut self) -> &mut ::std::string::String {
  1713. if self.reason.is_none() {
  1714. self.reason.set_default();
  1715. }
  1716. self.reason.as_mut().unwrap()
  1717. }
  1718. // Take field
  1719. pub fn take_reason(&mut self) -> ::std::string::String {
  1720. self.reason.take().unwrap_or_else(|| ::std::string::String::new())
  1721. }
  1722. pub fn get_reason(&self) -> &str {
  1723. match self.reason.as_ref() {
  1724. Some(v) => &v,
  1725. None => "",
  1726. }
  1727. }
  1728. fn get_reason_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  1729. &self.reason
  1730. }
  1731. fn mut_reason_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  1732. &mut self.reason
  1733. }
  1734. }
  1735. impl ::protobuf::Message for Goodbye {
  1736. fn is_initialized(&self) -> bool {
  1737. true
  1738. }
  1739. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  1740. while !is.eof()? {
  1741. let (field_number, wire_type) = is.read_tag_unpack()?;
  1742. match field_number {
  1743. 1 => {
  1744. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.reason)?;
  1745. },
  1746. _ => {
  1747. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1748. },
  1749. };
  1750. }
  1751. ::std::result::Result::Ok(())
  1752. }
  1753. // Compute sizes of nested messages
  1754. #[allow(unused_variables)]
  1755. fn compute_size(&self) -> u32 {
  1756. let mut my_size = 0;
  1757. if let Some(ref v) = self.reason.as_ref() {
  1758. my_size += ::protobuf::rt::string_size(1, &v);
  1759. }
  1760. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1761. self.cached_size.set(my_size);
  1762. my_size
  1763. }
  1764. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  1765. if let Some(ref v) = self.reason.as_ref() {
  1766. os.write_string(1, &v)?;
  1767. }
  1768. os.write_unknown_fields(self.get_unknown_fields())?;
  1769. ::std::result::Result::Ok(())
  1770. }
  1771. fn get_cached_size(&self) -> u32 {
  1772. self.cached_size.get()
  1773. }
  1774. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1775. &self.unknown_fields
  1776. }
  1777. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1778. &mut self.unknown_fields
  1779. }
  1780. fn as_any(&self) -> &::std::any::Any {
  1781. self as &::std::any::Any
  1782. }
  1783. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  1784. self as &mut ::std::any::Any
  1785. }
  1786. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  1787. self
  1788. }
  1789. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1790. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  1791. }
  1792. }
  1793. impl ::protobuf::MessageStatic for Goodbye {
  1794. fn new() -> Goodbye {
  1795. Goodbye::new()
  1796. }
  1797. fn descriptor_static(_: ::std::option::Option<Goodbye>) -> &'static ::protobuf::reflect::MessageDescriptor {
  1798. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1799. lock: ::protobuf::lazy::ONCE_INIT,
  1800. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1801. };
  1802. unsafe {
  1803. descriptor.get(|| {
  1804. let mut fields = ::std::vec::Vec::new();
  1805. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1806. "reason",
  1807. Goodbye::get_reason_for_reflect,
  1808. Goodbye::mut_reason_for_reflect,
  1809. ));
  1810. ::protobuf::reflect::MessageDescriptor::new::<Goodbye>(
  1811. "Goodbye",
  1812. fields,
  1813. file_descriptor_proto()
  1814. )
  1815. })
  1816. }
  1817. }
  1818. }
  1819. impl ::protobuf::Clear for Goodbye {
  1820. fn clear(&mut self) {
  1821. self.clear_reason();
  1822. self.unknown_fields.clear();
  1823. }
  1824. }
  1825. impl ::std::fmt::Debug for Goodbye {
  1826. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  1827. ::protobuf::text_format::fmt(self, f)
  1828. }
  1829. }
  1830. impl ::protobuf::reflect::ProtobufValue for Goodbye {
  1831. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1832. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1833. }
  1834. }
  1835. #[derive(PartialEq,Clone,Default)]
  1836. pub struct State {
  1837. // message fields
  1838. context_uri: ::protobuf::SingularField<::std::string::String>,
  1839. index: ::std::option::Option<u32>,
  1840. position_ms: ::std::option::Option<u32>,
  1841. status: ::std::option::Option<PlayStatus>,
  1842. position_measured_at: ::std::option::Option<u64>,
  1843. context_description: ::protobuf::SingularField<::std::string::String>,
  1844. shuffle: ::std::option::Option<bool>,
  1845. repeat: ::std::option::Option<bool>,
  1846. last_command_ident: ::protobuf::SingularField<::std::string::String>,
  1847. last_command_msgid: ::std::option::Option<u32>,
  1848. playing_from_fallback: ::std::option::Option<bool>,
  1849. row: ::std::option::Option<u32>,
  1850. playing_track_index: ::std::option::Option<u32>,
  1851. track: ::protobuf::RepeatedField<TrackRef>,
  1852. ad: ::protobuf::SingularPtrField<Ad>,
  1853. // special fields
  1854. unknown_fields: ::protobuf::UnknownFields,
  1855. cached_size: ::protobuf::CachedSize,
  1856. }
  1857. // see codegen.rs for the explanation why impl Sync explicitly
  1858. unsafe impl ::std::marker::Sync for State {}
  1859. impl State {
  1860. pub fn new() -> State {
  1861. ::std::default::Default::default()
  1862. }
  1863. pub fn default_instance() -> &'static State {
  1864. static mut instance: ::protobuf::lazy::Lazy<State> = ::protobuf::lazy::Lazy {
  1865. lock: ::protobuf::lazy::ONCE_INIT,
  1866. ptr: 0 as *const State,
  1867. };
  1868. unsafe {
  1869. instance.get(State::new)
  1870. }
  1871. }
  1872. // optional string context_uri = 2;
  1873. pub fn clear_context_uri(&mut self) {
  1874. self.context_uri.clear();
  1875. }
  1876. pub fn has_context_uri(&self) -> bool {
  1877. self.context_uri.is_some()
  1878. }
  1879. // Param is passed by value, moved
  1880. pub fn set_context_uri(&mut self, v: ::std::string::String) {
  1881. self.context_uri = ::protobuf::SingularField::some(v);
  1882. }
  1883. // Mutable pointer to the field.
  1884. // If field is not initialized, it is initialized with default value first.
  1885. pub fn mut_context_uri(&mut self) -> &mut ::std::string::String {
  1886. if self.context_uri.is_none() {
  1887. self.context_uri.set_default();
  1888. }
  1889. self.context_uri.as_mut().unwrap()
  1890. }
  1891. // Take field
  1892. pub fn take_context_uri(&mut self) -> ::std::string::String {
  1893. self.context_uri.take().unwrap_or_else(|| ::std::string::String::new())
  1894. }
  1895. pub fn get_context_uri(&self) -> &str {
  1896. match self.context_uri.as_ref() {
  1897. Some(v) => &v,
  1898. None => "",
  1899. }
  1900. }
  1901. fn get_context_uri_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  1902. &self.context_uri
  1903. }
  1904. fn mut_context_uri_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  1905. &mut self.context_uri
  1906. }
  1907. // optional uint32 index = 3;
  1908. pub fn clear_index(&mut self) {
  1909. self.index = ::std::option::Option::None;
  1910. }
  1911. pub fn has_index(&self) -> bool {
  1912. self.index.is_some()
  1913. }
  1914. // Param is passed by value, moved
  1915. pub fn set_index(&mut self, v: u32) {
  1916. self.index = ::std::option::Option::Some(v);
  1917. }
  1918. pub fn get_index(&self) -> u32 {
  1919. self.index.unwrap_or(0)
  1920. }
  1921. fn get_index_for_reflect(&self) -> &::std::option::Option<u32> {
  1922. &self.index
  1923. }
  1924. fn mut_index_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  1925. &mut self.index
  1926. }
  1927. // optional uint32 position_ms = 4;
  1928. pub fn clear_position_ms(&mut self) {
  1929. self.position_ms = ::std::option::Option::None;
  1930. }
  1931. pub fn has_position_ms(&self) -> bool {
  1932. self.position_ms.is_some()
  1933. }
  1934. // Param is passed by value, moved
  1935. pub fn set_position_ms(&mut self, v: u32) {
  1936. self.position_ms = ::std::option::Option::Some(v);
  1937. }
  1938. pub fn get_position_ms(&self) -> u32 {
  1939. self.position_ms.unwrap_or(0)
  1940. }
  1941. fn get_position_ms_for_reflect(&self) -> &::std::option::Option<u32> {
  1942. &self.position_ms
  1943. }
  1944. fn mut_position_ms_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  1945. &mut self.position_ms
  1946. }
  1947. // optional .PlayStatus status = 5;
  1948. pub fn clear_status(&mut self) {
  1949. self.status = ::std::option::Option::None;
  1950. }
  1951. pub fn has_status(&self) -> bool {
  1952. self.status.is_some()
  1953. }
  1954. // Param is passed by value, moved
  1955. pub fn set_status(&mut self, v: PlayStatus) {
  1956. self.status = ::std::option::Option::Some(v);
  1957. }
  1958. pub fn get_status(&self) -> PlayStatus {
  1959. self.status.unwrap_or(PlayStatus::kPlayStatusStop)
  1960. }
  1961. fn get_status_for_reflect(&self) -> &::std::option::Option<PlayStatus> {
  1962. &self.status
  1963. }
  1964. fn mut_status_for_reflect(&mut self) -> &mut ::std::option::Option<PlayStatus> {
  1965. &mut self.status
  1966. }
  1967. // optional uint64 position_measured_at = 7;
  1968. pub fn clear_position_measured_at(&mut self) {
  1969. self.position_measured_at = ::std::option::Option::None;
  1970. }
  1971. pub fn has_position_measured_at(&self) -> bool {
  1972. self.position_measured_at.is_some()
  1973. }
  1974. // Param is passed by value, moved
  1975. pub fn set_position_measured_at(&mut self, v: u64) {
  1976. self.position_measured_at = ::std::option::Option::Some(v);
  1977. }
  1978. pub fn get_position_measured_at(&self) -> u64 {
  1979. self.position_measured_at.unwrap_or(0)
  1980. }
  1981. fn get_position_measured_at_for_reflect(&self) -> &::std::option::Option<u64> {
  1982. &self.position_measured_at
  1983. }
  1984. fn mut_position_measured_at_for_reflect(&mut self) -> &mut ::std::option::Option<u64> {
  1985. &mut self.position_measured_at
  1986. }
  1987. // optional string context_description = 8;
  1988. pub fn clear_context_description(&mut self) {
  1989. self.context_description.clear();
  1990. }
  1991. pub fn has_context_description(&self) -> bool {
  1992. self.context_description.is_some()
  1993. }
  1994. // Param is passed by value, moved
  1995. pub fn set_context_description(&mut self, v: ::std::string::String) {
  1996. self.context_description = ::protobuf::SingularField::some(v);
  1997. }
  1998. // Mutable pointer to the field.
  1999. // If field is not initialized, it is initialized with default value first.
  2000. pub fn mut_context_description(&mut self) -> &mut ::std::string::String {
  2001. if self.context_description.is_none() {
  2002. self.context_description.set_default();
  2003. }
  2004. self.context_description.as_mut().unwrap()
  2005. }
  2006. // Take field
  2007. pub fn take_context_description(&mut self) -> ::std::string::String {
  2008. self.context_description.take().unwrap_or_else(|| ::std::string::String::new())
  2009. }
  2010. pub fn get_context_description(&self) -> &str {
  2011. match self.context_description.as_ref() {
  2012. Some(v) => &v,
  2013. None => "",
  2014. }
  2015. }
  2016. fn get_context_description_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  2017. &self.context_description
  2018. }
  2019. fn mut_context_description_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  2020. &mut self.context_description
  2021. }
  2022. // optional bool shuffle = 13;
  2023. pub fn clear_shuffle(&mut self) {
  2024. self.shuffle = ::std::option::Option::None;
  2025. }
  2026. pub fn has_shuffle(&self) -> bool {
  2027. self.shuffle.is_some()
  2028. }
  2029. // Param is passed by value, moved
  2030. pub fn set_shuffle(&mut self, v: bool) {
  2031. self.shuffle = ::std::option::Option::Some(v);
  2032. }
  2033. pub fn get_shuffle(&self) -> bool {
  2034. self.shuffle.unwrap_or(false)
  2035. }
  2036. fn get_shuffle_for_reflect(&self) -> &::std::option::Option<bool> {
  2037. &self.shuffle
  2038. }
  2039. fn mut_shuffle_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
  2040. &mut self.shuffle
  2041. }
  2042. // optional bool repeat = 14;
  2043. pub fn clear_repeat(&mut self) {
  2044. self.repeat = ::std::option::Option::None;
  2045. }
  2046. pub fn has_repeat(&self) -> bool {
  2047. self.repeat.is_some()
  2048. }
  2049. // Param is passed by value, moved
  2050. pub fn set_repeat(&mut self, v: bool) {
  2051. self.repeat = ::std::option::Option::Some(v);
  2052. }
  2053. pub fn get_repeat(&self) -> bool {
  2054. self.repeat.unwrap_or(false)
  2055. }
  2056. fn get_repeat_for_reflect(&self) -> &::std::option::Option<bool> {
  2057. &self.repeat
  2058. }
  2059. fn mut_repeat_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
  2060. &mut self.repeat
  2061. }
  2062. // optional string last_command_ident = 20;
  2063. pub fn clear_last_command_ident(&mut self) {
  2064. self.last_command_ident.clear();
  2065. }
  2066. pub fn has_last_command_ident(&self) -> bool {
  2067. self.last_command_ident.is_some()
  2068. }
  2069. // Param is passed by value, moved
  2070. pub fn set_last_command_ident(&mut self, v: ::std::string::String) {
  2071. self.last_command_ident = ::protobuf::SingularField::some(v);
  2072. }
  2073. // Mutable pointer to the field.
  2074. // If field is not initialized, it is initialized with default value first.
  2075. pub fn mut_last_command_ident(&mut self) -> &mut ::std::string::String {
  2076. if self.last_command_ident.is_none() {
  2077. self.last_command_ident.set_default();
  2078. }
  2079. self.last_command_ident.as_mut().unwrap()
  2080. }
  2081. // Take field
  2082. pub fn take_last_command_ident(&mut self) -> ::std::string::String {
  2083. self.last_command_ident.take().unwrap_or_else(|| ::std::string::String::new())
  2084. }
  2085. pub fn get_last_command_ident(&self) -> &str {
  2086. match self.last_command_ident.as_ref() {
  2087. Some(v) => &v,
  2088. None => "",
  2089. }
  2090. }
  2091. fn get_last_command_ident_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  2092. &self.last_command_ident
  2093. }
  2094. fn mut_last_command_ident_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  2095. &mut self.last_command_ident
  2096. }
  2097. // optional uint32 last_command_msgid = 21;
  2098. pub fn clear_last_command_msgid(&mut self) {
  2099. self.last_command_msgid = ::std::option::Option::None;
  2100. }
  2101. pub fn has_last_command_msgid(&self) -> bool {
  2102. self.last_command_msgid.is_some()
  2103. }
  2104. // Param is passed by value, moved
  2105. pub fn set_last_command_msgid(&mut self, v: u32) {
  2106. self.last_command_msgid = ::std::option::Option::Some(v);
  2107. }
  2108. pub fn get_last_command_msgid(&self) -> u32 {
  2109. self.last_command_msgid.unwrap_or(0)
  2110. }
  2111. fn get_last_command_msgid_for_reflect(&self) -> &::std::option::Option<u32> {
  2112. &self.last_command_msgid
  2113. }
  2114. fn mut_last_command_msgid_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  2115. &mut self.last_command_msgid
  2116. }
  2117. // optional bool playing_from_fallback = 24;
  2118. pub fn clear_playing_from_fallback(&mut self) {
  2119. self.playing_from_fallback = ::std::option::Option::None;
  2120. }
  2121. pub fn has_playing_from_fallback(&self) -> bool {
  2122. self.playing_from_fallback.is_some()
  2123. }
  2124. // Param is passed by value, moved
  2125. pub fn set_playing_from_fallback(&mut self, v: bool) {
  2126. self.playing_from_fallback = ::std::option::Option::Some(v);
  2127. }
  2128. pub fn get_playing_from_fallback(&self) -> bool {
  2129. self.playing_from_fallback.unwrap_or(false)
  2130. }
  2131. fn get_playing_from_fallback_for_reflect(&self) -> &::std::option::Option<bool> {
  2132. &self.playing_from_fallback
  2133. }
  2134. fn mut_playing_from_fallback_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
  2135. &mut self.playing_from_fallback
  2136. }
  2137. // optional uint32 row = 25;
  2138. pub fn clear_row(&mut self) {
  2139. self.row = ::std::option::Option::None;
  2140. }
  2141. pub fn has_row(&self) -> bool {
  2142. self.row.is_some()
  2143. }
  2144. // Param is passed by value, moved
  2145. pub fn set_row(&mut self, v: u32) {
  2146. self.row = ::std::option::Option::Some(v);
  2147. }
  2148. pub fn get_row(&self) -> u32 {
  2149. self.row.unwrap_or(0)
  2150. }
  2151. fn get_row_for_reflect(&self) -> &::std::option::Option<u32> {
  2152. &self.row
  2153. }
  2154. fn mut_row_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  2155. &mut self.row
  2156. }
  2157. // optional uint32 playing_track_index = 26;
  2158. pub fn clear_playing_track_index(&mut self) {
  2159. self.playing_track_index = ::std::option::Option::None;
  2160. }
  2161. pub fn has_playing_track_index(&self) -> bool {
  2162. self.playing_track_index.is_some()
  2163. }
  2164. // Param is passed by value, moved
  2165. pub fn set_playing_track_index(&mut self, v: u32) {
  2166. self.playing_track_index = ::std::option::Option::Some(v);
  2167. }
  2168. pub fn get_playing_track_index(&self) -> u32 {
  2169. self.playing_track_index.unwrap_or(0)
  2170. }
  2171. fn get_playing_track_index_for_reflect(&self) -> &::std::option::Option<u32> {
  2172. &self.playing_track_index
  2173. }
  2174. fn mut_playing_track_index_for_reflect(&mut self) -> &mut ::std::option::Option<u32> {
  2175. &mut self.playing_track_index
  2176. }
  2177. // repeated .TrackRef track = 27;
  2178. pub fn clear_track(&mut self) {
  2179. self.track.clear();
  2180. }
  2181. // Param is passed by value, moved
  2182. pub fn set_track(&mut self, v: ::protobuf::RepeatedField<TrackRef>) {
  2183. self.track = v;
  2184. }
  2185. // Mutable pointer to the field.
  2186. pub fn mut_track(&mut self) -> &mut ::protobuf::RepeatedField<TrackRef> {
  2187. &mut self.track
  2188. }
  2189. // Take field
  2190. pub fn take_track(&mut self) -> ::protobuf::RepeatedField<TrackRef> {
  2191. ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new())
  2192. }
  2193. pub fn get_track(&self) -> &[TrackRef] {
  2194. &self.track
  2195. }
  2196. fn get_track_for_reflect(&self) -> &::protobuf::RepeatedField<TrackRef> {
  2197. &self.track
  2198. }
  2199. fn mut_track_for_reflect(&mut self) -> &mut ::protobuf::RepeatedField<TrackRef> {
  2200. &mut self.track
  2201. }
  2202. // optional .Ad ad = 28;
  2203. pub fn clear_ad(&mut self) {
  2204. self.ad.clear();
  2205. }
  2206. pub fn has_ad(&self) -> bool {
  2207. self.ad.is_some()
  2208. }
  2209. // Param is passed by value, moved
  2210. pub fn set_ad(&mut self, v: Ad) {
  2211. self.ad = ::protobuf::SingularPtrField::some(v);
  2212. }
  2213. // Mutable pointer to the field.
  2214. // If field is not initialized, it is initialized with default value first.
  2215. pub fn mut_ad(&mut self) -> &mut Ad {
  2216. if self.ad.is_none() {
  2217. self.ad.set_default();
  2218. }
  2219. self.ad.as_mut().unwrap()
  2220. }
  2221. // Take field
  2222. pub fn take_ad(&mut self) -> Ad {
  2223. self.ad.take().unwrap_or_else(|| Ad::new())
  2224. }
  2225. pub fn get_ad(&self) -> &Ad {
  2226. self.ad.as_ref().unwrap_or_else(|| Ad::default_instance())
  2227. }
  2228. fn get_ad_for_reflect(&self) -> &::protobuf::SingularPtrField<Ad> {
  2229. &self.ad
  2230. }
  2231. fn mut_ad_for_reflect(&mut self) -> &mut ::protobuf::SingularPtrField<Ad> {
  2232. &mut self.ad
  2233. }
  2234. }
  2235. impl ::protobuf::Message for State {
  2236. fn is_initialized(&self) -> bool {
  2237. for v in &self.track {
  2238. if !v.is_initialized() {
  2239. return false;
  2240. }
  2241. };
  2242. for v in &self.ad {
  2243. if !v.is_initialized() {
  2244. return false;
  2245. }
  2246. };
  2247. true
  2248. }
  2249. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  2250. while !is.eof()? {
  2251. let (field_number, wire_type) = is.read_tag_unpack()?;
  2252. match field_number {
  2253. 2 => {
  2254. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_uri)?;
  2255. },
  2256. 3 => {
  2257. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2258. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2259. }
  2260. let tmp = is.read_uint32()?;
  2261. self.index = ::std::option::Option::Some(tmp);
  2262. },
  2263. 4 => {
  2264. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2265. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2266. }
  2267. let tmp = is.read_uint32()?;
  2268. self.position_ms = ::std::option::Option::Some(tmp);
  2269. },
  2270. 5 => {
  2271. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2272. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2273. }
  2274. let tmp = is.read_enum()?;
  2275. self.status = ::std::option::Option::Some(tmp);
  2276. },
  2277. 7 => {
  2278. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2279. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2280. }
  2281. let tmp = is.read_uint64()?;
  2282. self.position_measured_at = ::std::option::Option::Some(tmp);
  2283. },
  2284. 8 => {
  2285. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_description)?;
  2286. },
  2287. 13 => {
  2288. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2289. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2290. }
  2291. let tmp = is.read_bool()?;
  2292. self.shuffle = ::std::option::Option::Some(tmp);
  2293. },
  2294. 14 => {
  2295. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2296. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2297. }
  2298. let tmp = is.read_bool()?;
  2299. self.repeat = ::std::option::Option::Some(tmp);
  2300. },
  2301. 20 => {
  2302. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.last_command_ident)?;
  2303. },
  2304. 21 => {
  2305. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2306. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2307. }
  2308. let tmp = is.read_uint32()?;
  2309. self.last_command_msgid = ::std::option::Option::Some(tmp);
  2310. },
  2311. 24 => {
  2312. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2313. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2314. }
  2315. let tmp = is.read_bool()?;
  2316. self.playing_from_fallback = ::std::option::Option::Some(tmp);
  2317. },
  2318. 25 => {
  2319. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2320. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2321. }
  2322. let tmp = is.read_uint32()?;
  2323. self.row = ::std::option::Option::Some(tmp);
  2324. },
  2325. 26 => {
  2326. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2327. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2328. }
  2329. let tmp = is.read_uint32()?;
  2330. self.playing_track_index = ::std::option::Option::Some(tmp);
  2331. },
  2332. 27 => {
  2333. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?;
  2334. },
  2335. 28 => {
  2336. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ad)?;
  2337. },
  2338. _ => {
  2339. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2340. },
  2341. };
  2342. }
  2343. ::std::result::Result::Ok(())
  2344. }
  2345. // Compute sizes of nested messages
  2346. #[allow(unused_variables)]
  2347. fn compute_size(&self) -> u32 {
  2348. let mut my_size = 0;
  2349. if let Some(ref v) = self.context_uri.as_ref() {
  2350. my_size += ::protobuf::rt::string_size(2, &v);
  2351. }
  2352. if let Some(v) = self.index {
  2353. my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
  2354. }
  2355. if let Some(v) = self.position_ms {
  2356. my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
  2357. }
  2358. if let Some(v) = self.status {
  2359. my_size += ::protobuf::rt::enum_size(5, v);
  2360. }
  2361. if let Some(v) = self.position_measured_at {
  2362. my_size += ::protobuf::rt::value_size(7, v, ::protobuf::wire_format::WireTypeVarint);
  2363. }
  2364. if let Some(ref v) = self.context_description.as_ref() {
  2365. my_size += ::protobuf::rt::string_size(8, &v);
  2366. }
  2367. if let Some(v) = self.shuffle {
  2368. my_size += 2;
  2369. }
  2370. if let Some(v) = self.repeat {
  2371. my_size += 2;
  2372. }
  2373. if let Some(ref v) = self.last_command_ident.as_ref() {
  2374. my_size += ::protobuf::rt::string_size(20, &v);
  2375. }
  2376. if let Some(v) = self.last_command_msgid {
  2377. my_size += ::protobuf::rt::value_size(21, v, ::protobuf::wire_format::WireTypeVarint);
  2378. }
  2379. if let Some(v) = self.playing_from_fallback {
  2380. my_size += 3;
  2381. }
  2382. if let Some(v) = self.row {
  2383. my_size += ::protobuf::rt::value_size(25, v, ::protobuf::wire_format::WireTypeVarint);
  2384. }
  2385. if let Some(v) = self.playing_track_index {
  2386. my_size += ::protobuf::rt::value_size(26, v, ::protobuf::wire_format::WireTypeVarint);
  2387. }
  2388. for value in &self.track {
  2389. let len = value.compute_size();
  2390. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2391. };
  2392. if let Some(ref v) = self.ad.as_ref() {
  2393. let len = v.compute_size();
  2394. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2395. }
  2396. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2397. self.cached_size.set(my_size);
  2398. my_size
  2399. }
  2400. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  2401. if let Some(ref v) = self.context_uri.as_ref() {
  2402. os.write_string(2, &v)?;
  2403. }
  2404. if let Some(v) = self.index {
  2405. os.write_uint32(3, v)?;
  2406. }
  2407. if let Some(v) = self.position_ms {
  2408. os.write_uint32(4, v)?;
  2409. }
  2410. if let Some(v) = self.status {
  2411. os.write_enum(5, v.value())?;
  2412. }
  2413. if let Some(v) = self.position_measured_at {
  2414. os.write_uint64(7, v)?;
  2415. }
  2416. if let Some(ref v) = self.context_description.as_ref() {
  2417. os.write_string(8, &v)?;
  2418. }
  2419. if let Some(v) = self.shuffle {
  2420. os.write_bool(13, v)?;
  2421. }
  2422. if let Some(v) = self.repeat {
  2423. os.write_bool(14, v)?;
  2424. }
  2425. if let Some(ref v) = self.last_command_ident.as_ref() {
  2426. os.write_string(20, &v)?;
  2427. }
  2428. if let Some(v) = self.last_command_msgid {
  2429. os.write_uint32(21, v)?;
  2430. }
  2431. if let Some(v) = self.playing_from_fallback {
  2432. os.write_bool(24, v)?;
  2433. }
  2434. if let Some(v) = self.row {
  2435. os.write_uint32(25, v)?;
  2436. }
  2437. if let Some(v) = self.playing_track_index {
  2438. os.write_uint32(26, v)?;
  2439. }
  2440. for v in &self.track {
  2441. os.write_tag(27, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2442. os.write_raw_varint32(v.get_cached_size())?;
  2443. v.write_to_with_cached_sizes(os)?;
  2444. };
  2445. if let Some(ref v) = self.ad.as_ref() {
  2446. os.write_tag(28, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2447. os.write_raw_varint32(v.get_cached_size())?;
  2448. v.write_to_with_cached_sizes(os)?;
  2449. }
  2450. os.write_unknown_fields(self.get_unknown_fields())?;
  2451. ::std::result::Result::Ok(())
  2452. }
  2453. fn get_cached_size(&self) -> u32 {
  2454. self.cached_size.get()
  2455. }
  2456. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2457. &self.unknown_fields
  2458. }
  2459. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2460. &mut self.unknown_fields
  2461. }
  2462. fn as_any(&self) -> &::std::any::Any {
  2463. self as &::std::any::Any
  2464. }
  2465. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  2466. self as &mut ::std::any::Any
  2467. }
  2468. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  2469. self
  2470. }
  2471. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2472. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  2473. }
  2474. }
  2475. impl ::protobuf::MessageStatic for State {
  2476. fn new() -> State {
  2477. State::new()
  2478. }
  2479. fn descriptor_static(_: ::std::option::Option<State>) -> &'static ::protobuf::reflect::MessageDescriptor {
  2480. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2481. lock: ::protobuf::lazy::ONCE_INIT,
  2482. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2483. };
  2484. unsafe {
  2485. descriptor.get(|| {
  2486. let mut fields = ::std::vec::Vec::new();
  2487. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2488. "context_uri",
  2489. State::get_context_uri_for_reflect,
  2490. State::mut_context_uri_for_reflect,
  2491. ));
  2492. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2493. "index",
  2494. State::get_index_for_reflect,
  2495. State::mut_index_for_reflect,
  2496. ));
  2497. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2498. "position_ms",
  2499. State::get_position_ms_for_reflect,
  2500. State::mut_position_ms_for_reflect,
  2501. ));
  2502. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<PlayStatus>>(
  2503. "status",
  2504. State::get_status_for_reflect,
  2505. State::mut_status_for_reflect,
  2506. ));
  2507. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
  2508. "position_measured_at",
  2509. State::get_position_measured_at_for_reflect,
  2510. State::mut_position_measured_at_for_reflect,
  2511. ));
  2512. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2513. "context_description",
  2514. State::get_context_description_for_reflect,
  2515. State::mut_context_description_for_reflect,
  2516. ));
  2517. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  2518. "shuffle",
  2519. State::get_shuffle_for_reflect,
  2520. State::mut_shuffle_for_reflect,
  2521. ));
  2522. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  2523. "repeat",
  2524. State::get_repeat_for_reflect,
  2525. State::mut_repeat_for_reflect,
  2526. ));
  2527. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2528. "last_command_ident",
  2529. State::get_last_command_ident_for_reflect,
  2530. State::mut_last_command_ident_for_reflect,
  2531. ));
  2532. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2533. "last_command_msgid",
  2534. State::get_last_command_msgid_for_reflect,
  2535. State::mut_last_command_msgid_for_reflect,
  2536. ));
  2537. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  2538. "playing_from_fallback",
  2539. State::get_playing_from_fallback_for_reflect,
  2540. State::mut_playing_from_fallback_for_reflect,
  2541. ));
  2542. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2543. "row",
  2544. State::get_row_for_reflect,
  2545. State::mut_row_for_reflect,
  2546. ));
  2547. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2548. "playing_track_index",
  2549. State::get_playing_track_index_for_reflect,
  2550. State::mut_playing_track_index_for_reflect,
  2551. ));
  2552. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TrackRef>>(
  2553. "track",
  2554. State::get_track_for_reflect,
  2555. State::mut_track_for_reflect,
  2556. ));
  2557. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Ad>>(
  2558. "ad",
  2559. State::get_ad_for_reflect,
  2560. State::mut_ad_for_reflect,
  2561. ));
  2562. ::protobuf::reflect::MessageDescriptor::new::<State>(
  2563. "State",
  2564. fields,
  2565. file_descriptor_proto()
  2566. )
  2567. })
  2568. }
  2569. }
  2570. }
  2571. impl ::protobuf::Clear for State {
  2572. fn clear(&mut self) {
  2573. self.clear_context_uri();
  2574. self.clear_index();
  2575. self.clear_position_ms();
  2576. self.clear_status();
  2577. self.clear_position_measured_at();
  2578. self.clear_context_description();
  2579. self.clear_shuffle();
  2580. self.clear_repeat();
  2581. self.clear_last_command_ident();
  2582. self.clear_last_command_msgid();
  2583. self.clear_playing_from_fallback();
  2584. self.clear_row();
  2585. self.clear_playing_track_index();
  2586. self.clear_track();
  2587. self.clear_ad();
  2588. self.unknown_fields.clear();
  2589. }
  2590. }
  2591. impl ::std::fmt::Debug for State {
  2592. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  2593. ::protobuf::text_format::fmt(self, f)
  2594. }
  2595. }
  2596. impl ::protobuf::reflect::ProtobufValue for State {
  2597. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2598. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2599. }
  2600. }
  2601. #[derive(PartialEq,Clone,Default)]
  2602. pub struct TrackRef {
  2603. // message fields
  2604. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2605. uri: ::protobuf::SingularField<::std::string::String>,
  2606. queued: ::std::option::Option<bool>,
  2607. context: ::protobuf::SingularField<::std::string::String>,
  2608. // special fields
  2609. unknown_fields: ::protobuf::UnknownFields,
  2610. cached_size: ::protobuf::CachedSize,
  2611. }
  2612. // see codegen.rs for the explanation why impl Sync explicitly
  2613. unsafe impl ::std::marker::Sync for TrackRef {}
  2614. impl TrackRef {
  2615. pub fn new() -> TrackRef {
  2616. ::std::default::Default::default()
  2617. }
  2618. pub fn default_instance() -> &'static TrackRef {
  2619. static mut instance: ::protobuf::lazy::Lazy<TrackRef> = ::protobuf::lazy::Lazy {
  2620. lock: ::protobuf::lazy::ONCE_INIT,
  2621. ptr: 0 as *const TrackRef,
  2622. };
  2623. unsafe {
  2624. instance.get(TrackRef::new)
  2625. }
  2626. }
  2627. // optional bytes gid = 1;
  2628. pub fn clear_gid(&mut self) {
  2629. self.gid.clear();
  2630. }
  2631. pub fn has_gid(&self) -> bool {
  2632. self.gid.is_some()
  2633. }
  2634. // Param is passed by value, moved
  2635. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  2636. self.gid = ::protobuf::SingularField::some(v);
  2637. }
  2638. // Mutable pointer to the field.
  2639. // If field is not initialized, it is initialized with default value first.
  2640. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  2641. if self.gid.is_none() {
  2642. self.gid.set_default();
  2643. }
  2644. self.gid.as_mut().unwrap()
  2645. }
  2646. // Take field
  2647. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  2648. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2649. }
  2650. pub fn get_gid(&self) -> &[u8] {
  2651. match self.gid.as_ref() {
  2652. Some(v) => &v,
  2653. None => &[],
  2654. }
  2655. }
  2656. fn get_gid_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
  2657. &self.gid
  2658. }
  2659. fn mut_gid_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
  2660. &mut self.gid
  2661. }
  2662. // optional string uri = 2;
  2663. pub fn clear_uri(&mut self) {
  2664. self.uri.clear();
  2665. }
  2666. pub fn has_uri(&self) -> bool {
  2667. self.uri.is_some()
  2668. }
  2669. // Param is passed by value, moved
  2670. pub fn set_uri(&mut self, v: ::std::string::String) {
  2671. self.uri = ::protobuf::SingularField::some(v);
  2672. }
  2673. // Mutable pointer to the field.
  2674. // If field is not initialized, it is initialized with default value first.
  2675. pub fn mut_uri(&mut self) -> &mut ::std::string::String {
  2676. if self.uri.is_none() {
  2677. self.uri.set_default();
  2678. }
  2679. self.uri.as_mut().unwrap()
  2680. }
  2681. // Take field
  2682. pub fn take_uri(&mut self) -> ::std::string::String {
  2683. self.uri.take().unwrap_or_else(|| ::std::string::String::new())
  2684. }
  2685. pub fn get_uri(&self) -> &str {
  2686. match self.uri.as_ref() {
  2687. Some(v) => &v,
  2688. None => "",
  2689. }
  2690. }
  2691. fn get_uri_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  2692. &self.uri
  2693. }
  2694. fn mut_uri_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  2695. &mut self.uri
  2696. }
  2697. // optional bool queued = 3;
  2698. pub fn clear_queued(&mut self) {
  2699. self.queued = ::std::option::Option::None;
  2700. }
  2701. pub fn has_queued(&self) -> bool {
  2702. self.queued.is_some()
  2703. }
  2704. // Param is passed by value, moved
  2705. pub fn set_queued(&mut self, v: bool) {
  2706. self.queued = ::std::option::Option::Some(v);
  2707. }
  2708. pub fn get_queued(&self) -> bool {
  2709. self.queued.unwrap_or(false)
  2710. }
  2711. fn get_queued_for_reflect(&self) -> &::std::option::Option<bool> {
  2712. &self.queued
  2713. }
  2714. fn mut_queued_for_reflect(&mut self) -> &mut ::std::option::Option<bool> {
  2715. &mut self.queued
  2716. }
  2717. // optional string context = 4;
  2718. pub fn clear_context(&mut self) {
  2719. self.context.clear();
  2720. }
  2721. pub fn has_context(&self) -> bool {
  2722. self.context.is_some()
  2723. }
  2724. // Param is passed by value, moved
  2725. pub fn set_context(&mut self, v: ::std::string::String) {
  2726. self.context = ::protobuf::SingularField::some(v);
  2727. }
  2728. // Mutable pointer to the field.
  2729. // If field is not initialized, it is initialized with default value first.
  2730. pub fn mut_context(&mut self) -> &mut ::std::string::String {
  2731. if self.context.is_none() {
  2732. self.context.set_default();
  2733. }
  2734. self.context.as_mut().unwrap()
  2735. }
  2736. // Take field
  2737. pub fn take_context(&mut self) -> ::std::string::String {
  2738. self.context.take().unwrap_or_else(|| ::std::string::String::new())
  2739. }
  2740. pub fn get_context(&self) -> &str {
  2741. match self.context.as_ref() {
  2742. Some(v) => &v,
  2743. None => "",
  2744. }
  2745. }
  2746. fn get_context_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  2747. &self.context
  2748. }
  2749. fn mut_context_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  2750. &mut self.context
  2751. }
  2752. }
  2753. impl ::protobuf::Message for TrackRef {
  2754. fn is_initialized(&self) -> bool {
  2755. true
  2756. }
  2757. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  2758. while !is.eof()? {
  2759. let (field_number, wire_type) = is.read_tag_unpack()?;
  2760. match field_number {
  2761. 1 => {
  2762. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  2763. },
  2764. 2 => {
  2765. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?;
  2766. },
  2767. 3 => {
  2768. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2769. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2770. }
  2771. let tmp = is.read_bool()?;
  2772. self.queued = ::std::option::Option::Some(tmp);
  2773. },
  2774. 4 => {
  2775. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context)?;
  2776. },
  2777. _ => {
  2778. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2779. },
  2780. };
  2781. }
  2782. ::std::result::Result::Ok(())
  2783. }
  2784. // Compute sizes of nested messages
  2785. #[allow(unused_variables)]
  2786. fn compute_size(&self) -> u32 {
  2787. let mut my_size = 0;
  2788. if let Some(ref v) = self.gid.as_ref() {
  2789. my_size += ::protobuf::rt::bytes_size(1, &v);
  2790. }
  2791. if let Some(ref v) = self.uri.as_ref() {
  2792. my_size += ::protobuf::rt::string_size(2, &v);
  2793. }
  2794. if let Some(v) = self.queued {
  2795. my_size += 2;
  2796. }
  2797. if let Some(ref v) = self.context.as_ref() {
  2798. my_size += ::protobuf::rt::string_size(4, &v);
  2799. }
  2800. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2801. self.cached_size.set(my_size);
  2802. my_size
  2803. }
  2804. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  2805. if let Some(ref v) = self.gid.as_ref() {
  2806. os.write_bytes(1, &v)?;
  2807. }
  2808. if let Some(ref v) = self.uri.as_ref() {
  2809. os.write_string(2, &v)?;
  2810. }
  2811. if let Some(v) = self.queued {
  2812. os.write_bool(3, v)?;
  2813. }
  2814. if let Some(ref v) = self.context.as_ref() {
  2815. os.write_string(4, &v)?;
  2816. }
  2817. os.write_unknown_fields(self.get_unknown_fields())?;
  2818. ::std::result::Result::Ok(())
  2819. }
  2820. fn get_cached_size(&self) -> u32 {
  2821. self.cached_size.get()
  2822. }
  2823. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2824. &self.unknown_fields
  2825. }
  2826. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2827. &mut self.unknown_fields
  2828. }
  2829. fn as_any(&self) -> &::std::any::Any {
  2830. self as &::std::any::Any
  2831. }
  2832. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  2833. self as &mut ::std::any::Any
  2834. }
  2835. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  2836. self
  2837. }
  2838. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2839. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  2840. }
  2841. }
  2842. impl ::protobuf::MessageStatic for TrackRef {
  2843. fn new() -> TrackRef {
  2844. TrackRef::new()
  2845. }
  2846. fn descriptor_static(_: ::std::option::Option<TrackRef>) -> &'static ::protobuf::reflect::MessageDescriptor {
  2847. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2848. lock: ::protobuf::lazy::ONCE_INIT,
  2849. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2850. };
  2851. unsafe {
  2852. descriptor.get(|| {
  2853. let mut fields = ::std::vec::Vec::new();
  2854. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2855. "gid",
  2856. TrackRef::get_gid_for_reflect,
  2857. TrackRef::mut_gid_for_reflect,
  2858. ));
  2859. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2860. "uri",
  2861. TrackRef::get_uri_for_reflect,
  2862. TrackRef::mut_uri_for_reflect,
  2863. ));
  2864. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  2865. "queued",
  2866. TrackRef::get_queued_for_reflect,
  2867. TrackRef::mut_queued_for_reflect,
  2868. ));
  2869. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2870. "context",
  2871. TrackRef::get_context_for_reflect,
  2872. TrackRef::mut_context_for_reflect,
  2873. ));
  2874. ::protobuf::reflect::MessageDescriptor::new::<TrackRef>(
  2875. "TrackRef",
  2876. fields,
  2877. file_descriptor_proto()
  2878. )
  2879. })
  2880. }
  2881. }
  2882. }
  2883. impl ::protobuf::Clear for TrackRef {
  2884. fn clear(&mut self) {
  2885. self.clear_gid();
  2886. self.clear_uri();
  2887. self.clear_queued();
  2888. self.clear_context();
  2889. self.unknown_fields.clear();
  2890. }
  2891. }
  2892. impl ::std::fmt::Debug for TrackRef {
  2893. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  2894. ::protobuf::text_format::fmt(self, f)
  2895. }
  2896. }
  2897. impl ::protobuf::reflect::ProtobufValue for TrackRef {
  2898. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2899. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2900. }
  2901. }
  2902. #[derive(PartialEq,Clone,Default)]
  2903. pub struct Ad {
  2904. // message fields
  2905. next: ::std::option::Option<i32>,
  2906. ogg_fid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2907. image_fid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2908. duration: ::std::option::Option<i32>,
  2909. click_url: ::protobuf::SingularField<::std::string::String>,
  2910. impression_url: ::protobuf::SingularField<::std::string::String>,
  2911. product: ::protobuf::SingularField<::std::string::String>,
  2912. advertiser: ::protobuf::SingularField<::std::string::String>,
  2913. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2914. // special fields
  2915. unknown_fields: ::protobuf::UnknownFields,
  2916. cached_size: ::protobuf::CachedSize,
  2917. }
  2918. // see codegen.rs for the explanation why impl Sync explicitly
  2919. unsafe impl ::std::marker::Sync for Ad {}
  2920. impl Ad {
  2921. pub fn new() -> Ad {
  2922. ::std::default::Default::default()
  2923. }
  2924. pub fn default_instance() -> &'static Ad {
  2925. static mut instance: ::protobuf::lazy::Lazy<Ad> = ::protobuf::lazy::Lazy {
  2926. lock: ::protobuf::lazy::ONCE_INIT,
  2927. ptr: 0 as *const Ad,
  2928. };
  2929. unsafe {
  2930. instance.get(Ad::new)
  2931. }
  2932. }
  2933. // optional int32 next = 1;
  2934. pub fn clear_next(&mut self) {
  2935. self.next = ::std::option::Option::None;
  2936. }
  2937. pub fn has_next(&self) -> bool {
  2938. self.next.is_some()
  2939. }
  2940. // Param is passed by value, moved
  2941. pub fn set_next(&mut self, v: i32) {
  2942. self.next = ::std::option::Option::Some(v);
  2943. }
  2944. pub fn get_next(&self) -> i32 {
  2945. self.next.unwrap_or(0)
  2946. }
  2947. fn get_next_for_reflect(&self) -> &::std::option::Option<i32> {
  2948. &self.next
  2949. }
  2950. fn mut_next_for_reflect(&mut self) -> &mut ::std::option::Option<i32> {
  2951. &mut self.next
  2952. }
  2953. // optional bytes ogg_fid = 2;
  2954. pub fn clear_ogg_fid(&mut self) {
  2955. self.ogg_fid.clear();
  2956. }
  2957. pub fn has_ogg_fid(&self) -> bool {
  2958. self.ogg_fid.is_some()
  2959. }
  2960. // Param is passed by value, moved
  2961. pub fn set_ogg_fid(&mut self, v: ::std::vec::Vec<u8>) {
  2962. self.ogg_fid = ::protobuf::SingularField::some(v);
  2963. }
  2964. // Mutable pointer to the field.
  2965. // If field is not initialized, it is initialized with default value first.
  2966. pub fn mut_ogg_fid(&mut self) -> &mut ::std::vec::Vec<u8> {
  2967. if self.ogg_fid.is_none() {
  2968. self.ogg_fid.set_default();
  2969. }
  2970. self.ogg_fid.as_mut().unwrap()
  2971. }
  2972. // Take field
  2973. pub fn take_ogg_fid(&mut self) -> ::std::vec::Vec<u8> {
  2974. self.ogg_fid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2975. }
  2976. pub fn get_ogg_fid(&self) -> &[u8] {
  2977. match self.ogg_fid.as_ref() {
  2978. Some(v) => &v,
  2979. None => &[],
  2980. }
  2981. }
  2982. fn get_ogg_fid_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
  2983. &self.ogg_fid
  2984. }
  2985. fn mut_ogg_fid_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
  2986. &mut self.ogg_fid
  2987. }
  2988. // optional bytes image_fid = 3;
  2989. pub fn clear_image_fid(&mut self) {
  2990. self.image_fid.clear();
  2991. }
  2992. pub fn has_image_fid(&self) -> bool {
  2993. self.image_fid.is_some()
  2994. }
  2995. // Param is passed by value, moved
  2996. pub fn set_image_fid(&mut self, v: ::std::vec::Vec<u8>) {
  2997. self.image_fid = ::protobuf::SingularField::some(v);
  2998. }
  2999. // Mutable pointer to the field.
  3000. // If field is not initialized, it is initialized with default value first.
  3001. pub fn mut_image_fid(&mut self) -> &mut ::std::vec::Vec<u8> {
  3002. if self.image_fid.is_none() {
  3003. self.image_fid.set_default();
  3004. }
  3005. self.image_fid.as_mut().unwrap()
  3006. }
  3007. // Take field
  3008. pub fn take_image_fid(&mut self) -> ::std::vec::Vec<u8> {
  3009. self.image_fid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3010. }
  3011. pub fn get_image_fid(&self) -> &[u8] {
  3012. match self.image_fid.as_ref() {
  3013. Some(v) => &v,
  3014. None => &[],
  3015. }
  3016. }
  3017. fn get_image_fid_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
  3018. &self.image_fid
  3019. }
  3020. fn mut_image_fid_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
  3021. &mut self.image_fid
  3022. }
  3023. // optional int32 duration = 4;
  3024. pub fn clear_duration(&mut self) {
  3025. self.duration = ::std::option::Option::None;
  3026. }
  3027. pub fn has_duration(&self) -> bool {
  3028. self.duration.is_some()
  3029. }
  3030. // Param is passed by value, moved
  3031. pub fn set_duration(&mut self, v: i32) {
  3032. self.duration = ::std::option::Option::Some(v);
  3033. }
  3034. pub fn get_duration(&self) -> i32 {
  3035. self.duration.unwrap_or(0)
  3036. }
  3037. fn get_duration_for_reflect(&self) -> &::std::option::Option<i32> {
  3038. &self.duration
  3039. }
  3040. fn mut_duration_for_reflect(&mut self) -> &mut ::std::option::Option<i32> {
  3041. &mut self.duration
  3042. }
  3043. // optional string click_url = 5;
  3044. pub fn clear_click_url(&mut self) {
  3045. self.click_url.clear();
  3046. }
  3047. pub fn has_click_url(&self) -> bool {
  3048. self.click_url.is_some()
  3049. }
  3050. // Param is passed by value, moved
  3051. pub fn set_click_url(&mut self, v: ::std::string::String) {
  3052. self.click_url = ::protobuf::SingularField::some(v);
  3053. }
  3054. // Mutable pointer to the field.
  3055. // If field is not initialized, it is initialized with default value first.
  3056. pub fn mut_click_url(&mut self) -> &mut ::std::string::String {
  3057. if self.click_url.is_none() {
  3058. self.click_url.set_default();
  3059. }
  3060. self.click_url.as_mut().unwrap()
  3061. }
  3062. // Take field
  3063. pub fn take_click_url(&mut self) -> ::std::string::String {
  3064. self.click_url.take().unwrap_or_else(|| ::std::string::String::new())
  3065. }
  3066. pub fn get_click_url(&self) -> &str {
  3067. match self.click_url.as_ref() {
  3068. Some(v) => &v,
  3069. None => "",
  3070. }
  3071. }
  3072. fn get_click_url_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  3073. &self.click_url
  3074. }
  3075. fn mut_click_url_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  3076. &mut self.click_url
  3077. }
  3078. // optional string impression_url = 6;
  3079. pub fn clear_impression_url(&mut self) {
  3080. self.impression_url.clear();
  3081. }
  3082. pub fn has_impression_url(&self) -> bool {
  3083. self.impression_url.is_some()
  3084. }
  3085. // Param is passed by value, moved
  3086. pub fn set_impression_url(&mut self, v: ::std::string::String) {
  3087. self.impression_url = ::protobuf::SingularField::some(v);
  3088. }
  3089. // Mutable pointer to the field.
  3090. // If field is not initialized, it is initialized with default value first.
  3091. pub fn mut_impression_url(&mut self) -> &mut ::std::string::String {
  3092. if self.impression_url.is_none() {
  3093. self.impression_url.set_default();
  3094. }
  3095. self.impression_url.as_mut().unwrap()
  3096. }
  3097. // Take field
  3098. pub fn take_impression_url(&mut self) -> ::std::string::String {
  3099. self.impression_url.take().unwrap_or_else(|| ::std::string::String::new())
  3100. }
  3101. pub fn get_impression_url(&self) -> &str {
  3102. match self.impression_url.as_ref() {
  3103. Some(v) => &v,
  3104. None => "",
  3105. }
  3106. }
  3107. fn get_impression_url_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  3108. &self.impression_url
  3109. }
  3110. fn mut_impression_url_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  3111. &mut self.impression_url
  3112. }
  3113. // optional string product = 7;
  3114. pub fn clear_product(&mut self) {
  3115. self.product.clear();
  3116. }
  3117. pub fn has_product(&self) -> bool {
  3118. self.product.is_some()
  3119. }
  3120. // Param is passed by value, moved
  3121. pub fn set_product(&mut self, v: ::std::string::String) {
  3122. self.product = ::protobuf::SingularField::some(v);
  3123. }
  3124. // Mutable pointer to the field.
  3125. // If field is not initialized, it is initialized with default value first.
  3126. pub fn mut_product(&mut self) -> &mut ::std::string::String {
  3127. if self.product.is_none() {
  3128. self.product.set_default();
  3129. }
  3130. self.product.as_mut().unwrap()
  3131. }
  3132. // Take field
  3133. pub fn take_product(&mut self) -> ::std::string::String {
  3134. self.product.take().unwrap_or_else(|| ::std::string::String::new())
  3135. }
  3136. pub fn get_product(&self) -> &str {
  3137. match self.product.as_ref() {
  3138. Some(v) => &v,
  3139. None => "",
  3140. }
  3141. }
  3142. fn get_product_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  3143. &self.product
  3144. }
  3145. fn mut_product_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  3146. &mut self.product
  3147. }
  3148. // optional string advertiser = 8;
  3149. pub fn clear_advertiser(&mut self) {
  3150. self.advertiser.clear();
  3151. }
  3152. pub fn has_advertiser(&self) -> bool {
  3153. self.advertiser.is_some()
  3154. }
  3155. // Param is passed by value, moved
  3156. pub fn set_advertiser(&mut self, v: ::std::string::String) {
  3157. self.advertiser = ::protobuf::SingularField::some(v);
  3158. }
  3159. // Mutable pointer to the field.
  3160. // If field is not initialized, it is initialized with default value first.
  3161. pub fn mut_advertiser(&mut self) -> &mut ::std::string::String {
  3162. if self.advertiser.is_none() {
  3163. self.advertiser.set_default();
  3164. }
  3165. self.advertiser.as_mut().unwrap()
  3166. }
  3167. // Take field
  3168. pub fn take_advertiser(&mut self) -> ::std::string::String {
  3169. self.advertiser.take().unwrap_or_else(|| ::std::string::String::new())
  3170. }
  3171. pub fn get_advertiser(&self) -> &str {
  3172. match self.advertiser.as_ref() {
  3173. Some(v) => &v,
  3174. None => "",
  3175. }
  3176. }
  3177. fn get_advertiser_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  3178. &self.advertiser
  3179. }
  3180. fn mut_advertiser_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  3181. &mut self.advertiser
  3182. }
  3183. // optional bytes gid = 9;
  3184. pub fn clear_gid(&mut self) {
  3185. self.gid.clear();
  3186. }
  3187. pub fn has_gid(&self) -> bool {
  3188. self.gid.is_some()
  3189. }
  3190. // Param is passed by value, moved
  3191. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  3192. self.gid = ::protobuf::SingularField::some(v);
  3193. }
  3194. // Mutable pointer to the field.
  3195. // If field is not initialized, it is initialized with default value first.
  3196. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  3197. if self.gid.is_none() {
  3198. self.gid.set_default();
  3199. }
  3200. self.gid.as_mut().unwrap()
  3201. }
  3202. // Take field
  3203. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  3204. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3205. }
  3206. pub fn get_gid(&self) -> &[u8] {
  3207. match self.gid.as_ref() {
  3208. Some(v) => &v,
  3209. None => &[],
  3210. }
  3211. }
  3212. fn get_gid_for_reflect(&self) -> &::protobuf::SingularField<::std::vec::Vec<u8>> {
  3213. &self.gid
  3214. }
  3215. fn mut_gid_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::vec::Vec<u8>> {
  3216. &mut self.gid
  3217. }
  3218. }
  3219. impl ::protobuf::Message for Ad {
  3220. fn is_initialized(&self) -> bool {
  3221. true
  3222. }
  3223. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  3224. while !is.eof()? {
  3225. let (field_number, wire_type) = is.read_tag_unpack()?;
  3226. match field_number {
  3227. 1 => {
  3228. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3229. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3230. }
  3231. let tmp = is.read_int32()?;
  3232. self.next = ::std::option::Option::Some(tmp);
  3233. },
  3234. 2 => {
  3235. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.ogg_fid)?;
  3236. },
  3237. 3 => {
  3238. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.image_fid)?;
  3239. },
  3240. 4 => {
  3241. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3242. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3243. }
  3244. let tmp = is.read_int32()?;
  3245. self.duration = ::std::option::Option::Some(tmp);
  3246. },
  3247. 5 => {
  3248. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.click_url)?;
  3249. },
  3250. 6 => {
  3251. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.impression_url)?;
  3252. },
  3253. 7 => {
  3254. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.product)?;
  3255. },
  3256. 8 => {
  3257. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.advertiser)?;
  3258. },
  3259. 9 => {
  3260. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  3261. },
  3262. _ => {
  3263. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3264. },
  3265. };
  3266. }
  3267. ::std::result::Result::Ok(())
  3268. }
  3269. // Compute sizes of nested messages
  3270. #[allow(unused_variables)]
  3271. fn compute_size(&self) -> u32 {
  3272. let mut my_size = 0;
  3273. if let Some(v) = self.next {
  3274. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  3275. }
  3276. if let Some(ref v) = self.ogg_fid.as_ref() {
  3277. my_size += ::protobuf::rt::bytes_size(2, &v);
  3278. }
  3279. if let Some(ref v) = self.image_fid.as_ref() {
  3280. my_size += ::protobuf::rt::bytes_size(3, &v);
  3281. }
  3282. if let Some(v) = self.duration {
  3283. my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
  3284. }
  3285. if let Some(ref v) = self.click_url.as_ref() {
  3286. my_size += ::protobuf::rt::string_size(5, &v);
  3287. }
  3288. if let Some(ref v) = self.impression_url.as_ref() {
  3289. my_size += ::protobuf::rt::string_size(6, &v);
  3290. }
  3291. if let Some(ref v) = self.product.as_ref() {
  3292. my_size += ::protobuf::rt::string_size(7, &v);
  3293. }
  3294. if let Some(ref v) = self.advertiser.as_ref() {
  3295. my_size += ::protobuf::rt::string_size(8, &v);
  3296. }
  3297. if let Some(ref v) = self.gid.as_ref() {
  3298. my_size += ::protobuf::rt::bytes_size(9, &v);
  3299. }
  3300. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3301. self.cached_size.set(my_size);
  3302. my_size
  3303. }
  3304. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  3305. if let Some(v) = self.next {
  3306. os.write_int32(1, v)?;
  3307. }
  3308. if let Some(ref v) = self.ogg_fid.as_ref() {
  3309. os.write_bytes(2, &v)?;
  3310. }
  3311. if let Some(ref v) = self.image_fid.as_ref() {
  3312. os.write_bytes(3, &v)?;
  3313. }
  3314. if let Some(v) = self.duration {
  3315. os.write_int32(4, v)?;
  3316. }
  3317. if let Some(ref v) = self.click_url.as_ref() {
  3318. os.write_string(5, &v)?;
  3319. }
  3320. if let Some(ref v) = self.impression_url.as_ref() {
  3321. os.write_string(6, &v)?;
  3322. }
  3323. if let Some(ref v) = self.product.as_ref() {
  3324. os.write_string(7, &v)?;
  3325. }
  3326. if let Some(ref v) = self.advertiser.as_ref() {
  3327. os.write_string(8, &v)?;
  3328. }
  3329. if let Some(ref v) = self.gid.as_ref() {
  3330. os.write_bytes(9, &v)?;
  3331. }
  3332. os.write_unknown_fields(self.get_unknown_fields())?;
  3333. ::std::result::Result::Ok(())
  3334. }
  3335. fn get_cached_size(&self) -> u32 {
  3336. self.cached_size.get()
  3337. }
  3338. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3339. &self.unknown_fields
  3340. }
  3341. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3342. &mut self.unknown_fields
  3343. }
  3344. fn as_any(&self) -> &::std::any::Any {
  3345. self as &::std::any::Any
  3346. }
  3347. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  3348. self as &mut ::std::any::Any
  3349. }
  3350. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  3351. self
  3352. }
  3353. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3354. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  3355. }
  3356. }
  3357. impl ::protobuf::MessageStatic for Ad {
  3358. fn new() -> Ad {
  3359. Ad::new()
  3360. }
  3361. fn descriptor_static(_: ::std::option::Option<Ad>) -> &'static ::protobuf::reflect::MessageDescriptor {
  3362. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3363. lock: ::protobuf::lazy::ONCE_INIT,
  3364. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3365. };
  3366. unsafe {
  3367. descriptor.get(|| {
  3368. let mut fields = ::std::vec::Vec::new();
  3369. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  3370. "next",
  3371. Ad::get_next_for_reflect,
  3372. Ad::mut_next_for_reflect,
  3373. ));
  3374. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3375. "ogg_fid",
  3376. Ad::get_ogg_fid_for_reflect,
  3377. Ad::mut_ogg_fid_for_reflect,
  3378. ));
  3379. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3380. "image_fid",
  3381. Ad::get_image_fid_for_reflect,
  3382. Ad::mut_image_fid_for_reflect,
  3383. ));
  3384. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  3385. "duration",
  3386. Ad::get_duration_for_reflect,
  3387. Ad::mut_duration_for_reflect,
  3388. ));
  3389. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3390. "click_url",
  3391. Ad::get_click_url_for_reflect,
  3392. Ad::mut_click_url_for_reflect,
  3393. ));
  3394. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3395. "impression_url",
  3396. Ad::get_impression_url_for_reflect,
  3397. Ad::mut_impression_url_for_reflect,
  3398. ));
  3399. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3400. "product",
  3401. Ad::get_product_for_reflect,
  3402. Ad::mut_product_for_reflect,
  3403. ));
  3404. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3405. "advertiser",
  3406. Ad::get_advertiser_for_reflect,
  3407. Ad::mut_advertiser_for_reflect,
  3408. ));
  3409. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3410. "gid",
  3411. Ad::get_gid_for_reflect,
  3412. Ad::mut_gid_for_reflect,
  3413. ));
  3414. ::protobuf::reflect::MessageDescriptor::new::<Ad>(
  3415. "Ad",
  3416. fields,
  3417. file_descriptor_proto()
  3418. )
  3419. })
  3420. }
  3421. }
  3422. }
  3423. impl ::protobuf::Clear for Ad {
  3424. fn clear(&mut self) {
  3425. self.clear_next();
  3426. self.clear_ogg_fid();
  3427. self.clear_image_fid();
  3428. self.clear_duration();
  3429. self.clear_click_url();
  3430. self.clear_impression_url();
  3431. self.clear_product();
  3432. self.clear_advertiser();
  3433. self.clear_gid();
  3434. self.unknown_fields.clear();
  3435. }
  3436. }
  3437. impl ::std::fmt::Debug for Ad {
  3438. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  3439. ::protobuf::text_format::fmt(self, f)
  3440. }
  3441. }
  3442. impl ::protobuf::reflect::ProtobufValue for Ad {
  3443. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3444. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3445. }
  3446. }
  3447. #[derive(PartialEq,Clone,Default)]
  3448. pub struct Metadata {
  3449. // message fields
  3450. field_type: ::protobuf::SingularField<::std::string::String>,
  3451. metadata: ::protobuf::SingularField<::std::string::String>,
  3452. // special fields
  3453. unknown_fields: ::protobuf::UnknownFields,
  3454. cached_size: ::protobuf::CachedSize,
  3455. }
  3456. // see codegen.rs for the explanation why impl Sync explicitly
  3457. unsafe impl ::std::marker::Sync for Metadata {}
  3458. impl Metadata {
  3459. pub fn new() -> Metadata {
  3460. ::std::default::Default::default()
  3461. }
  3462. pub fn default_instance() -> &'static Metadata {
  3463. static mut instance: ::protobuf::lazy::Lazy<Metadata> = ::protobuf::lazy::Lazy {
  3464. lock: ::protobuf::lazy::ONCE_INIT,
  3465. ptr: 0 as *const Metadata,
  3466. };
  3467. unsafe {
  3468. instance.get(Metadata::new)
  3469. }
  3470. }
  3471. // optional string type = 1;
  3472. pub fn clear_field_type(&mut self) {
  3473. self.field_type.clear();
  3474. }
  3475. pub fn has_field_type(&self) -> bool {
  3476. self.field_type.is_some()
  3477. }
  3478. // Param is passed by value, moved
  3479. pub fn set_field_type(&mut self, v: ::std::string::String) {
  3480. self.field_type = ::protobuf::SingularField::some(v);
  3481. }
  3482. // Mutable pointer to the field.
  3483. // If field is not initialized, it is initialized with default value first.
  3484. pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
  3485. if self.field_type.is_none() {
  3486. self.field_type.set_default();
  3487. }
  3488. self.field_type.as_mut().unwrap()
  3489. }
  3490. // Take field
  3491. pub fn take_field_type(&mut self) -> ::std::string::String {
  3492. self.field_type.take().unwrap_or_else(|| ::std::string::String::new())
  3493. }
  3494. pub fn get_field_type(&self) -> &str {
  3495. match self.field_type.as_ref() {
  3496. Some(v) => &v,
  3497. None => "",
  3498. }
  3499. }
  3500. fn get_field_type_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  3501. &self.field_type
  3502. }
  3503. fn mut_field_type_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  3504. &mut self.field_type
  3505. }
  3506. // optional string metadata = 2;
  3507. pub fn clear_metadata(&mut self) {
  3508. self.metadata.clear();
  3509. }
  3510. pub fn has_metadata(&self) -> bool {
  3511. self.metadata.is_some()
  3512. }
  3513. // Param is passed by value, moved
  3514. pub fn set_metadata(&mut self, v: ::std::string::String) {
  3515. self.metadata = ::protobuf::SingularField::some(v);
  3516. }
  3517. // Mutable pointer to the field.
  3518. // If field is not initialized, it is initialized with default value first.
  3519. pub fn mut_metadata(&mut self) -> &mut ::std::string::String {
  3520. if self.metadata.is_none() {
  3521. self.metadata.set_default();
  3522. }
  3523. self.metadata.as_mut().unwrap()
  3524. }
  3525. // Take field
  3526. pub fn take_metadata(&mut self) -> ::std::string::String {
  3527. self.metadata.take().unwrap_or_else(|| ::std::string::String::new())
  3528. }
  3529. pub fn get_metadata(&self) -> &str {
  3530. match self.metadata.as_ref() {
  3531. Some(v) => &v,
  3532. None => "",
  3533. }
  3534. }
  3535. fn get_metadata_for_reflect(&self) -> &::protobuf::SingularField<::std::string::String> {
  3536. &self.metadata
  3537. }
  3538. fn mut_metadata_for_reflect(&mut self) -> &mut ::protobuf::SingularField<::std::string::String> {
  3539. &mut self.metadata
  3540. }
  3541. }
  3542. impl ::protobuf::Message for Metadata {
  3543. fn is_initialized(&self) -> bool {
  3544. true
  3545. }
  3546. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
  3547. while !is.eof()? {
  3548. let (field_number, wire_type) = is.read_tag_unpack()?;
  3549. match field_number {
  3550. 1 => {
  3551. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.field_type)?;
  3552. },
  3553. 2 => {
  3554. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.metadata)?;
  3555. },
  3556. _ => {
  3557. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3558. },
  3559. };
  3560. }
  3561. ::std::result::Result::Ok(())
  3562. }
  3563. // Compute sizes of nested messages
  3564. #[allow(unused_variables)]
  3565. fn compute_size(&self) -> u32 {
  3566. let mut my_size = 0;
  3567. if let Some(ref v) = self.field_type.as_ref() {
  3568. my_size += ::protobuf::rt::string_size(1, &v);
  3569. }
  3570. if let Some(ref v) = self.metadata.as_ref() {
  3571. my_size += ::protobuf::rt::string_size(2, &v);
  3572. }
  3573. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3574. self.cached_size.set(my_size);
  3575. my_size
  3576. }
  3577. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
  3578. if let Some(ref v) = self.field_type.as_ref() {
  3579. os.write_string(1, &v)?;
  3580. }
  3581. if let Some(ref v) = self.metadata.as_ref() {
  3582. os.write_string(2, &v)?;
  3583. }
  3584. os.write_unknown_fields(self.get_unknown_fields())?;
  3585. ::std::result::Result::Ok(())
  3586. }
  3587. fn get_cached_size(&self) -> u32 {
  3588. self.cached_size.get()
  3589. }
  3590. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3591. &self.unknown_fields
  3592. }
  3593. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3594. &mut self.unknown_fields
  3595. }
  3596. fn as_any(&self) -> &::std::any::Any {
  3597. self as &::std::any::Any
  3598. }
  3599. fn as_any_mut(&mut self) -> &mut ::std::any::Any {
  3600. self as &mut ::std::any::Any
  3601. }
  3602. fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
  3603. self
  3604. }
  3605. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3606. ::protobuf::MessageStatic::descriptor_static(None::<Self>)
  3607. }
  3608. }
  3609. impl ::protobuf::MessageStatic for Metadata {
  3610. fn new() -> Metadata {
  3611. Metadata::new()
  3612. }
  3613. fn descriptor_static(_: ::std::option::Option<Metadata>) -> &'static ::protobuf::reflect::MessageDescriptor {
  3614. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3615. lock: ::protobuf::lazy::ONCE_INIT,
  3616. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3617. };
  3618. unsafe {
  3619. descriptor.get(|| {
  3620. let mut fields = ::std::vec::Vec::new();
  3621. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3622. "type",
  3623. Metadata::get_field_type_for_reflect,
  3624. Metadata::mut_field_type_for_reflect,
  3625. ));
  3626. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3627. "metadata",
  3628. Metadata::get_metadata_for_reflect,
  3629. Metadata::mut_metadata_for_reflect,
  3630. ));
  3631. ::protobuf::reflect::MessageDescriptor::new::<Metadata>(
  3632. "Metadata",
  3633. fields,
  3634. file_descriptor_proto()
  3635. )
  3636. })
  3637. }
  3638. }
  3639. }
  3640. impl ::protobuf::Clear for Metadata {
  3641. fn clear(&mut self) {
  3642. self.clear_field_type();
  3643. self.clear_metadata();
  3644. self.unknown_fields.clear();
  3645. }
  3646. }
  3647. impl ::std::fmt::Debug for Metadata {
  3648. fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  3649. ::protobuf::text_format::fmt(self, f)
  3650. }
  3651. }
  3652. impl ::protobuf::reflect::ProtobufValue for Metadata {
  3653. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3654. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3655. }
  3656. }
  3657. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  3658. pub enum MessageType {
  3659. kMessageTypeHello = 1,
  3660. kMessageTypeGoodbye = 2,
  3661. kMessageTypeProbe = 3,
  3662. kMessageTypeNotify = 10,
  3663. kMessageTypeLoad = 20,
  3664. kMessageTypePlay = 21,
  3665. kMessageTypePause = 22,
  3666. kMessageTypePlayPause = 23,
  3667. kMessageTypeSeek = 24,
  3668. kMessageTypePrev = 25,
  3669. kMessageTypeNext = 26,
  3670. kMessageTypeVolume = 27,
  3671. kMessageTypeShuffle = 28,
  3672. kMessageTypeRepeat = 29,
  3673. kMessageTypeVolumeDown = 31,
  3674. kMessageTypeVolumeUp = 32,
  3675. kMessageTypeReplace = 33,
  3676. kMessageTypeLogout = 34,
  3677. kMessageTypeAction = 35,
  3678. kMessageTypeRename = 36,
  3679. kMessageTypeUpdateMetadata = 128,
  3680. }
  3681. impl ::protobuf::ProtobufEnum for MessageType {
  3682. fn value(&self) -> i32 {
  3683. *self as i32
  3684. }
  3685. fn from_i32(value: i32) -> ::std::option::Option<MessageType> {
  3686. match value {
  3687. 1 => ::std::option::Option::Some(MessageType::kMessageTypeHello),
  3688. 2 => ::std::option::Option::Some(MessageType::kMessageTypeGoodbye),
  3689. 3 => ::std::option::Option::Some(MessageType::kMessageTypeProbe),
  3690. 10 => ::std::option::Option::Some(MessageType::kMessageTypeNotify),
  3691. 20 => ::std::option::Option::Some(MessageType::kMessageTypeLoad),
  3692. 21 => ::std::option::Option::Some(MessageType::kMessageTypePlay),
  3693. 22 => ::std::option::Option::Some(MessageType::kMessageTypePause),
  3694. 23 => ::std::option::Option::Some(MessageType::kMessageTypePlayPause),
  3695. 24 => ::std::option::Option::Some(MessageType::kMessageTypeSeek),
  3696. 25 => ::std::option::Option::Some(MessageType::kMessageTypePrev),
  3697. 26 => ::std::option::Option::Some(MessageType::kMessageTypeNext),
  3698. 27 => ::std::option::Option::Some(MessageType::kMessageTypeVolume),
  3699. 28 => ::std::option::Option::Some(MessageType::kMessageTypeShuffle),
  3700. 29 => ::std::option::Option::Some(MessageType::kMessageTypeRepeat),
  3701. 31 => ::std::option::Option::Some(MessageType::kMessageTypeVolumeDown),
  3702. 32 => ::std::option::Option::Some(MessageType::kMessageTypeVolumeUp),
  3703. 33 => ::std::option::Option::Some(MessageType::kMessageTypeReplace),
  3704. 34 => ::std::option::Option::Some(MessageType::kMessageTypeLogout),
  3705. 35 => ::std::option::Option::Some(MessageType::kMessageTypeAction),
  3706. 36 => ::std::option::Option::Some(MessageType::kMessageTypeRename),
  3707. 128 => ::std::option::Option::Some(MessageType::kMessageTypeUpdateMetadata),
  3708. _ => ::std::option::Option::None
  3709. }
  3710. }
  3711. fn values() -> &'static [Self] {
  3712. static values: &'static [MessageType] = &[
  3713. MessageType::kMessageTypeHello,
  3714. MessageType::kMessageTypeGoodbye,
  3715. MessageType::kMessageTypeProbe,
  3716. MessageType::kMessageTypeNotify,
  3717. MessageType::kMessageTypeLoad,
  3718. MessageType::kMessageTypePlay,
  3719. MessageType::kMessageTypePause,
  3720. MessageType::kMessageTypePlayPause,
  3721. MessageType::kMessageTypeSeek,
  3722. MessageType::kMessageTypePrev,
  3723. MessageType::kMessageTypeNext,
  3724. MessageType::kMessageTypeVolume,
  3725. MessageType::kMessageTypeShuffle,
  3726. MessageType::kMessageTypeRepeat,
  3727. MessageType::kMessageTypeVolumeDown,
  3728. MessageType::kMessageTypeVolumeUp,
  3729. MessageType::kMessageTypeReplace,
  3730. MessageType::kMessageTypeLogout,
  3731. MessageType::kMessageTypeAction,
  3732. MessageType::kMessageTypeRename,
  3733. MessageType::kMessageTypeUpdateMetadata,
  3734. ];
  3735. values
  3736. }
  3737. fn enum_descriptor_static(_: ::std::option::Option<MessageType>) -> &'static ::protobuf::reflect::EnumDescriptor {
  3738. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  3739. lock: ::protobuf::lazy::ONCE_INIT,
  3740. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  3741. };
  3742. unsafe {
  3743. descriptor.get(|| {
  3744. ::protobuf::reflect::EnumDescriptor::new("MessageType", file_descriptor_proto())
  3745. })
  3746. }
  3747. }
  3748. }
  3749. impl ::std::marker::Copy for MessageType {
  3750. }
  3751. impl ::protobuf::reflect::ProtobufValue for MessageType {
  3752. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3753. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  3754. }
  3755. }
  3756. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  3757. pub enum CapabilityType {
  3758. kSupportedContexts = 1,
  3759. kCanBePlayer = 2,
  3760. kRestrictToLocal = 3,
  3761. kDeviceType = 4,
  3762. kGaiaEqConnectId = 5,
  3763. kSupportsLogout = 6,
  3764. kIsObservable = 7,
  3765. kVolumeSteps = 8,
  3766. kSupportedTypes = 9,
  3767. kCommandAcks = 10,
  3768. kSupportsRename = 11,
  3769. kHidden = 12,
  3770. }
  3771. impl ::protobuf::ProtobufEnum for CapabilityType {
  3772. fn value(&self) -> i32 {
  3773. *self as i32
  3774. }
  3775. fn from_i32(value: i32) -> ::std::option::Option<CapabilityType> {
  3776. match value {
  3777. 1 => ::std::option::Option::Some(CapabilityType::kSupportedContexts),
  3778. 2 => ::std::option::Option::Some(CapabilityType::kCanBePlayer),
  3779. 3 => ::std::option::Option::Some(CapabilityType::kRestrictToLocal),
  3780. 4 => ::std::option::Option::Some(CapabilityType::kDeviceType),
  3781. 5 => ::std::option::Option::Some(CapabilityType::kGaiaEqConnectId),
  3782. 6 => ::std::option::Option::Some(CapabilityType::kSupportsLogout),
  3783. 7 => ::std::option::Option::Some(CapabilityType::kIsObservable),
  3784. 8 => ::std::option::Option::Some(CapabilityType::kVolumeSteps),
  3785. 9 => ::std::option::Option::Some(CapabilityType::kSupportedTypes),
  3786. 10 => ::std::option::Option::Some(CapabilityType::kCommandAcks),
  3787. 11 => ::std::option::Option::Some(CapabilityType::kSupportsRename),
  3788. 12 => ::std::option::Option::Some(CapabilityType::kHidden),
  3789. _ => ::std::option::Option::None
  3790. }
  3791. }
  3792. fn values() -> &'static [Self] {
  3793. static values: &'static [CapabilityType] = &[
  3794. CapabilityType::kSupportedContexts,
  3795. CapabilityType::kCanBePlayer,
  3796. CapabilityType::kRestrictToLocal,
  3797. CapabilityType::kDeviceType,
  3798. CapabilityType::kGaiaEqConnectId,
  3799. CapabilityType::kSupportsLogout,
  3800. CapabilityType::kIsObservable,
  3801. CapabilityType::kVolumeSteps,
  3802. CapabilityType::kSupportedTypes,
  3803. CapabilityType::kCommandAcks,
  3804. CapabilityType::kSupportsRename,
  3805. CapabilityType::kHidden,
  3806. ];
  3807. values
  3808. }
  3809. fn enum_descriptor_static(_: ::std::option::Option<CapabilityType>) -> &'static ::protobuf::reflect::EnumDescriptor {
  3810. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  3811. lock: ::protobuf::lazy::ONCE_INIT,
  3812. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  3813. };
  3814. unsafe {
  3815. descriptor.get(|| {
  3816. ::protobuf::reflect::EnumDescriptor::new("CapabilityType", file_descriptor_proto())
  3817. })
  3818. }
  3819. }
  3820. }
  3821. impl ::std::marker::Copy for CapabilityType {
  3822. }
  3823. impl ::protobuf::reflect::ProtobufValue for CapabilityType {
  3824. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3825. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  3826. }
  3827. }
  3828. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  3829. pub enum PlayStatus {
  3830. kPlayStatusStop = 0,
  3831. kPlayStatusPlay = 1,
  3832. kPlayStatusPause = 2,
  3833. kPlayStatusLoading = 3,
  3834. }
  3835. impl ::protobuf::ProtobufEnum for PlayStatus {
  3836. fn value(&self) -> i32 {
  3837. *self as i32
  3838. }
  3839. fn from_i32(value: i32) -> ::std::option::Option<PlayStatus> {
  3840. match value {
  3841. 0 => ::std::option::Option::Some(PlayStatus::kPlayStatusStop),
  3842. 1 => ::std::option::Option::Some(PlayStatus::kPlayStatusPlay),
  3843. 2 => ::std::option::Option::Some(PlayStatus::kPlayStatusPause),
  3844. 3 => ::std::option::Option::Some(PlayStatus::kPlayStatusLoading),
  3845. _ => ::std::option::Option::None
  3846. }
  3847. }
  3848. fn values() -> &'static [Self] {
  3849. static values: &'static [PlayStatus] = &[
  3850. PlayStatus::kPlayStatusStop,
  3851. PlayStatus::kPlayStatusPlay,
  3852. PlayStatus::kPlayStatusPause,
  3853. PlayStatus::kPlayStatusLoading,
  3854. ];
  3855. values
  3856. }
  3857. fn enum_descriptor_static(_: ::std::option::Option<PlayStatus>) -> &'static ::protobuf::reflect::EnumDescriptor {
  3858. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  3859. lock: ::protobuf::lazy::ONCE_INIT,
  3860. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  3861. };
  3862. unsafe {
  3863. descriptor.get(|| {
  3864. ::protobuf::reflect::EnumDescriptor::new("PlayStatus", file_descriptor_proto())
  3865. })
  3866. }
  3867. }
  3868. }
  3869. impl ::std::marker::Copy for PlayStatus {
  3870. }
  3871. impl ::protobuf::reflect::ProtobufValue for PlayStatus {
  3872. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3873. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  3874. }
  3875. }
  3876. static file_descriptor_proto_data: &'static [u8] = b"\
  3877. \n\x0bspirc.proto\"\xfa\x03\n\x05Frame\x12\x18\n\x07version\x18\x01\x20\
  3878. \x01(\rR\x07version\x12\x14\n\x05ident\x18\x02\x20\x01(\tR\x05ident\x12)\
  3879. \n\x10protocol_version\x18\x03\x20\x01(\tR\x0fprotocolVersion\x12\x15\n\
  3880. \x06seq_nr\x18\x04\x20\x01(\rR\x05seqNr\x12\x1e\n\x03typ\x18\x05\x20\x01\
  3881. (\x0e2\x0c.MessageTypeR\x03typ\x12/\n\x0cdevice_state\x18\x07\x20\x01(\
  3882. \x0b2\x0c.DeviceStateR\x0bdeviceState\x12\"\n\x07goodbye\x18\x0b\x20\x01\
  3883. (\x0b2\x08.GoodbyeR\x07goodbye\x12\x1c\n\x05state\x18\x0c\x20\x01(\x0b2\
  3884. \x06.StateR\x05state\x12\x1a\n\x08position\x18\r\x20\x01(\rR\x08position\
  3885. \x12\x16\n\x06volume\x18\x0e\x20\x01(\rR\x06volume\x12&\n\x0fstate_updat\
  3886. e_id\x18\x11\x20\x01(\x03R\rstateUpdateId\x12\x1c\n\trecipient\x18\x12\
  3887. \x20\x03(\tR\trecipient\x120\n\x14context_player_state\x18\x13\x20\x01(\
  3888. \x0cR\x12contextPlayerState\x12\x19\n\x08new_name\x18\x14\x20\x01(\tR\
  3889. \x07newName\x12%\n\x08metadata\x18\x19\x20\x01(\x0b2\t.MetadataR\x08meta\
  3890. data\"\x88\x03\n\x0bDeviceState\x12\x1d\n\nsw_version\x18\x01\x20\x01(\t\
  3891. R\tswVersion\x12\x1b\n\tis_active\x18\n\x20\x01(\x08R\x08isActive\x12\
  3892. \x19\n\x08can_play\x18\x0b\x20\x01(\x08R\x07canPlay\x12\x16\n\x06volume\
  3893. \x18\x0c\x20\x01(\rR\x06volume\x12\x12\n\x04name\x18\r\x20\x01(\tR\x04na\
  3894. me\x12\x1d\n\nerror_code\x18\x0e\x20\x01(\rR\terrorCode\x12(\n\x10became\
  3895. _active_at\x18\x0f\x20\x01(\x03R\x0ebecameActiveAt\x12#\n\rerror_message\
  3896. \x18\x10\x20\x01(\tR\x0cerrorMessage\x12/\n\x0ccapabilities\x18\x11\x20\
  3897. \x03(\x0b2\x0b.CapabilityR\x0ccapabilities\x120\n\x14context_player_erro\
  3898. r\x18\x14\x20\x01(\tR\x12contextPlayerError\x12%\n\x08metadata\x18\x19\
  3899. \x20\x03(\x0b2\t.MetadataR\x08metadata\"m\n\nCapability\x12!\n\x03typ\
  3900. \x18\x01\x20\x01(\x0e2\x0f.CapabilityTypeR\x03typ\x12\x1a\n\x08intValue\
  3901. \x18\x02\x20\x03(\x03R\x08intValue\x12\x20\n\x0bstringValue\x18\x03\x20\
  3902. \x03(\tR\x0bstringValue\"!\n\x07Goodbye\x12\x16\n\x06reason\x18\x01\x20\
  3903. \x01(\tR\x06reason\"\xa1\x04\n\x05State\x12\x1f\n\x0bcontext_uri\x18\x02\
  3904. \x20\x01(\tR\ncontextUri\x12\x14\n\x05index\x18\x03\x20\x01(\rR\x05index\
  3905. \x12\x1f\n\x0bposition_ms\x18\x04\x20\x01(\rR\npositionMs\x12#\n\x06stat\
  3906. us\x18\x05\x20\x01(\x0e2\x0b.PlayStatusR\x06status\x120\n\x14position_me\
  3907. asured_at\x18\x07\x20\x01(\x04R\x12positionMeasuredAt\x12/\n\x13context_\
  3908. description\x18\x08\x20\x01(\tR\x12contextDescription\x12\x18\n\x07shuff\
  3909. le\x18\r\x20\x01(\x08R\x07shuffle\x12\x16\n\x06repeat\x18\x0e\x20\x01(\
  3910. \x08R\x06repeat\x12,\n\x12last_command_ident\x18\x14\x20\x01(\tR\x10last\
  3911. CommandIdent\x12,\n\x12last_command_msgid\x18\x15\x20\x01(\rR\x10lastCom\
  3912. mandMsgid\x122\n\x15playing_from_fallback\x18\x18\x20\x01(\x08R\x13playi\
  3913. ngFromFallback\x12\x10\n\x03row\x18\x19\x20\x01(\rR\x03row\x12.\n\x13pla\
  3914. ying_track_index\x18\x1a\x20\x01(\rR\x11playingTrackIndex\x12\x1f\n\x05t\
  3915. rack\x18\x1b\x20\x03(\x0b2\t.TrackRefR\x05track\x12\x13\n\x02ad\x18\x1c\
  3916. \x20\x01(\x0b2\x03.AdR\x02ad\"`\n\x08TrackRef\x12\x10\n\x03gid\x18\x01\
  3917. \x20\x01(\x0cR\x03gid\x12\x10\n\x03uri\x18\x02\x20\x01(\tR\x03uri\x12\
  3918. \x16\n\x06queued\x18\x03\x20\x01(\x08R\x06queued\x12\x18\n\x07context\
  3919. \x18\x04\x20\x01(\tR\x07context\"\xfa\x01\n\x02Ad\x12\x12\n\x04next\x18\
  3920. \x01\x20\x01(\x05R\x04next\x12\x17\n\x07ogg_fid\x18\x02\x20\x01(\x0cR\
  3921. \x06oggFid\x12\x1b\n\timage_fid\x18\x03\x20\x01(\x0cR\x08imageFid\x12\
  3922. \x1a\n\x08duration\x18\x04\x20\x01(\x05R\x08duration\x12\x1b\n\tclick_ur\
  3923. l\x18\x05\x20\x01(\tR\x08clickUrl\x12%\n\x0eimpression_url\x18\x06\x20\
  3924. \x01(\tR\rimpressionUrl\x12\x18\n\x07product\x18\x07\x20\x01(\tR\x07prod\
  3925. uct\x12\x1e\n\nadvertiser\x18\x08\x20\x01(\tR\nadvertiser\x12\x10\n\x03g\
  3926. id\x18\t\x20\x01(\x0cR\x03gid\":\n\x08Metadata\x12\x12\n\x04type\x18\x01\
  3927. \x20\x01(\tR\x04type\x12\x1a\n\x08metadata\x18\x02\x20\x01(\tR\x08metada\
  3928. ta*\x8d\x04\n\x0bMessageType\x12\x15\n\x11kMessageTypeHello\x10\x01\x12\
  3929. \x17\n\x13kMessageTypeGoodbye\x10\x02\x12\x15\n\x11kMessageTypeProbe\x10\
  3930. \x03\x12\x16\n\x12kMessageTypeNotify\x10\n\x12\x14\n\x10kMessageTypeLoad\
  3931. \x10\x14\x12\x14\n\x10kMessageTypePlay\x10\x15\x12\x15\n\x11kMessageType\
  3932. Pause\x10\x16\x12\x19\n\x15kMessageTypePlayPause\x10\x17\x12\x14\n\x10kM\
  3933. essageTypeSeek\x10\x18\x12\x14\n\x10kMessageTypePrev\x10\x19\x12\x14\n\
  3934. \x10kMessageTypeNext\x10\x1a\x12\x16\n\x12kMessageTypeVolume\x10\x1b\x12\
  3935. \x17\n\x13kMessageTypeShuffle\x10\x1c\x12\x16\n\x12kMessageTypeRepeat\
  3936. \x10\x1d\x12\x1a\n\x16kMessageTypeVolumeDown\x10\x1f\x12\x18\n\x14kMessa\
  3937. geTypeVolumeUp\x10\x20\x12\x17\n\x13kMessageTypeReplace\x10!\x12\x16\n\
  3938. \x12kMessageTypeLogout\x10\"\x12\x16\n\x12kMessageTypeAction\x10#\x12\
  3939. \x16\n\x12kMessageTypeRename\x10$\x12\x1f\n\x1akMessageTypeUpdateMetadat\
  3940. a\x10\x80\x01*\xfa\x01\n\x0eCapabilityType\x12\x16\n\x12kSupportedContex\
  3941. ts\x10\x01\x12\x10\n\x0ckCanBePlayer\x10\x02\x12\x14\n\x10kRestrictToLoc\
  3942. al\x10\x03\x12\x0f\n\x0bkDeviceType\x10\x04\x12\x14\n\x10kGaiaEqConnectI\
  3943. d\x10\x05\x12\x13\n\x0fkSupportsLogout\x10\x06\x12\x11\n\rkIsObservable\
  3944. \x10\x07\x12\x10\n\x0ckVolumeSteps\x10\x08\x12\x13\n\x0fkSupportedTypes\
  3945. \x10\t\x12\x10\n\x0ckCommandAcks\x10\n\x12\x13\n\x0fkSupportsRename\x10\
  3946. \x0b\x12\x0b\n\x07kHidden\x10\x0c*d\n\nPlayStatus\x12\x13\n\x0fkPlayStat\
  3947. usStop\x10\0\x12\x13\n\x0fkPlayStatusPlay\x10\x01\x12\x14\n\x10kPlayStat\
  3948. usPause\x10\x02\x12\x16\n\x12kPlayStatusLoading\x10\x03J\xbf.\n\x07\x12\
  3949. \x05\0\0\x82\x01\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\
  3950. \x04\x02\0\x12\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\r\n\x0b\n\x04\x04\
  3951. \0\x02\0\x12\x03\x03\x04\"\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x03\x04\
  3952. \x0c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\r\x13\n\x0c\n\x05\x04\0\x02\
  3953. \0\x01\x12\x03\x03\x14\x1b\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x1e!\
  3954. \n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\x20\n\x0c\n\x05\x04\0\x02\x01\
  3955. \x04\x12\x03\x04\x04\x0c\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\r\x13\
  3956. \n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x14\x19\n\x0c\n\x05\x04\0\x02\
  3957. \x01\x03\x12\x03\x04\x1c\x1f\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04+\
  3958. \n\x0c\n\x05\x04\0\x02\x02\x04\x12\x03\x05\x04\x0c\n\x0c\n\x05\x04\0\x02\
  3959. \x02\x05\x12\x03\x05\r\x13\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\x14\
  3960. $\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05'*\n\x0b\n\x04\x04\0\x02\x03\
  3961. \x12\x03\x06\x04!\n\x0c\n\x05\x04\0\x02\x03\x04\x12\x03\x06\x04\x0c\n\
  3962. \x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x06\r\x13\n\x0c\n\x05\x04\0\x02\x03\
  3963. \x01\x12\x03\x06\x14\x1a\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x06\x1d\
  3964. \x20\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x07\x04#\n\x0c\n\x05\x04\0\x02\
  3965. \x04\x04\x12\x03\x07\x04\x0c\n\x0c\n\x05\x04\0\x02\x04\x06\x12\x03\x07\r\
  3966. \x18\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07\x19\x1c\n\x0c\n\x05\x04\0\
  3967. \x02\x04\x03\x12\x03\x07\x1f\"\n\x0b\n\x04\x04\0\x02\x05\x12\x03\x08\x04\
  3968. ,\n\x0c\n\x05\x04\0\x02\x05\x04\x12\x03\x08\x04\x0c\n\x0c\n\x05\x04\0\
  3969. \x02\x05\x06\x12\x03\x08\r\x18\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\x08\
  3970. \x19%\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\x08(+\n\x0b\n\x04\x04\0\x02\
  3971. \x06\x12\x03\t\x04#\n\x0c\n\x05\x04\0\x02\x06\x04\x12\x03\t\x04\x0c\n\
  3972. \x0c\n\x05\x04\0\x02\x06\x06\x12\x03\t\r\x14\n\x0c\n\x05\x04\0\x02\x06\
  3973. \x01\x12\x03\t\x15\x1c\n\x0c\n\x05\x04\0\x02\x06\x03\x12\x03\t\x1f\"\n\
  3974. \x0b\n\x04\x04\0\x02\x07\x12\x03\n\x04\x1f\n\x0c\n\x05\x04\0\x02\x07\x04\
  3975. \x12\x03\n\x04\x0c\n\x0c\n\x05\x04\0\x02\x07\x06\x12\x03\n\r\x12\n\x0c\n\
  3976. \x05\x04\0\x02\x07\x01\x12\x03\n\x13\x18\n\x0c\n\x05\x04\0\x02\x07\x03\
  3977. \x12\x03\n\x1b\x1e\n\x0b\n\x04\x04\0\x02\x08\x12\x03\x0b\x04#\n\x0c\n\
  3978. \x05\x04\0\x02\x08\x04\x12\x03\x0b\x04\x0c\n\x0c\n\x05\x04\0\x02\x08\x05\
  3979. \x12\x03\x0b\r\x13\n\x0c\n\x05\x04\0\x02\x08\x01\x12\x03\x0b\x14\x1c\n\
  3980. \x0c\n\x05\x04\0\x02\x08\x03\x12\x03\x0b\x1f\"\n\x0b\n\x04\x04\0\x02\t\
  3981. \x12\x03\x0c\x04!\n\x0c\n\x05\x04\0\x02\t\x04\x12\x03\x0c\x04\x0c\n\x0c\
  3982. \n\x05\x04\0\x02\t\x05\x12\x03\x0c\r\x13\n\x0c\n\x05\x04\0\x02\t\x01\x12\
  3983. \x03\x0c\x14\x1a\n\x0c\n\x05\x04\0\x02\t\x03\x12\x03\x0c\x1d\x20\n\x0b\n\
  3984. \x04\x04\0\x02\n\x12\x03\r\x04*\n\x0c\n\x05\x04\0\x02\n\x04\x12\x03\r\
  3985. \x04\x0c\n\x0c\n\x05\x04\0\x02\n\x05\x12\x03\r\r\x12\n\x0c\n\x05\x04\0\
  3986. \x02\n\x01\x12\x03\r\x13\"\n\x0c\n\x05\x04\0\x02\n\x03\x12\x03\r%)\n\x0b\
  3987. \n\x04\x04\0\x02\x0b\x12\x03\x0e\x04%\n\x0c\n\x05\x04\0\x02\x0b\x04\x12\
  3988. \x03\x0e\x04\x0c\n\x0c\n\x05\x04\0\x02\x0b\x05\x12\x03\x0e\r\x13\n\x0c\n\
  3989. \x05\x04\0\x02\x0b\x01\x12\x03\x0e\x14\x1d\n\x0c\n\x05\x04\0\x02\x0b\x03\
  3990. \x12\x03\x0e\x20$\n\x0b\n\x04\x04\0\x02\x0c\x12\x03\x0f\x04/\n\x0c\n\x05\
  3991. \x04\0\x02\x0c\x04\x12\x03\x0f\x04\x0c\n\x0c\n\x05\x04\0\x02\x0c\x05\x12\
  3992. \x03\x0f\r\x12\n\x0c\n\x05\x04\0\x02\x0c\x01\x12\x03\x0f\x13'\n\x0c\n\
  3993. \x05\x04\0\x02\x0c\x03\x12\x03\x0f*.\n\x0b\n\x04\x04\0\x02\r\x12\x03\x10\
  3994. \x04$\n\x0c\n\x05\x04\0\x02\r\x04\x12\x03\x10\x04\x0c\n\x0c\n\x05\x04\0\
  3995. \x02\r\x05\x12\x03\x10\r\x13\n\x0c\n\x05\x04\0\x02\r\x01\x12\x03\x10\x14\
  3996. \x1c\n\x0c\n\x05\x04\0\x02\r\x03\x12\x03\x10\x1f#\n\x0b\n\x04\x04\0\x02\
  3997. \x0e\x12\x03\x11\x04&\n\x0c\n\x05\x04\0\x02\x0e\x04\x12\x03\x11\x04\x0c\
  3998. \n\x0c\n\x05\x04\0\x02\x0e\x06\x12\x03\x11\r\x15\n\x0c\n\x05\x04\0\x02\
  3999. \x0e\x01\x12\x03\x11\x16\x1e\n\x0c\n\x05\x04\0\x02\x0e\x03\x12\x03\x11!%\
  4000. \n\n\n\x02\x05\0\x12\x04\x14\0*\x01\n\n\n\x03\x05\0\x01\x12\x03\x14\x05\
  4001. \x10\n\x0b\n\x04\x05\0\x02\0\x12\x03\x15\x04\x1c\n\x0c\n\x05\x05\0\x02\0\
  4002. \x01\x12\x03\x15\x04\x15\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x15\x18\x1b\
  4003. \n\x0b\n\x04\x05\0\x02\x01\x12\x03\x16\x04\x1e\n\x0c\n\x05\x05\0\x02\x01\
  4004. \x01\x12\x03\x16\x04\x17\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x16\x1a\
  4005. \x1d\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x17\x04\x1c\n\x0c\n\x05\x05\0\x02\
  4006. \x02\x01\x12\x03\x17\x04\x15\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x17\
  4007. \x18\x1b\n\x0b\n\x04\x05\0\x02\x03\x12\x03\x18\x04\x1d\n\x0c\n\x05\x05\0\
  4008. \x02\x03\x01\x12\x03\x18\x04\x16\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\
  4009. \x18\x19\x1c\n\x0b\n\x04\x05\0\x02\x04\x12\x03\x19\x04\x1c\n\x0c\n\x05\
  4010. \x05\0\x02\x04\x01\x12\x03\x19\x04\x14\n\x0c\n\x05\x05\0\x02\x04\x02\x12\
  4011. \x03\x19\x17\x1b\n\x0b\n\x04\x05\0\x02\x05\x12\x03\x1a\x04\x1c\n\x0c\n\
  4012. \x05\x05\0\x02\x05\x01\x12\x03\x1a\x04\x14\n\x0c\n\x05\x05\0\x02\x05\x02\
  4013. \x12\x03\x1a\x17\x1b\n\x0b\n\x04\x05\0\x02\x06\x12\x03\x1b\x04\x1d\n\x0c\
  4014. \n\x05\x05\0\x02\x06\x01\x12\x03\x1b\x04\x15\n\x0c\n\x05\x05\0\x02\x06\
  4015. \x02\x12\x03\x1b\x18\x1c\n\x0b\n\x04\x05\0\x02\x07\x12\x03\x1c\x04!\n\
  4016. \x0c\n\x05\x05\0\x02\x07\x01\x12\x03\x1c\x04\x19\n\x0c\n\x05\x05\0\x02\
  4017. \x07\x02\x12\x03\x1c\x1c\x20\n\x0b\n\x04\x05\0\x02\x08\x12\x03\x1d\x04\
  4018. \x1c\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03\x1d\x04\x14\n\x0c\n\x05\x05\0\
  4019. \x02\x08\x02\x12\x03\x1d\x17\x1b\n\x0b\n\x04\x05\0\x02\t\x12\x03\x1e\x04\
  4020. \x1c\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03\x1e\x04\x14\n\x0c\n\x05\x05\0\
  4021. \x02\t\x02\x12\x03\x1e\x17\x1b\n\x0b\n\x04\x05\0\x02\n\x12\x03\x1f\x04\
  4022. \x1c\n\x0c\n\x05\x05\0\x02\n\x01\x12\x03\x1f\x04\x14\n\x0c\n\x05\x05\0\
  4023. \x02\n\x02\x12\x03\x1f\x17\x1b\n\x0b\n\x04\x05\0\x02\x0b\x12\x03\x20\x04\
  4024. \x1e\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\x20\x04\x16\n\x0c\n\x05\x05\0\
  4025. \x02\x0b\x02\x12\x03\x20\x19\x1d\n\x0b\n\x04\x05\0\x02\x0c\x12\x03!\x04\
  4026. \x1f\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\x03!\x04\x17\n\x0c\n\x05\x05\0\
  4027. \x02\x0c\x02\x12\x03!\x1a\x1e\n\x0b\n\x04\x05\0\x02\r\x12\x03\"\x04\x1e\
  4028. \n\x0c\n\x05\x05\0\x02\r\x01\x12\x03\"\x04\x16\n\x0c\n\x05\x05\0\x02\r\
  4029. \x02\x12\x03\"\x19\x1d\n\x0b\n\x04\x05\0\x02\x0e\x12\x03#\x04\"\n\x0c\n\
  4030. \x05\x05\0\x02\x0e\x01\x12\x03#\x04\x1a\n\x0c\n\x05\x05\0\x02\x0e\x02\
  4031. \x12\x03#\x1d!\n\x0b\n\x04\x05\0\x02\x0f\x12\x03$\x04\x20\n\x0c\n\x05\
  4032. \x05\0\x02\x0f\x01\x12\x03$\x04\x18\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\
  4033. \x03$\x1b\x1f\n\x0b\n\x04\x05\0\x02\x10\x12\x03%\x04\x1f\n\x0c\n\x05\x05\
  4034. \0\x02\x10\x01\x12\x03%\x04\x17\n\x0c\n\x05\x05\0\x02\x10\x02\x12\x03%\
  4035. \x1a\x1e\n\x0b\n\x04\x05\0\x02\x11\x12\x03&\x04\x1e\n\x0c\n\x05\x05\0\
  4036. \x02\x11\x01\x12\x03&\x04\x16\n\x0c\n\x05\x05\0\x02\x11\x02\x12\x03&\x19\
  4037. \x1d\n\x0b\n\x04\x05\0\x02\x12\x12\x03'\x04\x1e\n\x0c\n\x05\x05\0\x02\
  4038. \x12\x01\x12\x03'\x04\x16\n\x0c\n\x05\x05\0\x02\x12\x02\x12\x03'\x19\x1d\
  4039. \n\x0b\n\x04\x05\0\x02\x13\x12\x03(\x04\x1e\n\x0c\n\x05\x05\0\x02\x13\
  4040. \x01\x12\x03(\x04\x16\n\x0c\n\x05\x05\0\x02\x13\x02\x12\x03(\x19\x1d\n\
  4041. \x0b\n\x04\x05\0\x02\x14\x12\x03)\x04&\n\x0c\n\x05\x05\0\x02\x14\x01\x12\
  4042. \x03)\x04\x1e\n\x0c\n\x05\x05\0\x02\x14\x02\x12\x03)!%\n\n\n\x02\x04\x01\
  4043. \x12\x04,\08\x01\n\n\n\x03\x04\x01\x01\x12\x03,\x08\x13\n\x0b\n\x04\x04\
  4044. \x01\x02\0\x12\x03-\x04%\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03-\x04\x0c\
  4045. \n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03-\r\x13\n\x0c\n\x05\x04\x01\x02\0\
  4046. \x01\x12\x03-\x14\x1e\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03-!$\n\x0b\n\
  4047. \x04\x04\x01\x02\x01\x12\x03.\x04\"\n\x0c\n\x05\x04\x01\x02\x01\x04\x12\
  4048. \x03.\x04\x0c\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03.\r\x11\n\x0c\n\x05\
  4049. \x04\x01\x02\x01\x01\x12\x03.\x12\x1b\n\x0c\n\x05\x04\x01\x02\x01\x03\
  4050. \x12\x03.\x1e!\n\x0b\n\x04\x04\x01\x02\x02\x12\x03/\x04!\n\x0c\n\x05\x04\
  4051. \x01\x02\x02\x04\x12\x03/\x04\x0c\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\
  4052. \x03/\r\x11\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03/\x12\x1a\n\x0c\n\x05\
  4053. \x04\x01\x02\x02\x03\x12\x03/\x1d\x20\n\x0b\n\x04\x04\x01\x02\x03\x12\
  4054. \x030\x04!\n\x0c\n\x05\x04\x01\x02\x03\x04\x12\x030\x04\x0c\n\x0c\n\x05\
  4055. \x04\x01\x02\x03\x05\x12\x030\r\x13\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\
  4056. \x030\x14\x1a\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x030\x1d\x20\n\x0b\n\
  4057. \x04\x04\x01\x02\x04\x12\x031\x04\x1f\n\x0c\n\x05\x04\x01\x02\x04\x04\
  4058. \x12\x031\x04\x0c\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x031\r\x13\n\x0c\n\
  4059. \x05\x04\x01\x02\x04\x01\x12\x031\x14\x18\n\x0c\n\x05\x04\x01\x02\x04\
  4060. \x03\x12\x031\x1b\x1e\n\x0b\n\x04\x04\x01\x02\x05\x12\x032\x04%\n\x0c\n\
  4061. \x05\x04\x01\x02\x05\x04\x12\x032\x04\x0c\n\x0c\n\x05\x04\x01\x02\x05\
  4062. \x05\x12\x032\r\x13\n\x0c\n\x05\x04\x01\x02\x05\x01\x12\x032\x14\x1e\n\
  4063. \x0c\n\x05\x04\x01\x02\x05\x03\x12\x032!$\n\x0b\n\x04\x04\x01\x02\x06\
  4064. \x12\x033\x04*\n\x0c\n\x05\x04\x01\x02\x06\x04\x12\x033\x04\x0c\n\x0c\n\
  4065. \x05\x04\x01\x02\x06\x05\x12\x033\r\x12\n\x0c\n\x05\x04\x01\x02\x06\x01\
  4066. \x12\x033\x13#\n\x0c\n\x05\x04\x01\x02\x06\x03\x12\x033&)\n\x0b\n\x04\
  4067. \x04\x01\x02\x07\x12\x034\x04)\n\x0c\n\x05\x04\x01\x02\x07\x04\x12\x034\
  4068. \x04\x0c\n\x0c\n\x05\x04\x01\x02\x07\x05\x12\x034\r\x13\n\x0c\n\x05\x04\
  4069. \x01\x02\x07\x01\x12\x034\x14!\n\x0c\n\x05\x04\x01\x02\x07\x03\x12\x034$\
  4070. (\n\x0b\n\x04\x04\x01\x02\x08\x12\x035\x04,\n\x0c\n\x05\x04\x01\x02\x08\
  4071. \x04\x12\x035\x04\x0c\n\x0c\n\x05\x04\x01\x02\x08\x06\x12\x035\r\x17\n\
  4072. \x0c\n\x05\x04\x01\x02\x08\x01\x12\x035\x18$\n\x0c\n\x05\x04\x01\x02\x08\
  4073. \x03\x12\x035'+\n\x0b\n\x04\x04\x01\x02\t\x12\x036\x040\n\x0c\n\x05\x04\
  4074. \x01\x02\t\x04\x12\x036\x04\x0c\n\x0c\n\x05\x04\x01\x02\t\x05\x12\x036\r\
  4075. \x13\n\x0c\n\x05\x04\x01\x02\t\x01\x12\x036\x14(\n\x0c\n\x05\x04\x01\x02\
  4076. \t\x03\x12\x036+/\n\x0b\n\x04\x04\x01\x02\n\x12\x037\x04&\n\x0c\n\x05\
  4077. \x04\x01\x02\n\x04\x12\x037\x04\x0c\n\x0c\n\x05\x04\x01\x02\n\x06\x12\
  4078. \x037\r\x15\n\x0c\n\x05\x04\x01\x02\n\x01\x12\x037\x16\x1e\n\x0c\n\x05\
  4079. \x04\x01\x02\n\x03\x12\x037!%\n\n\n\x02\x04\x02\x12\x04:\0>\x01\n\n\n\
  4080. \x03\x04\x02\x01\x12\x03:\x08\x12\n\x0b\n\x04\x04\x02\x02\0\x12\x03;\x04\
  4081. &\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03;\x04\x0c\n\x0c\n\x05\x04\x02\x02\
  4082. \0\x06\x12\x03;\r\x1b\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03;\x1c\x1f\n\
  4083. \x0c\n\x05\x04\x02\x02\0\x03\x12\x03;\"%\n\x0b\n\x04\x04\x02\x02\x01\x12\
  4084. \x03<\x04\"\n\x0c\n\x05\x04\x02\x02\x01\x04\x12\x03<\x04\x0c\n\x0c\n\x05\
  4085. \x04\x02\x02\x01\x05\x12\x03<\r\x12\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\
  4086. \x03<\x13\x1b\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03<\x1e!\n\x0b\n\x04\
  4087. \x04\x02\x02\x02\x12\x03=\x04&\n\x0c\n\x05\x04\x02\x02\x02\x04\x12\x03=\
  4088. \x04\x0c\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03=\r\x13\n\x0c\n\x05\x04\
  4089. \x02\x02\x02\x01\x12\x03=\x14\x1f\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\
  4090. \x03=\"%\n\n\n\x02\x05\x01\x12\x04@\0M\x01\n\n\n\x03\x05\x01\x01\x12\x03\
  4091. @\x05\x13\n\x0b\n\x04\x05\x01\x02\0\x12\x03A\x04\x1d\n\x0c\n\x05\x05\x01\
  4092. \x02\0\x01\x12\x03A\x04\x16\n\x0c\n\x05\x05\x01\x02\0\x02\x12\x03A\x19\
  4093. \x1c\n\x0b\n\x04\x05\x01\x02\x01\x12\x03B\x04\x17\n\x0c\n\x05\x05\x01\
  4094. \x02\x01\x01\x12\x03B\x04\x10\n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03B\
  4095. \x13\x16\n\x0b\n\x04\x05\x01\x02\x02\x12\x03C\x04\x1b\n\x0c\n\x05\x05\
  4096. \x01\x02\x02\x01\x12\x03C\x04\x14\n\x0c\n\x05\x05\x01\x02\x02\x02\x12\
  4097. \x03C\x17\x1a\n\x0b\n\x04\x05\x01\x02\x03\x12\x03D\x04\x16\n\x0c\n\x05\
  4098. \x05\x01\x02\x03\x01\x12\x03D\x04\x0f\n\x0c\n\x05\x05\x01\x02\x03\x02\
  4099. \x12\x03D\x12\x15\n\x0b\n\x04\x05\x01\x02\x04\x12\x03E\x04\x1b\n\x0c\n\
  4100. \x05\x05\x01\x02\x04\x01\x12\x03E\x04\x14\n\x0c\n\x05\x05\x01\x02\x04\
  4101. \x02\x12\x03E\x17\x1a\n\x0b\n\x04\x05\x01\x02\x05\x12\x03F\x04\x1a\n\x0c\
  4102. \n\x05\x05\x01\x02\x05\x01\x12\x03F\x04\x13\n\x0c\n\x05\x05\x01\x02\x05\
  4103. \x02\x12\x03F\x16\x19\n\x0b\n\x04\x05\x01\x02\x06\x12\x03G\x04\x18\n\x0c\
  4104. \n\x05\x05\x01\x02\x06\x01\x12\x03G\x04\x11\n\x0c\n\x05\x05\x01\x02\x06\
  4105. \x02\x12\x03G\x14\x17\n\x0b\n\x04\x05\x01\x02\x07\x12\x03H\x04\x17\n\x0c\
  4106. \n\x05\x05\x01\x02\x07\x01\x12\x03H\x04\x10\n\x0c\n\x05\x05\x01\x02\x07\
  4107. \x02\x12\x03H\x13\x16\n\x0b\n\x04\x05\x01\x02\x08\x12\x03I\x04\x1a\n\x0c\
  4108. \n\x05\x05\x01\x02\x08\x01\x12\x03I\x04\x13\n\x0c\n\x05\x05\x01\x02\x08\
  4109. \x02\x12\x03I\x16\x19\n\x0b\n\x04\x05\x01\x02\t\x12\x03J\x04\x17\n\x0c\n\
  4110. \x05\x05\x01\x02\t\x01\x12\x03J\x04\x10\n\x0c\n\x05\x05\x01\x02\t\x02\
  4111. \x12\x03J\x13\x16\n\x0b\n\x04\x05\x01\x02\n\x12\x03K\x04\x1a\n\x0c\n\x05\
  4112. \x05\x01\x02\n\x01\x12\x03K\x04\x13\n\x0c\n\x05\x05\x01\x02\n\x02\x12\
  4113. \x03K\x16\x19\n\x0b\n\x04\x05\x01\x02\x0b\x12\x03L\x04\x12\n\x0c\n\x05\
  4114. \x05\x01\x02\x0b\x01\x12\x03L\x04\x0b\n\x0c\n\x05\x05\x01\x02\x0b\x02\
  4115. \x12\x03L\x0e\x11\n\n\n\x02\x04\x03\x12\x04O\0Q\x01\n\n\n\x03\x04\x03\
  4116. \x01\x12\x03O\x08\x0f\n\x0b\n\x04\x04\x03\x02\0\x12\x03P\x04!\n\x0c\n\
  4117. \x05\x04\x03\x02\0\x04\x12\x03P\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x05\
  4118. \x12\x03P\r\x13\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03P\x14\x1a\n\x0c\n\
  4119. \x05\x04\x03\x02\0\x03\x12\x03P\x1d\x20\n\n\n\x02\x04\x04\x12\x04S\0c\
  4120. \x01\n\n\n\x03\x04\x04\x01\x12\x03S\x08\r\n\x0b\n\x04\x04\x04\x02\0\x12\
  4121. \x03T\x04&\n\x0c\n\x05\x04\x04\x02\0\x04\x12\x03T\x04\x0c\n\x0c\n\x05\
  4122. \x04\x04\x02\0\x05\x12\x03T\r\x13\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03T\
  4123. \x14\x1f\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03T\"%\n\x0b\n\x04\x04\x04\
  4124. \x02\x01\x12\x03U\x04\x20\n\x0c\n\x05\x04\x04\x02\x01\x04\x12\x03U\x04\
  4125. \x0c\n\x0c\n\x05\x04\x04\x02\x01\x05\x12\x03U\r\x13\n\x0c\n\x05\x04\x04\
  4126. \x02\x01\x01\x12\x03U\x14\x19\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03U\
  4127. \x1c\x1f\n\x0b\n\x04\x04\x04\x02\x02\x12\x03V\x04&\n\x0c\n\x05\x04\x04\
  4128. \x02\x02\x04\x12\x03V\x04\x0c\n\x0c\n\x05\x04\x04\x02\x02\x05\x12\x03V\r\
  4129. \x13\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03V\x14\x1f\n\x0c\n\x05\x04\
  4130. \x04\x02\x02\x03\x12\x03V\"%\n\x0b\n\x04\x04\x04\x02\x03\x12\x03W\x04%\n\
  4131. \x0c\n\x05\x04\x04\x02\x03\x04\x12\x03W\x04\x0c\n\x0c\n\x05\x04\x04\x02\
  4132. \x03\x06\x12\x03W\r\x17\n\x0c\n\x05\x04\x04\x02\x03\x01\x12\x03W\x18\x1e\
  4133. \n\x0c\n\x05\x04\x04\x02\x03\x03\x12\x03W!$\n\x0b\n\x04\x04\x04\x02\x04\
  4134. \x12\x03X\x04/\n\x0c\n\x05\x04\x04\x02\x04\x04\x12\x03X\x04\x0c\n\x0c\n\
  4135. \x05\x04\x04\x02\x04\x05\x12\x03X\r\x13\n\x0c\n\x05\x04\x04\x02\x04\x01\
  4136. \x12\x03X\x14(\n\x0c\n\x05\x04\x04\x02\x04\x03\x12\x03X+.\n\x0b\n\x04\
  4137. \x04\x04\x02\x05\x12\x03Y\x04.\n\x0c\n\x05\x04\x04\x02\x05\x04\x12\x03Y\
  4138. \x04\x0c\n\x0c\n\x05\x04\x04\x02\x05\x05\x12\x03Y\r\x13\n\x0c\n\x05\x04\
  4139. \x04\x02\x05\x01\x12\x03Y\x14'\n\x0c\n\x05\x04\x04\x02\x05\x03\x12\x03Y*\
  4140. -\n\x0b\n\x04\x04\x04\x02\x06\x12\x03Z\x04\x20\n\x0c\n\x05\x04\x04\x02\
  4141. \x06\x04\x12\x03Z\x04\x0c\n\x0c\n\x05\x04\x04\x02\x06\x05\x12\x03Z\r\x11\
  4142. \n\x0c\n\x05\x04\x04\x02\x06\x01\x12\x03Z\x12\x19\n\x0c\n\x05\x04\x04\
  4143. \x02\x06\x03\x12\x03Z\x1c\x1f\n\x0b\n\x04\x04\x04\x02\x07\x12\x03[\x04\
  4144. \x1f\n\x0c\n\x05\x04\x04\x02\x07\x04\x12\x03[\x04\x0c\n\x0c\n\x05\x04\
  4145. \x04\x02\x07\x05\x12\x03[\r\x11\n\x0c\n\x05\x04\x04\x02\x07\x01\x12\x03[\
  4146. \x12\x18\n\x0c\n\x05\x04\x04\x02\x07\x03\x12\x03[\x1b\x1e\n\x0b\n\x04\
  4147. \x04\x04\x02\x08\x12\x03\\\x04.\n\x0c\n\x05\x04\x04\x02\x08\x04\x12\x03\
  4148. \\\x04\x0c\n\x0c\n\x05\x04\x04\x02\x08\x05\x12\x03\\\r\x13\n\x0c\n\x05\
  4149. \x04\x04\x02\x08\x01\x12\x03\\\x14&\n\x0c\n\x05\x04\x04\x02\x08\x03\x12\
  4150. \x03\\)-\n\x0b\n\x04\x04\x04\x02\t\x12\x03]\x04.\n\x0c\n\x05\x04\x04\x02\
  4151. \t\x04\x12\x03]\x04\x0c\n\x0c\n\x05\x04\x04\x02\t\x05\x12\x03]\r\x13\n\
  4152. \x0c\n\x05\x04\x04\x02\t\x01\x12\x03]\x14&\n\x0c\n\x05\x04\x04\x02\t\x03\
  4153. \x12\x03])-\n\x0b\n\x04\x04\x04\x02\n\x12\x03^\x04/\n\x0c\n\x05\x04\x04\
  4154. \x02\n\x04\x12\x03^\x04\x0c\n\x0c\n\x05\x04\x04\x02\n\x05\x12\x03^\r\x11\
  4155. \n\x0c\n\x05\x04\x04\x02\n\x01\x12\x03^\x12'\n\x0c\n\x05\x04\x04\x02\n\
  4156. \x03\x12\x03^*.\n\x0b\n\x04\x04\x04\x02\x0b\x12\x03_\x04\x1f\n\x0c\n\x05\
  4157. \x04\x04\x02\x0b\x04\x12\x03_\x04\x0c\n\x0c\n\x05\x04\x04\x02\x0b\x05\
  4158. \x12\x03_\r\x13\n\x0c\n\x05\x04\x04\x02\x0b\x01\x12\x03_\x14\x17\n\x0c\n\
  4159. \x05\x04\x04\x02\x0b\x03\x12\x03_\x1a\x1e\n\x0b\n\x04\x04\x04\x02\x0c\
  4160. \x12\x03`\x04/\n\x0c\n\x05\x04\x04\x02\x0c\x04\x12\x03`\x04\x0c\n\x0c\n\
  4161. \x05\x04\x04\x02\x0c\x05\x12\x03`\r\x13\n\x0c\n\x05\x04\x04\x02\x0c\x01\
  4162. \x12\x03`\x14'\n\x0c\n\x05\x04\x04\x02\x0c\x03\x12\x03`*.\n\x0b\n\x04\
  4163. \x04\x04\x02\r\x12\x03a\x04#\n\x0c\n\x05\x04\x04\x02\r\x04\x12\x03a\x04\
  4164. \x0c\n\x0c\n\x05\x04\x04\x02\r\x06\x12\x03a\r\x15\n\x0c\n\x05\x04\x04\
  4165. \x02\r\x01\x12\x03a\x16\x1b\n\x0c\n\x05\x04\x04\x02\r\x03\x12\x03a\x1e\"\
  4166. \n\x0b\n\x04\x04\x04\x02\x0e\x12\x03b\x04\x1a\n\x0c\n\x05\x04\x04\x02\
  4167. \x0e\x04\x12\x03b\x04\x0c\n\x0c\n\x05\x04\x04\x02\x0e\x06\x12\x03b\r\x0f\
  4168. \n\x0c\n\x05\x04\x04\x02\x0e\x01\x12\x03b\x10\x12\n\x0c\n\x05\x04\x04\
  4169. \x02\x0e\x03\x12\x03b\x15\x19\n\n\n\x02\x05\x02\x12\x04e\0j\x01\n\n\n\
  4170. \x03\x05\x02\x01\x12\x03e\x05\x0f\n\x0b\n\x04\x05\x02\x02\0\x12\x03f\x04\
  4171. \x1a\n\x0c\n\x05\x05\x02\x02\0\x01\x12\x03f\x04\x13\n\x0c\n\x05\x05\x02\
  4172. \x02\0\x02\x12\x03f\x16\x19\n\x0b\n\x04\x05\x02\x02\x01\x12\x03g\x04\x1a\
  4173. \n\x0c\n\x05\x05\x02\x02\x01\x01\x12\x03g\x04\x13\n\x0c\n\x05\x05\x02\
  4174. \x02\x01\x02\x12\x03g\x16\x19\n\x0b\n\x04\x05\x02\x02\x02\x12\x03h\x04\
  4175. \x1b\n\x0c\n\x05\x05\x02\x02\x02\x01\x12\x03h\x04\x14\n\x0c\n\x05\x05\
  4176. \x02\x02\x02\x02\x12\x03h\x17\x1a\n\x0b\n\x04\x05\x02\x02\x03\x12\x03i\
  4177. \x04\x1d\n\x0c\n\x05\x05\x02\x02\x03\x01\x12\x03i\x04\x16\n\x0c\n\x05\
  4178. \x05\x02\x02\x03\x02\x12\x03i\x19\x1c\n\n\n\x02\x04\x05\x12\x04l\0q\x01\
  4179. \n\n\n\x03\x04\x05\x01\x12\x03l\x08\x10\n\x0b\n\x04\x04\x05\x02\0\x12\
  4180. \x03m\x04\x1d\n\x0c\n\x05\x04\x05\x02\0\x04\x12\x03m\x04\x0c\n\x0c\n\x05\
  4181. \x04\x05\x02\0\x05\x12\x03m\r\x12\n\x0c\n\x05\x04\x05\x02\0\x01\x12\x03m\
  4182. \x13\x16\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03m\x19\x1c\n\x0b\n\x04\x04\
  4183. \x05\x02\x01\x12\x03n\x04\x1e\n\x0c\n\x05\x04\x05\x02\x01\x04\x12\x03n\
  4184. \x04\x0c\n\x0c\n\x05\x04\x05\x02\x01\x05\x12\x03n\r\x13\n\x0c\n\x05\x04\
  4185. \x05\x02\x01\x01\x12\x03n\x14\x17\n\x0c\n\x05\x04\x05\x02\x01\x03\x12\
  4186. \x03n\x1a\x1d\n\x0b\n\x04\x04\x05\x02\x02\x12\x03o\x04\x1f\n\x0c\n\x05\
  4187. \x04\x05\x02\x02\x04\x12\x03o\x04\x0c\n\x0c\n\x05\x04\x05\x02\x02\x05\
  4188. \x12\x03o\r\x11\n\x0c\n\x05\x04\x05\x02\x02\x01\x12\x03o\x12\x18\n\x0c\n\
  4189. \x05\x04\x05\x02\x02\x03\x12\x03o\x1b\x1e\n\x0b\n\x04\x04\x05\x02\x03\
  4190. \x12\x03p\x04\"\n\x0c\n\x05\x04\x05\x02\x03\x04\x12\x03p\x04\x0c\n\x0c\n\
  4191. \x05\x04\x05\x02\x03\x05\x12\x03p\r\x13\n\x0c\n\x05\x04\x05\x02\x03\x01\
  4192. \x12\x03p\x14\x1b\n\x0c\n\x05\x04\x05\x02\x03\x03\x12\x03p\x1e!\n\n\n\
  4193. \x02\x04\x06\x12\x04s\0}\x01\n\n\n\x03\x04\x06\x01\x12\x03s\x08\n\n\x0b\
  4194. \n\x04\x04\x06\x02\0\x12\x03t\x04\x1e\n\x0c\n\x05\x04\x06\x02\0\x04\x12\
  4195. \x03t\x04\x0c\n\x0c\n\x05\x04\x06\x02\0\x05\x12\x03t\r\x12\n\x0c\n\x05\
  4196. \x04\x06\x02\0\x01\x12\x03t\x13\x17\n\x0c\n\x05\x04\x06\x02\0\x03\x12\
  4197. \x03t\x1a\x1d\n\x0b\n\x04\x04\x06\x02\x01\x12\x03u\x04!\n\x0c\n\x05\x04\
  4198. \x06\x02\x01\x04\x12\x03u\x04\x0c\n\x0c\n\x05\x04\x06\x02\x01\x05\x12\
  4199. \x03u\r\x12\n\x0c\n\x05\x04\x06\x02\x01\x01\x12\x03u\x13\x1a\n\x0c\n\x05\
  4200. \x04\x06\x02\x01\x03\x12\x03u\x1d\x20\n\x0b\n\x04\x04\x06\x02\x02\x12\
  4201. \x03v\x04#\n\x0c\n\x05\x04\x06\x02\x02\x04\x12\x03v\x04\x0c\n\x0c\n\x05\
  4202. \x04\x06\x02\x02\x05\x12\x03v\r\x12\n\x0c\n\x05\x04\x06\x02\x02\x01\x12\
  4203. \x03v\x13\x1c\n\x0c\n\x05\x04\x06\x02\x02\x03\x12\x03v\x1f\"\n\x0b\n\x04\
  4204. \x04\x06\x02\x03\x12\x03w\x04\"\n\x0c\n\x05\x04\x06\x02\x03\x04\x12\x03w\
  4205. \x04\x0c\n\x0c\n\x05\x04\x06\x02\x03\x05\x12\x03w\r\x12\n\x0c\n\x05\x04\
  4206. \x06\x02\x03\x01\x12\x03w\x13\x1b\n\x0c\n\x05\x04\x06\x02\x03\x03\x12\
  4207. \x03w\x1e!\n\x0b\n\x04\x04\x06\x02\x04\x12\x03x\x04$\n\x0c\n\x05\x04\x06\
  4208. \x02\x04\x04\x12\x03x\x04\x0c\n\x0c\n\x05\x04\x06\x02\x04\x05\x12\x03x\r\
  4209. \x13\n\x0c\n\x05\x04\x06\x02\x04\x01\x12\x03x\x14\x1d\n\x0c\n\x05\x04\
  4210. \x06\x02\x04\x03\x12\x03x\x20#\n\x0b\n\x04\x04\x06\x02\x05\x12\x03y\x04)\
  4211. \n\x0c\n\x05\x04\x06\x02\x05\x04\x12\x03y\x04\x0c\n\x0c\n\x05\x04\x06\
  4212. \x02\x05\x05\x12\x03y\r\x13\n\x0c\n\x05\x04\x06\x02\x05\x01\x12\x03y\x14\
  4213. \"\n\x0c\n\x05\x04\x06\x02\x05\x03\x12\x03y%(\n\x0b\n\x04\x04\x06\x02\
  4214. \x06\x12\x03z\x04\"\n\x0c\n\x05\x04\x06\x02\x06\x04\x12\x03z\x04\x0c\n\
  4215. \x0c\n\x05\x04\x06\x02\x06\x05\x12\x03z\r\x13\n\x0c\n\x05\x04\x06\x02\
  4216. \x06\x01\x12\x03z\x14\x1b\n\x0c\n\x05\x04\x06\x02\x06\x03\x12\x03z\x1e!\
  4217. \n\x0b\n\x04\x04\x06\x02\x07\x12\x03{\x04%\n\x0c\n\x05\x04\x06\x02\x07\
  4218. \x04\x12\x03{\x04\x0c\n\x0c\n\x05\x04\x06\x02\x07\x05\x12\x03{\r\x13\n\
  4219. \x0c\n\x05\x04\x06\x02\x07\x01\x12\x03{\x14\x1e\n\x0c\n\x05\x04\x06\x02\
  4220. \x07\x03\x12\x03{!$\n\x0b\n\x04\x04\x06\x02\x08\x12\x03|\x04\x1d\n\x0c\n\
  4221. \x05\x04\x06\x02\x08\x04\x12\x03|\x04\x0c\n\x0c\n\x05\x04\x06\x02\x08\
  4222. \x05\x12\x03|\r\x12\n\x0c\n\x05\x04\x06\x02\x08\x01\x12\x03|\x13\x16\n\
  4223. \x0c\n\x05\x04\x06\x02\x08\x03\x12\x03|\x19\x1c\n\x0b\n\x02\x04\x07\x12\
  4224. \x05\x7f\0\x82\x01\x01\n\n\n\x03\x04\x07\x01\x12\x03\x7f\x08\x10\n\x0c\n\
  4225. \x04\x04\x07\x02\0\x12\x04\x80\x01\x04\x1f\n\r\n\x05\x04\x07\x02\0\x04\
  4226. \x12\x04\x80\x01\x04\x0c\n\r\n\x05\x04\x07\x02\0\x05\x12\x04\x80\x01\r\
  4227. \x13\n\r\n\x05\x04\x07\x02\0\x01\x12\x04\x80\x01\x14\x18\n\r\n\x05\x04\
  4228. \x07\x02\0\x03\x12\x04\x80\x01\x1b\x1e\n\x0c\n\x04\x04\x07\x02\x01\x12\
  4229. \x04\x81\x01\x04#\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04\x81\x01\x04\x0c\
  4230. \n\r\n\x05\x04\x07\x02\x01\x05\x12\x04\x81\x01\r\x13\n\r\n\x05\x04\x07\
  4231. \x02\x01\x01\x12\x04\x81\x01\x14\x1c\n\r\n\x05\x04\x07\x02\x01\x03\x12\
  4232. \x04\x81\x01\x1f\"\
  4233. ";
  4234. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
  4235. lock: ::protobuf::lazy::ONCE_INIT,
  4236. ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
  4237. };
  4238. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  4239. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  4240. }
  4241. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  4242. unsafe {
  4243. file_descriptor_proto_lazy.get(|| {
  4244. parse_descriptor_proto()
  4245. })
  4246. }
  4247. }