123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161 |
- // This file is generated by rust-protobuf 2.8.1. Do not edit
- // @generated
- // https://github.com/Manishearth/rust-clippy/issues/702
- #![allow(unknown_lints)]
- #![allow(clippy::all)]
- #![cfg_attr(rustfmt, rustfmt_skip)]
- #![allow(box_pointers)]
- #![allow(dead_code)]
- #![allow(missing_docs)]
- #![allow(non_camel_case_types)]
- #![allow(non_snake_case)]
- #![allow(non_upper_case_globals)]
- #![allow(trivial_casts)]
- #![allow(unsafe_code)]
- #![allow(unused_imports)]
- #![allow(unused_results)]
- //! Generated file from `spirc.proto`
- use protobuf::Message as Message_imported_for_functions;
- use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
- /// Generated files are compatible only with the same version
- /// of protobuf runtime.
- const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1;
- #[derive(PartialEq,Clone,Default)]
- pub struct Frame {
- // message fields
- version: ::std::option::Option<u32>,
- ident: ::protobuf::SingularField<::std::string::String>,
- protocol_version: ::protobuf::SingularField<::std::string::String>,
- seq_nr: ::std::option::Option<u32>,
- typ: ::std::option::Option<MessageType>,
- device_state: ::protobuf::SingularPtrField<DeviceState>,
- goodbye: ::protobuf::SingularPtrField<Goodbye>,
- state: ::protobuf::SingularPtrField<State>,
- position: ::std::option::Option<u32>,
- volume: ::std::option::Option<u32>,
- state_update_id: ::std::option::Option<i64>,
- recipient: ::protobuf::RepeatedField<::std::string::String>,
- context_player_state: ::protobuf::SingularField<::std::vec::Vec<u8>>,
- new_name: ::protobuf::SingularField<::std::string::String>,
- metadata: ::protobuf::SingularPtrField<Metadata>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a Frame {
- fn default() -> &'a Frame {
- <Frame as ::protobuf::Message>::default_instance()
- }
- }
- impl Frame {
- pub fn new() -> Frame {
- ::std::default::Default::default()
- }
- // optional uint32 version = 1;
- pub fn get_version(&self) -> u32 {
- self.version.unwrap_or(0)
- }
- pub fn clear_version(&mut self) {
- self.version = ::std::option::Option::None;
- }
- pub fn has_version(&self) -> bool {
- self.version.is_some()
- }
- // Param is passed by value, moved
- pub fn set_version(&mut self, v: u32) {
- self.version = ::std::option::Option::Some(v);
- }
- // optional string ident = 2;
- pub fn get_ident(&self) -> &str {
- match self.ident.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_ident(&mut self) {
- self.ident.clear();
- }
- pub fn has_ident(&self) -> bool {
- self.ident.is_some()
- }
- // Param is passed by value, moved
- pub fn set_ident(&mut self, v: ::std::string::String) {
- self.ident = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_ident(&mut self) -> &mut ::std::string::String {
- if self.ident.is_none() {
- self.ident.set_default();
- }
- self.ident.as_mut().unwrap()
- }
- // Take field
- pub fn take_ident(&mut self) -> ::std::string::String {
- self.ident.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional string protocol_version = 3;
- pub fn get_protocol_version(&self) -> &str {
- match self.protocol_version.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_protocol_version(&mut self) {
- self.protocol_version.clear();
- }
- pub fn has_protocol_version(&self) -> bool {
- self.protocol_version.is_some()
- }
- // Param is passed by value, moved
- pub fn set_protocol_version(&mut self, v: ::std::string::String) {
- self.protocol_version = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_protocol_version(&mut self) -> &mut ::std::string::String {
- if self.protocol_version.is_none() {
- self.protocol_version.set_default();
- }
- self.protocol_version.as_mut().unwrap()
- }
- // Take field
- pub fn take_protocol_version(&mut self) -> ::std::string::String {
- self.protocol_version.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional uint32 seq_nr = 4;
- pub fn get_seq_nr(&self) -> u32 {
- self.seq_nr.unwrap_or(0)
- }
- pub fn clear_seq_nr(&mut self) {
- self.seq_nr = ::std::option::Option::None;
- }
- pub fn has_seq_nr(&self) -> bool {
- self.seq_nr.is_some()
- }
- // Param is passed by value, moved
- pub fn set_seq_nr(&mut self, v: u32) {
- self.seq_nr = ::std::option::Option::Some(v);
- }
- // optional .MessageType typ = 5;
- pub fn get_typ(&self) -> MessageType {
- self.typ.unwrap_or(MessageType::kMessageTypeHello)
- }
- pub fn clear_typ(&mut self) {
- self.typ = ::std::option::Option::None;
- }
- pub fn has_typ(&self) -> bool {
- self.typ.is_some()
- }
- // Param is passed by value, moved
- pub fn set_typ(&mut self, v: MessageType) {
- self.typ = ::std::option::Option::Some(v);
- }
- // optional .DeviceState device_state = 7;
- pub fn get_device_state(&self) -> &DeviceState {
- self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance())
- }
- pub fn clear_device_state(&mut self) {
- self.device_state.clear();
- }
- pub fn has_device_state(&self) -> bool {
- self.device_state.is_some()
- }
- // Param is passed by value, moved
- pub fn set_device_state(&mut self, v: DeviceState) {
- self.device_state = ::protobuf::SingularPtrField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_device_state(&mut self) -> &mut DeviceState {
- if self.device_state.is_none() {
- self.device_state.set_default();
- }
- self.device_state.as_mut().unwrap()
- }
- // Take field
- pub fn take_device_state(&mut self) -> DeviceState {
- self.device_state.take().unwrap_or_else(|| DeviceState::new())
- }
- // optional .Goodbye goodbye = 11;
- pub fn get_goodbye(&self) -> &Goodbye {
- self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance())
- }
- pub fn clear_goodbye(&mut self) {
- self.goodbye.clear();
- }
- pub fn has_goodbye(&self) -> bool {
- self.goodbye.is_some()
- }
- // Param is passed by value, moved
- pub fn set_goodbye(&mut self, v: Goodbye) {
- self.goodbye = ::protobuf::SingularPtrField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_goodbye(&mut self) -> &mut Goodbye {
- if self.goodbye.is_none() {
- self.goodbye.set_default();
- }
- self.goodbye.as_mut().unwrap()
- }
- // Take field
- pub fn take_goodbye(&mut self) -> Goodbye {
- self.goodbye.take().unwrap_or_else(|| Goodbye::new())
- }
- // optional .State state = 12;
- pub fn get_state(&self) -> &State {
- self.state.as_ref().unwrap_or_else(|| State::default_instance())
- }
- pub fn clear_state(&mut self) {
- self.state.clear();
- }
- pub fn has_state(&self) -> bool {
- self.state.is_some()
- }
- // Param is passed by value, moved
- pub fn set_state(&mut self, v: State) {
- self.state = ::protobuf::SingularPtrField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_state(&mut self) -> &mut State {
- if self.state.is_none() {
- self.state.set_default();
- }
- self.state.as_mut().unwrap()
- }
- // Take field
- pub fn take_state(&mut self) -> State {
- self.state.take().unwrap_or_else(|| State::new())
- }
- // optional uint32 position = 13;
- pub fn get_position(&self) -> u32 {
- self.position.unwrap_or(0)
- }
- pub fn clear_position(&mut self) {
- self.position = ::std::option::Option::None;
- }
- pub fn has_position(&self) -> bool {
- self.position.is_some()
- }
- // Param is passed by value, moved
- pub fn set_position(&mut self, v: u32) {
- self.position = ::std::option::Option::Some(v);
- }
- // optional uint32 volume = 14;
- pub fn get_volume(&self) -> u32 {
- self.volume.unwrap_or(0)
- }
- pub fn clear_volume(&mut self) {
- self.volume = ::std::option::Option::None;
- }
- pub fn has_volume(&self) -> bool {
- self.volume.is_some()
- }
- // Param is passed by value, moved
- pub fn set_volume(&mut self, v: u32) {
- self.volume = ::std::option::Option::Some(v);
- }
- // optional int64 state_update_id = 17;
- pub fn get_state_update_id(&self) -> i64 {
- self.state_update_id.unwrap_or(0)
- }
- pub fn clear_state_update_id(&mut self) {
- self.state_update_id = ::std::option::Option::None;
- }
- pub fn has_state_update_id(&self) -> bool {
- self.state_update_id.is_some()
- }
- // Param is passed by value, moved
- pub fn set_state_update_id(&mut self, v: i64) {
- self.state_update_id = ::std::option::Option::Some(v);
- }
- // repeated string recipient = 18;
- pub fn get_recipient(&self) -> &[::std::string::String] {
- &self.recipient
- }
- pub fn clear_recipient(&mut self) {
- self.recipient.clear();
- }
- // Param is passed by value, moved
- pub fn set_recipient(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
- self.recipient = v;
- }
- // Mutable pointer to the field.
- pub fn mut_recipient(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
- &mut self.recipient
- }
- // Take field
- pub fn take_recipient(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
- ::std::mem::replace(&mut self.recipient, ::protobuf::RepeatedField::new())
- }
- // optional bytes context_player_state = 19;
- pub fn get_context_player_state(&self) -> &[u8] {
- match self.context_player_state.as_ref() {
- Some(v) => &v,
- None => &[],
- }
- }
- pub fn clear_context_player_state(&mut self) {
- self.context_player_state.clear();
- }
- pub fn has_context_player_state(&self) -> bool {
- self.context_player_state.is_some()
- }
- // Param is passed by value, moved
- pub fn set_context_player_state(&mut self, v: ::std::vec::Vec<u8>) {
- self.context_player_state = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_context_player_state(&mut self) -> &mut ::std::vec::Vec<u8> {
- if self.context_player_state.is_none() {
- self.context_player_state.set_default();
- }
- self.context_player_state.as_mut().unwrap()
- }
- // Take field
- pub fn take_context_player_state(&mut self) -> ::std::vec::Vec<u8> {
- self.context_player_state.take().unwrap_or_else(|| ::std::vec::Vec::new())
- }
- // optional string new_name = 20;
- pub fn get_new_name(&self) -> &str {
- match self.new_name.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_new_name(&mut self) {
- self.new_name.clear();
- }
- pub fn has_new_name(&self) -> bool {
- self.new_name.is_some()
- }
- // Param is passed by value, moved
- pub fn set_new_name(&mut self, v: ::std::string::String) {
- self.new_name = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_new_name(&mut self) -> &mut ::std::string::String {
- if self.new_name.is_none() {
- self.new_name.set_default();
- }
- self.new_name.as_mut().unwrap()
- }
- // Take field
- pub fn take_new_name(&mut self) -> ::std::string::String {
- self.new_name.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional .Metadata metadata = 25;
- pub fn get_metadata(&self) -> &Metadata {
- self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance())
- }
- pub fn clear_metadata(&mut self) {
- self.metadata.clear();
- }
- pub fn has_metadata(&self) -> bool {
- self.metadata.is_some()
- }
- // Param is passed by value, moved
- pub fn set_metadata(&mut self, v: Metadata) {
- self.metadata = ::protobuf::SingularPtrField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_metadata(&mut self) -> &mut Metadata {
- if self.metadata.is_none() {
- self.metadata.set_default();
- }
- self.metadata.as_mut().unwrap()
- }
- // Take field
- pub fn take_metadata(&mut self) -> Metadata {
- self.metadata.take().unwrap_or_else(|| Metadata::new())
- }
- }
- impl ::protobuf::Message for Frame {
- fn is_initialized(&self) -> bool {
- for v in &self.device_state {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.goodbye {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.state {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.metadata {
- if !v.is_initialized() {
- return false;
- }
- };
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.version = ::std::option::Option::Some(tmp);
- },
- 2 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.ident)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.protocol_version)?;
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.seq_nr = ::std::option::Option::Some(tmp);
- },
- 5 => {
- ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 5, &mut self.unknown_fields)?
- },
- 7 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.device_state)?;
- },
- 11 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.goodbye)?;
- },
- 12 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.state)?;
- },
- 13 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.position = ::std::option::Option::Some(tmp);
- },
- 14 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.volume = ::std::option::Option::Some(tmp);
- },
- 17 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_int64()?;
- self.state_update_id = ::std::option::Option::Some(tmp);
- },
- 18 => {
- ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.recipient)?;
- },
- 19 => {
- ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.context_player_state)?;
- },
- 20 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.new_name)?;
- },
- 25 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.metadata)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(v) = self.version {
- my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(ref v) = self.ident.as_ref() {
- my_size += ::protobuf::rt::string_size(2, &v);
- }
- if let Some(ref v) = self.protocol_version.as_ref() {
- my_size += ::protobuf::rt::string_size(3, &v);
- }
- if let Some(v) = self.seq_nr {
- my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.typ {
- my_size += ::protobuf::rt::enum_size(5, v);
- }
- if let Some(ref v) = self.device_state.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.goodbye.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(ref v) = self.state.as_ref() {
- let len = v.compute_size();
- my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- if let Some(v) = self.position {
- my_size += ::protobuf::rt::value_size(13, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.volume {
- my_size += ::protobuf::rt::value_size(14, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.state_update_id {
- my_size += ::protobuf::rt::value_size(17, v, ::protobuf::wire_format::WireTypeVarint);
- }
- for value in &self.recipient {
- my_size += ::protobuf::rt::string_size(18, &value);
- };
- if let Some(ref v) = self.context_player_state.as_ref() {
- my_size += ::protobuf::rt::bytes_size(19, &v);
- }
- if let Some(ref v) = self.new_name.as_ref() {
- my_size += ::protobuf::rt::string_size(20, &v);
- }
- if let Some(ref v) = self.metadata.as_ref() {
- let len = v.compute_size();
- my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(v) = self.version {
- os.write_uint32(1, v)?;
- }
- if let Some(ref v) = self.ident.as_ref() {
- os.write_string(2, &v)?;
- }
- if let Some(ref v) = self.protocol_version.as_ref() {
- os.write_string(3, &v)?;
- }
- if let Some(v) = self.seq_nr {
- os.write_uint32(4, v)?;
- }
- if let Some(v) = self.typ {
- os.write_enum(5, v.value())?;
- }
- if let Some(ref v) = self.device_state.as_ref() {
- os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if let Some(ref v) = self.goodbye.as_ref() {
- os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if let Some(ref v) = self.state.as_ref() {
- os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- if let Some(v) = self.position {
- os.write_uint32(13, v)?;
- }
- if let Some(v) = self.volume {
- os.write_uint32(14, v)?;
- }
- if let Some(v) = self.state_update_id {
- os.write_int64(17, v)?;
- }
- for v in &self.recipient {
- os.write_string(18, &v)?;
- };
- if let Some(ref v) = self.context_player_state.as_ref() {
- os.write_bytes(19, &v)?;
- }
- if let Some(ref v) = self.new_name.as_ref() {
- os.write_string(20, &v)?;
- }
- if let Some(ref v) = self.metadata.as_ref() {
- os.write_tag(25, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> Frame {
- Frame::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "version",
- |m: &Frame| { &m.version },
- |m: &mut Frame| { &mut m.version },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "ident",
- |m: &Frame| { &m.ident },
- |m: &mut Frame| { &mut m.ident },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "protocol_version",
- |m: &Frame| { &m.protocol_version },
- |m: &mut Frame| { &mut m.protocol_version },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "seq_nr",
- |m: &Frame| { &m.seq_nr },
- |m: &mut Frame| { &mut m.seq_nr },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MessageType>>(
- "typ",
- |m: &Frame| { &m.typ },
- |m: &mut Frame| { &mut m.typ },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<DeviceState>>(
- "device_state",
- |m: &Frame| { &m.device_state },
- |m: &mut Frame| { &mut m.device_state },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Goodbye>>(
- "goodbye",
- |m: &Frame| { &m.goodbye },
- |m: &mut Frame| { &mut m.goodbye },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<State>>(
- "state",
- |m: &Frame| { &m.state },
- |m: &mut Frame| { &mut m.state },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "position",
- |m: &Frame| { &m.position },
- |m: &mut Frame| { &mut m.position },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "volume",
- |m: &Frame| { &m.volume },
- |m: &mut Frame| { &mut m.volume },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "state_update_id",
- |m: &Frame| { &m.state_update_id },
- |m: &mut Frame| { &mut m.state_update_id },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "recipient",
- |m: &Frame| { &m.recipient },
- |m: &mut Frame| { &mut m.recipient },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "context_player_state",
- |m: &Frame| { &m.context_player_state },
- |m: &mut Frame| { &mut m.context_player_state },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "new_name",
- |m: &Frame| { &m.new_name },
- |m: &mut Frame| { &mut m.new_name },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Metadata>>(
- "metadata",
- |m: &Frame| { &m.metadata },
- |m: &mut Frame| { &mut m.metadata },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<Frame>(
- "Frame",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static Frame {
- static mut instance: ::protobuf::lazy::Lazy<Frame> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const Frame,
- };
- unsafe {
- instance.get(Frame::new)
- }
- }
- }
- impl ::protobuf::Clear for Frame {
- fn clear(&mut self) {
- self.version = ::std::option::Option::None;
- self.ident.clear();
- self.protocol_version.clear();
- self.seq_nr = ::std::option::Option::None;
- self.typ = ::std::option::Option::None;
- self.device_state.clear();
- self.goodbye.clear();
- self.state.clear();
- self.position = ::std::option::Option::None;
- self.volume = ::std::option::Option::None;
- self.state_update_id = ::std::option::Option::None;
- self.recipient.clear();
- self.context_player_state.clear();
- self.new_name.clear();
- self.metadata.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for Frame {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for Frame {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct DeviceState {
- // message fields
- sw_version: ::protobuf::SingularField<::std::string::String>,
- is_active: ::std::option::Option<bool>,
- can_play: ::std::option::Option<bool>,
- volume: ::std::option::Option<u32>,
- name: ::protobuf::SingularField<::std::string::String>,
- error_code: ::std::option::Option<u32>,
- became_active_at: ::std::option::Option<i64>,
- error_message: ::protobuf::SingularField<::std::string::String>,
- capabilities: ::protobuf::RepeatedField<Capability>,
- context_player_error: ::protobuf::SingularField<::std::string::String>,
- metadata: ::protobuf::RepeatedField<Metadata>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a DeviceState {
- fn default() -> &'a DeviceState {
- <DeviceState as ::protobuf::Message>::default_instance()
- }
- }
- impl DeviceState {
- pub fn new() -> DeviceState {
- ::std::default::Default::default()
- }
- // optional string sw_version = 1;
- pub fn get_sw_version(&self) -> &str {
- match self.sw_version.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_sw_version(&mut self) {
- self.sw_version.clear();
- }
- pub fn has_sw_version(&self) -> bool {
- self.sw_version.is_some()
- }
- // Param is passed by value, moved
- pub fn set_sw_version(&mut self, v: ::std::string::String) {
- self.sw_version = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_sw_version(&mut self) -> &mut ::std::string::String {
- if self.sw_version.is_none() {
- self.sw_version.set_default();
- }
- self.sw_version.as_mut().unwrap()
- }
- // Take field
- pub fn take_sw_version(&mut self) -> ::std::string::String {
- self.sw_version.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional bool is_active = 10;
- pub fn get_is_active(&self) -> bool {
- self.is_active.unwrap_or(false)
- }
- pub fn clear_is_active(&mut self) {
- self.is_active = ::std::option::Option::None;
- }
- pub fn has_is_active(&self) -> bool {
- self.is_active.is_some()
- }
- // Param is passed by value, moved
- pub fn set_is_active(&mut self, v: bool) {
- self.is_active = ::std::option::Option::Some(v);
- }
- // optional bool can_play = 11;
- pub fn get_can_play(&self) -> bool {
- self.can_play.unwrap_or(false)
- }
- pub fn clear_can_play(&mut self) {
- self.can_play = ::std::option::Option::None;
- }
- pub fn has_can_play(&self) -> bool {
- self.can_play.is_some()
- }
- // Param is passed by value, moved
- pub fn set_can_play(&mut self, v: bool) {
- self.can_play = ::std::option::Option::Some(v);
- }
- // optional uint32 volume = 12;
- pub fn get_volume(&self) -> u32 {
- self.volume.unwrap_or(0)
- }
- pub fn clear_volume(&mut self) {
- self.volume = ::std::option::Option::None;
- }
- pub fn has_volume(&self) -> bool {
- self.volume.is_some()
- }
- // Param is passed by value, moved
- pub fn set_volume(&mut self, v: u32) {
- self.volume = ::std::option::Option::Some(v);
- }
- // optional string name = 13;
- pub fn get_name(&self) -> &str {
- match self.name.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_name(&mut self) {
- self.name.clear();
- }
- pub fn has_name(&self) -> bool {
- self.name.is_some()
- }
- // Param is passed by value, moved
- pub fn set_name(&mut self, v: ::std::string::String) {
- self.name = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_name(&mut self) -> &mut ::std::string::String {
- if self.name.is_none() {
- self.name.set_default();
- }
- self.name.as_mut().unwrap()
- }
- // Take field
- pub fn take_name(&mut self) -> ::std::string::String {
- self.name.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional uint32 error_code = 14;
- pub fn get_error_code(&self) -> u32 {
- self.error_code.unwrap_or(0)
- }
- pub fn clear_error_code(&mut self) {
- self.error_code = ::std::option::Option::None;
- }
- pub fn has_error_code(&self) -> bool {
- self.error_code.is_some()
- }
- // Param is passed by value, moved
- pub fn set_error_code(&mut self, v: u32) {
- self.error_code = ::std::option::Option::Some(v);
- }
- // optional int64 became_active_at = 15;
- pub fn get_became_active_at(&self) -> i64 {
- self.became_active_at.unwrap_or(0)
- }
- pub fn clear_became_active_at(&mut self) {
- self.became_active_at = ::std::option::Option::None;
- }
- pub fn has_became_active_at(&self) -> bool {
- self.became_active_at.is_some()
- }
- // Param is passed by value, moved
- pub fn set_became_active_at(&mut self, v: i64) {
- self.became_active_at = ::std::option::Option::Some(v);
- }
- // optional string error_message = 16;
- pub fn get_error_message(&self) -> &str {
- match self.error_message.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_error_message(&mut self) {
- self.error_message.clear();
- }
- pub fn has_error_message(&self) -> bool {
- self.error_message.is_some()
- }
- // Param is passed by value, moved
- pub fn set_error_message(&mut self, v: ::std::string::String) {
- self.error_message = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_error_message(&mut self) -> &mut ::std::string::String {
- if self.error_message.is_none() {
- self.error_message.set_default();
- }
- self.error_message.as_mut().unwrap()
- }
- // Take field
- pub fn take_error_message(&mut self) -> ::std::string::String {
- self.error_message.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // repeated .Capability capabilities = 17;
- pub fn get_capabilities(&self) -> &[Capability] {
- &self.capabilities
- }
- pub fn clear_capabilities(&mut self) {
- self.capabilities.clear();
- }
- // Param is passed by value, moved
- pub fn set_capabilities(&mut self, v: ::protobuf::RepeatedField<Capability>) {
- self.capabilities = v;
- }
- // Mutable pointer to the field.
- pub fn mut_capabilities(&mut self) -> &mut ::protobuf::RepeatedField<Capability> {
- &mut self.capabilities
- }
- // Take field
- pub fn take_capabilities(&mut self) -> ::protobuf::RepeatedField<Capability> {
- ::std::mem::replace(&mut self.capabilities, ::protobuf::RepeatedField::new())
- }
- // optional string context_player_error = 20;
- pub fn get_context_player_error(&self) -> &str {
- match self.context_player_error.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_context_player_error(&mut self) {
- self.context_player_error.clear();
- }
- pub fn has_context_player_error(&self) -> bool {
- self.context_player_error.is_some()
- }
- // Param is passed by value, moved
- pub fn set_context_player_error(&mut self, v: ::std::string::String) {
- self.context_player_error = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_context_player_error(&mut self) -> &mut ::std::string::String {
- if self.context_player_error.is_none() {
- self.context_player_error.set_default();
- }
- self.context_player_error.as_mut().unwrap()
- }
- // Take field
- pub fn take_context_player_error(&mut self) -> ::std::string::String {
- self.context_player_error.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // repeated .Metadata metadata = 25;
- pub fn get_metadata(&self) -> &[Metadata] {
- &self.metadata
- }
- pub fn clear_metadata(&mut self) {
- self.metadata.clear();
- }
- // Param is passed by value, moved
- pub fn set_metadata(&mut self, v: ::protobuf::RepeatedField<Metadata>) {
- self.metadata = v;
- }
- // Mutable pointer to the field.
- pub fn mut_metadata(&mut self) -> &mut ::protobuf::RepeatedField<Metadata> {
- &mut self.metadata
- }
- // Take field
- pub fn take_metadata(&mut self) -> ::protobuf::RepeatedField<Metadata> {
- ::std::mem::replace(&mut self.metadata, ::protobuf::RepeatedField::new())
- }
- }
- impl ::protobuf::Message for DeviceState {
- fn is_initialized(&self) -> bool {
- for v in &self.capabilities {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.metadata {
- if !v.is_initialized() {
- return false;
- }
- };
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.sw_version)?;
- },
- 10 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_bool()?;
- self.is_active = ::std::option::Option::Some(tmp);
- },
- 11 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_bool()?;
- self.can_play = ::std::option::Option::Some(tmp);
- },
- 12 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.volume = ::std::option::Option::Some(tmp);
- },
- 13 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
- },
- 14 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.error_code = ::std::option::Option::Some(tmp);
- },
- 15 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_int64()?;
- self.became_active_at = ::std::option::Option::Some(tmp);
- },
- 16 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.error_message)?;
- },
- 17 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.capabilities)?;
- },
- 20 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_player_error)?;
- },
- 25 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metadata)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(ref v) = self.sw_version.as_ref() {
- my_size += ::protobuf::rt::string_size(1, &v);
- }
- if let Some(v) = self.is_active {
- my_size += 2;
- }
- if let Some(v) = self.can_play {
- my_size += 2;
- }
- if let Some(v) = self.volume {
- my_size += ::protobuf::rt::value_size(12, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(ref v) = self.name.as_ref() {
- my_size += ::protobuf::rt::string_size(13, &v);
- }
- if let Some(v) = self.error_code {
- my_size += ::protobuf::rt::value_size(14, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.became_active_at {
- my_size += ::protobuf::rt::value_size(15, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(ref v) = self.error_message.as_ref() {
- my_size += ::protobuf::rt::string_size(16, &v);
- }
- for value in &self.capabilities {
- let len = value.compute_size();
- my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- if let Some(ref v) = self.context_player_error.as_ref() {
- my_size += ::protobuf::rt::string_size(20, &v);
- }
- for value in &self.metadata {
- let len = value.compute_size();
- my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(ref v) = self.sw_version.as_ref() {
- os.write_string(1, &v)?;
- }
- if let Some(v) = self.is_active {
- os.write_bool(10, v)?;
- }
- if let Some(v) = self.can_play {
- os.write_bool(11, v)?;
- }
- if let Some(v) = self.volume {
- os.write_uint32(12, v)?;
- }
- if let Some(ref v) = self.name.as_ref() {
- os.write_string(13, &v)?;
- }
- if let Some(v) = self.error_code {
- os.write_uint32(14, v)?;
- }
- if let Some(v) = self.became_active_at {
- os.write_int64(15, v)?;
- }
- if let Some(ref v) = self.error_message.as_ref() {
- os.write_string(16, &v)?;
- }
- for v in &self.capabilities {
- os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- };
- if let Some(ref v) = self.context_player_error.as_ref() {
- os.write_string(20, &v)?;
- }
- for v in &self.metadata {
- os.write_tag(25, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- };
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> DeviceState {
- DeviceState::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "sw_version",
- |m: &DeviceState| { &m.sw_version },
- |m: &mut DeviceState| { &mut m.sw_version },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "is_active",
- |m: &DeviceState| { &m.is_active },
- |m: &mut DeviceState| { &mut m.is_active },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "can_play",
- |m: &DeviceState| { &m.can_play },
- |m: &mut DeviceState| { &mut m.can_play },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "volume",
- |m: &DeviceState| { &m.volume },
- |m: &mut DeviceState| { &mut m.volume },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "name",
- |m: &DeviceState| { &m.name },
- |m: &mut DeviceState| { &mut m.name },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "error_code",
- |m: &DeviceState| { &m.error_code },
- |m: &mut DeviceState| { &mut m.error_code },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "became_active_at",
- |m: &DeviceState| { &m.became_active_at },
- |m: &mut DeviceState| { &mut m.became_active_at },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "error_message",
- |m: &DeviceState| { &m.error_message },
- |m: &mut DeviceState| { &mut m.error_message },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Capability>>(
- "capabilities",
- |m: &DeviceState| { &m.capabilities },
- |m: &mut DeviceState| { &mut m.capabilities },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "context_player_error",
- |m: &DeviceState| { &m.context_player_error },
- |m: &mut DeviceState| { &mut m.context_player_error },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Metadata>>(
- "metadata",
- |m: &DeviceState| { &m.metadata },
- |m: &mut DeviceState| { &mut m.metadata },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<DeviceState>(
- "DeviceState",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static DeviceState {
- static mut instance: ::protobuf::lazy::Lazy<DeviceState> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const DeviceState,
- };
- unsafe {
- instance.get(DeviceState::new)
- }
- }
- }
- impl ::protobuf::Clear for DeviceState {
- fn clear(&mut self) {
- self.sw_version.clear();
- self.is_active = ::std::option::Option::None;
- self.can_play = ::std::option::Option::None;
- self.volume = ::std::option::Option::None;
- self.name.clear();
- self.error_code = ::std::option::Option::None;
- self.became_active_at = ::std::option::Option::None;
- self.error_message.clear();
- self.capabilities.clear();
- self.context_player_error.clear();
- self.metadata.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for DeviceState {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for DeviceState {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct Capability {
- // message fields
- typ: ::std::option::Option<CapabilityType>,
- intValue: ::std::vec::Vec<i64>,
- stringValue: ::protobuf::RepeatedField<::std::string::String>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a Capability {
- fn default() -> &'a Capability {
- <Capability as ::protobuf::Message>::default_instance()
- }
- }
- impl Capability {
- pub fn new() -> Capability {
- ::std::default::Default::default()
- }
- // optional .CapabilityType typ = 1;
- pub fn get_typ(&self) -> CapabilityType {
- self.typ.unwrap_or(CapabilityType::kSupportedContexts)
- }
- pub fn clear_typ(&mut self) {
- self.typ = ::std::option::Option::None;
- }
- pub fn has_typ(&self) -> bool {
- self.typ.is_some()
- }
- // Param is passed by value, moved
- pub fn set_typ(&mut self, v: CapabilityType) {
- self.typ = ::std::option::Option::Some(v);
- }
- // repeated int64 intValue = 2;
- pub fn get_intValue(&self) -> &[i64] {
- &self.intValue
- }
- pub fn clear_intValue(&mut self) {
- self.intValue.clear();
- }
- // Param is passed by value, moved
- pub fn set_intValue(&mut self, v: ::std::vec::Vec<i64>) {
- self.intValue = v;
- }
- // Mutable pointer to the field.
- pub fn mut_intValue(&mut self) -> &mut ::std::vec::Vec<i64> {
- &mut self.intValue
- }
- // Take field
- pub fn take_intValue(&mut self) -> ::std::vec::Vec<i64> {
- ::std::mem::replace(&mut self.intValue, ::std::vec::Vec::new())
- }
- // repeated string stringValue = 3;
- pub fn get_stringValue(&self) -> &[::std::string::String] {
- &self.stringValue
- }
- pub fn clear_stringValue(&mut self) {
- self.stringValue.clear();
- }
- // Param is passed by value, moved
- pub fn set_stringValue(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
- self.stringValue = v;
- }
- // Mutable pointer to the field.
- pub fn mut_stringValue(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
- &mut self.stringValue
- }
- // Take field
- pub fn take_stringValue(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
- ::std::mem::replace(&mut self.stringValue, ::protobuf::RepeatedField::new())
- }
- }
- impl ::protobuf::Message for Capability {
- fn is_initialized(&self) -> bool {
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 1, &mut self.unknown_fields)?
- },
- 2 => {
- ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.intValue)?;
- },
- 3 => {
- ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.stringValue)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(v) = self.typ {
- my_size += ::protobuf::rt::enum_size(1, v);
- }
- for value in &self.intValue {
- my_size += ::protobuf::rt::value_size(2, *value, ::protobuf::wire_format::WireTypeVarint);
- };
- for value in &self.stringValue {
- my_size += ::protobuf::rt::string_size(3, &value);
- };
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(v) = self.typ {
- os.write_enum(1, v.value())?;
- }
- for v in &self.intValue {
- os.write_int64(2, *v)?;
- };
- for v in &self.stringValue {
- os.write_string(3, &v)?;
- };
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> Capability {
- Capability::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<CapabilityType>>(
- "typ",
- |m: &Capability| { &m.typ },
- |m: &mut Capability| { &mut m.typ },
- ));
- fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
- "intValue",
- |m: &Capability| { &m.intValue },
- |m: &mut Capability| { &mut m.intValue },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "stringValue",
- |m: &Capability| { &m.stringValue },
- |m: &mut Capability| { &mut m.stringValue },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<Capability>(
- "Capability",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static Capability {
- static mut instance: ::protobuf::lazy::Lazy<Capability> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const Capability,
- };
- unsafe {
- instance.get(Capability::new)
- }
- }
- }
- impl ::protobuf::Clear for Capability {
- fn clear(&mut self) {
- self.typ = ::std::option::Option::None;
- self.intValue.clear();
- self.stringValue.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for Capability {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for Capability {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct Goodbye {
- // message fields
- reason: ::protobuf::SingularField<::std::string::String>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a Goodbye {
- fn default() -> &'a Goodbye {
- <Goodbye as ::protobuf::Message>::default_instance()
- }
- }
- impl Goodbye {
- pub fn new() -> Goodbye {
- ::std::default::Default::default()
- }
- // optional string reason = 1;
- pub fn get_reason(&self) -> &str {
- match self.reason.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_reason(&mut self) {
- self.reason.clear();
- }
- pub fn has_reason(&self) -> bool {
- self.reason.is_some()
- }
- // Param is passed by value, moved
- pub fn set_reason(&mut self, v: ::std::string::String) {
- self.reason = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_reason(&mut self) -> &mut ::std::string::String {
- if self.reason.is_none() {
- self.reason.set_default();
- }
- self.reason.as_mut().unwrap()
- }
- // Take field
- pub fn take_reason(&mut self) -> ::std::string::String {
- self.reason.take().unwrap_or_else(|| ::std::string::String::new())
- }
- }
- impl ::protobuf::Message for Goodbye {
- fn is_initialized(&self) -> bool {
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.reason)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(ref v) = self.reason.as_ref() {
- my_size += ::protobuf::rt::string_size(1, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(ref v) = self.reason.as_ref() {
- os.write_string(1, &v)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> Goodbye {
- Goodbye::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "reason",
- |m: &Goodbye| { &m.reason },
- |m: &mut Goodbye| { &mut m.reason },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<Goodbye>(
- "Goodbye",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static Goodbye {
- static mut instance: ::protobuf::lazy::Lazy<Goodbye> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const Goodbye,
- };
- unsafe {
- instance.get(Goodbye::new)
- }
- }
- }
- impl ::protobuf::Clear for Goodbye {
- fn clear(&mut self) {
- self.reason.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for Goodbye {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for Goodbye {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct State {
- // message fields
- context_uri: ::protobuf::SingularField<::std::string::String>,
- index: ::std::option::Option<u32>,
- position_ms: ::std::option::Option<u32>,
- status: ::std::option::Option<PlayStatus>,
- position_measured_at: ::std::option::Option<u64>,
- context_description: ::protobuf::SingularField<::std::string::String>,
- shuffle: ::std::option::Option<bool>,
- repeat: ::std::option::Option<bool>,
- last_command_ident: ::protobuf::SingularField<::std::string::String>,
- last_command_msgid: ::std::option::Option<u32>,
- playing_from_fallback: ::std::option::Option<bool>,
- row: ::std::option::Option<u32>,
- playing_track_index: ::std::option::Option<u32>,
- track: ::protobuf::RepeatedField<TrackRef>,
- ad: ::protobuf::SingularPtrField<Ad>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a State {
- fn default() -> &'a State {
- <State as ::protobuf::Message>::default_instance()
- }
- }
- impl State {
- pub fn new() -> State {
- ::std::default::Default::default()
- }
- // optional string context_uri = 2;
- pub fn get_context_uri(&self) -> &str {
- match self.context_uri.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_context_uri(&mut self) {
- self.context_uri.clear();
- }
- pub fn has_context_uri(&self) -> bool {
- self.context_uri.is_some()
- }
- // Param is passed by value, moved
- pub fn set_context_uri(&mut self, v: ::std::string::String) {
- self.context_uri = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_context_uri(&mut self) -> &mut ::std::string::String {
- if self.context_uri.is_none() {
- self.context_uri.set_default();
- }
- self.context_uri.as_mut().unwrap()
- }
- // Take field
- pub fn take_context_uri(&mut self) -> ::std::string::String {
- self.context_uri.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional uint32 index = 3;
- pub fn get_index(&self) -> u32 {
- self.index.unwrap_or(0)
- }
- pub fn clear_index(&mut self) {
- self.index = ::std::option::Option::None;
- }
- pub fn has_index(&self) -> bool {
- self.index.is_some()
- }
- // Param is passed by value, moved
- pub fn set_index(&mut self, v: u32) {
- self.index = ::std::option::Option::Some(v);
- }
- // optional uint32 position_ms = 4;
- pub fn get_position_ms(&self) -> u32 {
- self.position_ms.unwrap_or(0)
- }
- pub fn clear_position_ms(&mut self) {
- self.position_ms = ::std::option::Option::None;
- }
- pub fn has_position_ms(&self) -> bool {
- self.position_ms.is_some()
- }
- // Param is passed by value, moved
- pub fn set_position_ms(&mut self, v: u32) {
- self.position_ms = ::std::option::Option::Some(v);
- }
- // optional .PlayStatus status = 5;
- pub fn get_status(&self) -> PlayStatus {
- self.status.unwrap_or(PlayStatus::kPlayStatusStop)
- }
- pub fn clear_status(&mut self) {
- self.status = ::std::option::Option::None;
- }
- pub fn has_status(&self) -> bool {
- self.status.is_some()
- }
- // Param is passed by value, moved
- pub fn set_status(&mut self, v: PlayStatus) {
- self.status = ::std::option::Option::Some(v);
- }
- // optional uint64 position_measured_at = 7;
- pub fn get_position_measured_at(&self) -> u64 {
- self.position_measured_at.unwrap_or(0)
- }
- pub fn clear_position_measured_at(&mut self) {
- self.position_measured_at = ::std::option::Option::None;
- }
- pub fn has_position_measured_at(&self) -> bool {
- self.position_measured_at.is_some()
- }
- // Param is passed by value, moved
- pub fn set_position_measured_at(&mut self, v: u64) {
- self.position_measured_at = ::std::option::Option::Some(v);
- }
- // optional string context_description = 8;
- pub fn get_context_description(&self) -> &str {
- match self.context_description.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_context_description(&mut self) {
- self.context_description.clear();
- }
- pub fn has_context_description(&self) -> bool {
- self.context_description.is_some()
- }
- // Param is passed by value, moved
- pub fn set_context_description(&mut self, v: ::std::string::String) {
- self.context_description = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_context_description(&mut self) -> &mut ::std::string::String {
- if self.context_description.is_none() {
- self.context_description.set_default();
- }
- self.context_description.as_mut().unwrap()
- }
- // Take field
- pub fn take_context_description(&mut self) -> ::std::string::String {
- self.context_description.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional bool shuffle = 13;
- pub fn get_shuffle(&self) -> bool {
- self.shuffle.unwrap_or(false)
- }
- pub fn clear_shuffle(&mut self) {
- self.shuffle = ::std::option::Option::None;
- }
- pub fn has_shuffle(&self) -> bool {
- self.shuffle.is_some()
- }
- // Param is passed by value, moved
- pub fn set_shuffle(&mut self, v: bool) {
- self.shuffle = ::std::option::Option::Some(v);
- }
- // optional bool repeat = 14;
- pub fn get_repeat(&self) -> bool {
- self.repeat.unwrap_or(false)
- }
- pub fn clear_repeat(&mut self) {
- self.repeat = ::std::option::Option::None;
- }
- pub fn has_repeat(&self) -> bool {
- self.repeat.is_some()
- }
- // Param is passed by value, moved
- pub fn set_repeat(&mut self, v: bool) {
- self.repeat = ::std::option::Option::Some(v);
- }
- // optional string last_command_ident = 20;
- pub fn get_last_command_ident(&self) -> &str {
- match self.last_command_ident.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_last_command_ident(&mut self) {
- self.last_command_ident.clear();
- }
- pub fn has_last_command_ident(&self) -> bool {
- self.last_command_ident.is_some()
- }
- // Param is passed by value, moved
- pub fn set_last_command_ident(&mut self, v: ::std::string::String) {
- self.last_command_ident = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_last_command_ident(&mut self) -> &mut ::std::string::String {
- if self.last_command_ident.is_none() {
- self.last_command_ident.set_default();
- }
- self.last_command_ident.as_mut().unwrap()
- }
- // Take field
- pub fn take_last_command_ident(&mut self) -> ::std::string::String {
- self.last_command_ident.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional uint32 last_command_msgid = 21;
- pub fn get_last_command_msgid(&self) -> u32 {
- self.last_command_msgid.unwrap_or(0)
- }
- pub fn clear_last_command_msgid(&mut self) {
- self.last_command_msgid = ::std::option::Option::None;
- }
- pub fn has_last_command_msgid(&self) -> bool {
- self.last_command_msgid.is_some()
- }
- // Param is passed by value, moved
- pub fn set_last_command_msgid(&mut self, v: u32) {
- self.last_command_msgid = ::std::option::Option::Some(v);
- }
- // optional bool playing_from_fallback = 24;
- pub fn get_playing_from_fallback(&self) -> bool {
- self.playing_from_fallback.unwrap_or(false)
- }
- pub fn clear_playing_from_fallback(&mut self) {
- self.playing_from_fallback = ::std::option::Option::None;
- }
- pub fn has_playing_from_fallback(&self) -> bool {
- self.playing_from_fallback.is_some()
- }
- // Param is passed by value, moved
- pub fn set_playing_from_fallback(&mut self, v: bool) {
- self.playing_from_fallback = ::std::option::Option::Some(v);
- }
- // optional uint32 row = 25;
- pub fn get_row(&self) -> u32 {
- self.row.unwrap_or(0)
- }
- pub fn clear_row(&mut self) {
- self.row = ::std::option::Option::None;
- }
- pub fn has_row(&self) -> bool {
- self.row.is_some()
- }
- // Param is passed by value, moved
- pub fn set_row(&mut self, v: u32) {
- self.row = ::std::option::Option::Some(v);
- }
- // optional uint32 playing_track_index = 26;
- pub fn get_playing_track_index(&self) -> u32 {
- self.playing_track_index.unwrap_or(0)
- }
- pub fn clear_playing_track_index(&mut self) {
- self.playing_track_index = ::std::option::Option::None;
- }
- pub fn has_playing_track_index(&self) -> bool {
- self.playing_track_index.is_some()
- }
- // Param is passed by value, moved
- pub fn set_playing_track_index(&mut self, v: u32) {
- self.playing_track_index = ::std::option::Option::Some(v);
- }
- // repeated .TrackRef track = 27;
- pub fn get_track(&self) -> &[TrackRef] {
- &self.track
- }
- pub fn clear_track(&mut self) {
- self.track.clear();
- }
- // Param is passed by value, moved
- pub fn set_track(&mut self, v: ::protobuf::RepeatedField<TrackRef>) {
- self.track = v;
- }
- // Mutable pointer to the field.
- pub fn mut_track(&mut self) -> &mut ::protobuf::RepeatedField<TrackRef> {
- &mut self.track
- }
- // Take field
- pub fn take_track(&mut self) -> ::protobuf::RepeatedField<TrackRef> {
- ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new())
- }
- // optional .Ad ad = 28;
- pub fn get_ad(&self) -> &Ad {
- self.ad.as_ref().unwrap_or_else(|| Ad::default_instance())
- }
- pub fn clear_ad(&mut self) {
- self.ad.clear();
- }
- pub fn has_ad(&self) -> bool {
- self.ad.is_some()
- }
- // Param is passed by value, moved
- pub fn set_ad(&mut self, v: Ad) {
- self.ad = ::protobuf::SingularPtrField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_ad(&mut self) -> &mut Ad {
- if self.ad.is_none() {
- self.ad.set_default();
- }
- self.ad.as_mut().unwrap()
- }
- // Take field
- pub fn take_ad(&mut self) -> Ad {
- self.ad.take().unwrap_or_else(|| Ad::new())
- }
- }
- impl ::protobuf::Message for State {
- fn is_initialized(&self) -> bool {
- for v in &self.track {
- if !v.is_initialized() {
- return false;
- }
- };
- for v in &self.ad {
- if !v.is_initialized() {
- return false;
- }
- };
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 2 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_uri)?;
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.index = ::std::option::Option::Some(tmp);
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.position_ms = ::std::option::Option::Some(tmp);
- },
- 5 => {
- ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 5, &mut self.unknown_fields)?
- },
- 7 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint64()?;
- self.position_measured_at = ::std::option::Option::Some(tmp);
- },
- 8 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context_description)?;
- },
- 13 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_bool()?;
- self.shuffle = ::std::option::Option::Some(tmp);
- },
- 14 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_bool()?;
- self.repeat = ::std::option::Option::Some(tmp);
- },
- 20 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.last_command_ident)?;
- },
- 21 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.last_command_msgid = ::std::option::Option::Some(tmp);
- },
- 24 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_bool()?;
- self.playing_from_fallback = ::std::option::Option::Some(tmp);
- },
- 25 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.row = ::std::option::Option::Some(tmp);
- },
- 26 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_uint32()?;
- self.playing_track_index = ::std::option::Option::Some(tmp);
- },
- 27 => {
- ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?;
- },
- 28 => {
- ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ad)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(ref v) = self.context_uri.as_ref() {
- my_size += ::protobuf::rt::string_size(2, &v);
- }
- if let Some(v) = self.index {
- my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.position_ms {
- my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.status {
- my_size += ::protobuf::rt::enum_size(5, v);
- }
- if let Some(v) = self.position_measured_at {
- my_size += ::protobuf::rt::value_size(7, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(ref v) = self.context_description.as_ref() {
- my_size += ::protobuf::rt::string_size(8, &v);
- }
- if let Some(v) = self.shuffle {
- my_size += 2;
- }
- if let Some(v) = self.repeat {
- my_size += 2;
- }
- if let Some(ref v) = self.last_command_ident.as_ref() {
- my_size += ::protobuf::rt::string_size(20, &v);
- }
- if let Some(v) = self.last_command_msgid {
- my_size += ::protobuf::rt::value_size(21, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.playing_from_fallback {
- my_size += 3;
- }
- if let Some(v) = self.row {
- my_size += ::protobuf::rt::value_size(25, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(v) = self.playing_track_index {
- my_size += ::protobuf::rt::value_size(26, v, ::protobuf::wire_format::WireTypeVarint);
- }
- for value in &self.track {
- let len = value.compute_size();
- my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- };
- if let Some(ref v) = self.ad.as_ref() {
- let len = v.compute_size();
- my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(ref v) = self.context_uri.as_ref() {
- os.write_string(2, &v)?;
- }
- if let Some(v) = self.index {
- os.write_uint32(3, v)?;
- }
- if let Some(v) = self.position_ms {
- os.write_uint32(4, v)?;
- }
- if let Some(v) = self.status {
- os.write_enum(5, v.value())?;
- }
- if let Some(v) = self.position_measured_at {
- os.write_uint64(7, v)?;
- }
- if let Some(ref v) = self.context_description.as_ref() {
- os.write_string(8, &v)?;
- }
- if let Some(v) = self.shuffle {
- os.write_bool(13, v)?;
- }
- if let Some(v) = self.repeat {
- os.write_bool(14, v)?;
- }
- if let Some(ref v) = self.last_command_ident.as_ref() {
- os.write_string(20, &v)?;
- }
- if let Some(v) = self.last_command_msgid {
- os.write_uint32(21, v)?;
- }
- if let Some(v) = self.playing_from_fallback {
- os.write_bool(24, v)?;
- }
- if let Some(v) = self.row {
- os.write_uint32(25, v)?;
- }
- if let Some(v) = self.playing_track_index {
- os.write_uint32(26, v)?;
- }
- for v in &self.track {
- os.write_tag(27, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- };
- if let Some(ref v) = self.ad.as_ref() {
- os.write_tag(28, ::protobuf::wire_format::WireTypeLengthDelimited)?;
- os.write_raw_varint32(v.get_cached_size())?;
- v.write_to_with_cached_sizes(os)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> State {
- State::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "context_uri",
- |m: &State| { &m.context_uri },
- |m: &mut State| { &mut m.context_uri },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "index",
- |m: &State| { &m.index },
- |m: &mut State| { &mut m.index },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "position_ms",
- |m: &State| { &m.position_ms },
- |m: &mut State| { &mut m.position_ms },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<PlayStatus>>(
- "status",
- |m: &State| { &m.status },
- |m: &mut State| { &mut m.status },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
- "position_measured_at",
- |m: &State| { &m.position_measured_at },
- |m: &mut State| { &mut m.position_measured_at },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "context_description",
- |m: &State| { &m.context_description },
- |m: &mut State| { &mut m.context_description },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "shuffle",
- |m: &State| { &m.shuffle },
- |m: &mut State| { &mut m.shuffle },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "repeat",
- |m: &State| { &m.repeat },
- |m: &mut State| { &mut m.repeat },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "last_command_ident",
- |m: &State| { &m.last_command_ident },
- |m: &mut State| { &mut m.last_command_ident },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "last_command_msgid",
- |m: &State| { &m.last_command_msgid },
- |m: &mut State| { &mut m.last_command_msgid },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "playing_from_fallback",
- |m: &State| { &m.playing_from_fallback },
- |m: &mut State| { &mut m.playing_from_fallback },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "row",
- |m: &State| { &m.row },
- |m: &mut State| { &mut m.row },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
- "playing_track_index",
- |m: &State| { &m.playing_track_index },
- |m: &mut State| { &mut m.playing_track_index },
- ));
- fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TrackRef>>(
- "track",
- |m: &State| { &m.track },
- |m: &mut State| { &mut m.track },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Ad>>(
- "ad",
- |m: &State| { &m.ad },
- |m: &mut State| { &mut m.ad },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<State>(
- "State",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static State {
- static mut instance: ::protobuf::lazy::Lazy<State> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const State,
- };
- unsafe {
- instance.get(State::new)
- }
- }
- }
- impl ::protobuf::Clear for State {
- fn clear(&mut self) {
- self.context_uri.clear();
- self.index = ::std::option::Option::None;
- self.position_ms = ::std::option::Option::None;
- self.status = ::std::option::Option::None;
- self.position_measured_at = ::std::option::Option::None;
- self.context_description.clear();
- self.shuffle = ::std::option::Option::None;
- self.repeat = ::std::option::Option::None;
- self.last_command_ident.clear();
- self.last_command_msgid = ::std::option::Option::None;
- self.playing_from_fallback = ::std::option::Option::None;
- self.row = ::std::option::Option::None;
- self.playing_track_index = ::std::option::Option::None;
- self.track.clear();
- self.ad.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for State {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for State {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct TrackRef {
- // message fields
- gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
- uri: ::protobuf::SingularField<::std::string::String>,
- queued: ::std::option::Option<bool>,
- context: ::protobuf::SingularField<::std::string::String>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a TrackRef {
- fn default() -> &'a TrackRef {
- <TrackRef as ::protobuf::Message>::default_instance()
- }
- }
- impl TrackRef {
- pub fn new() -> TrackRef {
- ::std::default::Default::default()
- }
- // optional bytes gid = 1;
- pub fn get_gid(&self) -> &[u8] {
- match self.gid.as_ref() {
- Some(v) => &v,
- None => &[],
- }
- }
- pub fn clear_gid(&mut self) {
- self.gid.clear();
- }
- pub fn has_gid(&self) -> bool {
- self.gid.is_some()
- }
- // Param is passed by value, moved
- pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
- self.gid = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
- if self.gid.is_none() {
- self.gid.set_default();
- }
- self.gid.as_mut().unwrap()
- }
- // Take field
- pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
- self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
- }
- // optional string uri = 2;
- pub fn get_uri(&self) -> &str {
- match self.uri.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_uri(&mut self) {
- self.uri.clear();
- }
- pub fn has_uri(&self) -> bool {
- self.uri.is_some()
- }
- // Param is passed by value, moved
- pub fn set_uri(&mut self, v: ::std::string::String) {
- self.uri = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_uri(&mut self) -> &mut ::std::string::String {
- if self.uri.is_none() {
- self.uri.set_default();
- }
- self.uri.as_mut().unwrap()
- }
- // Take field
- pub fn take_uri(&mut self) -> ::std::string::String {
- self.uri.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional bool queued = 3;
- pub fn get_queued(&self) -> bool {
- self.queued.unwrap_or(false)
- }
- pub fn clear_queued(&mut self) {
- self.queued = ::std::option::Option::None;
- }
- pub fn has_queued(&self) -> bool {
- self.queued.is_some()
- }
- // Param is passed by value, moved
- pub fn set_queued(&mut self, v: bool) {
- self.queued = ::std::option::Option::Some(v);
- }
- // optional string context = 4;
- pub fn get_context(&self) -> &str {
- match self.context.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_context(&mut self) {
- self.context.clear();
- }
- pub fn has_context(&self) -> bool {
- self.context.is_some()
- }
- // Param is passed by value, moved
- pub fn set_context(&mut self, v: ::std::string::String) {
- self.context = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_context(&mut self) -> &mut ::std::string::String {
- if self.context.is_none() {
- self.context.set_default();
- }
- self.context.as_mut().unwrap()
- }
- // Take field
- pub fn take_context(&mut self) -> ::std::string::String {
- self.context.take().unwrap_or_else(|| ::std::string::String::new())
- }
- }
- impl ::protobuf::Message for TrackRef {
- fn is_initialized(&self) -> bool {
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.uri)?;
- },
- 3 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_bool()?;
- self.queued = ::std::option::Option::Some(tmp);
- },
- 4 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.context)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(ref v) = self.gid.as_ref() {
- my_size += ::protobuf::rt::bytes_size(1, &v);
- }
- if let Some(ref v) = self.uri.as_ref() {
- my_size += ::protobuf::rt::string_size(2, &v);
- }
- if let Some(v) = self.queued {
- my_size += 2;
- }
- if let Some(ref v) = self.context.as_ref() {
- my_size += ::protobuf::rt::string_size(4, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(ref v) = self.gid.as_ref() {
- os.write_bytes(1, &v)?;
- }
- if let Some(ref v) = self.uri.as_ref() {
- os.write_string(2, &v)?;
- }
- if let Some(v) = self.queued {
- os.write_bool(3, v)?;
- }
- if let Some(ref v) = self.context.as_ref() {
- os.write_string(4, &v)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> TrackRef {
- TrackRef::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "gid",
- |m: &TrackRef| { &m.gid },
- |m: &mut TrackRef| { &mut m.gid },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "uri",
- |m: &TrackRef| { &m.uri },
- |m: &mut TrackRef| { &mut m.uri },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
- "queued",
- |m: &TrackRef| { &m.queued },
- |m: &mut TrackRef| { &mut m.queued },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "context",
- |m: &TrackRef| { &m.context },
- |m: &mut TrackRef| { &mut m.context },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<TrackRef>(
- "TrackRef",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static TrackRef {
- static mut instance: ::protobuf::lazy::Lazy<TrackRef> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const TrackRef,
- };
- unsafe {
- instance.get(TrackRef::new)
- }
- }
- }
- impl ::protobuf::Clear for TrackRef {
- fn clear(&mut self) {
- self.gid.clear();
- self.uri.clear();
- self.queued = ::std::option::Option::None;
- self.context.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for TrackRef {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for TrackRef {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct Ad {
- // message fields
- next: ::std::option::Option<i32>,
- ogg_fid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
- image_fid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
- duration: ::std::option::Option<i32>,
- click_url: ::protobuf::SingularField<::std::string::String>,
- impression_url: ::protobuf::SingularField<::std::string::String>,
- product: ::protobuf::SingularField<::std::string::String>,
- advertiser: ::protobuf::SingularField<::std::string::String>,
- gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a Ad {
- fn default() -> &'a Ad {
- <Ad as ::protobuf::Message>::default_instance()
- }
- }
- impl Ad {
- pub fn new() -> Ad {
- ::std::default::Default::default()
- }
- // optional int32 next = 1;
- pub fn get_next(&self) -> i32 {
- self.next.unwrap_or(0)
- }
- pub fn clear_next(&mut self) {
- self.next = ::std::option::Option::None;
- }
- pub fn has_next(&self) -> bool {
- self.next.is_some()
- }
- // Param is passed by value, moved
- pub fn set_next(&mut self, v: i32) {
- self.next = ::std::option::Option::Some(v);
- }
- // optional bytes ogg_fid = 2;
- pub fn get_ogg_fid(&self) -> &[u8] {
- match self.ogg_fid.as_ref() {
- Some(v) => &v,
- None => &[],
- }
- }
- pub fn clear_ogg_fid(&mut self) {
- self.ogg_fid.clear();
- }
- pub fn has_ogg_fid(&self) -> bool {
- self.ogg_fid.is_some()
- }
- // Param is passed by value, moved
- pub fn set_ogg_fid(&mut self, v: ::std::vec::Vec<u8>) {
- self.ogg_fid = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_ogg_fid(&mut self) -> &mut ::std::vec::Vec<u8> {
- if self.ogg_fid.is_none() {
- self.ogg_fid.set_default();
- }
- self.ogg_fid.as_mut().unwrap()
- }
- // Take field
- pub fn take_ogg_fid(&mut self) -> ::std::vec::Vec<u8> {
- self.ogg_fid.take().unwrap_or_else(|| ::std::vec::Vec::new())
- }
- // optional bytes image_fid = 3;
- pub fn get_image_fid(&self) -> &[u8] {
- match self.image_fid.as_ref() {
- Some(v) => &v,
- None => &[],
- }
- }
- pub fn clear_image_fid(&mut self) {
- self.image_fid.clear();
- }
- pub fn has_image_fid(&self) -> bool {
- self.image_fid.is_some()
- }
- // Param is passed by value, moved
- pub fn set_image_fid(&mut self, v: ::std::vec::Vec<u8>) {
- self.image_fid = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_image_fid(&mut self) -> &mut ::std::vec::Vec<u8> {
- if self.image_fid.is_none() {
- self.image_fid.set_default();
- }
- self.image_fid.as_mut().unwrap()
- }
- // Take field
- pub fn take_image_fid(&mut self) -> ::std::vec::Vec<u8> {
- self.image_fid.take().unwrap_or_else(|| ::std::vec::Vec::new())
- }
- // optional int32 duration = 4;
- pub fn get_duration(&self) -> i32 {
- self.duration.unwrap_or(0)
- }
- pub fn clear_duration(&mut self) {
- self.duration = ::std::option::Option::None;
- }
- pub fn has_duration(&self) -> bool {
- self.duration.is_some()
- }
- // Param is passed by value, moved
- pub fn set_duration(&mut self, v: i32) {
- self.duration = ::std::option::Option::Some(v);
- }
- // optional string click_url = 5;
- pub fn get_click_url(&self) -> &str {
- match self.click_url.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_click_url(&mut self) {
- self.click_url.clear();
- }
- pub fn has_click_url(&self) -> bool {
- self.click_url.is_some()
- }
- // Param is passed by value, moved
- pub fn set_click_url(&mut self, v: ::std::string::String) {
- self.click_url = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_click_url(&mut self) -> &mut ::std::string::String {
- if self.click_url.is_none() {
- self.click_url.set_default();
- }
- self.click_url.as_mut().unwrap()
- }
- // Take field
- pub fn take_click_url(&mut self) -> ::std::string::String {
- self.click_url.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional string impression_url = 6;
- pub fn get_impression_url(&self) -> &str {
- match self.impression_url.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_impression_url(&mut self) {
- self.impression_url.clear();
- }
- pub fn has_impression_url(&self) -> bool {
- self.impression_url.is_some()
- }
- // Param is passed by value, moved
- pub fn set_impression_url(&mut self, v: ::std::string::String) {
- self.impression_url = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_impression_url(&mut self) -> &mut ::std::string::String {
- if self.impression_url.is_none() {
- self.impression_url.set_default();
- }
- self.impression_url.as_mut().unwrap()
- }
- // Take field
- pub fn take_impression_url(&mut self) -> ::std::string::String {
- self.impression_url.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional string product = 7;
- pub fn get_product(&self) -> &str {
- match self.product.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_product(&mut self) {
- self.product.clear();
- }
- pub fn has_product(&self) -> bool {
- self.product.is_some()
- }
- // Param is passed by value, moved
- pub fn set_product(&mut self, v: ::std::string::String) {
- self.product = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_product(&mut self) -> &mut ::std::string::String {
- if self.product.is_none() {
- self.product.set_default();
- }
- self.product.as_mut().unwrap()
- }
- // Take field
- pub fn take_product(&mut self) -> ::std::string::String {
- self.product.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional string advertiser = 8;
- pub fn get_advertiser(&self) -> &str {
- match self.advertiser.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_advertiser(&mut self) {
- self.advertiser.clear();
- }
- pub fn has_advertiser(&self) -> bool {
- self.advertiser.is_some()
- }
- // Param is passed by value, moved
- pub fn set_advertiser(&mut self, v: ::std::string::String) {
- self.advertiser = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_advertiser(&mut self) -> &mut ::std::string::String {
- if self.advertiser.is_none() {
- self.advertiser.set_default();
- }
- self.advertiser.as_mut().unwrap()
- }
- // Take field
- pub fn take_advertiser(&mut self) -> ::std::string::String {
- self.advertiser.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional bytes gid = 9;
- pub fn get_gid(&self) -> &[u8] {
- match self.gid.as_ref() {
- Some(v) => &v,
- None => &[],
- }
- }
- pub fn clear_gid(&mut self) {
- self.gid.clear();
- }
- pub fn has_gid(&self) -> bool {
- self.gid.is_some()
- }
- // Param is passed by value, moved
- pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
- self.gid = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
- if self.gid.is_none() {
- self.gid.set_default();
- }
- self.gid.as_mut().unwrap()
- }
- // Take field
- pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
- self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
- }
- }
- impl ::protobuf::Message for Ad {
- fn is_initialized(&self) -> bool {
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_int32()?;
- self.next = ::std::option::Option::Some(tmp);
- },
- 2 => {
- ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.ogg_fid)?;
- },
- 3 => {
- ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.image_fid)?;
- },
- 4 => {
- if wire_type != ::protobuf::wire_format::WireTypeVarint {
- return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
- }
- let tmp = is.read_int32()?;
- self.duration = ::std::option::Option::Some(tmp);
- },
- 5 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.click_url)?;
- },
- 6 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.impression_url)?;
- },
- 7 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.product)?;
- },
- 8 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.advertiser)?;
- },
- 9 => {
- ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(v) = self.next {
- my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(ref v) = self.ogg_fid.as_ref() {
- my_size += ::protobuf::rt::bytes_size(2, &v);
- }
- if let Some(ref v) = self.image_fid.as_ref() {
- my_size += ::protobuf::rt::bytes_size(3, &v);
- }
- if let Some(v) = self.duration {
- my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
- }
- if let Some(ref v) = self.click_url.as_ref() {
- my_size += ::protobuf::rt::string_size(5, &v);
- }
- if let Some(ref v) = self.impression_url.as_ref() {
- my_size += ::protobuf::rt::string_size(6, &v);
- }
- if let Some(ref v) = self.product.as_ref() {
- my_size += ::protobuf::rt::string_size(7, &v);
- }
- if let Some(ref v) = self.advertiser.as_ref() {
- my_size += ::protobuf::rt::string_size(8, &v);
- }
- if let Some(ref v) = self.gid.as_ref() {
- my_size += ::protobuf::rt::bytes_size(9, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(v) = self.next {
- os.write_int32(1, v)?;
- }
- if let Some(ref v) = self.ogg_fid.as_ref() {
- os.write_bytes(2, &v)?;
- }
- if let Some(ref v) = self.image_fid.as_ref() {
- os.write_bytes(3, &v)?;
- }
- if let Some(v) = self.duration {
- os.write_int32(4, v)?;
- }
- if let Some(ref v) = self.click_url.as_ref() {
- os.write_string(5, &v)?;
- }
- if let Some(ref v) = self.impression_url.as_ref() {
- os.write_string(6, &v)?;
- }
- if let Some(ref v) = self.product.as_ref() {
- os.write_string(7, &v)?;
- }
- if let Some(ref v) = self.advertiser.as_ref() {
- os.write_string(8, &v)?;
- }
- if let Some(ref v) = self.gid.as_ref() {
- os.write_bytes(9, &v)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> Ad {
- Ad::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "next",
- |m: &Ad| { &m.next },
- |m: &mut Ad| { &mut m.next },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "ogg_fid",
- |m: &Ad| { &m.ogg_fid },
- |m: &mut Ad| { &mut m.ogg_fid },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "image_fid",
- |m: &Ad| { &m.image_fid },
- |m: &mut Ad| { &mut m.image_fid },
- ));
- fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
- "duration",
- |m: &Ad| { &m.duration },
- |m: &mut Ad| { &mut m.duration },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "click_url",
- |m: &Ad| { &m.click_url },
- |m: &mut Ad| { &mut m.click_url },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "impression_url",
- |m: &Ad| { &m.impression_url },
- |m: &mut Ad| { &mut m.impression_url },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "product",
- |m: &Ad| { &m.product },
- |m: &mut Ad| { &mut m.product },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "advertiser",
- |m: &Ad| { &m.advertiser },
- |m: &mut Ad| { &mut m.advertiser },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
- "gid",
- |m: &Ad| { &m.gid },
- |m: &mut Ad| { &mut m.gid },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<Ad>(
- "Ad",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static Ad {
- static mut instance: ::protobuf::lazy::Lazy<Ad> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const Ad,
- };
- unsafe {
- instance.get(Ad::new)
- }
- }
- }
- impl ::protobuf::Clear for Ad {
- fn clear(&mut self) {
- self.next = ::std::option::Option::None;
- self.ogg_fid.clear();
- self.image_fid.clear();
- self.duration = ::std::option::Option::None;
- self.click_url.clear();
- self.impression_url.clear();
- self.product.clear();
- self.advertiser.clear();
- self.gid.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for Ad {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for Ad {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(PartialEq,Clone,Default)]
- pub struct Metadata {
- // message fields
- field_type: ::protobuf::SingularField<::std::string::String>,
- metadata: ::protobuf::SingularField<::std::string::String>,
- // special fields
- pub unknown_fields: ::protobuf::UnknownFields,
- pub cached_size: ::protobuf::CachedSize,
- }
- impl<'a> ::std::default::Default for &'a Metadata {
- fn default() -> &'a Metadata {
- <Metadata as ::protobuf::Message>::default_instance()
- }
- }
- impl Metadata {
- pub fn new() -> Metadata {
- ::std::default::Default::default()
- }
- // optional string type = 1;
- pub fn get_field_type(&self) -> &str {
- match self.field_type.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_field_type(&mut self) {
- self.field_type.clear();
- }
- pub fn has_field_type(&self) -> bool {
- self.field_type.is_some()
- }
- // Param is passed by value, moved
- pub fn set_field_type(&mut self, v: ::std::string::String) {
- self.field_type = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_field_type(&mut self) -> &mut ::std::string::String {
- if self.field_type.is_none() {
- self.field_type.set_default();
- }
- self.field_type.as_mut().unwrap()
- }
- // Take field
- pub fn take_field_type(&mut self) -> ::std::string::String {
- self.field_type.take().unwrap_or_else(|| ::std::string::String::new())
- }
- // optional string metadata = 2;
- pub fn get_metadata(&self) -> &str {
- match self.metadata.as_ref() {
- Some(v) => &v,
- None => "",
- }
- }
- pub fn clear_metadata(&mut self) {
- self.metadata.clear();
- }
- pub fn has_metadata(&self) -> bool {
- self.metadata.is_some()
- }
- // Param is passed by value, moved
- pub fn set_metadata(&mut self, v: ::std::string::String) {
- self.metadata = ::protobuf::SingularField::some(v);
- }
- // Mutable pointer to the field.
- // If field is not initialized, it is initialized with default value first.
- pub fn mut_metadata(&mut self) -> &mut ::std::string::String {
- if self.metadata.is_none() {
- self.metadata.set_default();
- }
- self.metadata.as_mut().unwrap()
- }
- // Take field
- pub fn take_metadata(&mut self) -> ::std::string::String {
- self.metadata.take().unwrap_or_else(|| ::std::string::String::new())
- }
- }
- impl ::protobuf::Message for Metadata {
- fn is_initialized(&self) -> bool {
- true
- }
- fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- while !is.eof()? {
- let (field_number, wire_type) = is.read_tag_unpack()?;
- match field_number {
- 1 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.field_type)?;
- },
- 2 => {
- ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.metadata)?;
- },
- _ => {
- ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
- },
- };
- }
- ::std::result::Result::Ok(())
- }
- // Compute sizes of nested messages
- #[allow(unused_variables)]
- fn compute_size(&self) -> u32 {
- let mut my_size = 0;
- if let Some(ref v) = self.field_type.as_ref() {
- my_size += ::protobuf::rt::string_size(1, &v);
- }
- if let Some(ref v) = self.metadata.as_ref() {
- my_size += ::protobuf::rt::string_size(2, &v);
- }
- my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
- self.cached_size.set(my_size);
- my_size
- }
- fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
- if let Some(ref v) = self.field_type.as_ref() {
- os.write_string(1, &v)?;
- }
- if let Some(ref v) = self.metadata.as_ref() {
- os.write_string(2, &v)?;
- }
- os.write_unknown_fields(self.get_unknown_fields())?;
- ::std::result::Result::Ok(())
- }
- fn get_cached_size(&self) -> u32 {
- self.cached_size.get()
- }
- fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
- &self.unknown_fields
- }
- fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
- &mut self.unknown_fields
- }
- fn as_any(&self) -> &dyn (::std::any::Any) {
- self as &dyn (::std::any::Any)
- }
- fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
- self as &mut dyn (::std::any::Any)
- }
- fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
- self
- }
- fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
- Self::descriptor_static()
- }
- fn new() -> Metadata {
- Metadata::new()
- }
- fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- let mut fields = ::std::vec::Vec::new();
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "type",
- |m: &Metadata| { &m.field_type },
- |m: &mut Metadata| { &mut m.field_type },
- ));
- fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
- "metadata",
- |m: &Metadata| { &m.metadata },
- |m: &mut Metadata| { &mut m.metadata },
- ));
- ::protobuf::reflect::MessageDescriptor::new::<Metadata>(
- "Metadata",
- fields,
- file_descriptor_proto()
- )
- })
- }
- }
- fn default_instance() -> &'static Metadata {
- static mut instance: ::protobuf::lazy::Lazy<Metadata> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const Metadata,
- };
- unsafe {
- instance.get(Metadata::new)
- }
- }
- }
- impl ::protobuf::Clear for Metadata {
- fn clear(&mut self) {
- self.field_type.clear();
- self.metadata.clear();
- self.unknown_fields.clear();
- }
- }
- impl ::std::fmt::Debug for Metadata {
- fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
- ::protobuf::text_format::fmt(self, f)
- }
- }
- impl ::protobuf::reflect::ProtobufValue for Metadata {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Message(self)
- }
- }
- #[derive(Clone,PartialEq,Eq,Debug,Hash)]
- pub enum MessageType {
- kMessageTypeHello = 1,
- kMessageTypeGoodbye = 2,
- kMessageTypeProbe = 3,
- kMessageTypeNotify = 10,
- kMessageTypeLoad = 20,
- kMessageTypePlay = 21,
- kMessageTypePause = 22,
- kMessageTypePlayPause = 23,
- kMessageTypeSeek = 24,
- kMessageTypePrev = 25,
- kMessageTypeNext = 26,
- kMessageTypeVolume = 27,
- kMessageTypeShuffle = 28,
- kMessageTypeRepeat = 29,
- kMessageTypeVolumeDown = 31,
- kMessageTypeVolumeUp = 32,
- kMessageTypeReplace = 33,
- kMessageTypeLogout = 34,
- kMessageTypeAction = 35,
- kMessageTypeRename = 36,
- kMessageTypeUpdateMetadata = 128,
- }
- impl ::protobuf::ProtobufEnum for MessageType {
- fn value(&self) -> i32 {
- *self as i32
- }
- fn from_i32(value: i32) -> ::std::option::Option<MessageType> {
- match value {
- 1 => ::std::option::Option::Some(MessageType::kMessageTypeHello),
- 2 => ::std::option::Option::Some(MessageType::kMessageTypeGoodbye),
- 3 => ::std::option::Option::Some(MessageType::kMessageTypeProbe),
- 10 => ::std::option::Option::Some(MessageType::kMessageTypeNotify),
- 20 => ::std::option::Option::Some(MessageType::kMessageTypeLoad),
- 21 => ::std::option::Option::Some(MessageType::kMessageTypePlay),
- 22 => ::std::option::Option::Some(MessageType::kMessageTypePause),
- 23 => ::std::option::Option::Some(MessageType::kMessageTypePlayPause),
- 24 => ::std::option::Option::Some(MessageType::kMessageTypeSeek),
- 25 => ::std::option::Option::Some(MessageType::kMessageTypePrev),
- 26 => ::std::option::Option::Some(MessageType::kMessageTypeNext),
- 27 => ::std::option::Option::Some(MessageType::kMessageTypeVolume),
- 28 => ::std::option::Option::Some(MessageType::kMessageTypeShuffle),
- 29 => ::std::option::Option::Some(MessageType::kMessageTypeRepeat),
- 31 => ::std::option::Option::Some(MessageType::kMessageTypeVolumeDown),
- 32 => ::std::option::Option::Some(MessageType::kMessageTypeVolumeUp),
- 33 => ::std::option::Option::Some(MessageType::kMessageTypeReplace),
- 34 => ::std::option::Option::Some(MessageType::kMessageTypeLogout),
- 35 => ::std::option::Option::Some(MessageType::kMessageTypeAction),
- 36 => ::std::option::Option::Some(MessageType::kMessageTypeRename),
- 128 => ::std::option::Option::Some(MessageType::kMessageTypeUpdateMetadata),
- _ => ::std::option::Option::None
- }
- }
- fn values() -> &'static [Self] {
- static values: &'static [MessageType] = &[
- MessageType::kMessageTypeHello,
- MessageType::kMessageTypeGoodbye,
- MessageType::kMessageTypeProbe,
- MessageType::kMessageTypeNotify,
- MessageType::kMessageTypeLoad,
- MessageType::kMessageTypePlay,
- MessageType::kMessageTypePause,
- MessageType::kMessageTypePlayPause,
- MessageType::kMessageTypeSeek,
- MessageType::kMessageTypePrev,
- MessageType::kMessageTypeNext,
- MessageType::kMessageTypeVolume,
- MessageType::kMessageTypeShuffle,
- MessageType::kMessageTypeRepeat,
- MessageType::kMessageTypeVolumeDown,
- MessageType::kMessageTypeVolumeUp,
- MessageType::kMessageTypeReplace,
- MessageType::kMessageTypeLogout,
- MessageType::kMessageTypeAction,
- MessageType::kMessageTypeRename,
- MessageType::kMessageTypeUpdateMetadata,
- ];
- values
- }
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new("MessageType", file_descriptor_proto())
- })
- }
- }
- }
- impl ::std::marker::Copy for MessageType {
- }
- // Note, `Default` is implemented although default value is not 0
- impl ::std::default::Default for MessageType {
- fn default() -> Self {
- MessageType::kMessageTypeHello
- }
- }
- impl ::protobuf::reflect::ProtobufValue for MessageType {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
- }
- }
- #[derive(Clone,PartialEq,Eq,Debug,Hash)]
- pub enum CapabilityType {
- kSupportedContexts = 1,
- kCanBePlayer = 2,
- kRestrictToLocal = 3,
- kDeviceType = 4,
- kGaiaEqConnectId = 5,
- kSupportsLogout = 6,
- kIsObservable = 7,
- kVolumeSteps = 8,
- kSupportedTypes = 9,
- kCommandAcks = 10,
- kSupportsRename = 11,
- kHidden = 12,
- kSupportsPlaylistV2 = 13,
- kSupportsExternalEpisodes = 14,
- }
- impl ::protobuf::ProtobufEnum for CapabilityType {
- fn value(&self) -> i32 {
- *self as i32
- }
- fn from_i32(value: i32) -> ::std::option::Option<CapabilityType> {
- match value {
- 1 => ::std::option::Option::Some(CapabilityType::kSupportedContexts),
- 2 => ::std::option::Option::Some(CapabilityType::kCanBePlayer),
- 3 => ::std::option::Option::Some(CapabilityType::kRestrictToLocal),
- 4 => ::std::option::Option::Some(CapabilityType::kDeviceType),
- 5 => ::std::option::Option::Some(CapabilityType::kGaiaEqConnectId),
- 6 => ::std::option::Option::Some(CapabilityType::kSupportsLogout),
- 7 => ::std::option::Option::Some(CapabilityType::kIsObservable),
- 8 => ::std::option::Option::Some(CapabilityType::kVolumeSteps),
- 9 => ::std::option::Option::Some(CapabilityType::kSupportedTypes),
- 10 => ::std::option::Option::Some(CapabilityType::kCommandAcks),
- 11 => ::std::option::Option::Some(CapabilityType::kSupportsRename),
- 12 => ::std::option::Option::Some(CapabilityType::kHidden),
- 13 => ::std::option::Option::Some(CapabilityType::kSupportsPlaylistV2),
- 14 => ::std::option::Option::Some(CapabilityType::kSupportsExternalEpisodes),
- _ => ::std::option::Option::None
- }
- }
- fn values() -> &'static [Self] {
- static values: &'static [CapabilityType] = &[
- CapabilityType::kSupportedContexts,
- CapabilityType::kCanBePlayer,
- CapabilityType::kRestrictToLocal,
- CapabilityType::kDeviceType,
- CapabilityType::kGaiaEqConnectId,
- CapabilityType::kSupportsLogout,
- CapabilityType::kIsObservable,
- CapabilityType::kVolumeSteps,
- CapabilityType::kSupportedTypes,
- CapabilityType::kCommandAcks,
- CapabilityType::kSupportsRename,
- CapabilityType::kHidden,
- CapabilityType::kSupportsPlaylistV2,
- CapabilityType::kSupportsExternalEpisodes,
- ];
- values
- }
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new("CapabilityType", file_descriptor_proto())
- })
- }
- }
- }
- impl ::std::marker::Copy for CapabilityType {
- }
- // Note, `Default` is implemented although default value is not 0
- impl ::std::default::Default for CapabilityType {
- fn default() -> Self {
- CapabilityType::kSupportedContexts
- }
- }
- impl ::protobuf::reflect::ProtobufValue for CapabilityType {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
- }
- }
- #[derive(Clone,PartialEq,Eq,Debug,Hash)]
- pub enum PlayStatus {
- kPlayStatusStop = 0,
- kPlayStatusPlay = 1,
- kPlayStatusPause = 2,
- kPlayStatusLoading = 3,
- }
- impl ::protobuf::ProtobufEnum for PlayStatus {
- fn value(&self) -> i32 {
- *self as i32
- }
- fn from_i32(value: i32) -> ::std::option::Option<PlayStatus> {
- match value {
- 0 => ::std::option::Option::Some(PlayStatus::kPlayStatusStop),
- 1 => ::std::option::Option::Some(PlayStatus::kPlayStatusPlay),
- 2 => ::std::option::Option::Some(PlayStatus::kPlayStatusPause),
- 3 => ::std::option::Option::Some(PlayStatus::kPlayStatusLoading),
- _ => ::std::option::Option::None
- }
- }
- fn values() -> &'static [Self] {
- static values: &'static [PlayStatus] = &[
- PlayStatus::kPlayStatusStop,
- PlayStatus::kPlayStatusPlay,
- PlayStatus::kPlayStatusPause,
- PlayStatus::kPlayStatusLoading,
- ];
- values
- }
- fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
- static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
- };
- unsafe {
- descriptor.get(|| {
- ::protobuf::reflect::EnumDescriptor::new("PlayStatus", file_descriptor_proto())
- })
- }
- }
- }
- impl ::std::marker::Copy for PlayStatus {
- }
- impl ::std::default::Default for PlayStatus {
- fn default() -> Self {
- PlayStatus::kPlayStatusStop
- }
- }
- impl ::protobuf::reflect::ProtobufValue for PlayStatus {
- fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
- ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
- }
- }
- static file_descriptor_proto_data: &'static [u8] = b"\
- \n\x0bspirc.proto\x12\0\"\xfd\x02\n\x05Frame\x12\x11\n\x07version\x18\
- \x01\x20\x01(\rB\0\x12\x0f\n\x05ident\x18\x02\x20\x01(\tB\0\x12\x1a\n\
- \x10protocol_version\x18\x03\x20\x01(\tB\0\x12\x10\n\x06seq_nr\x18\x04\
- \x20\x01(\rB\0\x12\x1b\n\x03typ\x18\x05\x20\x01(\x0e2\x0c.MessageTypeB\0\
- \x12$\n\x0cdevice_state\x18\x07\x20\x01(\x0b2\x0c.DeviceStateB\0\x12\x1b\
- \n\x07goodbye\x18\x0b\x20\x01(\x0b2\x08.GoodbyeB\0\x12\x17\n\x05state\
- \x18\x0c\x20\x01(\x0b2\x06.StateB\0\x12\x12\n\x08position\x18\r\x20\x01(\
- \rB\0\x12\x10\n\x06volume\x18\x0e\x20\x01(\rB\0\x12\x19\n\x0fstate_updat\
- e_id\x18\x11\x20\x01(\x03B\0\x12\x13\n\trecipient\x18\x12\x20\x03(\tB\0\
- \x12\x1e\n\x14context_player_state\x18\x13\x20\x01(\x0cB\0\x12\x12\n\x08\
- new_name\x18\x14\x20\x01(\tB\0\x12\x1d\n\x08metadata\x18\x19\x20\x01(\
- \x0b2\t.MetadataB\0:\0\"\x9f\x02\n\x0bDeviceState\x12\x14\n\nsw_version\
- \x18\x01\x20\x01(\tB\0\x12\x13\n\tis_active\x18\n\x20\x01(\x08B\0\x12\
- \x12\n\x08can_play\x18\x0b\x20\x01(\x08B\0\x12\x10\n\x06volume\x18\x0c\
- \x20\x01(\rB\0\x12\x0e\n\x04name\x18\r\x20\x01(\tB\0\x12\x14\n\nerror_co\
- de\x18\x0e\x20\x01(\rB\0\x12\x1a\n\x10became_active_at\x18\x0f\x20\x01(\
- \x03B\0\x12\x17\n\rerror_message\x18\x10\x20\x01(\tB\0\x12#\n\x0ccapabil\
- ities\x18\x11\x20\x03(\x0b2\x0b.CapabilityB\0\x12\x1e\n\x14context_playe\
- r_error\x18\x14\x20\x01(\tB\0\x12\x1d\n\x08metadata\x18\x19\x20\x03(\x0b\
- 2\t.MetadataB\0:\0\"Y\n\nCapability\x12\x1e\n\x03typ\x18\x01\x20\x01(\
- \x0e2\x0f.CapabilityTypeB\0\x12\x12\n\x08intValue\x18\x02\x20\x03(\x03B\
- \0\x12\x15\n\x0bstringValue\x18\x03\x20\x03(\tB\0:\0\"\x1d\n\x07Goodbye\
- \x12\x10\n\x06reason\x18\x01\x20\x01(\tB\0:\0\"\x85\x03\n\x05State\x12\
- \x15\n\x0bcontext_uri\x18\x02\x20\x01(\tB\0\x12\x0f\n\x05index\x18\x03\
- \x20\x01(\rB\0\x12\x15\n\x0bposition_ms\x18\x04\x20\x01(\rB\0\x12\x1d\n\
- \x06status\x18\x05\x20\x01(\x0e2\x0b.PlayStatusB\0\x12\x1e\n\x14position\
- _measured_at\x18\x07\x20\x01(\x04B\0\x12\x1d\n\x13context_description\
- \x18\x08\x20\x01(\tB\0\x12\x11\n\x07shuffle\x18\r\x20\x01(\x08B\0\x12\
- \x10\n\x06repeat\x18\x0e\x20\x01(\x08B\0\x12\x1c\n\x12last_command_ident\
- \x18\x14\x20\x01(\tB\0\x12\x1c\n\x12last_command_msgid\x18\x15\x20\x01(\
- \rB\0\x12\x1f\n\x15playing_from_fallback\x18\x18\x20\x01(\x08B\0\x12\r\n\
- \x03row\x18\x19\x20\x01(\rB\0\x12\x1d\n\x13playing_track_index\x18\x1a\
- \x20\x01(\rB\0\x12\x1a\n\x05track\x18\x1b\x20\x03(\x0b2\t.TrackRefB\0\
- \x12\x11\n\x02ad\x18\x1c\x20\x01(\x0b2\x03.AdB\0:\0\"O\n\x08TrackRef\x12\
- \r\n\x03gid\x18\x01\x20\x01(\x0cB\0\x12\r\n\x03uri\x18\x02\x20\x01(\tB\0\
- \x12\x10\n\x06queued\x18\x03\x20\x01(\x08B\0\x12\x11\n\x07context\x18\
- \x04\x20\x01(\tB\0:\0\"\xb9\x01\n\x02Ad\x12\x0e\n\x04next\x18\x01\x20\
- \x01(\x05B\0\x12\x11\n\x07ogg_fid\x18\x02\x20\x01(\x0cB\0\x12\x13\n\tima\
- ge_fid\x18\x03\x20\x01(\x0cB\0\x12\x12\n\x08duration\x18\x04\x20\x01(\
- \x05B\0\x12\x13\n\tclick_url\x18\x05\x20\x01(\tB\0\x12\x18\n\x0eimpressi\
- on_url\x18\x06\x20\x01(\tB\0\x12\x11\n\x07product\x18\x07\x20\x01(\tB\0\
- \x12\x14\n\nadvertiser\x18\x08\x20\x01(\tB\0\x12\r\n\x03gid\x18\t\x20\
- \x01(\x0cB\0:\0\"0\n\x08Metadata\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\
- \x12\x12\n\x08metadata\x18\x02\x20\x01(\tB\0:\0*\x8f\x04\n\x0bMessageTyp\
- e\x12\x15\n\x11kMessageTypeHello\x10\x01\x12\x17\n\x13kMessageTypeGoodby\
- e\x10\x02\x12\x15\n\x11kMessageTypeProbe\x10\x03\x12\x16\n\x12kMessageTy\
- peNotify\x10\n\x12\x14\n\x10kMessageTypeLoad\x10\x14\x12\x14\n\x10kMessa\
- geTypePlay\x10\x15\x12\x15\n\x11kMessageTypePause\x10\x16\x12\x19\n\x15k\
- MessageTypePlayPause\x10\x17\x12\x14\n\x10kMessageTypeSeek\x10\x18\x12\
- \x14\n\x10kMessageTypePrev\x10\x19\x12\x14\n\x10kMessageTypeNext\x10\x1a\
- \x12\x16\n\x12kMessageTypeVolume\x10\x1b\x12\x17\n\x13kMessageTypeShuffl\
- e\x10\x1c\x12\x16\n\x12kMessageTypeRepeat\x10\x1d\x12\x1a\n\x16kMessageT\
- ypeVolumeDown\x10\x1f\x12\x18\n\x14kMessageTypeVolumeUp\x10\x20\x12\x17\
- \n\x13kMessageTypeReplace\x10!\x12\x16\n\x12kMessageTypeLogout\x10\"\x12\
- \x16\n\x12kMessageTypeAction\x10#\x12\x16\n\x12kMessageTypeRename\x10$\
- \x12\x1f\n\x1akMessageTypeUpdateMetadata\x10\x80\x01\x1a\0*\xb4\x02\n\
- \x0eCapabilityType\x12\x16\n\x12kSupportedContexts\x10\x01\x12\x10\n\x0c\
- kCanBePlayer\x10\x02\x12\x14\n\x10kRestrictToLocal\x10\x03\x12\x0f\n\x0b\
- kDeviceType\x10\x04\x12\x14\n\x10kGaiaEqConnectId\x10\x05\x12\x13\n\x0fk\
- SupportsLogout\x10\x06\x12\x11\n\rkIsObservable\x10\x07\x12\x10\n\x0ckVo\
- lumeSteps\x10\x08\x12\x13\n\x0fkSupportedTypes\x10\t\x12\x10\n\x0ckComma\
- ndAcks\x10\n\x12\x13\n\x0fkSupportsRename\x10\x0b\x12\x0b\n\x07kHidden\
- \x10\x0c\x12\x17\n\x13kSupportsPlaylistV2\x10\r\x12\x1d\n\x19kSupportsEx\
- ternalEpisodes\x10\x0e\x1a\0*f\n\nPlayStatus\x12\x13\n\x0fkPlayStatusSto\
- p\x10\0\x12\x13\n\x0fkPlayStatusPlay\x10\x01\x12\x14\n\x10kPlayStatusPau\
- se\x10\x02\x12\x16\n\x12kPlayStatusLoading\x10\x03\x1a\0B\0b\x06proto2\
- ";
- static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
- lock: ::protobuf::lazy::ONCE_INIT,
- ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
- };
- fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
- ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
- }
- pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
- unsafe {
- file_descriptor_proto_lazy.get(|| {
- parse_descriptor_proto()
- })
- }
- }
|