authentication.rs 175 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194
  1. // This file is generated by rust-protobuf 2.8.1. Do not edit
  2. // @generated
  3. // https://github.com/Manishearth/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![cfg_attr(rustfmt, rustfmt_skip)]
  7. #![allow(box_pointers)]
  8. #![allow(dead_code)]
  9. #![allow(missing_docs)]
  10. #![allow(non_camel_case_types)]
  11. #![allow(non_snake_case)]
  12. #![allow(non_upper_case_globals)]
  13. #![allow(trivial_casts)]
  14. #![allow(unsafe_code)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `authentication.proto`
  18. use protobuf::Message as Message_imported_for_functions;
  19. use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
  20. /// Generated files are compatible only with the same version
  21. /// of protobuf runtime.
  22. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1;
  23. #[derive(PartialEq,Clone,Default)]
  24. pub struct ClientResponseEncrypted {
  25. // message fields
  26. login_credentials: ::protobuf::SingularPtrField<LoginCredentials>,
  27. account_creation: ::std::option::Option<AccountCreation>,
  28. fingerprint_response: ::protobuf::SingularPtrField<FingerprintResponseUnion>,
  29. peer_ticket: ::protobuf::SingularPtrField<PeerTicketUnion>,
  30. system_info: ::protobuf::SingularPtrField<SystemInfo>,
  31. platform_model: ::protobuf::SingularField<::std::string::String>,
  32. version_string: ::protobuf::SingularField<::std::string::String>,
  33. appkey: ::protobuf::SingularPtrField<LibspotifyAppKey>,
  34. client_info: ::protobuf::SingularPtrField<ClientInfo>,
  35. // special fields
  36. pub unknown_fields: ::protobuf::UnknownFields,
  37. pub cached_size: ::protobuf::CachedSize,
  38. }
  39. impl<'a> ::std::default::Default for &'a ClientResponseEncrypted {
  40. fn default() -> &'a ClientResponseEncrypted {
  41. <ClientResponseEncrypted as ::protobuf::Message>::default_instance()
  42. }
  43. }
  44. impl ClientResponseEncrypted {
  45. pub fn new() -> ClientResponseEncrypted {
  46. ::std::default::Default::default()
  47. }
  48. // required .LoginCredentials login_credentials = 10;
  49. pub fn get_login_credentials(&self) -> &LoginCredentials {
  50. self.login_credentials.as_ref().unwrap_or_else(|| LoginCredentials::default_instance())
  51. }
  52. pub fn clear_login_credentials(&mut self) {
  53. self.login_credentials.clear();
  54. }
  55. pub fn has_login_credentials(&self) -> bool {
  56. self.login_credentials.is_some()
  57. }
  58. // Param is passed by value, moved
  59. pub fn set_login_credentials(&mut self, v: LoginCredentials) {
  60. self.login_credentials = ::protobuf::SingularPtrField::some(v);
  61. }
  62. // Mutable pointer to the field.
  63. // If field is not initialized, it is initialized with default value first.
  64. pub fn mut_login_credentials(&mut self) -> &mut LoginCredentials {
  65. if self.login_credentials.is_none() {
  66. self.login_credentials.set_default();
  67. }
  68. self.login_credentials.as_mut().unwrap()
  69. }
  70. // Take field
  71. pub fn take_login_credentials(&mut self) -> LoginCredentials {
  72. self.login_credentials.take().unwrap_or_else(|| LoginCredentials::new())
  73. }
  74. // optional .AccountCreation account_creation = 20;
  75. pub fn get_account_creation(&self) -> AccountCreation {
  76. self.account_creation.unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT)
  77. }
  78. pub fn clear_account_creation(&mut self) {
  79. self.account_creation = ::std::option::Option::None;
  80. }
  81. pub fn has_account_creation(&self) -> bool {
  82. self.account_creation.is_some()
  83. }
  84. // Param is passed by value, moved
  85. pub fn set_account_creation(&mut self, v: AccountCreation) {
  86. self.account_creation = ::std::option::Option::Some(v);
  87. }
  88. // optional .FingerprintResponseUnion fingerprint_response = 30;
  89. pub fn get_fingerprint_response(&self) -> &FingerprintResponseUnion {
  90. self.fingerprint_response.as_ref().unwrap_or_else(|| FingerprintResponseUnion::default_instance())
  91. }
  92. pub fn clear_fingerprint_response(&mut self) {
  93. self.fingerprint_response.clear();
  94. }
  95. pub fn has_fingerprint_response(&self) -> bool {
  96. self.fingerprint_response.is_some()
  97. }
  98. // Param is passed by value, moved
  99. pub fn set_fingerprint_response(&mut self, v: FingerprintResponseUnion) {
  100. self.fingerprint_response = ::protobuf::SingularPtrField::some(v);
  101. }
  102. // Mutable pointer to the field.
  103. // If field is not initialized, it is initialized with default value first.
  104. pub fn mut_fingerprint_response(&mut self) -> &mut FingerprintResponseUnion {
  105. if self.fingerprint_response.is_none() {
  106. self.fingerprint_response.set_default();
  107. }
  108. self.fingerprint_response.as_mut().unwrap()
  109. }
  110. // Take field
  111. pub fn take_fingerprint_response(&mut self) -> FingerprintResponseUnion {
  112. self.fingerprint_response.take().unwrap_or_else(|| FingerprintResponseUnion::new())
  113. }
  114. // optional .PeerTicketUnion peer_ticket = 40;
  115. pub fn get_peer_ticket(&self) -> &PeerTicketUnion {
  116. self.peer_ticket.as_ref().unwrap_or_else(|| PeerTicketUnion::default_instance())
  117. }
  118. pub fn clear_peer_ticket(&mut self) {
  119. self.peer_ticket.clear();
  120. }
  121. pub fn has_peer_ticket(&self) -> bool {
  122. self.peer_ticket.is_some()
  123. }
  124. // Param is passed by value, moved
  125. pub fn set_peer_ticket(&mut self, v: PeerTicketUnion) {
  126. self.peer_ticket = ::protobuf::SingularPtrField::some(v);
  127. }
  128. // Mutable pointer to the field.
  129. // If field is not initialized, it is initialized with default value first.
  130. pub fn mut_peer_ticket(&mut self) -> &mut PeerTicketUnion {
  131. if self.peer_ticket.is_none() {
  132. self.peer_ticket.set_default();
  133. }
  134. self.peer_ticket.as_mut().unwrap()
  135. }
  136. // Take field
  137. pub fn take_peer_ticket(&mut self) -> PeerTicketUnion {
  138. self.peer_ticket.take().unwrap_or_else(|| PeerTicketUnion::new())
  139. }
  140. // required .SystemInfo system_info = 50;
  141. pub fn get_system_info(&self) -> &SystemInfo {
  142. self.system_info.as_ref().unwrap_or_else(|| SystemInfo::default_instance())
  143. }
  144. pub fn clear_system_info(&mut self) {
  145. self.system_info.clear();
  146. }
  147. pub fn has_system_info(&self) -> bool {
  148. self.system_info.is_some()
  149. }
  150. // Param is passed by value, moved
  151. pub fn set_system_info(&mut self, v: SystemInfo) {
  152. self.system_info = ::protobuf::SingularPtrField::some(v);
  153. }
  154. // Mutable pointer to the field.
  155. // If field is not initialized, it is initialized with default value first.
  156. pub fn mut_system_info(&mut self) -> &mut SystemInfo {
  157. if self.system_info.is_none() {
  158. self.system_info.set_default();
  159. }
  160. self.system_info.as_mut().unwrap()
  161. }
  162. // Take field
  163. pub fn take_system_info(&mut self) -> SystemInfo {
  164. self.system_info.take().unwrap_or_else(|| SystemInfo::new())
  165. }
  166. // optional string platform_model = 60;
  167. pub fn get_platform_model(&self) -> &str {
  168. match self.platform_model.as_ref() {
  169. Some(v) => &v,
  170. None => "",
  171. }
  172. }
  173. pub fn clear_platform_model(&mut self) {
  174. self.platform_model.clear();
  175. }
  176. pub fn has_platform_model(&self) -> bool {
  177. self.platform_model.is_some()
  178. }
  179. // Param is passed by value, moved
  180. pub fn set_platform_model(&mut self, v: ::std::string::String) {
  181. self.platform_model = ::protobuf::SingularField::some(v);
  182. }
  183. // Mutable pointer to the field.
  184. // If field is not initialized, it is initialized with default value first.
  185. pub fn mut_platform_model(&mut self) -> &mut ::std::string::String {
  186. if self.platform_model.is_none() {
  187. self.platform_model.set_default();
  188. }
  189. self.platform_model.as_mut().unwrap()
  190. }
  191. // Take field
  192. pub fn take_platform_model(&mut self) -> ::std::string::String {
  193. self.platform_model.take().unwrap_or_else(|| ::std::string::String::new())
  194. }
  195. // optional string version_string = 70;
  196. pub fn get_version_string(&self) -> &str {
  197. match self.version_string.as_ref() {
  198. Some(v) => &v,
  199. None => "",
  200. }
  201. }
  202. pub fn clear_version_string(&mut self) {
  203. self.version_string.clear();
  204. }
  205. pub fn has_version_string(&self) -> bool {
  206. self.version_string.is_some()
  207. }
  208. // Param is passed by value, moved
  209. pub fn set_version_string(&mut self, v: ::std::string::String) {
  210. self.version_string = ::protobuf::SingularField::some(v);
  211. }
  212. // Mutable pointer to the field.
  213. // If field is not initialized, it is initialized with default value first.
  214. pub fn mut_version_string(&mut self) -> &mut ::std::string::String {
  215. if self.version_string.is_none() {
  216. self.version_string.set_default();
  217. }
  218. self.version_string.as_mut().unwrap()
  219. }
  220. // Take field
  221. pub fn take_version_string(&mut self) -> ::std::string::String {
  222. self.version_string.take().unwrap_or_else(|| ::std::string::String::new())
  223. }
  224. // optional .LibspotifyAppKey appkey = 80;
  225. pub fn get_appkey(&self) -> &LibspotifyAppKey {
  226. self.appkey.as_ref().unwrap_or_else(|| LibspotifyAppKey::default_instance())
  227. }
  228. pub fn clear_appkey(&mut self) {
  229. self.appkey.clear();
  230. }
  231. pub fn has_appkey(&self) -> bool {
  232. self.appkey.is_some()
  233. }
  234. // Param is passed by value, moved
  235. pub fn set_appkey(&mut self, v: LibspotifyAppKey) {
  236. self.appkey = ::protobuf::SingularPtrField::some(v);
  237. }
  238. // Mutable pointer to the field.
  239. // If field is not initialized, it is initialized with default value first.
  240. pub fn mut_appkey(&mut self) -> &mut LibspotifyAppKey {
  241. if self.appkey.is_none() {
  242. self.appkey.set_default();
  243. }
  244. self.appkey.as_mut().unwrap()
  245. }
  246. // Take field
  247. pub fn take_appkey(&mut self) -> LibspotifyAppKey {
  248. self.appkey.take().unwrap_or_else(|| LibspotifyAppKey::new())
  249. }
  250. // optional .ClientInfo client_info = 90;
  251. pub fn get_client_info(&self) -> &ClientInfo {
  252. self.client_info.as_ref().unwrap_or_else(|| ClientInfo::default_instance())
  253. }
  254. pub fn clear_client_info(&mut self) {
  255. self.client_info.clear();
  256. }
  257. pub fn has_client_info(&self) -> bool {
  258. self.client_info.is_some()
  259. }
  260. // Param is passed by value, moved
  261. pub fn set_client_info(&mut self, v: ClientInfo) {
  262. self.client_info = ::protobuf::SingularPtrField::some(v);
  263. }
  264. // Mutable pointer to the field.
  265. // If field is not initialized, it is initialized with default value first.
  266. pub fn mut_client_info(&mut self) -> &mut ClientInfo {
  267. if self.client_info.is_none() {
  268. self.client_info.set_default();
  269. }
  270. self.client_info.as_mut().unwrap()
  271. }
  272. // Take field
  273. pub fn take_client_info(&mut self) -> ClientInfo {
  274. self.client_info.take().unwrap_or_else(|| ClientInfo::new())
  275. }
  276. }
  277. impl ::protobuf::Message for ClientResponseEncrypted {
  278. fn is_initialized(&self) -> bool {
  279. if self.login_credentials.is_none() {
  280. return false;
  281. }
  282. if self.system_info.is_none() {
  283. return false;
  284. }
  285. for v in &self.login_credentials {
  286. if !v.is_initialized() {
  287. return false;
  288. }
  289. };
  290. for v in &self.fingerprint_response {
  291. if !v.is_initialized() {
  292. return false;
  293. }
  294. };
  295. for v in &self.peer_ticket {
  296. if !v.is_initialized() {
  297. return false;
  298. }
  299. };
  300. for v in &self.system_info {
  301. if !v.is_initialized() {
  302. return false;
  303. }
  304. };
  305. for v in &self.appkey {
  306. if !v.is_initialized() {
  307. return false;
  308. }
  309. };
  310. for v in &self.client_info {
  311. if !v.is_initialized() {
  312. return false;
  313. }
  314. };
  315. true
  316. }
  317. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  318. while !is.eof()? {
  319. let (field_number, wire_type) = is.read_tag_unpack()?;
  320. match field_number {
  321. 10 => {
  322. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_credentials)?;
  323. },
  324. 20 => {
  325. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.account_creation, 20, &mut self.unknown_fields)?
  326. },
  327. 30 => {
  328. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fingerprint_response)?;
  329. },
  330. 40 => {
  331. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.peer_ticket)?;
  332. },
  333. 50 => {
  334. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.system_info)?;
  335. },
  336. 60 => {
  337. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.platform_model)?;
  338. },
  339. 70 => {
  340. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.version_string)?;
  341. },
  342. 80 => {
  343. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.appkey)?;
  344. },
  345. 90 => {
  346. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.client_info)?;
  347. },
  348. _ => {
  349. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  350. },
  351. };
  352. }
  353. ::std::result::Result::Ok(())
  354. }
  355. // Compute sizes of nested messages
  356. #[allow(unused_variables)]
  357. fn compute_size(&self) -> u32 {
  358. let mut my_size = 0;
  359. if let Some(ref v) = self.login_credentials.as_ref() {
  360. let len = v.compute_size();
  361. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  362. }
  363. if let Some(v) = self.account_creation {
  364. my_size += ::protobuf::rt::enum_size(20, v);
  365. }
  366. if let Some(ref v) = self.fingerprint_response.as_ref() {
  367. let len = v.compute_size();
  368. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  369. }
  370. if let Some(ref v) = self.peer_ticket.as_ref() {
  371. let len = v.compute_size();
  372. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  373. }
  374. if let Some(ref v) = self.system_info.as_ref() {
  375. let len = v.compute_size();
  376. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  377. }
  378. if let Some(ref v) = self.platform_model.as_ref() {
  379. my_size += ::protobuf::rt::string_size(60, &v);
  380. }
  381. if let Some(ref v) = self.version_string.as_ref() {
  382. my_size += ::protobuf::rt::string_size(70, &v);
  383. }
  384. if let Some(ref v) = self.appkey.as_ref() {
  385. let len = v.compute_size();
  386. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  387. }
  388. if let Some(ref v) = self.client_info.as_ref() {
  389. let len = v.compute_size();
  390. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  391. }
  392. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  393. self.cached_size.set(my_size);
  394. my_size
  395. }
  396. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  397. if let Some(ref v) = self.login_credentials.as_ref() {
  398. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  399. os.write_raw_varint32(v.get_cached_size())?;
  400. v.write_to_with_cached_sizes(os)?;
  401. }
  402. if let Some(v) = self.account_creation {
  403. os.write_enum(20, v.value())?;
  404. }
  405. if let Some(ref v) = self.fingerprint_response.as_ref() {
  406. os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  407. os.write_raw_varint32(v.get_cached_size())?;
  408. v.write_to_with_cached_sizes(os)?;
  409. }
  410. if let Some(ref v) = self.peer_ticket.as_ref() {
  411. os.write_tag(40, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  412. os.write_raw_varint32(v.get_cached_size())?;
  413. v.write_to_with_cached_sizes(os)?;
  414. }
  415. if let Some(ref v) = self.system_info.as_ref() {
  416. os.write_tag(50, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  417. os.write_raw_varint32(v.get_cached_size())?;
  418. v.write_to_with_cached_sizes(os)?;
  419. }
  420. if let Some(ref v) = self.platform_model.as_ref() {
  421. os.write_string(60, &v)?;
  422. }
  423. if let Some(ref v) = self.version_string.as_ref() {
  424. os.write_string(70, &v)?;
  425. }
  426. if let Some(ref v) = self.appkey.as_ref() {
  427. os.write_tag(80, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  428. os.write_raw_varint32(v.get_cached_size())?;
  429. v.write_to_with_cached_sizes(os)?;
  430. }
  431. if let Some(ref v) = self.client_info.as_ref() {
  432. os.write_tag(90, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  433. os.write_raw_varint32(v.get_cached_size())?;
  434. v.write_to_with_cached_sizes(os)?;
  435. }
  436. os.write_unknown_fields(self.get_unknown_fields())?;
  437. ::std::result::Result::Ok(())
  438. }
  439. fn get_cached_size(&self) -> u32 {
  440. self.cached_size.get()
  441. }
  442. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  443. &self.unknown_fields
  444. }
  445. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  446. &mut self.unknown_fields
  447. }
  448. fn as_any(&self) -> &dyn (::std::any::Any) {
  449. self as &dyn (::std::any::Any)
  450. }
  451. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  452. self as &mut dyn (::std::any::Any)
  453. }
  454. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  455. self
  456. }
  457. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  458. Self::descriptor_static()
  459. }
  460. fn new() -> ClientResponseEncrypted {
  461. ClientResponseEncrypted::new()
  462. }
  463. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  464. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  465. lock: ::protobuf::lazy::ONCE_INIT,
  466. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  467. };
  468. unsafe {
  469. descriptor.get(|| {
  470. let mut fields = ::std::vec::Vec::new();
  471. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCredentials>>(
  472. "login_credentials",
  473. |m: &ClientResponseEncrypted| { &m.login_credentials },
  474. |m: &mut ClientResponseEncrypted| { &mut m.login_credentials },
  475. ));
  476. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AccountCreation>>(
  477. "account_creation",
  478. |m: &ClientResponseEncrypted| { &m.account_creation },
  479. |m: &mut ClientResponseEncrypted| { &mut m.account_creation },
  480. ));
  481. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FingerprintResponseUnion>>(
  482. "fingerprint_response",
  483. |m: &ClientResponseEncrypted| { &m.fingerprint_response },
  484. |m: &mut ClientResponseEncrypted| { &mut m.fingerprint_response },
  485. ));
  486. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PeerTicketUnion>>(
  487. "peer_ticket",
  488. |m: &ClientResponseEncrypted| { &m.peer_ticket },
  489. |m: &mut ClientResponseEncrypted| { &mut m.peer_ticket },
  490. ));
  491. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<SystemInfo>>(
  492. "system_info",
  493. |m: &ClientResponseEncrypted| { &m.system_info },
  494. |m: &mut ClientResponseEncrypted| { &mut m.system_info },
  495. ));
  496. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  497. "platform_model",
  498. |m: &ClientResponseEncrypted| { &m.platform_model },
  499. |m: &mut ClientResponseEncrypted| { &mut m.platform_model },
  500. ));
  501. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  502. "version_string",
  503. |m: &ClientResponseEncrypted| { &m.version_string },
  504. |m: &mut ClientResponseEncrypted| { &mut m.version_string },
  505. ));
  506. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LibspotifyAppKey>>(
  507. "appkey",
  508. |m: &ClientResponseEncrypted| { &m.appkey },
  509. |m: &mut ClientResponseEncrypted| { &mut m.appkey },
  510. ));
  511. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ClientInfo>>(
  512. "client_info",
  513. |m: &ClientResponseEncrypted| { &m.client_info },
  514. |m: &mut ClientResponseEncrypted| { &mut m.client_info },
  515. ));
  516. ::protobuf::reflect::MessageDescriptor::new::<ClientResponseEncrypted>(
  517. "ClientResponseEncrypted",
  518. fields,
  519. file_descriptor_proto()
  520. )
  521. })
  522. }
  523. }
  524. fn default_instance() -> &'static ClientResponseEncrypted {
  525. static mut instance: ::protobuf::lazy::Lazy<ClientResponseEncrypted> = ::protobuf::lazy::Lazy {
  526. lock: ::protobuf::lazy::ONCE_INIT,
  527. ptr: 0 as *const ClientResponseEncrypted,
  528. };
  529. unsafe {
  530. instance.get(ClientResponseEncrypted::new)
  531. }
  532. }
  533. }
  534. impl ::protobuf::Clear for ClientResponseEncrypted {
  535. fn clear(&mut self) {
  536. self.login_credentials.clear();
  537. self.account_creation = ::std::option::Option::None;
  538. self.fingerprint_response.clear();
  539. self.peer_ticket.clear();
  540. self.system_info.clear();
  541. self.platform_model.clear();
  542. self.version_string.clear();
  543. self.appkey.clear();
  544. self.client_info.clear();
  545. self.unknown_fields.clear();
  546. }
  547. }
  548. impl ::std::fmt::Debug for ClientResponseEncrypted {
  549. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  550. ::protobuf::text_format::fmt(self, f)
  551. }
  552. }
  553. impl ::protobuf::reflect::ProtobufValue for ClientResponseEncrypted {
  554. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  555. ::protobuf::reflect::ProtobufValueRef::Message(self)
  556. }
  557. }
  558. #[derive(PartialEq,Clone,Default)]
  559. pub struct LoginCredentials {
  560. // message fields
  561. username: ::protobuf::SingularField<::std::string::String>,
  562. typ: ::std::option::Option<AuthenticationType>,
  563. auth_data: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  564. // special fields
  565. pub unknown_fields: ::protobuf::UnknownFields,
  566. pub cached_size: ::protobuf::CachedSize,
  567. }
  568. impl<'a> ::std::default::Default for &'a LoginCredentials {
  569. fn default() -> &'a LoginCredentials {
  570. <LoginCredentials as ::protobuf::Message>::default_instance()
  571. }
  572. }
  573. impl LoginCredentials {
  574. pub fn new() -> LoginCredentials {
  575. ::std::default::Default::default()
  576. }
  577. // optional string username = 10;
  578. pub fn get_username(&self) -> &str {
  579. match self.username.as_ref() {
  580. Some(v) => &v,
  581. None => "",
  582. }
  583. }
  584. pub fn clear_username(&mut self) {
  585. self.username.clear();
  586. }
  587. pub fn has_username(&self) -> bool {
  588. self.username.is_some()
  589. }
  590. // Param is passed by value, moved
  591. pub fn set_username(&mut self, v: ::std::string::String) {
  592. self.username = ::protobuf::SingularField::some(v);
  593. }
  594. // Mutable pointer to the field.
  595. // If field is not initialized, it is initialized with default value first.
  596. pub fn mut_username(&mut self) -> &mut ::std::string::String {
  597. if self.username.is_none() {
  598. self.username.set_default();
  599. }
  600. self.username.as_mut().unwrap()
  601. }
  602. // Take field
  603. pub fn take_username(&mut self) -> ::std::string::String {
  604. self.username.take().unwrap_or_else(|| ::std::string::String::new())
  605. }
  606. // required .AuthenticationType typ = 20;
  607. pub fn get_typ(&self) -> AuthenticationType {
  608. self.typ.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS)
  609. }
  610. pub fn clear_typ(&mut self) {
  611. self.typ = ::std::option::Option::None;
  612. }
  613. pub fn has_typ(&self) -> bool {
  614. self.typ.is_some()
  615. }
  616. // Param is passed by value, moved
  617. pub fn set_typ(&mut self, v: AuthenticationType) {
  618. self.typ = ::std::option::Option::Some(v);
  619. }
  620. // optional bytes auth_data = 30;
  621. pub fn get_auth_data(&self) -> &[u8] {
  622. match self.auth_data.as_ref() {
  623. Some(v) => &v,
  624. None => &[],
  625. }
  626. }
  627. pub fn clear_auth_data(&mut self) {
  628. self.auth_data.clear();
  629. }
  630. pub fn has_auth_data(&self) -> bool {
  631. self.auth_data.is_some()
  632. }
  633. // Param is passed by value, moved
  634. pub fn set_auth_data(&mut self, v: ::std::vec::Vec<u8>) {
  635. self.auth_data = ::protobuf::SingularField::some(v);
  636. }
  637. // Mutable pointer to the field.
  638. // If field is not initialized, it is initialized with default value first.
  639. pub fn mut_auth_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  640. if self.auth_data.is_none() {
  641. self.auth_data.set_default();
  642. }
  643. self.auth_data.as_mut().unwrap()
  644. }
  645. // Take field
  646. pub fn take_auth_data(&mut self) -> ::std::vec::Vec<u8> {
  647. self.auth_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
  648. }
  649. }
  650. impl ::protobuf::Message for LoginCredentials {
  651. fn is_initialized(&self) -> bool {
  652. if self.typ.is_none() {
  653. return false;
  654. }
  655. true
  656. }
  657. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  658. while !is.eof()? {
  659. let (field_number, wire_type) = is.read_tag_unpack()?;
  660. match field_number {
  661. 10 => {
  662. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.username)?;
  663. },
  664. 20 => {
  665. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.typ, 20, &mut self.unknown_fields)?
  666. },
  667. 30 => {
  668. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.auth_data)?;
  669. },
  670. _ => {
  671. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  672. },
  673. };
  674. }
  675. ::std::result::Result::Ok(())
  676. }
  677. // Compute sizes of nested messages
  678. #[allow(unused_variables)]
  679. fn compute_size(&self) -> u32 {
  680. let mut my_size = 0;
  681. if let Some(ref v) = self.username.as_ref() {
  682. my_size += ::protobuf::rt::string_size(10, &v);
  683. }
  684. if let Some(v) = self.typ {
  685. my_size += ::protobuf::rt::enum_size(20, v);
  686. }
  687. if let Some(ref v) = self.auth_data.as_ref() {
  688. my_size += ::protobuf::rt::bytes_size(30, &v);
  689. }
  690. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  691. self.cached_size.set(my_size);
  692. my_size
  693. }
  694. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  695. if let Some(ref v) = self.username.as_ref() {
  696. os.write_string(10, &v)?;
  697. }
  698. if let Some(v) = self.typ {
  699. os.write_enum(20, v.value())?;
  700. }
  701. if let Some(ref v) = self.auth_data.as_ref() {
  702. os.write_bytes(30, &v)?;
  703. }
  704. os.write_unknown_fields(self.get_unknown_fields())?;
  705. ::std::result::Result::Ok(())
  706. }
  707. fn get_cached_size(&self) -> u32 {
  708. self.cached_size.get()
  709. }
  710. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  711. &self.unknown_fields
  712. }
  713. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  714. &mut self.unknown_fields
  715. }
  716. fn as_any(&self) -> &dyn (::std::any::Any) {
  717. self as &dyn (::std::any::Any)
  718. }
  719. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  720. self as &mut dyn (::std::any::Any)
  721. }
  722. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  723. self
  724. }
  725. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  726. Self::descriptor_static()
  727. }
  728. fn new() -> LoginCredentials {
  729. LoginCredentials::new()
  730. }
  731. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  732. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  733. lock: ::protobuf::lazy::ONCE_INIT,
  734. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  735. };
  736. unsafe {
  737. descriptor.get(|| {
  738. let mut fields = ::std::vec::Vec::new();
  739. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  740. "username",
  741. |m: &LoginCredentials| { &m.username },
  742. |m: &mut LoginCredentials| { &mut m.username },
  743. ));
  744. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AuthenticationType>>(
  745. "typ",
  746. |m: &LoginCredentials| { &m.typ },
  747. |m: &mut LoginCredentials| { &mut m.typ },
  748. ));
  749. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  750. "auth_data",
  751. |m: &LoginCredentials| { &m.auth_data },
  752. |m: &mut LoginCredentials| { &mut m.auth_data },
  753. ));
  754. ::protobuf::reflect::MessageDescriptor::new::<LoginCredentials>(
  755. "LoginCredentials",
  756. fields,
  757. file_descriptor_proto()
  758. )
  759. })
  760. }
  761. }
  762. fn default_instance() -> &'static LoginCredentials {
  763. static mut instance: ::protobuf::lazy::Lazy<LoginCredentials> = ::protobuf::lazy::Lazy {
  764. lock: ::protobuf::lazy::ONCE_INIT,
  765. ptr: 0 as *const LoginCredentials,
  766. };
  767. unsafe {
  768. instance.get(LoginCredentials::new)
  769. }
  770. }
  771. }
  772. impl ::protobuf::Clear for LoginCredentials {
  773. fn clear(&mut self) {
  774. self.username.clear();
  775. self.typ = ::std::option::Option::None;
  776. self.auth_data.clear();
  777. self.unknown_fields.clear();
  778. }
  779. }
  780. impl ::std::fmt::Debug for LoginCredentials {
  781. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  782. ::protobuf::text_format::fmt(self, f)
  783. }
  784. }
  785. impl ::protobuf::reflect::ProtobufValue for LoginCredentials {
  786. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  787. ::protobuf::reflect::ProtobufValueRef::Message(self)
  788. }
  789. }
  790. #[derive(PartialEq,Clone,Default)]
  791. pub struct FingerprintResponseUnion {
  792. // message fields
  793. grain: ::protobuf::SingularPtrField<FingerprintGrainResponse>,
  794. hmac_ripemd: ::protobuf::SingularPtrField<FingerprintHmacRipemdResponse>,
  795. // special fields
  796. pub unknown_fields: ::protobuf::UnknownFields,
  797. pub cached_size: ::protobuf::CachedSize,
  798. }
  799. impl<'a> ::std::default::Default for &'a FingerprintResponseUnion {
  800. fn default() -> &'a FingerprintResponseUnion {
  801. <FingerprintResponseUnion as ::protobuf::Message>::default_instance()
  802. }
  803. }
  804. impl FingerprintResponseUnion {
  805. pub fn new() -> FingerprintResponseUnion {
  806. ::std::default::Default::default()
  807. }
  808. // optional .FingerprintGrainResponse grain = 10;
  809. pub fn get_grain(&self) -> &FingerprintGrainResponse {
  810. self.grain.as_ref().unwrap_or_else(|| FingerprintGrainResponse::default_instance())
  811. }
  812. pub fn clear_grain(&mut self) {
  813. self.grain.clear();
  814. }
  815. pub fn has_grain(&self) -> bool {
  816. self.grain.is_some()
  817. }
  818. // Param is passed by value, moved
  819. pub fn set_grain(&mut self, v: FingerprintGrainResponse) {
  820. self.grain = ::protobuf::SingularPtrField::some(v);
  821. }
  822. // Mutable pointer to the field.
  823. // If field is not initialized, it is initialized with default value first.
  824. pub fn mut_grain(&mut self) -> &mut FingerprintGrainResponse {
  825. if self.grain.is_none() {
  826. self.grain.set_default();
  827. }
  828. self.grain.as_mut().unwrap()
  829. }
  830. // Take field
  831. pub fn take_grain(&mut self) -> FingerprintGrainResponse {
  832. self.grain.take().unwrap_or_else(|| FingerprintGrainResponse::new())
  833. }
  834. // optional .FingerprintHmacRipemdResponse hmac_ripemd = 20;
  835. pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdResponse {
  836. self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance())
  837. }
  838. pub fn clear_hmac_ripemd(&mut self) {
  839. self.hmac_ripemd.clear();
  840. }
  841. pub fn has_hmac_ripemd(&self) -> bool {
  842. self.hmac_ripemd.is_some()
  843. }
  844. // Param is passed by value, moved
  845. pub fn set_hmac_ripemd(&mut self, v: FingerprintHmacRipemdResponse) {
  846. self.hmac_ripemd = ::protobuf::SingularPtrField::some(v);
  847. }
  848. // Mutable pointer to the field.
  849. // If field is not initialized, it is initialized with default value first.
  850. pub fn mut_hmac_ripemd(&mut self) -> &mut FingerprintHmacRipemdResponse {
  851. if self.hmac_ripemd.is_none() {
  852. self.hmac_ripemd.set_default();
  853. }
  854. self.hmac_ripemd.as_mut().unwrap()
  855. }
  856. // Take field
  857. pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdResponse {
  858. self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdResponse::new())
  859. }
  860. }
  861. impl ::protobuf::Message for FingerprintResponseUnion {
  862. fn is_initialized(&self) -> bool {
  863. for v in &self.grain {
  864. if !v.is_initialized() {
  865. return false;
  866. }
  867. };
  868. for v in &self.hmac_ripemd {
  869. if !v.is_initialized() {
  870. return false;
  871. }
  872. };
  873. true
  874. }
  875. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  876. while !is.eof()? {
  877. let (field_number, wire_type) = is.read_tag_unpack()?;
  878. match field_number {
  879. 10 => {
  880. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grain)?;
  881. },
  882. 20 => {
  883. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hmac_ripemd)?;
  884. },
  885. _ => {
  886. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  887. },
  888. };
  889. }
  890. ::std::result::Result::Ok(())
  891. }
  892. // Compute sizes of nested messages
  893. #[allow(unused_variables)]
  894. fn compute_size(&self) -> u32 {
  895. let mut my_size = 0;
  896. if let Some(ref v) = self.grain.as_ref() {
  897. let len = v.compute_size();
  898. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  899. }
  900. if let Some(ref v) = self.hmac_ripemd.as_ref() {
  901. let len = v.compute_size();
  902. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  903. }
  904. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  905. self.cached_size.set(my_size);
  906. my_size
  907. }
  908. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  909. if let Some(ref v) = self.grain.as_ref() {
  910. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  911. os.write_raw_varint32(v.get_cached_size())?;
  912. v.write_to_with_cached_sizes(os)?;
  913. }
  914. if let Some(ref v) = self.hmac_ripemd.as_ref() {
  915. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  916. os.write_raw_varint32(v.get_cached_size())?;
  917. v.write_to_with_cached_sizes(os)?;
  918. }
  919. os.write_unknown_fields(self.get_unknown_fields())?;
  920. ::std::result::Result::Ok(())
  921. }
  922. fn get_cached_size(&self) -> u32 {
  923. self.cached_size.get()
  924. }
  925. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  926. &self.unknown_fields
  927. }
  928. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  929. &mut self.unknown_fields
  930. }
  931. fn as_any(&self) -> &dyn (::std::any::Any) {
  932. self as &dyn (::std::any::Any)
  933. }
  934. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  935. self as &mut dyn (::std::any::Any)
  936. }
  937. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  938. self
  939. }
  940. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  941. Self::descriptor_static()
  942. }
  943. fn new() -> FingerprintResponseUnion {
  944. FingerprintResponseUnion::new()
  945. }
  946. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  947. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  948. lock: ::protobuf::lazy::ONCE_INIT,
  949. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  950. };
  951. unsafe {
  952. descriptor.get(|| {
  953. let mut fields = ::std::vec::Vec::new();
  954. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FingerprintGrainResponse>>(
  955. "grain",
  956. |m: &FingerprintResponseUnion| { &m.grain },
  957. |m: &mut FingerprintResponseUnion| { &mut m.grain },
  958. ));
  959. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FingerprintHmacRipemdResponse>>(
  960. "hmac_ripemd",
  961. |m: &FingerprintResponseUnion| { &m.hmac_ripemd },
  962. |m: &mut FingerprintResponseUnion| { &mut m.hmac_ripemd },
  963. ));
  964. ::protobuf::reflect::MessageDescriptor::new::<FingerprintResponseUnion>(
  965. "FingerprintResponseUnion",
  966. fields,
  967. file_descriptor_proto()
  968. )
  969. })
  970. }
  971. }
  972. fn default_instance() -> &'static FingerprintResponseUnion {
  973. static mut instance: ::protobuf::lazy::Lazy<FingerprintResponseUnion> = ::protobuf::lazy::Lazy {
  974. lock: ::protobuf::lazy::ONCE_INIT,
  975. ptr: 0 as *const FingerprintResponseUnion,
  976. };
  977. unsafe {
  978. instance.get(FingerprintResponseUnion::new)
  979. }
  980. }
  981. }
  982. impl ::protobuf::Clear for FingerprintResponseUnion {
  983. fn clear(&mut self) {
  984. self.grain.clear();
  985. self.hmac_ripemd.clear();
  986. self.unknown_fields.clear();
  987. }
  988. }
  989. impl ::std::fmt::Debug for FingerprintResponseUnion {
  990. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  991. ::protobuf::text_format::fmt(self, f)
  992. }
  993. }
  994. impl ::protobuf::reflect::ProtobufValue for FingerprintResponseUnion {
  995. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  996. ::protobuf::reflect::ProtobufValueRef::Message(self)
  997. }
  998. }
  999. #[derive(PartialEq,Clone,Default)]
  1000. pub struct FingerprintGrainResponse {
  1001. // message fields
  1002. encrypted_key: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1003. // special fields
  1004. pub unknown_fields: ::protobuf::UnknownFields,
  1005. pub cached_size: ::protobuf::CachedSize,
  1006. }
  1007. impl<'a> ::std::default::Default for &'a FingerprintGrainResponse {
  1008. fn default() -> &'a FingerprintGrainResponse {
  1009. <FingerprintGrainResponse as ::protobuf::Message>::default_instance()
  1010. }
  1011. }
  1012. impl FingerprintGrainResponse {
  1013. pub fn new() -> FingerprintGrainResponse {
  1014. ::std::default::Default::default()
  1015. }
  1016. // required bytes encrypted_key = 10;
  1017. pub fn get_encrypted_key(&self) -> &[u8] {
  1018. match self.encrypted_key.as_ref() {
  1019. Some(v) => &v,
  1020. None => &[],
  1021. }
  1022. }
  1023. pub fn clear_encrypted_key(&mut self) {
  1024. self.encrypted_key.clear();
  1025. }
  1026. pub fn has_encrypted_key(&self) -> bool {
  1027. self.encrypted_key.is_some()
  1028. }
  1029. // Param is passed by value, moved
  1030. pub fn set_encrypted_key(&mut self, v: ::std::vec::Vec<u8>) {
  1031. self.encrypted_key = ::protobuf::SingularField::some(v);
  1032. }
  1033. // Mutable pointer to the field.
  1034. // If field is not initialized, it is initialized with default value first.
  1035. pub fn mut_encrypted_key(&mut self) -> &mut ::std::vec::Vec<u8> {
  1036. if self.encrypted_key.is_none() {
  1037. self.encrypted_key.set_default();
  1038. }
  1039. self.encrypted_key.as_mut().unwrap()
  1040. }
  1041. // Take field
  1042. pub fn take_encrypted_key(&mut self) -> ::std::vec::Vec<u8> {
  1043. self.encrypted_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1044. }
  1045. }
  1046. impl ::protobuf::Message for FingerprintGrainResponse {
  1047. fn is_initialized(&self) -> bool {
  1048. if self.encrypted_key.is_none() {
  1049. return false;
  1050. }
  1051. true
  1052. }
  1053. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1054. while !is.eof()? {
  1055. let (field_number, wire_type) = is.read_tag_unpack()?;
  1056. match field_number {
  1057. 10 => {
  1058. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.encrypted_key)?;
  1059. },
  1060. _ => {
  1061. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1062. },
  1063. };
  1064. }
  1065. ::std::result::Result::Ok(())
  1066. }
  1067. // Compute sizes of nested messages
  1068. #[allow(unused_variables)]
  1069. fn compute_size(&self) -> u32 {
  1070. let mut my_size = 0;
  1071. if let Some(ref v) = self.encrypted_key.as_ref() {
  1072. my_size += ::protobuf::rt::bytes_size(10, &v);
  1073. }
  1074. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1075. self.cached_size.set(my_size);
  1076. my_size
  1077. }
  1078. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1079. if let Some(ref v) = self.encrypted_key.as_ref() {
  1080. os.write_bytes(10, &v)?;
  1081. }
  1082. os.write_unknown_fields(self.get_unknown_fields())?;
  1083. ::std::result::Result::Ok(())
  1084. }
  1085. fn get_cached_size(&self) -> u32 {
  1086. self.cached_size.get()
  1087. }
  1088. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1089. &self.unknown_fields
  1090. }
  1091. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1092. &mut self.unknown_fields
  1093. }
  1094. fn as_any(&self) -> &dyn (::std::any::Any) {
  1095. self as &dyn (::std::any::Any)
  1096. }
  1097. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1098. self as &mut dyn (::std::any::Any)
  1099. }
  1100. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1101. self
  1102. }
  1103. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1104. Self::descriptor_static()
  1105. }
  1106. fn new() -> FingerprintGrainResponse {
  1107. FingerprintGrainResponse::new()
  1108. }
  1109. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1110. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1111. lock: ::protobuf::lazy::ONCE_INIT,
  1112. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1113. };
  1114. unsafe {
  1115. descriptor.get(|| {
  1116. let mut fields = ::std::vec::Vec::new();
  1117. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1118. "encrypted_key",
  1119. |m: &FingerprintGrainResponse| { &m.encrypted_key },
  1120. |m: &mut FingerprintGrainResponse| { &mut m.encrypted_key },
  1121. ));
  1122. ::protobuf::reflect::MessageDescriptor::new::<FingerprintGrainResponse>(
  1123. "FingerprintGrainResponse",
  1124. fields,
  1125. file_descriptor_proto()
  1126. )
  1127. })
  1128. }
  1129. }
  1130. fn default_instance() -> &'static FingerprintGrainResponse {
  1131. static mut instance: ::protobuf::lazy::Lazy<FingerprintGrainResponse> = ::protobuf::lazy::Lazy {
  1132. lock: ::protobuf::lazy::ONCE_INIT,
  1133. ptr: 0 as *const FingerprintGrainResponse,
  1134. };
  1135. unsafe {
  1136. instance.get(FingerprintGrainResponse::new)
  1137. }
  1138. }
  1139. }
  1140. impl ::protobuf::Clear for FingerprintGrainResponse {
  1141. fn clear(&mut self) {
  1142. self.encrypted_key.clear();
  1143. self.unknown_fields.clear();
  1144. }
  1145. }
  1146. impl ::std::fmt::Debug for FingerprintGrainResponse {
  1147. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1148. ::protobuf::text_format::fmt(self, f)
  1149. }
  1150. }
  1151. impl ::protobuf::reflect::ProtobufValue for FingerprintGrainResponse {
  1152. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1153. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1154. }
  1155. }
  1156. #[derive(PartialEq,Clone,Default)]
  1157. pub struct FingerprintHmacRipemdResponse {
  1158. // message fields
  1159. hmac: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1160. // special fields
  1161. pub unknown_fields: ::protobuf::UnknownFields,
  1162. pub cached_size: ::protobuf::CachedSize,
  1163. }
  1164. impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdResponse {
  1165. fn default() -> &'a FingerprintHmacRipemdResponse {
  1166. <FingerprintHmacRipemdResponse as ::protobuf::Message>::default_instance()
  1167. }
  1168. }
  1169. impl FingerprintHmacRipemdResponse {
  1170. pub fn new() -> FingerprintHmacRipemdResponse {
  1171. ::std::default::Default::default()
  1172. }
  1173. // required bytes hmac = 10;
  1174. pub fn get_hmac(&self) -> &[u8] {
  1175. match self.hmac.as_ref() {
  1176. Some(v) => &v,
  1177. None => &[],
  1178. }
  1179. }
  1180. pub fn clear_hmac(&mut self) {
  1181. self.hmac.clear();
  1182. }
  1183. pub fn has_hmac(&self) -> bool {
  1184. self.hmac.is_some()
  1185. }
  1186. // Param is passed by value, moved
  1187. pub fn set_hmac(&mut self, v: ::std::vec::Vec<u8>) {
  1188. self.hmac = ::protobuf::SingularField::some(v);
  1189. }
  1190. // Mutable pointer to the field.
  1191. // If field is not initialized, it is initialized with default value first.
  1192. pub fn mut_hmac(&mut self) -> &mut ::std::vec::Vec<u8> {
  1193. if self.hmac.is_none() {
  1194. self.hmac.set_default();
  1195. }
  1196. self.hmac.as_mut().unwrap()
  1197. }
  1198. // Take field
  1199. pub fn take_hmac(&mut self) -> ::std::vec::Vec<u8> {
  1200. self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1201. }
  1202. }
  1203. impl ::protobuf::Message for FingerprintHmacRipemdResponse {
  1204. fn is_initialized(&self) -> bool {
  1205. if self.hmac.is_none() {
  1206. return false;
  1207. }
  1208. true
  1209. }
  1210. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1211. while !is.eof()? {
  1212. let (field_number, wire_type) = is.read_tag_unpack()?;
  1213. match field_number {
  1214. 10 => {
  1215. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hmac)?;
  1216. },
  1217. _ => {
  1218. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1219. },
  1220. };
  1221. }
  1222. ::std::result::Result::Ok(())
  1223. }
  1224. // Compute sizes of nested messages
  1225. #[allow(unused_variables)]
  1226. fn compute_size(&self) -> u32 {
  1227. let mut my_size = 0;
  1228. if let Some(ref v) = self.hmac.as_ref() {
  1229. my_size += ::protobuf::rt::bytes_size(10, &v);
  1230. }
  1231. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1232. self.cached_size.set(my_size);
  1233. my_size
  1234. }
  1235. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1236. if let Some(ref v) = self.hmac.as_ref() {
  1237. os.write_bytes(10, &v)?;
  1238. }
  1239. os.write_unknown_fields(self.get_unknown_fields())?;
  1240. ::std::result::Result::Ok(())
  1241. }
  1242. fn get_cached_size(&self) -> u32 {
  1243. self.cached_size.get()
  1244. }
  1245. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1246. &self.unknown_fields
  1247. }
  1248. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1249. &mut self.unknown_fields
  1250. }
  1251. fn as_any(&self) -> &dyn (::std::any::Any) {
  1252. self as &dyn (::std::any::Any)
  1253. }
  1254. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1255. self as &mut dyn (::std::any::Any)
  1256. }
  1257. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1258. self
  1259. }
  1260. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1261. Self::descriptor_static()
  1262. }
  1263. fn new() -> FingerprintHmacRipemdResponse {
  1264. FingerprintHmacRipemdResponse::new()
  1265. }
  1266. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1267. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1268. lock: ::protobuf::lazy::ONCE_INIT,
  1269. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1270. };
  1271. unsafe {
  1272. descriptor.get(|| {
  1273. let mut fields = ::std::vec::Vec::new();
  1274. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1275. "hmac",
  1276. |m: &FingerprintHmacRipemdResponse| { &m.hmac },
  1277. |m: &mut FingerprintHmacRipemdResponse| { &mut m.hmac },
  1278. ));
  1279. ::protobuf::reflect::MessageDescriptor::new::<FingerprintHmacRipemdResponse>(
  1280. "FingerprintHmacRipemdResponse",
  1281. fields,
  1282. file_descriptor_proto()
  1283. )
  1284. })
  1285. }
  1286. }
  1287. fn default_instance() -> &'static FingerprintHmacRipemdResponse {
  1288. static mut instance: ::protobuf::lazy::Lazy<FingerprintHmacRipemdResponse> = ::protobuf::lazy::Lazy {
  1289. lock: ::protobuf::lazy::ONCE_INIT,
  1290. ptr: 0 as *const FingerprintHmacRipemdResponse,
  1291. };
  1292. unsafe {
  1293. instance.get(FingerprintHmacRipemdResponse::new)
  1294. }
  1295. }
  1296. }
  1297. impl ::protobuf::Clear for FingerprintHmacRipemdResponse {
  1298. fn clear(&mut self) {
  1299. self.hmac.clear();
  1300. self.unknown_fields.clear();
  1301. }
  1302. }
  1303. impl ::std::fmt::Debug for FingerprintHmacRipemdResponse {
  1304. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1305. ::protobuf::text_format::fmt(self, f)
  1306. }
  1307. }
  1308. impl ::protobuf::reflect::ProtobufValue for FingerprintHmacRipemdResponse {
  1309. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1310. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1311. }
  1312. }
  1313. #[derive(PartialEq,Clone,Default)]
  1314. pub struct PeerTicketUnion {
  1315. // message fields
  1316. public_key: ::protobuf::SingularPtrField<PeerTicketPublicKey>,
  1317. old_ticket: ::protobuf::SingularPtrField<PeerTicketOld>,
  1318. // special fields
  1319. pub unknown_fields: ::protobuf::UnknownFields,
  1320. pub cached_size: ::protobuf::CachedSize,
  1321. }
  1322. impl<'a> ::std::default::Default for &'a PeerTicketUnion {
  1323. fn default() -> &'a PeerTicketUnion {
  1324. <PeerTicketUnion as ::protobuf::Message>::default_instance()
  1325. }
  1326. }
  1327. impl PeerTicketUnion {
  1328. pub fn new() -> PeerTicketUnion {
  1329. ::std::default::Default::default()
  1330. }
  1331. // optional .PeerTicketPublicKey public_key = 10;
  1332. pub fn get_public_key(&self) -> &PeerTicketPublicKey {
  1333. self.public_key.as_ref().unwrap_or_else(|| PeerTicketPublicKey::default_instance())
  1334. }
  1335. pub fn clear_public_key(&mut self) {
  1336. self.public_key.clear();
  1337. }
  1338. pub fn has_public_key(&self) -> bool {
  1339. self.public_key.is_some()
  1340. }
  1341. // Param is passed by value, moved
  1342. pub fn set_public_key(&mut self, v: PeerTicketPublicKey) {
  1343. self.public_key = ::protobuf::SingularPtrField::some(v);
  1344. }
  1345. // Mutable pointer to the field.
  1346. // If field is not initialized, it is initialized with default value first.
  1347. pub fn mut_public_key(&mut self) -> &mut PeerTicketPublicKey {
  1348. if self.public_key.is_none() {
  1349. self.public_key.set_default();
  1350. }
  1351. self.public_key.as_mut().unwrap()
  1352. }
  1353. // Take field
  1354. pub fn take_public_key(&mut self) -> PeerTicketPublicKey {
  1355. self.public_key.take().unwrap_or_else(|| PeerTicketPublicKey::new())
  1356. }
  1357. // optional .PeerTicketOld old_ticket = 20;
  1358. pub fn get_old_ticket(&self) -> &PeerTicketOld {
  1359. self.old_ticket.as_ref().unwrap_or_else(|| PeerTicketOld::default_instance())
  1360. }
  1361. pub fn clear_old_ticket(&mut self) {
  1362. self.old_ticket.clear();
  1363. }
  1364. pub fn has_old_ticket(&self) -> bool {
  1365. self.old_ticket.is_some()
  1366. }
  1367. // Param is passed by value, moved
  1368. pub fn set_old_ticket(&mut self, v: PeerTicketOld) {
  1369. self.old_ticket = ::protobuf::SingularPtrField::some(v);
  1370. }
  1371. // Mutable pointer to the field.
  1372. // If field is not initialized, it is initialized with default value first.
  1373. pub fn mut_old_ticket(&mut self) -> &mut PeerTicketOld {
  1374. if self.old_ticket.is_none() {
  1375. self.old_ticket.set_default();
  1376. }
  1377. self.old_ticket.as_mut().unwrap()
  1378. }
  1379. // Take field
  1380. pub fn take_old_ticket(&mut self) -> PeerTicketOld {
  1381. self.old_ticket.take().unwrap_or_else(|| PeerTicketOld::new())
  1382. }
  1383. }
  1384. impl ::protobuf::Message for PeerTicketUnion {
  1385. fn is_initialized(&self) -> bool {
  1386. for v in &self.public_key {
  1387. if !v.is_initialized() {
  1388. return false;
  1389. }
  1390. };
  1391. for v in &self.old_ticket {
  1392. if !v.is_initialized() {
  1393. return false;
  1394. }
  1395. };
  1396. true
  1397. }
  1398. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1399. while !is.eof()? {
  1400. let (field_number, wire_type) = is.read_tag_unpack()?;
  1401. match field_number {
  1402. 10 => {
  1403. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.public_key)?;
  1404. },
  1405. 20 => {
  1406. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.old_ticket)?;
  1407. },
  1408. _ => {
  1409. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1410. },
  1411. };
  1412. }
  1413. ::std::result::Result::Ok(())
  1414. }
  1415. // Compute sizes of nested messages
  1416. #[allow(unused_variables)]
  1417. fn compute_size(&self) -> u32 {
  1418. let mut my_size = 0;
  1419. if let Some(ref v) = self.public_key.as_ref() {
  1420. let len = v.compute_size();
  1421. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1422. }
  1423. if let Some(ref v) = self.old_ticket.as_ref() {
  1424. let len = v.compute_size();
  1425. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1426. }
  1427. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1428. self.cached_size.set(my_size);
  1429. my_size
  1430. }
  1431. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1432. if let Some(ref v) = self.public_key.as_ref() {
  1433. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1434. os.write_raw_varint32(v.get_cached_size())?;
  1435. v.write_to_with_cached_sizes(os)?;
  1436. }
  1437. if let Some(ref v) = self.old_ticket.as_ref() {
  1438. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1439. os.write_raw_varint32(v.get_cached_size())?;
  1440. v.write_to_with_cached_sizes(os)?;
  1441. }
  1442. os.write_unknown_fields(self.get_unknown_fields())?;
  1443. ::std::result::Result::Ok(())
  1444. }
  1445. fn get_cached_size(&self) -> u32 {
  1446. self.cached_size.get()
  1447. }
  1448. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1449. &self.unknown_fields
  1450. }
  1451. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1452. &mut self.unknown_fields
  1453. }
  1454. fn as_any(&self) -> &dyn (::std::any::Any) {
  1455. self as &dyn (::std::any::Any)
  1456. }
  1457. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1458. self as &mut dyn (::std::any::Any)
  1459. }
  1460. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1461. self
  1462. }
  1463. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1464. Self::descriptor_static()
  1465. }
  1466. fn new() -> PeerTicketUnion {
  1467. PeerTicketUnion::new()
  1468. }
  1469. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1470. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1471. lock: ::protobuf::lazy::ONCE_INIT,
  1472. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1473. };
  1474. unsafe {
  1475. descriptor.get(|| {
  1476. let mut fields = ::std::vec::Vec::new();
  1477. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PeerTicketPublicKey>>(
  1478. "public_key",
  1479. |m: &PeerTicketUnion| { &m.public_key },
  1480. |m: &mut PeerTicketUnion| { &mut m.public_key },
  1481. ));
  1482. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PeerTicketOld>>(
  1483. "old_ticket",
  1484. |m: &PeerTicketUnion| { &m.old_ticket },
  1485. |m: &mut PeerTicketUnion| { &mut m.old_ticket },
  1486. ));
  1487. ::protobuf::reflect::MessageDescriptor::new::<PeerTicketUnion>(
  1488. "PeerTicketUnion",
  1489. fields,
  1490. file_descriptor_proto()
  1491. )
  1492. })
  1493. }
  1494. }
  1495. fn default_instance() -> &'static PeerTicketUnion {
  1496. static mut instance: ::protobuf::lazy::Lazy<PeerTicketUnion> = ::protobuf::lazy::Lazy {
  1497. lock: ::protobuf::lazy::ONCE_INIT,
  1498. ptr: 0 as *const PeerTicketUnion,
  1499. };
  1500. unsafe {
  1501. instance.get(PeerTicketUnion::new)
  1502. }
  1503. }
  1504. }
  1505. impl ::protobuf::Clear for PeerTicketUnion {
  1506. fn clear(&mut self) {
  1507. self.public_key.clear();
  1508. self.old_ticket.clear();
  1509. self.unknown_fields.clear();
  1510. }
  1511. }
  1512. impl ::std::fmt::Debug for PeerTicketUnion {
  1513. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1514. ::protobuf::text_format::fmt(self, f)
  1515. }
  1516. }
  1517. impl ::protobuf::reflect::ProtobufValue for PeerTicketUnion {
  1518. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1519. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1520. }
  1521. }
  1522. #[derive(PartialEq,Clone,Default)]
  1523. pub struct PeerTicketPublicKey {
  1524. // message fields
  1525. public_key: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1526. // special fields
  1527. pub unknown_fields: ::protobuf::UnknownFields,
  1528. pub cached_size: ::protobuf::CachedSize,
  1529. }
  1530. impl<'a> ::std::default::Default for &'a PeerTicketPublicKey {
  1531. fn default() -> &'a PeerTicketPublicKey {
  1532. <PeerTicketPublicKey as ::protobuf::Message>::default_instance()
  1533. }
  1534. }
  1535. impl PeerTicketPublicKey {
  1536. pub fn new() -> PeerTicketPublicKey {
  1537. ::std::default::Default::default()
  1538. }
  1539. // required bytes public_key = 10;
  1540. pub fn get_public_key(&self) -> &[u8] {
  1541. match self.public_key.as_ref() {
  1542. Some(v) => &v,
  1543. None => &[],
  1544. }
  1545. }
  1546. pub fn clear_public_key(&mut self) {
  1547. self.public_key.clear();
  1548. }
  1549. pub fn has_public_key(&self) -> bool {
  1550. self.public_key.is_some()
  1551. }
  1552. // Param is passed by value, moved
  1553. pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
  1554. self.public_key = ::protobuf::SingularField::some(v);
  1555. }
  1556. // Mutable pointer to the field.
  1557. // If field is not initialized, it is initialized with default value first.
  1558. pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
  1559. if self.public_key.is_none() {
  1560. self.public_key.set_default();
  1561. }
  1562. self.public_key.as_mut().unwrap()
  1563. }
  1564. // Take field
  1565. pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
  1566. self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1567. }
  1568. }
  1569. impl ::protobuf::Message for PeerTicketPublicKey {
  1570. fn is_initialized(&self) -> bool {
  1571. if self.public_key.is_none() {
  1572. return false;
  1573. }
  1574. true
  1575. }
  1576. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1577. while !is.eof()? {
  1578. let (field_number, wire_type) = is.read_tag_unpack()?;
  1579. match field_number {
  1580. 10 => {
  1581. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.public_key)?;
  1582. },
  1583. _ => {
  1584. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1585. },
  1586. };
  1587. }
  1588. ::std::result::Result::Ok(())
  1589. }
  1590. // Compute sizes of nested messages
  1591. #[allow(unused_variables)]
  1592. fn compute_size(&self) -> u32 {
  1593. let mut my_size = 0;
  1594. if let Some(ref v) = self.public_key.as_ref() {
  1595. my_size += ::protobuf::rt::bytes_size(10, &v);
  1596. }
  1597. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1598. self.cached_size.set(my_size);
  1599. my_size
  1600. }
  1601. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1602. if let Some(ref v) = self.public_key.as_ref() {
  1603. os.write_bytes(10, &v)?;
  1604. }
  1605. os.write_unknown_fields(self.get_unknown_fields())?;
  1606. ::std::result::Result::Ok(())
  1607. }
  1608. fn get_cached_size(&self) -> u32 {
  1609. self.cached_size.get()
  1610. }
  1611. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1612. &self.unknown_fields
  1613. }
  1614. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1615. &mut self.unknown_fields
  1616. }
  1617. fn as_any(&self) -> &dyn (::std::any::Any) {
  1618. self as &dyn (::std::any::Any)
  1619. }
  1620. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1621. self as &mut dyn (::std::any::Any)
  1622. }
  1623. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1624. self
  1625. }
  1626. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1627. Self::descriptor_static()
  1628. }
  1629. fn new() -> PeerTicketPublicKey {
  1630. PeerTicketPublicKey::new()
  1631. }
  1632. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1633. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1634. lock: ::protobuf::lazy::ONCE_INIT,
  1635. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1636. };
  1637. unsafe {
  1638. descriptor.get(|| {
  1639. let mut fields = ::std::vec::Vec::new();
  1640. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1641. "public_key",
  1642. |m: &PeerTicketPublicKey| { &m.public_key },
  1643. |m: &mut PeerTicketPublicKey| { &mut m.public_key },
  1644. ));
  1645. ::protobuf::reflect::MessageDescriptor::new::<PeerTicketPublicKey>(
  1646. "PeerTicketPublicKey",
  1647. fields,
  1648. file_descriptor_proto()
  1649. )
  1650. })
  1651. }
  1652. }
  1653. fn default_instance() -> &'static PeerTicketPublicKey {
  1654. static mut instance: ::protobuf::lazy::Lazy<PeerTicketPublicKey> = ::protobuf::lazy::Lazy {
  1655. lock: ::protobuf::lazy::ONCE_INIT,
  1656. ptr: 0 as *const PeerTicketPublicKey,
  1657. };
  1658. unsafe {
  1659. instance.get(PeerTicketPublicKey::new)
  1660. }
  1661. }
  1662. }
  1663. impl ::protobuf::Clear for PeerTicketPublicKey {
  1664. fn clear(&mut self) {
  1665. self.public_key.clear();
  1666. self.unknown_fields.clear();
  1667. }
  1668. }
  1669. impl ::std::fmt::Debug for PeerTicketPublicKey {
  1670. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1671. ::protobuf::text_format::fmt(self, f)
  1672. }
  1673. }
  1674. impl ::protobuf::reflect::ProtobufValue for PeerTicketPublicKey {
  1675. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1676. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1677. }
  1678. }
  1679. #[derive(PartialEq,Clone,Default)]
  1680. pub struct PeerTicketOld {
  1681. // message fields
  1682. peer_ticket: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1683. peer_ticket_signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1684. // special fields
  1685. pub unknown_fields: ::protobuf::UnknownFields,
  1686. pub cached_size: ::protobuf::CachedSize,
  1687. }
  1688. impl<'a> ::std::default::Default for &'a PeerTicketOld {
  1689. fn default() -> &'a PeerTicketOld {
  1690. <PeerTicketOld as ::protobuf::Message>::default_instance()
  1691. }
  1692. }
  1693. impl PeerTicketOld {
  1694. pub fn new() -> PeerTicketOld {
  1695. ::std::default::Default::default()
  1696. }
  1697. // required bytes peer_ticket = 10;
  1698. pub fn get_peer_ticket(&self) -> &[u8] {
  1699. match self.peer_ticket.as_ref() {
  1700. Some(v) => &v,
  1701. None => &[],
  1702. }
  1703. }
  1704. pub fn clear_peer_ticket(&mut self) {
  1705. self.peer_ticket.clear();
  1706. }
  1707. pub fn has_peer_ticket(&self) -> bool {
  1708. self.peer_ticket.is_some()
  1709. }
  1710. // Param is passed by value, moved
  1711. pub fn set_peer_ticket(&mut self, v: ::std::vec::Vec<u8>) {
  1712. self.peer_ticket = ::protobuf::SingularField::some(v);
  1713. }
  1714. // Mutable pointer to the field.
  1715. // If field is not initialized, it is initialized with default value first.
  1716. pub fn mut_peer_ticket(&mut self) -> &mut ::std::vec::Vec<u8> {
  1717. if self.peer_ticket.is_none() {
  1718. self.peer_ticket.set_default();
  1719. }
  1720. self.peer_ticket.as_mut().unwrap()
  1721. }
  1722. // Take field
  1723. pub fn take_peer_ticket(&mut self) -> ::std::vec::Vec<u8> {
  1724. self.peer_ticket.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1725. }
  1726. // required bytes peer_ticket_signature = 20;
  1727. pub fn get_peer_ticket_signature(&self) -> &[u8] {
  1728. match self.peer_ticket_signature.as_ref() {
  1729. Some(v) => &v,
  1730. None => &[],
  1731. }
  1732. }
  1733. pub fn clear_peer_ticket_signature(&mut self) {
  1734. self.peer_ticket_signature.clear();
  1735. }
  1736. pub fn has_peer_ticket_signature(&self) -> bool {
  1737. self.peer_ticket_signature.is_some()
  1738. }
  1739. // Param is passed by value, moved
  1740. pub fn set_peer_ticket_signature(&mut self, v: ::std::vec::Vec<u8>) {
  1741. self.peer_ticket_signature = ::protobuf::SingularField::some(v);
  1742. }
  1743. // Mutable pointer to the field.
  1744. // If field is not initialized, it is initialized with default value first.
  1745. pub fn mut_peer_ticket_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
  1746. if self.peer_ticket_signature.is_none() {
  1747. self.peer_ticket_signature.set_default();
  1748. }
  1749. self.peer_ticket_signature.as_mut().unwrap()
  1750. }
  1751. // Take field
  1752. pub fn take_peer_ticket_signature(&mut self) -> ::std::vec::Vec<u8> {
  1753. self.peer_ticket_signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1754. }
  1755. }
  1756. impl ::protobuf::Message for PeerTicketOld {
  1757. fn is_initialized(&self) -> bool {
  1758. if self.peer_ticket.is_none() {
  1759. return false;
  1760. }
  1761. if self.peer_ticket_signature.is_none() {
  1762. return false;
  1763. }
  1764. true
  1765. }
  1766. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1767. while !is.eof()? {
  1768. let (field_number, wire_type) = is.read_tag_unpack()?;
  1769. match field_number {
  1770. 10 => {
  1771. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.peer_ticket)?;
  1772. },
  1773. 20 => {
  1774. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.peer_ticket_signature)?;
  1775. },
  1776. _ => {
  1777. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1778. },
  1779. };
  1780. }
  1781. ::std::result::Result::Ok(())
  1782. }
  1783. // Compute sizes of nested messages
  1784. #[allow(unused_variables)]
  1785. fn compute_size(&self) -> u32 {
  1786. let mut my_size = 0;
  1787. if let Some(ref v) = self.peer_ticket.as_ref() {
  1788. my_size += ::protobuf::rt::bytes_size(10, &v);
  1789. }
  1790. if let Some(ref v) = self.peer_ticket_signature.as_ref() {
  1791. my_size += ::protobuf::rt::bytes_size(20, &v);
  1792. }
  1793. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1794. self.cached_size.set(my_size);
  1795. my_size
  1796. }
  1797. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1798. if let Some(ref v) = self.peer_ticket.as_ref() {
  1799. os.write_bytes(10, &v)?;
  1800. }
  1801. if let Some(ref v) = self.peer_ticket_signature.as_ref() {
  1802. os.write_bytes(20, &v)?;
  1803. }
  1804. os.write_unknown_fields(self.get_unknown_fields())?;
  1805. ::std::result::Result::Ok(())
  1806. }
  1807. fn get_cached_size(&self) -> u32 {
  1808. self.cached_size.get()
  1809. }
  1810. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1811. &self.unknown_fields
  1812. }
  1813. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1814. &mut self.unknown_fields
  1815. }
  1816. fn as_any(&self) -> &dyn (::std::any::Any) {
  1817. self as &dyn (::std::any::Any)
  1818. }
  1819. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1820. self as &mut dyn (::std::any::Any)
  1821. }
  1822. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1823. self
  1824. }
  1825. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1826. Self::descriptor_static()
  1827. }
  1828. fn new() -> PeerTicketOld {
  1829. PeerTicketOld::new()
  1830. }
  1831. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1832. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1833. lock: ::protobuf::lazy::ONCE_INIT,
  1834. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1835. };
  1836. unsafe {
  1837. descriptor.get(|| {
  1838. let mut fields = ::std::vec::Vec::new();
  1839. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1840. "peer_ticket",
  1841. |m: &PeerTicketOld| { &m.peer_ticket },
  1842. |m: &mut PeerTicketOld| { &mut m.peer_ticket },
  1843. ));
  1844. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1845. "peer_ticket_signature",
  1846. |m: &PeerTicketOld| { &m.peer_ticket_signature },
  1847. |m: &mut PeerTicketOld| { &mut m.peer_ticket_signature },
  1848. ));
  1849. ::protobuf::reflect::MessageDescriptor::new::<PeerTicketOld>(
  1850. "PeerTicketOld",
  1851. fields,
  1852. file_descriptor_proto()
  1853. )
  1854. })
  1855. }
  1856. }
  1857. fn default_instance() -> &'static PeerTicketOld {
  1858. static mut instance: ::protobuf::lazy::Lazy<PeerTicketOld> = ::protobuf::lazy::Lazy {
  1859. lock: ::protobuf::lazy::ONCE_INIT,
  1860. ptr: 0 as *const PeerTicketOld,
  1861. };
  1862. unsafe {
  1863. instance.get(PeerTicketOld::new)
  1864. }
  1865. }
  1866. }
  1867. impl ::protobuf::Clear for PeerTicketOld {
  1868. fn clear(&mut self) {
  1869. self.peer_ticket.clear();
  1870. self.peer_ticket_signature.clear();
  1871. self.unknown_fields.clear();
  1872. }
  1873. }
  1874. impl ::std::fmt::Debug for PeerTicketOld {
  1875. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1876. ::protobuf::text_format::fmt(self, f)
  1877. }
  1878. }
  1879. impl ::protobuf::reflect::ProtobufValue for PeerTicketOld {
  1880. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1881. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1882. }
  1883. }
  1884. #[derive(PartialEq,Clone,Default)]
  1885. pub struct SystemInfo {
  1886. // message fields
  1887. cpu_family: ::std::option::Option<CpuFamily>,
  1888. cpu_subtype: ::std::option::Option<u32>,
  1889. cpu_ext: ::std::option::Option<u32>,
  1890. brand: ::std::option::Option<Brand>,
  1891. brand_flags: ::std::option::Option<u32>,
  1892. os: ::std::option::Option<Os>,
  1893. os_version: ::std::option::Option<u32>,
  1894. os_ext: ::std::option::Option<u32>,
  1895. system_information_string: ::protobuf::SingularField<::std::string::String>,
  1896. device_id: ::protobuf::SingularField<::std::string::String>,
  1897. // special fields
  1898. pub unknown_fields: ::protobuf::UnknownFields,
  1899. pub cached_size: ::protobuf::CachedSize,
  1900. }
  1901. impl<'a> ::std::default::Default for &'a SystemInfo {
  1902. fn default() -> &'a SystemInfo {
  1903. <SystemInfo as ::protobuf::Message>::default_instance()
  1904. }
  1905. }
  1906. impl SystemInfo {
  1907. pub fn new() -> SystemInfo {
  1908. ::std::default::Default::default()
  1909. }
  1910. // required .CpuFamily cpu_family = 10;
  1911. pub fn get_cpu_family(&self) -> CpuFamily {
  1912. self.cpu_family.unwrap_or(CpuFamily::CPU_UNKNOWN)
  1913. }
  1914. pub fn clear_cpu_family(&mut self) {
  1915. self.cpu_family = ::std::option::Option::None;
  1916. }
  1917. pub fn has_cpu_family(&self) -> bool {
  1918. self.cpu_family.is_some()
  1919. }
  1920. // Param is passed by value, moved
  1921. pub fn set_cpu_family(&mut self, v: CpuFamily) {
  1922. self.cpu_family = ::std::option::Option::Some(v);
  1923. }
  1924. // optional uint32 cpu_subtype = 20;
  1925. pub fn get_cpu_subtype(&self) -> u32 {
  1926. self.cpu_subtype.unwrap_or(0)
  1927. }
  1928. pub fn clear_cpu_subtype(&mut self) {
  1929. self.cpu_subtype = ::std::option::Option::None;
  1930. }
  1931. pub fn has_cpu_subtype(&self) -> bool {
  1932. self.cpu_subtype.is_some()
  1933. }
  1934. // Param is passed by value, moved
  1935. pub fn set_cpu_subtype(&mut self, v: u32) {
  1936. self.cpu_subtype = ::std::option::Option::Some(v);
  1937. }
  1938. // optional uint32 cpu_ext = 30;
  1939. pub fn get_cpu_ext(&self) -> u32 {
  1940. self.cpu_ext.unwrap_or(0)
  1941. }
  1942. pub fn clear_cpu_ext(&mut self) {
  1943. self.cpu_ext = ::std::option::Option::None;
  1944. }
  1945. pub fn has_cpu_ext(&self) -> bool {
  1946. self.cpu_ext.is_some()
  1947. }
  1948. // Param is passed by value, moved
  1949. pub fn set_cpu_ext(&mut self, v: u32) {
  1950. self.cpu_ext = ::std::option::Option::Some(v);
  1951. }
  1952. // optional .Brand brand = 40;
  1953. pub fn get_brand(&self) -> Brand {
  1954. self.brand.unwrap_or(Brand::BRAND_UNBRANDED)
  1955. }
  1956. pub fn clear_brand(&mut self) {
  1957. self.brand = ::std::option::Option::None;
  1958. }
  1959. pub fn has_brand(&self) -> bool {
  1960. self.brand.is_some()
  1961. }
  1962. // Param is passed by value, moved
  1963. pub fn set_brand(&mut self, v: Brand) {
  1964. self.brand = ::std::option::Option::Some(v);
  1965. }
  1966. // optional uint32 brand_flags = 50;
  1967. pub fn get_brand_flags(&self) -> u32 {
  1968. self.brand_flags.unwrap_or(0)
  1969. }
  1970. pub fn clear_brand_flags(&mut self) {
  1971. self.brand_flags = ::std::option::Option::None;
  1972. }
  1973. pub fn has_brand_flags(&self) -> bool {
  1974. self.brand_flags.is_some()
  1975. }
  1976. // Param is passed by value, moved
  1977. pub fn set_brand_flags(&mut self, v: u32) {
  1978. self.brand_flags = ::std::option::Option::Some(v);
  1979. }
  1980. // required .Os os = 60;
  1981. pub fn get_os(&self) -> Os {
  1982. self.os.unwrap_or(Os::OS_UNKNOWN)
  1983. }
  1984. pub fn clear_os(&mut self) {
  1985. self.os = ::std::option::Option::None;
  1986. }
  1987. pub fn has_os(&self) -> bool {
  1988. self.os.is_some()
  1989. }
  1990. // Param is passed by value, moved
  1991. pub fn set_os(&mut self, v: Os) {
  1992. self.os = ::std::option::Option::Some(v);
  1993. }
  1994. // optional uint32 os_version = 70;
  1995. pub fn get_os_version(&self) -> u32 {
  1996. self.os_version.unwrap_or(0)
  1997. }
  1998. pub fn clear_os_version(&mut self) {
  1999. self.os_version = ::std::option::Option::None;
  2000. }
  2001. pub fn has_os_version(&self) -> bool {
  2002. self.os_version.is_some()
  2003. }
  2004. // Param is passed by value, moved
  2005. pub fn set_os_version(&mut self, v: u32) {
  2006. self.os_version = ::std::option::Option::Some(v);
  2007. }
  2008. // optional uint32 os_ext = 80;
  2009. pub fn get_os_ext(&self) -> u32 {
  2010. self.os_ext.unwrap_or(0)
  2011. }
  2012. pub fn clear_os_ext(&mut self) {
  2013. self.os_ext = ::std::option::Option::None;
  2014. }
  2015. pub fn has_os_ext(&self) -> bool {
  2016. self.os_ext.is_some()
  2017. }
  2018. // Param is passed by value, moved
  2019. pub fn set_os_ext(&mut self, v: u32) {
  2020. self.os_ext = ::std::option::Option::Some(v);
  2021. }
  2022. // optional string system_information_string = 90;
  2023. pub fn get_system_information_string(&self) -> &str {
  2024. match self.system_information_string.as_ref() {
  2025. Some(v) => &v,
  2026. None => "",
  2027. }
  2028. }
  2029. pub fn clear_system_information_string(&mut self) {
  2030. self.system_information_string.clear();
  2031. }
  2032. pub fn has_system_information_string(&self) -> bool {
  2033. self.system_information_string.is_some()
  2034. }
  2035. // Param is passed by value, moved
  2036. pub fn set_system_information_string(&mut self, v: ::std::string::String) {
  2037. self.system_information_string = ::protobuf::SingularField::some(v);
  2038. }
  2039. // Mutable pointer to the field.
  2040. // If field is not initialized, it is initialized with default value first.
  2041. pub fn mut_system_information_string(&mut self) -> &mut ::std::string::String {
  2042. if self.system_information_string.is_none() {
  2043. self.system_information_string.set_default();
  2044. }
  2045. self.system_information_string.as_mut().unwrap()
  2046. }
  2047. // Take field
  2048. pub fn take_system_information_string(&mut self) -> ::std::string::String {
  2049. self.system_information_string.take().unwrap_or_else(|| ::std::string::String::new())
  2050. }
  2051. // optional string device_id = 100;
  2052. pub fn get_device_id(&self) -> &str {
  2053. match self.device_id.as_ref() {
  2054. Some(v) => &v,
  2055. None => "",
  2056. }
  2057. }
  2058. pub fn clear_device_id(&mut self) {
  2059. self.device_id.clear();
  2060. }
  2061. pub fn has_device_id(&self) -> bool {
  2062. self.device_id.is_some()
  2063. }
  2064. // Param is passed by value, moved
  2065. pub fn set_device_id(&mut self, v: ::std::string::String) {
  2066. self.device_id = ::protobuf::SingularField::some(v);
  2067. }
  2068. // Mutable pointer to the field.
  2069. // If field is not initialized, it is initialized with default value first.
  2070. pub fn mut_device_id(&mut self) -> &mut ::std::string::String {
  2071. if self.device_id.is_none() {
  2072. self.device_id.set_default();
  2073. }
  2074. self.device_id.as_mut().unwrap()
  2075. }
  2076. // Take field
  2077. pub fn take_device_id(&mut self) -> ::std::string::String {
  2078. self.device_id.take().unwrap_or_else(|| ::std::string::String::new())
  2079. }
  2080. }
  2081. impl ::protobuf::Message for SystemInfo {
  2082. fn is_initialized(&self) -> bool {
  2083. if self.cpu_family.is_none() {
  2084. return false;
  2085. }
  2086. if self.os.is_none() {
  2087. return false;
  2088. }
  2089. true
  2090. }
  2091. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2092. while !is.eof()? {
  2093. let (field_number, wire_type) = is.read_tag_unpack()?;
  2094. match field_number {
  2095. 10 => {
  2096. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.cpu_family, 10, &mut self.unknown_fields)?
  2097. },
  2098. 20 => {
  2099. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2100. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2101. }
  2102. let tmp = is.read_uint32()?;
  2103. self.cpu_subtype = ::std::option::Option::Some(tmp);
  2104. },
  2105. 30 => {
  2106. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2107. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2108. }
  2109. let tmp = is.read_uint32()?;
  2110. self.cpu_ext = ::std::option::Option::Some(tmp);
  2111. },
  2112. 40 => {
  2113. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.brand, 40, &mut self.unknown_fields)?
  2114. },
  2115. 50 => {
  2116. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2117. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2118. }
  2119. let tmp = is.read_uint32()?;
  2120. self.brand_flags = ::std::option::Option::Some(tmp);
  2121. },
  2122. 60 => {
  2123. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.os, 60, &mut self.unknown_fields)?
  2124. },
  2125. 70 => {
  2126. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2127. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2128. }
  2129. let tmp = is.read_uint32()?;
  2130. self.os_version = ::std::option::Option::Some(tmp);
  2131. },
  2132. 80 => {
  2133. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2134. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2135. }
  2136. let tmp = is.read_uint32()?;
  2137. self.os_ext = ::std::option::Option::Some(tmp);
  2138. },
  2139. 90 => {
  2140. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.system_information_string)?;
  2141. },
  2142. 100 => {
  2143. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.device_id)?;
  2144. },
  2145. _ => {
  2146. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2147. },
  2148. };
  2149. }
  2150. ::std::result::Result::Ok(())
  2151. }
  2152. // Compute sizes of nested messages
  2153. #[allow(unused_variables)]
  2154. fn compute_size(&self) -> u32 {
  2155. let mut my_size = 0;
  2156. if let Some(v) = self.cpu_family {
  2157. my_size += ::protobuf::rt::enum_size(10, v);
  2158. }
  2159. if let Some(v) = self.cpu_subtype {
  2160. my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
  2161. }
  2162. if let Some(v) = self.cpu_ext {
  2163. my_size += ::protobuf::rt::value_size(30, v, ::protobuf::wire_format::WireTypeVarint);
  2164. }
  2165. if let Some(v) = self.brand {
  2166. my_size += ::protobuf::rt::enum_size(40, v);
  2167. }
  2168. if let Some(v) = self.brand_flags {
  2169. my_size += ::protobuf::rt::value_size(50, v, ::protobuf::wire_format::WireTypeVarint);
  2170. }
  2171. if let Some(v) = self.os {
  2172. my_size += ::protobuf::rt::enum_size(60, v);
  2173. }
  2174. if let Some(v) = self.os_version {
  2175. my_size += ::protobuf::rt::value_size(70, v, ::protobuf::wire_format::WireTypeVarint);
  2176. }
  2177. if let Some(v) = self.os_ext {
  2178. my_size += ::protobuf::rt::value_size(80, v, ::protobuf::wire_format::WireTypeVarint);
  2179. }
  2180. if let Some(ref v) = self.system_information_string.as_ref() {
  2181. my_size += ::protobuf::rt::string_size(90, &v);
  2182. }
  2183. if let Some(ref v) = self.device_id.as_ref() {
  2184. my_size += ::protobuf::rt::string_size(100, &v);
  2185. }
  2186. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2187. self.cached_size.set(my_size);
  2188. my_size
  2189. }
  2190. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2191. if let Some(v) = self.cpu_family {
  2192. os.write_enum(10, v.value())?;
  2193. }
  2194. if let Some(v) = self.cpu_subtype {
  2195. os.write_uint32(20, v)?;
  2196. }
  2197. if let Some(v) = self.cpu_ext {
  2198. os.write_uint32(30, v)?;
  2199. }
  2200. if let Some(v) = self.brand {
  2201. os.write_enum(40, v.value())?;
  2202. }
  2203. if let Some(v) = self.brand_flags {
  2204. os.write_uint32(50, v)?;
  2205. }
  2206. if let Some(v) = self.os {
  2207. os.write_enum(60, v.value())?;
  2208. }
  2209. if let Some(v) = self.os_version {
  2210. os.write_uint32(70, v)?;
  2211. }
  2212. if let Some(v) = self.os_ext {
  2213. os.write_uint32(80, v)?;
  2214. }
  2215. if let Some(ref v) = self.system_information_string.as_ref() {
  2216. os.write_string(90, &v)?;
  2217. }
  2218. if let Some(ref v) = self.device_id.as_ref() {
  2219. os.write_string(100, &v)?;
  2220. }
  2221. os.write_unknown_fields(self.get_unknown_fields())?;
  2222. ::std::result::Result::Ok(())
  2223. }
  2224. fn get_cached_size(&self) -> u32 {
  2225. self.cached_size.get()
  2226. }
  2227. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2228. &self.unknown_fields
  2229. }
  2230. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2231. &mut self.unknown_fields
  2232. }
  2233. fn as_any(&self) -> &dyn (::std::any::Any) {
  2234. self as &dyn (::std::any::Any)
  2235. }
  2236. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2237. self as &mut dyn (::std::any::Any)
  2238. }
  2239. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2240. self
  2241. }
  2242. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2243. Self::descriptor_static()
  2244. }
  2245. fn new() -> SystemInfo {
  2246. SystemInfo::new()
  2247. }
  2248. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2249. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2250. lock: ::protobuf::lazy::ONCE_INIT,
  2251. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2252. };
  2253. unsafe {
  2254. descriptor.get(|| {
  2255. let mut fields = ::std::vec::Vec::new();
  2256. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<CpuFamily>>(
  2257. "cpu_family",
  2258. |m: &SystemInfo| { &m.cpu_family },
  2259. |m: &mut SystemInfo| { &mut m.cpu_family },
  2260. ));
  2261. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2262. "cpu_subtype",
  2263. |m: &SystemInfo| { &m.cpu_subtype },
  2264. |m: &mut SystemInfo| { &mut m.cpu_subtype },
  2265. ));
  2266. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2267. "cpu_ext",
  2268. |m: &SystemInfo| { &m.cpu_ext },
  2269. |m: &mut SystemInfo| { &mut m.cpu_ext },
  2270. ));
  2271. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Brand>>(
  2272. "brand",
  2273. |m: &SystemInfo| { &m.brand },
  2274. |m: &mut SystemInfo| { &mut m.brand },
  2275. ));
  2276. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2277. "brand_flags",
  2278. |m: &SystemInfo| { &m.brand_flags },
  2279. |m: &mut SystemInfo| { &mut m.brand_flags },
  2280. ));
  2281. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Os>>(
  2282. "os",
  2283. |m: &SystemInfo| { &m.os },
  2284. |m: &mut SystemInfo| { &mut m.os },
  2285. ));
  2286. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2287. "os_version",
  2288. |m: &SystemInfo| { &m.os_version },
  2289. |m: &mut SystemInfo| { &mut m.os_version },
  2290. ));
  2291. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2292. "os_ext",
  2293. |m: &SystemInfo| { &m.os_ext },
  2294. |m: &mut SystemInfo| { &mut m.os_ext },
  2295. ));
  2296. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2297. "system_information_string",
  2298. |m: &SystemInfo| { &m.system_information_string },
  2299. |m: &mut SystemInfo| { &mut m.system_information_string },
  2300. ));
  2301. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2302. "device_id",
  2303. |m: &SystemInfo| { &m.device_id },
  2304. |m: &mut SystemInfo| { &mut m.device_id },
  2305. ));
  2306. ::protobuf::reflect::MessageDescriptor::new::<SystemInfo>(
  2307. "SystemInfo",
  2308. fields,
  2309. file_descriptor_proto()
  2310. )
  2311. })
  2312. }
  2313. }
  2314. fn default_instance() -> &'static SystemInfo {
  2315. static mut instance: ::protobuf::lazy::Lazy<SystemInfo> = ::protobuf::lazy::Lazy {
  2316. lock: ::protobuf::lazy::ONCE_INIT,
  2317. ptr: 0 as *const SystemInfo,
  2318. };
  2319. unsafe {
  2320. instance.get(SystemInfo::new)
  2321. }
  2322. }
  2323. }
  2324. impl ::protobuf::Clear for SystemInfo {
  2325. fn clear(&mut self) {
  2326. self.cpu_family = ::std::option::Option::None;
  2327. self.cpu_subtype = ::std::option::Option::None;
  2328. self.cpu_ext = ::std::option::Option::None;
  2329. self.brand = ::std::option::Option::None;
  2330. self.brand_flags = ::std::option::Option::None;
  2331. self.os = ::std::option::Option::None;
  2332. self.os_version = ::std::option::Option::None;
  2333. self.os_ext = ::std::option::Option::None;
  2334. self.system_information_string.clear();
  2335. self.device_id.clear();
  2336. self.unknown_fields.clear();
  2337. }
  2338. }
  2339. impl ::std::fmt::Debug for SystemInfo {
  2340. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2341. ::protobuf::text_format::fmt(self, f)
  2342. }
  2343. }
  2344. impl ::protobuf::reflect::ProtobufValue for SystemInfo {
  2345. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2346. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2347. }
  2348. }
  2349. #[derive(PartialEq,Clone,Default)]
  2350. pub struct LibspotifyAppKey {
  2351. // message fields
  2352. version: ::std::option::Option<u32>,
  2353. devkey: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2354. signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2355. useragent: ::protobuf::SingularField<::std::string::String>,
  2356. callback_hash: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2357. // special fields
  2358. pub unknown_fields: ::protobuf::UnknownFields,
  2359. pub cached_size: ::protobuf::CachedSize,
  2360. }
  2361. impl<'a> ::std::default::Default for &'a LibspotifyAppKey {
  2362. fn default() -> &'a LibspotifyAppKey {
  2363. <LibspotifyAppKey as ::protobuf::Message>::default_instance()
  2364. }
  2365. }
  2366. impl LibspotifyAppKey {
  2367. pub fn new() -> LibspotifyAppKey {
  2368. ::std::default::Default::default()
  2369. }
  2370. // required uint32 version = 1;
  2371. pub fn get_version(&self) -> u32 {
  2372. self.version.unwrap_or(0)
  2373. }
  2374. pub fn clear_version(&mut self) {
  2375. self.version = ::std::option::Option::None;
  2376. }
  2377. pub fn has_version(&self) -> bool {
  2378. self.version.is_some()
  2379. }
  2380. // Param is passed by value, moved
  2381. pub fn set_version(&mut self, v: u32) {
  2382. self.version = ::std::option::Option::Some(v);
  2383. }
  2384. // required bytes devkey = 2;
  2385. pub fn get_devkey(&self) -> &[u8] {
  2386. match self.devkey.as_ref() {
  2387. Some(v) => &v,
  2388. None => &[],
  2389. }
  2390. }
  2391. pub fn clear_devkey(&mut self) {
  2392. self.devkey.clear();
  2393. }
  2394. pub fn has_devkey(&self) -> bool {
  2395. self.devkey.is_some()
  2396. }
  2397. // Param is passed by value, moved
  2398. pub fn set_devkey(&mut self, v: ::std::vec::Vec<u8>) {
  2399. self.devkey = ::protobuf::SingularField::some(v);
  2400. }
  2401. // Mutable pointer to the field.
  2402. // If field is not initialized, it is initialized with default value first.
  2403. pub fn mut_devkey(&mut self) -> &mut ::std::vec::Vec<u8> {
  2404. if self.devkey.is_none() {
  2405. self.devkey.set_default();
  2406. }
  2407. self.devkey.as_mut().unwrap()
  2408. }
  2409. // Take field
  2410. pub fn take_devkey(&mut self) -> ::std::vec::Vec<u8> {
  2411. self.devkey.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2412. }
  2413. // required bytes signature = 3;
  2414. pub fn get_signature(&self) -> &[u8] {
  2415. match self.signature.as_ref() {
  2416. Some(v) => &v,
  2417. None => &[],
  2418. }
  2419. }
  2420. pub fn clear_signature(&mut self) {
  2421. self.signature.clear();
  2422. }
  2423. pub fn has_signature(&self) -> bool {
  2424. self.signature.is_some()
  2425. }
  2426. // Param is passed by value, moved
  2427. pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
  2428. self.signature = ::protobuf::SingularField::some(v);
  2429. }
  2430. // Mutable pointer to the field.
  2431. // If field is not initialized, it is initialized with default value first.
  2432. pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
  2433. if self.signature.is_none() {
  2434. self.signature.set_default();
  2435. }
  2436. self.signature.as_mut().unwrap()
  2437. }
  2438. // Take field
  2439. pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
  2440. self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2441. }
  2442. // required string useragent = 4;
  2443. pub fn get_useragent(&self) -> &str {
  2444. match self.useragent.as_ref() {
  2445. Some(v) => &v,
  2446. None => "",
  2447. }
  2448. }
  2449. pub fn clear_useragent(&mut self) {
  2450. self.useragent.clear();
  2451. }
  2452. pub fn has_useragent(&self) -> bool {
  2453. self.useragent.is_some()
  2454. }
  2455. // Param is passed by value, moved
  2456. pub fn set_useragent(&mut self, v: ::std::string::String) {
  2457. self.useragent = ::protobuf::SingularField::some(v);
  2458. }
  2459. // Mutable pointer to the field.
  2460. // If field is not initialized, it is initialized with default value first.
  2461. pub fn mut_useragent(&mut self) -> &mut ::std::string::String {
  2462. if self.useragent.is_none() {
  2463. self.useragent.set_default();
  2464. }
  2465. self.useragent.as_mut().unwrap()
  2466. }
  2467. // Take field
  2468. pub fn take_useragent(&mut self) -> ::std::string::String {
  2469. self.useragent.take().unwrap_or_else(|| ::std::string::String::new())
  2470. }
  2471. // required bytes callback_hash = 5;
  2472. pub fn get_callback_hash(&self) -> &[u8] {
  2473. match self.callback_hash.as_ref() {
  2474. Some(v) => &v,
  2475. None => &[],
  2476. }
  2477. }
  2478. pub fn clear_callback_hash(&mut self) {
  2479. self.callback_hash.clear();
  2480. }
  2481. pub fn has_callback_hash(&self) -> bool {
  2482. self.callback_hash.is_some()
  2483. }
  2484. // Param is passed by value, moved
  2485. pub fn set_callback_hash(&mut self, v: ::std::vec::Vec<u8>) {
  2486. self.callback_hash = ::protobuf::SingularField::some(v);
  2487. }
  2488. // Mutable pointer to the field.
  2489. // If field is not initialized, it is initialized with default value first.
  2490. pub fn mut_callback_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
  2491. if self.callback_hash.is_none() {
  2492. self.callback_hash.set_default();
  2493. }
  2494. self.callback_hash.as_mut().unwrap()
  2495. }
  2496. // Take field
  2497. pub fn take_callback_hash(&mut self) -> ::std::vec::Vec<u8> {
  2498. self.callback_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2499. }
  2500. }
  2501. impl ::protobuf::Message for LibspotifyAppKey {
  2502. fn is_initialized(&self) -> bool {
  2503. if self.version.is_none() {
  2504. return false;
  2505. }
  2506. if self.devkey.is_none() {
  2507. return false;
  2508. }
  2509. if self.signature.is_none() {
  2510. return false;
  2511. }
  2512. if self.useragent.is_none() {
  2513. return false;
  2514. }
  2515. if self.callback_hash.is_none() {
  2516. return false;
  2517. }
  2518. true
  2519. }
  2520. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2521. while !is.eof()? {
  2522. let (field_number, wire_type) = is.read_tag_unpack()?;
  2523. match field_number {
  2524. 1 => {
  2525. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2526. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2527. }
  2528. let tmp = is.read_uint32()?;
  2529. self.version = ::std::option::Option::Some(tmp);
  2530. },
  2531. 2 => {
  2532. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.devkey)?;
  2533. },
  2534. 3 => {
  2535. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?;
  2536. },
  2537. 4 => {
  2538. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.useragent)?;
  2539. },
  2540. 5 => {
  2541. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.callback_hash)?;
  2542. },
  2543. _ => {
  2544. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2545. },
  2546. };
  2547. }
  2548. ::std::result::Result::Ok(())
  2549. }
  2550. // Compute sizes of nested messages
  2551. #[allow(unused_variables)]
  2552. fn compute_size(&self) -> u32 {
  2553. let mut my_size = 0;
  2554. if let Some(v) = self.version {
  2555. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  2556. }
  2557. if let Some(ref v) = self.devkey.as_ref() {
  2558. my_size += ::protobuf::rt::bytes_size(2, &v);
  2559. }
  2560. if let Some(ref v) = self.signature.as_ref() {
  2561. my_size += ::protobuf::rt::bytes_size(3, &v);
  2562. }
  2563. if let Some(ref v) = self.useragent.as_ref() {
  2564. my_size += ::protobuf::rt::string_size(4, &v);
  2565. }
  2566. if let Some(ref v) = self.callback_hash.as_ref() {
  2567. my_size += ::protobuf::rt::bytes_size(5, &v);
  2568. }
  2569. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2570. self.cached_size.set(my_size);
  2571. my_size
  2572. }
  2573. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2574. if let Some(v) = self.version {
  2575. os.write_uint32(1, v)?;
  2576. }
  2577. if let Some(ref v) = self.devkey.as_ref() {
  2578. os.write_bytes(2, &v)?;
  2579. }
  2580. if let Some(ref v) = self.signature.as_ref() {
  2581. os.write_bytes(3, &v)?;
  2582. }
  2583. if let Some(ref v) = self.useragent.as_ref() {
  2584. os.write_string(4, &v)?;
  2585. }
  2586. if let Some(ref v) = self.callback_hash.as_ref() {
  2587. os.write_bytes(5, &v)?;
  2588. }
  2589. os.write_unknown_fields(self.get_unknown_fields())?;
  2590. ::std::result::Result::Ok(())
  2591. }
  2592. fn get_cached_size(&self) -> u32 {
  2593. self.cached_size.get()
  2594. }
  2595. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2596. &self.unknown_fields
  2597. }
  2598. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2599. &mut self.unknown_fields
  2600. }
  2601. fn as_any(&self) -> &dyn (::std::any::Any) {
  2602. self as &dyn (::std::any::Any)
  2603. }
  2604. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2605. self as &mut dyn (::std::any::Any)
  2606. }
  2607. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2608. self
  2609. }
  2610. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2611. Self::descriptor_static()
  2612. }
  2613. fn new() -> LibspotifyAppKey {
  2614. LibspotifyAppKey::new()
  2615. }
  2616. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2617. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2618. lock: ::protobuf::lazy::ONCE_INIT,
  2619. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2620. };
  2621. unsafe {
  2622. descriptor.get(|| {
  2623. let mut fields = ::std::vec::Vec::new();
  2624. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  2625. "version",
  2626. |m: &LibspotifyAppKey| { &m.version },
  2627. |m: &mut LibspotifyAppKey| { &mut m.version },
  2628. ));
  2629. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2630. "devkey",
  2631. |m: &LibspotifyAppKey| { &m.devkey },
  2632. |m: &mut LibspotifyAppKey| { &mut m.devkey },
  2633. ));
  2634. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2635. "signature",
  2636. |m: &LibspotifyAppKey| { &m.signature },
  2637. |m: &mut LibspotifyAppKey| { &mut m.signature },
  2638. ));
  2639. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2640. "useragent",
  2641. |m: &LibspotifyAppKey| { &m.useragent },
  2642. |m: &mut LibspotifyAppKey| { &mut m.useragent },
  2643. ));
  2644. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2645. "callback_hash",
  2646. |m: &LibspotifyAppKey| { &m.callback_hash },
  2647. |m: &mut LibspotifyAppKey| { &mut m.callback_hash },
  2648. ));
  2649. ::protobuf::reflect::MessageDescriptor::new::<LibspotifyAppKey>(
  2650. "LibspotifyAppKey",
  2651. fields,
  2652. file_descriptor_proto()
  2653. )
  2654. })
  2655. }
  2656. }
  2657. fn default_instance() -> &'static LibspotifyAppKey {
  2658. static mut instance: ::protobuf::lazy::Lazy<LibspotifyAppKey> = ::protobuf::lazy::Lazy {
  2659. lock: ::protobuf::lazy::ONCE_INIT,
  2660. ptr: 0 as *const LibspotifyAppKey,
  2661. };
  2662. unsafe {
  2663. instance.get(LibspotifyAppKey::new)
  2664. }
  2665. }
  2666. }
  2667. impl ::protobuf::Clear for LibspotifyAppKey {
  2668. fn clear(&mut self) {
  2669. self.version = ::std::option::Option::None;
  2670. self.devkey.clear();
  2671. self.signature.clear();
  2672. self.useragent.clear();
  2673. self.callback_hash.clear();
  2674. self.unknown_fields.clear();
  2675. }
  2676. }
  2677. impl ::std::fmt::Debug for LibspotifyAppKey {
  2678. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2679. ::protobuf::text_format::fmt(self, f)
  2680. }
  2681. }
  2682. impl ::protobuf::reflect::ProtobufValue for LibspotifyAppKey {
  2683. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2684. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2685. }
  2686. }
  2687. #[derive(PartialEq,Clone,Default)]
  2688. pub struct ClientInfo {
  2689. // message fields
  2690. limited: ::std::option::Option<bool>,
  2691. fb: ::protobuf::SingularPtrField<ClientInfoFacebook>,
  2692. language: ::protobuf::SingularField<::std::string::String>,
  2693. // special fields
  2694. pub unknown_fields: ::protobuf::UnknownFields,
  2695. pub cached_size: ::protobuf::CachedSize,
  2696. }
  2697. impl<'a> ::std::default::Default for &'a ClientInfo {
  2698. fn default() -> &'a ClientInfo {
  2699. <ClientInfo as ::protobuf::Message>::default_instance()
  2700. }
  2701. }
  2702. impl ClientInfo {
  2703. pub fn new() -> ClientInfo {
  2704. ::std::default::Default::default()
  2705. }
  2706. // optional bool limited = 1;
  2707. pub fn get_limited(&self) -> bool {
  2708. self.limited.unwrap_or(false)
  2709. }
  2710. pub fn clear_limited(&mut self) {
  2711. self.limited = ::std::option::Option::None;
  2712. }
  2713. pub fn has_limited(&self) -> bool {
  2714. self.limited.is_some()
  2715. }
  2716. // Param is passed by value, moved
  2717. pub fn set_limited(&mut self, v: bool) {
  2718. self.limited = ::std::option::Option::Some(v);
  2719. }
  2720. // optional .ClientInfoFacebook fb = 2;
  2721. pub fn get_fb(&self) -> &ClientInfoFacebook {
  2722. self.fb.as_ref().unwrap_or_else(|| ClientInfoFacebook::default_instance())
  2723. }
  2724. pub fn clear_fb(&mut self) {
  2725. self.fb.clear();
  2726. }
  2727. pub fn has_fb(&self) -> bool {
  2728. self.fb.is_some()
  2729. }
  2730. // Param is passed by value, moved
  2731. pub fn set_fb(&mut self, v: ClientInfoFacebook) {
  2732. self.fb = ::protobuf::SingularPtrField::some(v);
  2733. }
  2734. // Mutable pointer to the field.
  2735. // If field is not initialized, it is initialized with default value first.
  2736. pub fn mut_fb(&mut self) -> &mut ClientInfoFacebook {
  2737. if self.fb.is_none() {
  2738. self.fb.set_default();
  2739. }
  2740. self.fb.as_mut().unwrap()
  2741. }
  2742. // Take field
  2743. pub fn take_fb(&mut self) -> ClientInfoFacebook {
  2744. self.fb.take().unwrap_or_else(|| ClientInfoFacebook::new())
  2745. }
  2746. // optional string language = 3;
  2747. pub fn get_language(&self) -> &str {
  2748. match self.language.as_ref() {
  2749. Some(v) => &v,
  2750. None => "",
  2751. }
  2752. }
  2753. pub fn clear_language(&mut self) {
  2754. self.language.clear();
  2755. }
  2756. pub fn has_language(&self) -> bool {
  2757. self.language.is_some()
  2758. }
  2759. // Param is passed by value, moved
  2760. pub fn set_language(&mut self, v: ::std::string::String) {
  2761. self.language = ::protobuf::SingularField::some(v);
  2762. }
  2763. // Mutable pointer to the field.
  2764. // If field is not initialized, it is initialized with default value first.
  2765. pub fn mut_language(&mut self) -> &mut ::std::string::String {
  2766. if self.language.is_none() {
  2767. self.language.set_default();
  2768. }
  2769. self.language.as_mut().unwrap()
  2770. }
  2771. // Take field
  2772. pub fn take_language(&mut self) -> ::std::string::String {
  2773. self.language.take().unwrap_or_else(|| ::std::string::String::new())
  2774. }
  2775. }
  2776. impl ::protobuf::Message for ClientInfo {
  2777. fn is_initialized(&self) -> bool {
  2778. for v in &self.fb {
  2779. if !v.is_initialized() {
  2780. return false;
  2781. }
  2782. };
  2783. true
  2784. }
  2785. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2786. while !is.eof()? {
  2787. let (field_number, wire_type) = is.read_tag_unpack()?;
  2788. match field_number {
  2789. 1 => {
  2790. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2791. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2792. }
  2793. let tmp = is.read_bool()?;
  2794. self.limited = ::std::option::Option::Some(tmp);
  2795. },
  2796. 2 => {
  2797. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fb)?;
  2798. },
  2799. 3 => {
  2800. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.language)?;
  2801. },
  2802. _ => {
  2803. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2804. },
  2805. };
  2806. }
  2807. ::std::result::Result::Ok(())
  2808. }
  2809. // Compute sizes of nested messages
  2810. #[allow(unused_variables)]
  2811. fn compute_size(&self) -> u32 {
  2812. let mut my_size = 0;
  2813. if let Some(v) = self.limited {
  2814. my_size += 2;
  2815. }
  2816. if let Some(ref v) = self.fb.as_ref() {
  2817. let len = v.compute_size();
  2818. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2819. }
  2820. if let Some(ref v) = self.language.as_ref() {
  2821. my_size += ::protobuf::rt::string_size(3, &v);
  2822. }
  2823. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2824. self.cached_size.set(my_size);
  2825. my_size
  2826. }
  2827. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2828. if let Some(v) = self.limited {
  2829. os.write_bool(1, v)?;
  2830. }
  2831. if let Some(ref v) = self.fb.as_ref() {
  2832. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2833. os.write_raw_varint32(v.get_cached_size())?;
  2834. v.write_to_with_cached_sizes(os)?;
  2835. }
  2836. if let Some(ref v) = self.language.as_ref() {
  2837. os.write_string(3, &v)?;
  2838. }
  2839. os.write_unknown_fields(self.get_unknown_fields())?;
  2840. ::std::result::Result::Ok(())
  2841. }
  2842. fn get_cached_size(&self) -> u32 {
  2843. self.cached_size.get()
  2844. }
  2845. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2846. &self.unknown_fields
  2847. }
  2848. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2849. &mut self.unknown_fields
  2850. }
  2851. fn as_any(&self) -> &dyn (::std::any::Any) {
  2852. self as &dyn (::std::any::Any)
  2853. }
  2854. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2855. self as &mut dyn (::std::any::Any)
  2856. }
  2857. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2858. self
  2859. }
  2860. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2861. Self::descriptor_static()
  2862. }
  2863. fn new() -> ClientInfo {
  2864. ClientInfo::new()
  2865. }
  2866. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2867. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2868. lock: ::protobuf::lazy::ONCE_INIT,
  2869. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2870. };
  2871. unsafe {
  2872. descriptor.get(|| {
  2873. let mut fields = ::std::vec::Vec::new();
  2874. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  2875. "limited",
  2876. |m: &ClientInfo| { &m.limited },
  2877. |m: &mut ClientInfo| { &mut m.limited },
  2878. ));
  2879. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ClientInfoFacebook>>(
  2880. "fb",
  2881. |m: &ClientInfo| { &m.fb },
  2882. |m: &mut ClientInfo| { &mut m.fb },
  2883. ));
  2884. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2885. "language",
  2886. |m: &ClientInfo| { &m.language },
  2887. |m: &mut ClientInfo| { &mut m.language },
  2888. ));
  2889. ::protobuf::reflect::MessageDescriptor::new::<ClientInfo>(
  2890. "ClientInfo",
  2891. fields,
  2892. file_descriptor_proto()
  2893. )
  2894. })
  2895. }
  2896. }
  2897. fn default_instance() -> &'static ClientInfo {
  2898. static mut instance: ::protobuf::lazy::Lazy<ClientInfo> = ::protobuf::lazy::Lazy {
  2899. lock: ::protobuf::lazy::ONCE_INIT,
  2900. ptr: 0 as *const ClientInfo,
  2901. };
  2902. unsafe {
  2903. instance.get(ClientInfo::new)
  2904. }
  2905. }
  2906. }
  2907. impl ::protobuf::Clear for ClientInfo {
  2908. fn clear(&mut self) {
  2909. self.limited = ::std::option::Option::None;
  2910. self.fb.clear();
  2911. self.language.clear();
  2912. self.unknown_fields.clear();
  2913. }
  2914. }
  2915. impl ::std::fmt::Debug for ClientInfo {
  2916. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2917. ::protobuf::text_format::fmt(self, f)
  2918. }
  2919. }
  2920. impl ::protobuf::reflect::ProtobufValue for ClientInfo {
  2921. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2922. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2923. }
  2924. }
  2925. #[derive(PartialEq,Clone,Default)]
  2926. pub struct ClientInfoFacebook {
  2927. // message fields
  2928. machine_id: ::protobuf::SingularField<::std::string::String>,
  2929. // special fields
  2930. pub unknown_fields: ::protobuf::UnknownFields,
  2931. pub cached_size: ::protobuf::CachedSize,
  2932. }
  2933. impl<'a> ::std::default::Default for &'a ClientInfoFacebook {
  2934. fn default() -> &'a ClientInfoFacebook {
  2935. <ClientInfoFacebook as ::protobuf::Message>::default_instance()
  2936. }
  2937. }
  2938. impl ClientInfoFacebook {
  2939. pub fn new() -> ClientInfoFacebook {
  2940. ::std::default::Default::default()
  2941. }
  2942. // optional string machine_id = 1;
  2943. pub fn get_machine_id(&self) -> &str {
  2944. match self.machine_id.as_ref() {
  2945. Some(v) => &v,
  2946. None => "",
  2947. }
  2948. }
  2949. pub fn clear_machine_id(&mut self) {
  2950. self.machine_id.clear();
  2951. }
  2952. pub fn has_machine_id(&self) -> bool {
  2953. self.machine_id.is_some()
  2954. }
  2955. // Param is passed by value, moved
  2956. pub fn set_machine_id(&mut self, v: ::std::string::String) {
  2957. self.machine_id = ::protobuf::SingularField::some(v);
  2958. }
  2959. // Mutable pointer to the field.
  2960. // If field is not initialized, it is initialized with default value first.
  2961. pub fn mut_machine_id(&mut self) -> &mut ::std::string::String {
  2962. if self.machine_id.is_none() {
  2963. self.machine_id.set_default();
  2964. }
  2965. self.machine_id.as_mut().unwrap()
  2966. }
  2967. // Take field
  2968. pub fn take_machine_id(&mut self) -> ::std::string::String {
  2969. self.machine_id.take().unwrap_or_else(|| ::std::string::String::new())
  2970. }
  2971. }
  2972. impl ::protobuf::Message for ClientInfoFacebook {
  2973. fn is_initialized(&self) -> bool {
  2974. true
  2975. }
  2976. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2977. while !is.eof()? {
  2978. let (field_number, wire_type) = is.read_tag_unpack()?;
  2979. match field_number {
  2980. 1 => {
  2981. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.machine_id)?;
  2982. },
  2983. _ => {
  2984. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2985. },
  2986. };
  2987. }
  2988. ::std::result::Result::Ok(())
  2989. }
  2990. // Compute sizes of nested messages
  2991. #[allow(unused_variables)]
  2992. fn compute_size(&self) -> u32 {
  2993. let mut my_size = 0;
  2994. if let Some(ref v) = self.machine_id.as_ref() {
  2995. my_size += ::protobuf::rt::string_size(1, &v);
  2996. }
  2997. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2998. self.cached_size.set(my_size);
  2999. my_size
  3000. }
  3001. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3002. if let Some(ref v) = self.machine_id.as_ref() {
  3003. os.write_string(1, &v)?;
  3004. }
  3005. os.write_unknown_fields(self.get_unknown_fields())?;
  3006. ::std::result::Result::Ok(())
  3007. }
  3008. fn get_cached_size(&self) -> u32 {
  3009. self.cached_size.get()
  3010. }
  3011. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3012. &self.unknown_fields
  3013. }
  3014. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3015. &mut self.unknown_fields
  3016. }
  3017. fn as_any(&self) -> &dyn (::std::any::Any) {
  3018. self as &dyn (::std::any::Any)
  3019. }
  3020. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3021. self as &mut dyn (::std::any::Any)
  3022. }
  3023. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3024. self
  3025. }
  3026. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3027. Self::descriptor_static()
  3028. }
  3029. fn new() -> ClientInfoFacebook {
  3030. ClientInfoFacebook::new()
  3031. }
  3032. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3033. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3034. lock: ::protobuf::lazy::ONCE_INIT,
  3035. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3036. };
  3037. unsafe {
  3038. descriptor.get(|| {
  3039. let mut fields = ::std::vec::Vec::new();
  3040. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3041. "machine_id",
  3042. |m: &ClientInfoFacebook| { &m.machine_id },
  3043. |m: &mut ClientInfoFacebook| { &mut m.machine_id },
  3044. ));
  3045. ::protobuf::reflect::MessageDescriptor::new::<ClientInfoFacebook>(
  3046. "ClientInfoFacebook",
  3047. fields,
  3048. file_descriptor_proto()
  3049. )
  3050. })
  3051. }
  3052. }
  3053. fn default_instance() -> &'static ClientInfoFacebook {
  3054. static mut instance: ::protobuf::lazy::Lazy<ClientInfoFacebook> = ::protobuf::lazy::Lazy {
  3055. lock: ::protobuf::lazy::ONCE_INIT,
  3056. ptr: 0 as *const ClientInfoFacebook,
  3057. };
  3058. unsafe {
  3059. instance.get(ClientInfoFacebook::new)
  3060. }
  3061. }
  3062. }
  3063. impl ::protobuf::Clear for ClientInfoFacebook {
  3064. fn clear(&mut self) {
  3065. self.machine_id.clear();
  3066. self.unknown_fields.clear();
  3067. }
  3068. }
  3069. impl ::std::fmt::Debug for ClientInfoFacebook {
  3070. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3071. ::protobuf::text_format::fmt(self, f)
  3072. }
  3073. }
  3074. impl ::protobuf::reflect::ProtobufValue for ClientInfoFacebook {
  3075. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3076. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3077. }
  3078. }
  3079. #[derive(PartialEq,Clone,Default)]
  3080. pub struct APWelcome {
  3081. // message fields
  3082. canonical_username: ::protobuf::SingularField<::std::string::String>,
  3083. account_type_logged_in: ::std::option::Option<AccountType>,
  3084. credentials_type_logged_in: ::std::option::Option<AccountType>,
  3085. reusable_auth_credentials_type: ::std::option::Option<AuthenticationType>,
  3086. reusable_auth_credentials: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  3087. lfs_secret: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  3088. account_info: ::protobuf::SingularPtrField<AccountInfo>,
  3089. fb: ::protobuf::SingularPtrField<AccountInfoFacebook>,
  3090. // special fields
  3091. pub unknown_fields: ::protobuf::UnknownFields,
  3092. pub cached_size: ::protobuf::CachedSize,
  3093. }
  3094. impl<'a> ::std::default::Default for &'a APWelcome {
  3095. fn default() -> &'a APWelcome {
  3096. <APWelcome as ::protobuf::Message>::default_instance()
  3097. }
  3098. }
  3099. impl APWelcome {
  3100. pub fn new() -> APWelcome {
  3101. ::std::default::Default::default()
  3102. }
  3103. // required string canonical_username = 10;
  3104. pub fn get_canonical_username(&self) -> &str {
  3105. match self.canonical_username.as_ref() {
  3106. Some(v) => &v,
  3107. None => "",
  3108. }
  3109. }
  3110. pub fn clear_canonical_username(&mut self) {
  3111. self.canonical_username.clear();
  3112. }
  3113. pub fn has_canonical_username(&self) -> bool {
  3114. self.canonical_username.is_some()
  3115. }
  3116. // Param is passed by value, moved
  3117. pub fn set_canonical_username(&mut self, v: ::std::string::String) {
  3118. self.canonical_username = ::protobuf::SingularField::some(v);
  3119. }
  3120. // Mutable pointer to the field.
  3121. // If field is not initialized, it is initialized with default value first.
  3122. pub fn mut_canonical_username(&mut self) -> &mut ::std::string::String {
  3123. if self.canonical_username.is_none() {
  3124. self.canonical_username.set_default();
  3125. }
  3126. self.canonical_username.as_mut().unwrap()
  3127. }
  3128. // Take field
  3129. pub fn take_canonical_username(&mut self) -> ::std::string::String {
  3130. self.canonical_username.take().unwrap_or_else(|| ::std::string::String::new())
  3131. }
  3132. // required .AccountType account_type_logged_in = 20;
  3133. pub fn get_account_type_logged_in(&self) -> AccountType {
  3134. self.account_type_logged_in.unwrap_or(AccountType::Spotify)
  3135. }
  3136. pub fn clear_account_type_logged_in(&mut self) {
  3137. self.account_type_logged_in = ::std::option::Option::None;
  3138. }
  3139. pub fn has_account_type_logged_in(&self) -> bool {
  3140. self.account_type_logged_in.is_some()
  3141. }
  3142. // Param is passed by value, moved
  3143. pub fn set_account_type_logged_in(&mut self, v: AccountType) {
  3144. self.account_type_logged_in = ::std::option::Option::Some(v);
  3145. }
  3146. // required .AccountType credentials_type_logged_in = 25;
  3147. pub fn get_credentials_type_logged_in(&self) -> AccountType {
  3148. self.credentials_type_logged_in.unwrap_or(AccountType::Spotify)
  3149. }
  3150. pub fn clear_credentials_type_logged_in(&mut self) {
  3151. self.credentials_type_logged_in = ::std::option::Option::None;
  3152. }
  3153. pub fn has_credentials_type_logged_in(&self) -> bool {
  3154. self.credentials_type_logged_in.is_some()
  3155. }
  3156. // Param is passed by value, moved
  3157. pub fn set_credentials_type_logged_in(&mut self, v: AccountType) {
  3158. self.credentials_type_logged_in = ::std::option::Option::Some(v);
  3159. }
  3160. // required .AuthenticationType reusable_auth_credentials_type = 30;
  3161. pub fn get_reusable_auth_credentials_type(&self) -> AuthenticationType {
  3162. self.reusable_auth_credentials_type.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS)
  3163. }
  3164. pub fn clear_reusable_auth_credentials_type(&mut self) {
  3165. self.reusable_auth_credentials_type = ::std::option::Option::None;
  3166. }
  3167. pub fn has_reusable_auth_credentials_type(&self) -> bool {
  3168. self.reusable_auth_credentials_type.is_some()
  3169. }
  3170. // Param is passed by value, moved
  3171. pub fn set_reusable_auth_credentials_type(&mut self, v: AuthenticationType) {
  3172. self.reusable_auth_credentials_type = ::std::option::Option::Some(v);
  3173. }
  3174. // required bytes reusable_auth_credentials = 40;
  3175. pub fn get_reusable_auth_credentials(&self) -> &[u8] {
  3176. match self.reusable_auth_credentials.as_ref() {
  3177. Some(v) => &v,
  3178. None => &[],
  3179. }
  3180. }
  3181. pub fn clear_reusable_auth_credentials(&mut self) {
  3182. self.reusable_auth_credentials.clear();
  3183. }
  3184. pub fn has_reusable_auth_credentials(&self) -> bool {
  3185. self.reusable_auth_credentials.is_some()
  3186. }
  3187. // Param is passed by value, moved
  3188. pub fn set_reusable_auth_credentials(&mut self, v: ::std::vec::Vec<u8>) {
  3189. self.reusable_auth_credentials = ::protobuf::SingularField::some(v);
  3190. }
  3191. // Mutable pointer to the field.
  3192. // If field is not initialized, it is initialized with default value first.
  3193. pub fn mut_reusable_auth_credentials(&mut self) -> &mut ::std::vec::Vec<u8> {
  3194. if self.reusable_auth_credentials.is_none() {
  3195. self.reusable_auth_credentials.set_default();
  3196. }
  3197. self.reusable_auth_credentials.as_mut().unwrap()
  3198. }
  3199. // Take field
  3200. pub fn take_reusable_auth_credentials(&mut self) -> ::std::vec::Vec<u8> {
  3201. self.reusable_auth_credentials.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3202. }
  3203. // optional bytes lfs_secret = 50;
  3204. pub fn get_lfs_secret(&self) -> &[u8] {
  3205. match self.lfs_secret.as_ref() {
  3206. Some(v) => &v,
  3207. None => &[],
  3208. }
  3209. }
  3210. pub fn clear_lfs_secret(&mut self) {
  3211. self.lfs_secret.clear();
  3212. }
  3213. pub fn has_lfs_secret(&self) -> bool {
  3214. self.lfs_secret.is_some()
  3215. }
  3216. // Param is passed by value, moved
  3217. pub fn set_lfs_secret(&mut self, v: ::std::vec::Vec<u8>) {
  3218. self.lfs_secret = ::protobuf::SingularField::some(v);
  3219. }
  3220. // Mutable pointer to the field.
  3221. // If field is not initialized, it is initialized with default value first.
  3222. pub fn mut_lfs_secret(&mut self) -> &mut ::std::vec::Vec<u8> {
  3223. if self.lfs_secret.is_none() {
  3224. self.lfs_secret.set_default();
  3225. }
  3226. self.lfs_secret.as_mut().unwrap()
  3227. }
  3228. // Take field
  3229. pub fn take_lfs_secret(&mut self) -> ::std::vec::Vec<u8> {
  3230. self.lfs_secret.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3231. }
  3232. // optional .AccountInfo account_info = 60;
  3233. pub fn get_account_info(&self) -> &AccountInfo {
  3234. self.account_info.as_ref().unwrap_or_else(|| AccountInfo::default_instance())
  3235. }
  3236. pub fn clear_account_info(&mut self) {
  3237. self.account_info.clear();
  3238. }
  3239. pub fn has_account_info(&self) -> bool {
  3240. self.account_info.is_some()
  3241. }
  3242. // Param is passed by value, moved
  3243. pub fn set_account_info(&mut self, v: AccountInfo) {
  3244. self.account_info = ::protobuf::SingularPtrField::some(v);
  3245. }
  3246. // Mutable pointer to the field.
  3247. // If field is not initialized, it is initialized with default value first.
  3248. pub fn mut_account_info(&mut self) -> &mut AccountInfo {
  3249. if self.account_info.is_none() {
  3250. self.account_info.set_default();
  3251. }
  3252. self.account_info.as_mut().unwrap()
  3253. }
  3254. // Take field
  3255. pub fn take_account_info(&mut self) -> AccountInfo {
  3256. self.account_info.take().unwrap_or_else(|| AccountInfo::new())
  3257. }
  3258. // optional .AccountInfoFacebook fb = 70;
  3259. pub fn get_fb(&self) -> &AccountInfoFacebook {
  3260. self.fb.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance())
  3261. }
  3262. pub fn clear_fb(&mut self) {
  3263. self.fb.clear();
  3264. }
  3265. pub fn has_fb(&self) -> bool {
  3266. self.fb.is_some()
  3267. }
  3268. // Param is passed by value, moved
  3269. pub fn set_fb(&mut self, v: AccountInfoFacebook) {
  3270. self.fb = ::protobuf::SingularPtrField::some(v);
  3271. }
  3272. // Mutable pointer to the field.
  3273. // If field is not initialized, it is initialized with default value first.
  3274. pub fn mut_fb(&mut self) -> &mut AccountInfoFacebook {
  3275. if self.fb.is_none() {
  3276. self.fb.set_default();
  3277. }
  3278. self.fb.as_mut().unwrap()
  3279. }
  3280. // Take field
  3281. pub fn take_fb(&mut self) -> AccountInfoFacebook {
  3282. self.fb.take().unwrap_or_else(|| AccountInfoFacebook::new())
  3283. }
  3284. }
  3285. impl ::protobuf::Message for APWelcome {
  3286. fn is_initialized(&self) -> bool {
  3287. if self.canonical_username.is_none() {
  3288. return false;
  3289. }
  3290. if self.account_type_logged_in.is_none() {
  3291. return false;
  3292. }
  3293. if self.credentials_type_logged_in.is_none() {
  3294. return false;
  3295. }
  3296. if self.reusable_auth_credentials_type.is_none() {
  3297. return false;
  3298. }
  3299. if self.reusable_auth_credentials.is_none() {
  3300. return false;
  3301. }
  3302. for v in &self.account_info {
  3303. if !v.is_initialized() {
  3304. return false;
  3305. }
  3306. };
  3307. for v in &self.fb {
  3308. if !v.is_initialized() {
  3309. return false;
  3310. }
  3311. };
  3312. true
  3313. }
  3314. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3315. while !is.eof()? {
  3316. let (field_number, wire_type) = is.read_tag_unpack()?;
  3317. match field_number {
  3318. 10 => {
  3319. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.canonical_username)?;
  3320. },
  3321. 20 => {
  3322. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.account_type_logged_in, 20, &mut self.unknown_fields)?
  3323. },
  3324. 25 => {
  3325. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.credentials_type_logged_in, 25, &mut self.unknown_fields)?
  3326. },
  3327. 30 => {
  3328. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.reusable_auth_credentials_type, 30, &mut self.unknown_fields)?
  3329. },
  3330. 40 => {
  3331. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.reusable_auth_credentials)?;
  3332. },
  3333. 50 => {
  3334. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.lfs_secret)?;
  3335. },
  3336. 60 => {
  3337. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_info)?;
  3338. },
  3339. 70 => {
  3340. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fb)?;
  3341. },
  3342. _ => {
  3343. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3344. },
  3345. };
  3346. }
  3347. ::std::result::Result::Ok(())
  3348. }
  3349. // Compute sizes of nested messages
  3350. #[allow(unused_variables)]
  3351. fn compute_size(&self) -> u32 {
  3352. let mut my_size = 0;
  3353. if let Some(ref v) = self.canonical_username.as_ref() {
  3354. my_size += ::protobuf::rt::string_size(10, &v);
  3355. }
  3356. if let Some(v) = self.account_type_logged_in {
  3357. my_size += ::protobuf::rt::enum_size(20, v);
  3358. }
  3359. if let Some(v) = self.credentials_type_logged_in {
  3360. my_size += ::protobuf::rt::enum_size(25, v);
  3361. }
  3362. if let Some(v) = self.reusable_auth_credentials_type {
  3363. my_size += ::protobuf::rt::enum_size(30, v);
  3364. }
  3365. if let Some(ref v) = self.reusable_auth_credentials.as_ref() {
  3366. my_size += ::protobuf::rt::bytes_size(40, &v);
  3367. }
  3368. if let Some(ref v) = self.lfs_secret.as_ref() {
  3369. my_size += ::protobuf::rt::bytes_size(50, &v);
  3370. }
  3371. if let Some(ref v) = self.account_info.as_ref() {
  3372. let len = v.compute_size();
  3373. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3374. }
  3375. if let Some(ref v) = self.fb.as_ref() {
  3376. let len = v.compute_size();
  3377. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3378. }
  3379. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3380. self.cached_size.set(my_size);
  3381. my_size
  3382. }
  3383. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3384. if let Some(ref v) = self.canonical_username.as_ref() {
  3385. os.write_string(10, &v)?;
  3386. }
  3387. if let Some(v) = self.account_type_logged_in {
  3388. os.write_enum(20, v.value())?;
  3389. }
  3390. if let Some(v) = self.credentials_type_logged_in {
  3391. os.write_enum(25, v.value())?;
  3392. }
  3393. if let Some(v) = self.reusable_auth_credentials_type {
  3394. os.write_enum(30, v.value())?;
  3395. }
  3396. if let Some(ref v) = self.reusable_auth_credentials.as_ref() {
  3397. os.write_bytes(40, &v)?;
  3398. }
  3399. if let Some(ref v) = self.lfs_secret.as_ref() {
  3400. os.write_bytes(50, &v)?;
  3401. }
  3402. if let Some(ref v) = self.account_info.as_ref() {
  3403. os.write_tag(60, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3404. os.write_raw_varint32(v.get_cached_size())?;
  3405. v.write_to_with_cached_sizes(os)?;
  3406. }
  3407. if let Some(ref v) = self.fb.as_ref() {
  3408. os.write_tag(70, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3409. os.write_raw_varint32(v.get_cached_size())?;
  3410. v.write_to_with_cached_sizes(os)?;
  3411. }
  3412. os.write_unknown_fields(self.get_unknown_fields())?;
  3413. ::std::result::Result::Ok(())
  3414. }
  3415. fn get_cached_size(&self) -> u32 {
  3416. self.cached_size.get()
  3417. }
  3418. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3419. &self.unknown_fields
  3420. }
  3421. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3422. &mut self.unknown_fields
  3423. }
  3424. fn as_any(&self) -> &dyn (::std::any::Any) {
  3425. self as &dyn (::std::any::Any)
  3426. }
  3427. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3428. self as &mut dyn (::std::any::Any)
  3429. }
  3430. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3431. self
  3432. }
  3433. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3434. Self::descriptor_static()
  3435. }
  3436. fn new() -> APWelcome {
  3437. APWelcome::new()
  3438. }
  3439. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3440. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3441. lock: ::protobuf::lazy::ONCE_INIT,
  3442. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3443. };
  3444. unsafe {
  3445. descriptor.get(|| {
  3446. let mut fields = ::std::vec::Vec::new();
  3447. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3448. "canonical_username",
  3449. |m: &APWelcome| { &m.canonical_username },
  3450. |m: &mut APWelcome| { &mut m.canonical_username },
  3451. ));
  3452. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AccountType>>(
  3453. "account_type_logged_in",
  3454. |m: &APWelcome| { &m.account_type_logged_in },
  3455. |m: &mut APWelcome| { &mut m.account_type_logged_in },
  3456. ));
  3457. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AccountType>>(
  3458. "credentials_type_logged_in",
  3459. |m: &APWelcome| { &m.credentials_type_logged_in },
  3460. |m: &mut APWelcome| { &mut m.credentials_type_logged_in },
  3461. ));
  3462. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AuthenticationType>>(
  3463. "reusable_auth_credentials_type",
  3464. |m: &APWelcome| { &m.reusable_auth_credentials_type },
  3465. |m: &mut APWelcome| { &mut m.reusable_auth_credentials_type },
  3466. ));
  3467. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3468. "reusable_auth_credentials",
  3469. |m: &APWelcome| { &m.reusable_auth_credentials },
  3470. |m: &mut APWelcome| { &mut m.reusable_auth_credentials },
  3471. ));
  3472. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3473. "lfs_secret",
  3474. |m: &APWelcome| { &m.lfs_secret },
  3475. |m: &mut APWelcome| { &mut m.lfs_secret },
  3476. ));
  3477. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AccountInfo>>(
  3478. "account_info",
  3479. |m: &APWelcome| { &m.account_info },
  3480. |m: &mut APWelcome| { &mut m.account_info },
  3481. ));
  3482. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AccountInfoFacebook>>(
  3483. "fb",
  3484. |m: &APWelcome| { &m.fb },
  3485. |m: &mut APWelcome| { &mut m.fb },
  3486. ));
  3487. ::protobuf::reflect::MessageDescriptor::new::<APWelcome>(
  3488. "APWelcome",
  3489. fields,
  3490. file_descriptor_proto()
  3491. )
  3492. })
  3493. }
  3494. }
  3495. fn default_instance() -> &'static APWelcome {
  3496. static mut instance: ::protobuf::lazy::Lazy<APWelcome> = ::protobuf::lazy::Lazy {
  3497. lock: ::protobuf::lazy::ONCE_INIT,
  3498. ptr: 0 as *const APWelcome,
  3499. };
  3500. unsafe {
  3501. instance.get(APWelcome::new)
  3502. }
  3503. }
  3504. }
  3505. impl ::protobuf::Clear for APWelcome {
  3506. fn clear(&mut self) {
  3507. self.canonical_username.clear();
  3508. self.account_type_logged_in = ::std::option::Option::None;
  3509. self.credentials_type_logged_in = ::std::option::Option::None;
  3510. self.reusable_auth_credentials_type = ::std::option::Option::None;
  3511. self.reusable_auth_credentials.clear();
  3512. self.lfs_secret.clear();
  3513. self.account_info.clear();
  3514. self.fb.clear();
  3515. self.unknown_fields.clear();
  3516. }
  3517. }
  3518. impl ::std::fmt::Debug for APWelcome {
  3519. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3520. ::protobuf::text_format::fmt(self, f)
  3521. }
  3522. }
  3523. impl ::protobuf::reflect::ProtobufValue for APWelcome {
  3524. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3525. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3526. }
  3527. }
  3528. #[derive(PartialEq,Clone,Default)]
  3529. pub struct AccountInfo {
  3530. // message fields
  3531. spotify: ::protobuf::SingularPtrField<AccountInfoSpotify>,
  3532. facebook: ::protobuf::SingularPtrField<AccountInfoFacebook>,
  3533. // special fields
  3534. pub unknown_fields: ::protobuf::UnknownFields,
  3535. pub cached_size: ::protobuf::CachedSize,
  3536. }
  3537. impl<'a> ::std::default::Default for &'a AccountInfo {
  3538. fn default() -> &'a AccountInfo {
  3539. <AccountInfo as ::protobuf::Message>::default_instance()
  3540. }
  3541. }
  3542. impl AccountInfo {
  3543. pub fn new() -> AccountInfo {
  3544. ::std::default::Default::default()
  3545. }
  3546. // optional .AccountInfoSpotify spotify = 1;
  3547. pub fn get_spotify(&self) -> &AccountInfoSpotify {
  3548. self.spotify.as_ref().unwrap_or_else(|| AccountInfoSpotify::default_instance())
  3549. }
  3550. pub fn clear_spotify(&mut self) {
  3551. self.spotify.clear();
  3552. }
  3553. pub fn has_spotify(&self) -> bool {
  3554. self.spotify.is_some()
  3555. }
  3556. // Param is passed by value, moved
  3557. pub fn set_spotify(&mut self, v: AccountInfoSpotify) {
  3558. self.spotify = ::protobuf::SingularPtrField::some(v);
  3559. }
  3560. // Mutable pointer to the field.
  3561. // If field is not initialized, it is initialized with default value first.
  3562. pub fn mut_spotify(&mut self) -> &mut AccountInfoSpotify {
  3563. if self.spotify.is_none() {
  3564. self.spotify.set_default();
  3565. }
  3566. self.spotify.as_mut().unwrap()
  3567. }
  3568. // Take field
  3569. pub fn take_spotify(&mut self) -> AccountInfoSpotify {
  3570. self.spotify.take().unwrap_or_else(|| AccountInfoSpotify::new())
  3571. }
  3572. // optional .AccountInfoFacebook facebook = 2;
  3573. pub fn get_facebook(&self) -> &AccountInfoFacebook {
  3574. self.facebook.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance())
  3575. }
  3576. pub fn clear_facebook(&mut self) {
  3577. self.facebook.clear();
  3578. }
  3579. pub fn has_facebook(&self) -> bool {
  3580. self.facebook.is_some()
  3581. }
  3582. // Param is passed by value, moved
  3583. pub fn set_facebook(&mut self, v: AccountInfoFacebook) {
  3584. self.facebook = ::protobuf::SingularPtrField::some(v);
  3585. }
  3586. // Mutable pointer to the field.
  3587. // If field is not initialized, it is initialized with default value first.
  3588. pub fn mut_facebook(&mut self) -> &mut AccountInfoFacebook {
  3589. if self.facebook.is_none() {
  3590. self.facebook.set_default();
  3591. }
  3592. self.facebook.as_mut().unwrap()
  3593. }
  3594. // Take field
  3595. pub fn take_facebook(&mut self) -> AccountInfoFacebook {
  3596. self.facebook.take().unwrap_or_else(|| AccountInfoFacebook::new())
  3597. }
  3598. }
  3599. impl ::protobuf::Message for AccountInfo {
  3600. fn is_initialized(&self) -> bool {
  3601. for v in &self.spotify {
  3602. if !v.is_initialized() {
  3603. return false;
  3604. }
  3605. };
  3606. for v in &self.facebook {
  3607. if !v.is_initialized() {
  3608. return false;
  3609. }
  3610. };
  3611. true
  3612. }
  3613. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3614. while !is.eof()? {
  3615. let (field_number, wire_type) = is.read_tag_unpack()?;
  3616. match field_number {
  3617. 1 => {
  3618. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.spotify)?;
  3619. },
  3620. 2 => {
  3621. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.facebook)?;
  3622. },
  3623. _ => {
  3624. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3625. },
  3626. };
  3627. }
  3628. ::std::result::Result::Ok(())
  3629. }
  3630. // Compute sizes of nested messages
  3631. #[allow(unused_variables)]
  3632. fn compute_size(&self) -> u32 {
  3633. let mut my_size = 0;
  3634. if let Some(ref v) = self.spotify.as_ref() {
  3635. let len = v.compute_size();
  3636. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3637. }
  3638. if let Some(ref v) = self.facebook.as_ref() {
  3639. let len = v.compute_size();
  3640. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3641. }
  3642. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3643. self.cached_size.set(my_size);
  3644. my_size
  3645. }
  3646. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3647. if let Some(ref v) = self.spotify.as_ref() {
  3648. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3649. os.write_raw_varint32(v.get_cached_size())?;
  3650. v.write_to_with_cached_sizes(os)?;
  3651. }
  3652. if let Some(ref v) = self.facebook.as_ref() {
  3653. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3654. os.write_raw_varint32(v.get_cached_size())?;
  3655. v.write_to_with_cached_sizes(os)?;
  3656. }
  3657. os.write_unknown_fields(self.get_unknown_fields())?;
  3658. ::std::result::Result::Ok(())
  3659. }
  3660. fn get_cached_size(&self) -> u32 {
  3661. self.cached_size.get()
  3662. }
  3663. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3664. &self.unknown_fields
  3665. }
  3666. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3667. &mut self.unknown_fields
  3668. }
  3669. fn as_any(&self) -> &dyn (::std::any::Any) {
  3670. self as &dyn (::std::any::Any)
  3671. }
  3672. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3673. self as &mut dyn (::std::any::Any)
  3674. }
  3675. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3676. self
  3677. }
  3678. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3679. Self::descriptor_static()
  3680. }
  3681. fn new() -> AccountInfo {
  3682. AccountInfo::new()
  3683. }
  3684. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3685. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3686. lock: ::protobuf::lazy::ONCE_INIT,
  3687. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3688. };
  3689. unsafe {
  3690. descriptor.get(|| {
  3691. let mut fields = ::std::vec::Vec::new();
  3692. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AccountInfoSpotify>>(
  3693. "spotify",
  3694. |m: &AccountInfo| { &m.spotify },
  3695. |m: &mut AccountInfo| { &mut m.spotify },
  3696. ));
  3697. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AccountInfoFacebook>>(
  3698. "facebook",
  3699. |m: &AccountInfo| { &m.facebook },
  3700. |m: &mut AccountInfo| { &mut m.facebook },
  3701. ));
  3702. ::protobuf::reflect::MessageDescriptor::new::<AccountInfo>(
  3703. "AccountInfo",
  3704. fields,
  3705. file_descriptor_proto()
  3706. )
  3707. })
  3708. }
  3709. }
  3710. fn default_instance() -> &'static AccountInfo {
  3711. static mut instance: ::protobuf::lazy::Lazy<AccountInfo> = ::protobuf::lazy::Lazy {
  3712. lock: ::protobuf::lazy::ONCE_INIT,
  3713. ptr: 0 as *const AccountInfo,
  3714. };
  3715. unsafe {
  3716. instance.get(AccountInfo::new)
  3717. }
  3718. }
  3719. }
  3720. impl ::protobuf::Clear for AccountInfo {
  3721. fn clear(&mut self) {
  3722. self.spotify.clear();
  3723. self.facebook.clear();
  3724. self.unknown_fields.clear();
  3725. }
  3726. }
  3727. impl ::std::fmt::Debug for AccountInfo {
  3728. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3729. ::protobuf::text_format::fmt(self, f)
  3730. }
  3731. }
  3732. impl ::protobuf::reflect::ProtobufValue for AccountInfo {
  3733. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3734. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3735. }
  3736. }
  3737. #[derive(PartialEq,Clone,Default)]
  3738. pub struct AccountInfoSpotify {
  3739. // special fields
  3740. pub unknown_fields: ::protobuf::UnknownFields,
  3741. pub cached_size: ::protobuf::CachedSize,
  3742. }
  3743. impl<'a> ::std::default::Default for &'a AccountInfoSpotify {
  3744. fn default() -> &'a AccountInfoSpotify {
  3745. <AccountInfoSpotify as ::protobuf::Message>::default_instance()
  3746. }
  3747. }
  3748. impl AccountInfoSpotify {
  3749. pub fn new() -> AccountInfoSpotify {
  3750. ::std::default::Default::default()
  3751. }
  3752. }
  3753. impl ::protobuf::Message for AccountInfoSpotify {
  3754. fn is_initialized(&self) -> bool {
  3755. true
  3756. }
  3757. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3758. while !is.eof()? {
  3759. let (field_number, wire_type) = is.read_tag_unpack()?;
  3760. match field_number {
  3761. _ => {
  3762. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3763. },
  3764. };
  3765. }
  3766. ::std::result::Result::Ok(())
  3767. }
  3768. // Compute sizes of nested messages
  3769. #[allow(unused_variables)]
  3770. fn compute_size(&self) -> u32 {
  3771. let mut my_size = 0;
  3772. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3773. self.cached_size.set(my_size);
  3774. my_size
  3775. }
  3776. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3777. os.write_unknown_fields(self.get_unknown_fields())?;
  3778. ::std::result::Result::Ok(())
  3779. }
  3780. fn get_cached_size(&self) -> u32 {
  3781. self.cached_size.get()
  3782. }
  3783. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3784. &self.unknown_fields
  3785. }
  3786. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3787. &mut self.unknown_fields
  3788. }
  3789. fn as_any(&self) -> &dyn (::std::any::Any) {
  3790. self as &dyn (::std::any::Any)
  3791. }
  3792. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3793. self as &mut dyn (::std::any::Any)
  3794. }
  3795. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3796. self
  3797. }
  3798. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3799. Self::descriptor_static()
  3800. }
  3801. fn new() -> AccountInfoSpotify {
  3802. AccountInfoSpotify::new()
  3803. }
  3804. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3805. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3806. lock: ::protobuf::lazy::ONCE_INIT,
  3807. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3808. };
  3809. unsafe {
  3810. descriptor.get(|| {
  3811. let fields = ::std::vec::Vec::new();
  3812. ::protobuf::reflect::MessageDescriptor::new::<AccountInfoSpotify>(
  3813. "AccountInfoSpotify",
  3814. fields,
  3815. file_descriptor_proto()
  3816. )
  3817. })
  3818. }
  3819. }
  3820. fn default_instance() -> &'static AccountInfoSpotify {
  3821. static mut instance: ::protobuf::lazy::Lazy<AccountInfoSpotify> = ::protobuf::lazy::Lazy {
  3822. lock: ::protobuf::lazy::ONCE_INIT,
  3823. ptr: 0 as *const AccountInfoSpotify,
  3824. };
  3825. unsafe {
  3826. instance.get(AccountInfoSpotify::new)
  3827. }
  3828. }
  3829. }
  3830. impl ::protobuf::Clear for AccountInfoSpotify {
  3831. fn clear(&mut self) {
  3832. self.unknown_fields.clear();
  3833. }
  3834. }
  3835. impl ::std::fmt::Debug for AccountInfoSpotify {
  3836. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3837. ::protobuf::text_format::fmt(self, f)
  3838. }
  3839. }
  3840. impl ::protobuf::reflect::ProtobufValue for AccountInfoSpotify {
  3841. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3842. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3843. }
  3844. }
  3845. #[derive(PartialEq,Clone,Default)]
  3846. pub struct AccountInfoFacebook {
  3847. // message fields
  3848. access_token: ::protobuf::SingularField<::std::string::String>,
  3849. machine_id: ::protobuf::SingularField<::std::string::String>,
  3850. // special fields
  3851. pub unknown_fields: ::protobuf::UnknownFields,
  3852. pub cached_size: ::protobuf::CachedSize,
  3853. }
  3854. impl<'a> ::std::default::Default for &'a AccountInfoFacebook {
  3855. fn default() -> &'a AccountInfoFacebook {
  3856. <AccountInfoFacebook as ::protobuf::Message>::default_instance()
  3857. }
  3858. }
  3859. impl AccountInfoFacebook {
  3860. pub fn new() -> AccountInfoFacebook {
  3861. ::std::default::Default::default()
  3862. }
  3863. // optional string access_token = 1;
  3864. pub fn get_access_token(&self) -> &str {
  3865. match self.access_token.as_ref() {
  3866. Some(v) => &v,
  3867. None => "",
  3868. }
  3869. }
  3870. pub fn clear_access_token(&mut self) {
  3871. self.access_token.clear();
  3872. }
  3873. pub fn has_access_token(&self) -> bool {
  3874. self.access_token.is_some()
  3875. }
  3876. // Param is passed by value, moved
  3877. pub fn set_access_token(&mut self, v: ::std::string::String) {
  3878. self.access_token = ::protobuf::SingularField::some(v);
  3879. }
  3880. // Mutable pointer to the field.
  3881. // If field is not initialized, it is initialized with default value first.
  3882. pub fn mut_access_token(&mut self) -> &mut ::std::string::String {
  3883. if self.access_token.is_none() {
  3884. self.access_token.set_default();
  3885. }
  3886. self.access_token.as_mut().unwrap()
  3887. }
  3888. // Take field
  3889. pub fn take_access_token(&mut self) -> ::std::string::String {
  3890. self.access_token.take().unwrap_or_else(|| ::std::string::String::new())
  3891. }
  3892. // optional string machine_id = 2;
  3893. pub fn get_machine_id(&self) -> &str {
  3894. match self.machine_id.as_ref() {
  3895. Some(v) => &v,
  3896. None => "",
  3897. }
  3898. }
  3899. pub fn clear_machine_id(&mut self) {
  3900. self.machine_id.clear();
  3901. }
  3902. pub fn has_machine_id(&self) -> bool {
  3903. self.machine_id.is_some()
  3904. }
  3905. // Param is passed by value, moved
  3906. pub fn set_machine_id(&mut self, v: ::std::string::String) {
  3907. self.machine_id = ::protobuf::SingularField::some(v);
  3908. }
  3909. // Mutable pointer to the field.
  3910. // If field is not initialized, it is initialized with default value first.
  3911. pub fn mut_machine_id(&mut self) -> &mut ::std::string::String {
  3912. if self.machine_id.is_none() {
  3913. self.machine_id.set_default();
  3914. }
  3915. self.machine_id.as_mut().unwrap()
  3916. }
  3917. // Take field
  3918. pub fn take_machine_id(&mut self) -> ::std::string::String {
  3919. self.machine_id.take().unwrap_or_else(|| ::std::string::String::new())
  3920. }
  3921. }
  3922. impl ::protobuf::Message for AccountInfoFacebook {
  3923. fn is_initialized(&self) -> bool {
  3924. true
  3925. }
  3926. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3927. while !is.eof()? {
  3928. let (field_number, wire_type) = is.read_tag_unpack()?;
  3929. match field_number {
  3930. 1 => {
  3931. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.access_token)?;
  3932. },
  3933. 2 => {
  3934. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.machine_id)?;
  3935. },
  3936. _ => {
  3937. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3938. },
  3939. };
  3940. }
  3941. ::std::result::Result::Ok(())
  3942. }
  3943. // Compute sizes of nested messages
  3944. #[allow(unused_variables)]
  3945. fn compute_size(&self) -> u32 {
  3946. let mut my_size = 0;
  3947. if let Some(ref v) = self.access_token.as_ref() {
  3948. my_size += ::protobuf::rt::string_size(1, &v);
  3949. }
  3950. if let Some(ref v) = self.machine_id.as_ref() {
  3951. my_size += ::protobuf::rt::string_size(2, &v);
  3952. }
  3953. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3954. self.cached_size.set(my_size);
  3955. my_size
  3956. }
  3957. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3958. if let Some(ref v) = self.access_token.as_ref() {
  3959. os.write_string(1, &v)?;
  3960. }
  3961. if let Some(ref v) = self.machine_id.as_ref() {
  3962. os.write_string(2, &v)?;
  3963. }
  3964. os.write_unknown_fields(self.get_unknown_fields())?;
  3965. ::std::result::Result::Ok(())
  3966. }
  3967. fn get_cached_size(&self) -> u32 {
  3968. self.cached_size.get()
  3969. }
  3970. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3971. &self.unknown_fields
  3972. }
  3973. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3974. &mut self.unknown_fields
  3975. }
  3976. fn as_any(&self) -> &dyn (::std::any::Any) {
  3977. self as &dyn (::std::any::Any)
  3978. }
  3979. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3980. self as &mut dyn (::std::any::Any)
  3981. }
  3982. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3983. self
  3984. }
  3985. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3986. Self::descriptor_static()
  3987. }
  3988. fn new() -> AccountInfoFacebook {
  3989. AccountInfoFacebook::new()
  3990. }
  3991. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3992. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3993. lock: ::protobuf::lazy::ONCE_INIT,
  3994. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3995. };
  3996. unsafe {
  3997. descriptor.get(|| {
  3998. let mut fields = ::std::vec::Vec::new();
  3999. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4000. "access_token",
  4001. |m: &AccountInfoFacebook| { &m.access_token },
  4002. |m: &mut AccountInfoFacebook| { &mut m.access_token },
  4003. ));
  4004. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4005. "machine_id",
  4006. |m: &AccountInfoFacebook| { &m.machine_id },
  4007. |m: &mut AccountInfoFacebook| { &mut m.machine_id },
  4008. ));
  4009. ::protobuf::reflect::MessageDescriptor::new::<AccountInfoFacebook>(
  4010. "AccountInfoFacebook",
  4011. fields,
  4012. file_descriptor_proto()
  4013. )
  4014. })
  4015. }
  4016. }
  4017. fn default_instance() -> &'static AccountInfoFacebook {
  4018. static mut instance: ::protobuf::lazy::Lazy<AccountInfoFacebook> = ::protobuf::lazy::Lazy {
  4019. lock: ::protobuf::lazy::ONCE_INIT,
  4020. ptr: 0 as *const AccountInfoFacebook,
  4021. };
  4022. unsafe {
  4023. instance.get(AccountInfoFacebook::new)
  4024. }
  4025. }
  4026. }
  4027. impl ::protobuf::Clear for AccountInfoFacebook {
  4028. fn clear(&mut self) {
  4029. self.access_token.clear();
  4030. self.machine_id.clear();
  4031. self.unknown_fields.clear();
  4032. }
  4033. }
  4034. impl ::std::fmt::Debug for AccountInfoFacebook {
  4035. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4036. ::protobuf::text_format::fmt(self, f)
  4037. }
  4038. }
  4039. impl ::protobuf::reflect::ProtobufValue for AccountInfoFacebook {
  4040. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4041. ::protobuf::reflect::ProtobufValueRef::Message(self)
  4042. }
  4043. }
  4044. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  4045. pub enum AuthenticationType {
  4046. AUTHENTICATION_USER_PASS = 0,
  4047. AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS = 1,
  4048. AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS = 2,
  4049. AUTHENTICATION_SPOTIFY_TOKEN = 3,
  4050. AUTHENTICATION_FACEBOOK_TOKEN = 4,
  4051. }
  4052. impl ::protobuf::ProtobufEnum for AuthenticationType {
  4053. fn value(&self) -> i32 {
  4054. *self as i32
  4055. }
  4056. fn from_i32(value: i32) -> ::std::option::Option<AuthenticationType> {
  4057. match value {
  4058. 0 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_USER_PASS),
  4059. 1 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS),
  4060. 2 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS),
  4061. 3 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_SPOTIFY_TOKEN),
  4062. 4 => ::std::option::Option::Some(AuthenticationType::AUTHENTICATION_FACEBOOK_TOKEN),
  4063. _ => ::std::option::Option::None
  4064. }
  4065. }
  4066. fn values() -> &'static [Self] {
  4067. static values: &'static [AuthenticationType] = &[
  4068. AuthenticationType::AUTHENTICATION_USER_PASS,
  4069. AuthenticationType::AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS,
  4070. AuthenticationType::AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS,
  4071. AuthenticationType::AUTHENTICATION_SPOTIFY_TOKEN,
  4072. AuthenticationType::AUTHENTICATION_FACEBOOK_TOKEN,
  4073. ];
  4074. values
  4075. }
  4076. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4077. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  4078. lock: ::protobuf::lazy::ONCE_INIT,
  4079. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  4080. };
  4081. unsafe {
  4082. descriptor.get(|| {
  4083. ::protobuf::reflect::EnumDescriptor::new("AuthenticationType", file_descriptor_proto())
  4084. })
  4085. }
  4086. }
  4087. }
  4088. impl ::std::marker::Copy for AuthenticationType {
  4089. }
  4090. impl ::std::default::Default for AuthenticationType {
  4091. fn default() -> Self {
  4092. AuthenticationType::AUTHENTICATION_USER_PASS
  4093. }
  4094. }
  4095. impl ::protobuf::reflect::ProtobufValue for AuthenticationType {
  4096. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4097. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  4098. }
  4099. }
  4100. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  4101. pub enum AccountCreation {
  4102. ACCOUNT_CREATION_ALWAYS_PROMPT = 1,
  4103. ACCOUNT_CREATION_ALWAYS_CREATE = 3,
  4104. }
  4105. impl ::protobuf::ProtobufEnum for AccountCreation {
  4106. fn value(&self) -> i32 {
  4107. *self as i32
  4108. }
  4109. fn from_i32(value: i32) -> ::std::option::Option<AccountCreation> {
  4110. match value {
  4111. 1 => ::std::option::Option::Some(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT),
  4112. 3 => ::std::option::Option::Some(AccountCreation::ACCOUNT_CREATION_ALWAYS_CREATE),
  4113. _ => ::std::option::Option::None
  4114. }
  4115. }
  4116. fn values() -> &'static [Self] {
  4117. static values: &'static [AccountCreation] = &[
  4118. AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT,
  4119. AccountCreation::ACCOUNT_CREATION_ALWAYS_CREATE,
  4120. ];
  4121. values
  4122. }
  4123. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4124. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  4125. lock: ::protobuf::lazy::ONCE_INIT,
  4126. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  4127. };
  4128. unsafe {
  4129. descriptor.get(|| {
  4130. ::protobuf::reflect::EnumDescriptor::new("AccountCreation", file_descriptor_proto())
  4131. })
  4132. }
  4133. }
  4134. }
  4135. impl ::std::marker::Copy for AccountCreation {
  4136. }
  4137. // Note, `Default` is implemented although default value is not 0
  4138. impl ::std::default::Default for AccountCreation {
  4139. fn default() -> Self {
  4140. AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT
  4141. }
  4142. }
  4143. impl ::protobuf::reflect::ProtobufValue for AccountCreation {
  4144. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4145. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  4146. }
  4147. }
  4148. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  4149. pub enum CpuFamily {
  4150. CPU_UNKNOWN = 0,
  4151. CPU_X86 = 1,
  4152. CPU_X86_64 = 2,
  4153. CPU_PPC = 3,
  4154. CPU_PPC_64 = 4,
  4155. CPU_ARM = 5,
  4156. CPU_IA64 = 6,
  4157. CPU_SH = 7,
  4158. CPU_MIPS = 8,
  4159. CPU_BLACKFIN = 9,
  4160. }
  4161. impl ::protobuf::ProtobufEnum for CpuFamily {
  4162. fn value(&self) -> i32 {
  4163. *self as i32
  4164. }
  4165. fn from_i32(value: i32) -> ::std::option::Option<CpuFamily> {
  4166. match value {
  4167. 0 => ::std::option::Option::Some(CpuFamily::CPU_UNKNOWN),
  4168. 1 => ::std::option::Option::Some(CpuFamily::CPU_X86),
  4169. 2 => ::std::option::Option::Some(CpuFamily::CPU_X86_64),
  4170. 3 => ::std::option::Option::Some(CpuFamily::CPU_PPC),
  4171. 4 => ::std::option::Option::Some(CpuFamily::CPU_PPC_64),
  4172. 5 => ::std::option::Option::Some(CpuFamily::CPU_ARM),
  4173. 6 => ::std::option::Option::Some(CpuFamily::CPU_IA64),
  4174. 7 => ::std::option::Option::Some(CpuFamily::CPU_SH),
  4175. 8 => ::std::option::Option::Some(CpuFamily::CPU_MIPS),
  4176. 9 => ::std::option::Option::Some(CpuFamily::CPU_BLACKFIN),
  4177. _ => ::std::option::Option::None
  4178. }
  4179. }
  4180. fn values() -> &'static [Self] {
  4181. static values: &'static [CpuFamily] = &[
  4182. CpuFamily::CPU_UNKNOWN,
  4183. CpuFamily::CPU_X86,
  4184. CpuFamily::CPU_X86_64,
  4185. CpuFamily::CPU_PPC,
  4186. CpuFamily::CPU_PPC_64,
  4187. CpuFamily::CPU_ARM,
  4188. CpuFamily::CPU_IA64,
  4189. CpuFamily::CPU_SH,
  4190. CpuFamily::CPU_MIPS,
  4191. CpuFamily::CPU_BLACKFIN,
  4192. ];
  4193. values
  4194. }
  4195. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4196. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  4197. lock: ::protobuf::lazy::ONCE_INIT,
  4198. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  4199. };
  4200. unsafe {
  4201. descriptor.get(|| {
  4202. ::protobuf::reflect::EnumDescriptor::new("CpuFamily", file_descriptor_proto())
  4203. })
  4204. }
  4205. }
  4206. }
  4207. impl ::std::marker::Copy for CpuFamily {
  4208. }
  4209. impl ::std::default::Default for CpuFamily {
  4210. fn default() -> Self {
  4211. CpuFamily::CPU_UNKNOWN
  4212. }
  4213. }
  4214. impl ::protobuf::reflect::ProtobufValue for CpuFamily {
  4215. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4216. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  4217. }
  4218. }
  4219. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  4220. pub enum Brand {
  4221. BRAND_UNBRANDED = 0,
  4222. BRAND_INQ = 1,
  4223. BRAND_HTC = 2,
  4224. BRAND_NOKIA = 3,
  4225. }
  4226. impl ::protobuf::ProtobufEnum for Brand {
  4227. fn value(&self) -> i32 {
  4228. *self as i32
  4229. }
  4230. fn from_i32(value: i32) -> ::std::option::Option<Brand> {
  4231. match value {
  4232. 0 => ::std::option::Option::Some(Brand::BRAND_UNBRANDED),
  4233. 1 => ::std::option::Option::Some(Brand::BRAND_INQ),
  4234. 2 => ::std::option::Option::Some(Brand::BRAND_HTC),
  4235. 3 => ::std::option::Option::Some(Brand::BRAND_NOKIA),
  4236. _ => ::std::option::Option::None
  4237. }
  4238. }
  4239. fn values() -> &'static [Self] {
  4240. static values: &'static [Brand] = &[
  4241. Brand::BRAND_UNBRANDED,
  4242. Brand::BRAND_INQ,
  4243. Brand::BRAND_HTC,
  4244. Brand::BRAND_NOKIA,
  4245. ];
  4246. values
  4247. }
  4248. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4249. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  4250. lock: ::protobuf::lazy::ONCE_INIT,
  4251. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  4252. };
  4253. unsafe {
  4254. descriptor.get(|| {
  4255. ::protobuf::reflect::EnumDescriptor::new("Brand", file_descriptor_proto())
  4256. })
  4257. }
  4258. }
  4259. }
  4260. impl ::std::marker::Copy for Brand {
  4261. }
  4262. impl ::std::default::Default for Brand {
  4263. fn default() -> Self {
  4264. Brand::BRAND_UNBRANDED
  4265. }
  4266. }
  4267. impl ::protobuf::reflect::ProtobufValue for Brand {
  4268. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4269. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  4270. }
  4271. }
  4272. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  4273. pub enum Os {
  4274. OS_UNKNOWN = 0,
  4275. OS_WINDOWS = 1,
  4276. OS_OSX = 2,
  4277. OS_IPHONE = 3,
  4278. OS_S60 = 4,
  4279. OS_LINUX = 5,
  4280. OS_WINDOWS_CE = 6,
  4281. OS_ANDROID = 7,
  4282. OS_PALM = 8,
  4283. OS_FREEBSD = 9,
  4284. OS_BLACKBERRY = 10,
  4285. OS_SONOS = 11,
  4286. OS_LOGITECH = 12,
  4287. OS_WP7 = 13,
  4288. OS_ONKYO = 14,
  4289. OS_PHILIPS = 15,
  4290. OS_WD = 16,
  4291. OS_VOLVO = 17,
  4292. OS_TIVO = 18,
  4293. OS_AWOX = 19,
  4294. OS_MEEGO = 20,
  4295. OS_QNXNTO = 21,
  4296. OS_BCO = 22,
  4297. }
  4298. impl ::protobuf::ProtobufEnum for Os {
  4299. fn value(&self) -> i32 {
  4300. *self as i32
  4301. }
  4302. fn from_i32(value: i32) -> ::std::option::Option<Os> {
  4303. match value {
  4304. 0 => ::std::option::Option::Some(Os::OS_UNKNOWN),
  4305. 1 => ::std::option::Option::Some(Os::OS_WINDOWS),
  4306. 2 => ::std::option::Option::Some(Os::OS_OSX),
  4307. 3 => ::std::option::Option::Some(Os::OS_IPHONE),
  4308. 4 => ::std::option::Option::Some(Os::OS_S60),
  4309. 5 => ::std::option::Option::Some(Os::OS_LINUX),
  4310. 6 => ::std::option::Option::Some(Os::OS_WINDOWS_CE),
  4311. 7 => ::std::option::Option::Some(Os::OS_ANDROID),
  4312. 8 => ::std::option::Option::Some(Os::OS_PALM),
  4313. 9 => ::std::option::Option::Some(Os::OS_FREEBSD),
  4314. 10 => ::std::option::Option::Some(Os::OS_BLACKBERRY),
  4315. 11 => ::std::option::Option::Some(Os::OS_SONOS),
  4316. 12 => ::std::option::Option::Some(Os::OS_LOGITECH),
  4317. 13 => ::std::option::Option::Some(Os::OS_WP7),
  4318. 14 => ::std::option::Option::Some(Os::OS_ONKYO),
  4319. 15 => ::std::option::Option::Some(Os::OS_PHILIPS),
  4320. 16 => ::std::option::Option::Some(Os::OS_WD),
  4321. 17 => ::std::option::Option::Some(Os::OS_VOLVO),
  4322. 18 => ::std::option::Option::Some(Os::OS_TIVO),
  4323. 19 => ::std::option::Option::Some(Os::OS_AWOX),
  4324. 20 => ::std::option::Option::Some(Os::OS_MEEGO),
  4325. 21 => ::std::option::Option::Some(Os::OS_QNXNTO),
  4326. 22 => ::std::option::Option::Some(Os::OS_BCO),
  4327. _ => ::std::option::Option::None
  4328. }
  4329. }
  4330. fn values() -> &'static [Self] {
  4331. static values: &'static [Os] = &[
  4332. Os::OS_UNKNOWN,
  4333. Os::OS_WINDOWS,
  4334. Os::OS_OSX,
  4335. Os::OS_IPHONE,
  4336. Os::OS_S60,
  4337. Os::OS_LINUX,
  4338. Os::OS_WINDOWS_CE,
  4339. Os::OS_ANDROID,
  4340. Os::OS_PALM,
  4341. Os::OS_FREEBSD,
  4342. Os::OS_BLACKBERRY,
  4343. Os::OS_SONOS,
  4344. Os::OS_LOGITECH,
  4345. Os::OS_WP7,
  4346. Os::OS_ONKYO,
  4347. Os::OS_PHILIPS,
  4348. Os::OS_WD,
  4349. Os::OS_VOLVO,
  4350. Os::OS_TIVO,
  4351. Os::OS_AWOX,
  4352. Os::OS_MEEGO,
  4353. Os::OS_QNXNTO,
  4354. Os::OS_BCO,
  4355. ];
  4356. values
  4357. }
  4358. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4359. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  4360. lock: ::protobuf::lazy::ONCE_INIT,
  4361. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  4362. };
  4363. unsafe {
  4364. descriptor.get(|| {
  4365. ::protobuf::reflect::EnumDescriptor::new("Os", file_descriptor_proto())
  4366. })
  4367. }
  4368. }
  4369. }
  4370. impl ::std::marker::Copy for Os {
  4371. }
  4372. impl ::std::default::Default for Os {
  4373. fn default() -> Self {
  4374. Os::OS_UNKNOWN
  4375. }
  4376. }
  4377. impl ::protobuf::reflect::ProtobufValue for Os {
  4378. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4379. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  4380. }
  4381. }
  4382. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  4383. pub enum AccountType {
  4384. Spotify = 0,
  4385. Facebook = 1,
  4386. }
  4387. impl ::protobuf::ProtobufEnum for AccountType {
  4388. fn value(&self) -> i32 {
  4389. *self as i32
  4390. }
  4391. fn from_i32(value: i32) -> ::std::option::Option<AccountType> {
  4392. match value {
  4393. 0 => ::std::option::Option::Some(AccountType::Spotify),
  4394. 1 => ::std::option::Option::Some(AccountType::Facebook),
  4395. _ => ::std::option::Option::None
  4396. }
  4397. }
  4398. fn values() -> &'static [Self] {
  4399. static values: &'static [AccountType] = &[
  4400. AccountType::Spotify,
  4401. AccountType::Facebook,
  4402. ];
  4403. values
  4404. }
  4405. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4406. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  4407. lock: ::protobuf::lazy::ONCE_INIT,
  4408. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  4409. };
  4410. unsafe {
  4411. descriptor.get(|| {
  4412. ::protobuf::reflect::EnumDescriptor::new("AccountType", file_descriptor_proto())
  4413. })
  4414. }
  4415. }
  4416. }
  4417. impl ::std::marker::Copy for AccountType {
  4418. }
  4419. impl ::std::default::Default for AccountType {
  4420. fn default() -> Self {
  4421. AccountType::Spotify
  4422. }
  4423. }
  4424. impl ::protobuf::reflect::ProtobufValue for AccountType {
  4425. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4426. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  4427. }
  4428. }
  4429. static file_descriptor_proto_data: &'static [u8] = b"\
  4430. \n\x14authentication.proto\x12\0\"\xfe\x02\n\x17ClientResponseEncrypted\
  4431. \x12.\n\x11login_credentials\x18\n\x20\x02(\x0b2\x11.LoginCredentialsB\0\
  4432. \x12,\n\x10account_creation\x18\x14\x20\x01(\x0e2\x10.AccountCreationB\0\
  4433. \x129\n\x14fingerprint_response\x18\x1e\x20\x01(\x0b2\x19.FingerprintRes\
  4434. ponseUnionB\0\x12'\n\x0bpeer_ticket\x18(\x20\x01(\x0b2\x10.PeerTicketUni\
  4435. onB\0\x12\"\n\x0bsystem_info\x182\x20\x02(\x0b2\x0b.SystemInfoB\0\x12\
  4436. \x18\n\x0eplatform_model\x18<\x20\x01(\tB\0\x12\x18\n\x0eversion_string\
  4437. \x18F\x20\x01(\tB\0\x12#\n\x06appkey\x18P\x20\x01(\x0b2\x11.LibspotifyAp\
  4438. pKeyB\0\x12\"\n\x0bclient_info\x18Z\x20\x01(\x0b2\x0b.ClientInfoB\0:\0\"\
  4439. a\n\x10LoginCredentials\x12\x12\n\x08username\x18\n\x20\x01(\tB\0\x12\"\
  4440. \n\x03typ\x18\x14\x20\x02(\x0e2\x13.AuthenticationTypeB\0\x12\x13\n\taut\
  4441. h_data\x18\x1e\x20\x01(\x0cB\0:\0\"\x7f\n\x18FingerprintResponseUnion\
  4442. \x12*\n\x05grain\x18\n\x20\x01(\x0b2\x19.FingerprintGrainResponseB\0\x12\
  4443. 5\n\x0bhmac_ripemd\x18\x14\x20\x01(\x0b2\x1e.FingerprintHmacRipemdRespon\
  4444. seB\0:\0\"5\n\x18FingerprintGrainResponse\x12\x17\n\rencrypted_key\x18\n\
  4445. \x20\x02(\x0cB\0:\0\"1\n\x1dFingerprintHmacRipemdResponse\x12\x0e\n\x04h\
  4446. mac\x18\n\x20\x02(\x0cB\0:\0\"e\n\x0fPeerTicketUnion\x12*\n\npublic_key\
  4447. \x18\n\x20\x01(\x0b2\x14.PeerTicketPublicKeyB\0\x12$\n\nold_ticket\x18\
  4448. \x14\x20\x01(\x0b2\x0e.PeerTicketOldB\0:\0\"-\n\x13PeerTicketPublicKey\
  4449. \x12\x14\n\npublic_key\x18\n\x20\x02(\x0cB\0:\0\"I\n\rPeerTicketOld\x12\
  4450. \x15\n\x0bpeer_ticket\x18\n\x20\x02(\x0cB\0\x12\x1f\n\x15peer_ticket_sig\
  4451. nature\x18\x14\x20\x02(\x0cB\0:\0\"\xff\x01\n\nSystemInfo\x12\x20\n\ncpu\
  4452. _family\x18\n\x20\x02(\x0e2\n.CpuFamilyB\0\x12\x15\n\x0bcpu_subtype\x18\
  4453. \x14\x20\x01(\rB\0\x12\x11\n\x07cpu_ext\x18\x1e\x20\x01(\rB\0\x12\x17\n\
  4454. \x05brand\x18(\x20\x01(\x0e2\x06.BrandB\0\x12\x15\n\x0bbrand_flags\x182\
  4455. \x20\x01(\rB\0\x12\x11\n\x02os\x18<\x20\x02(\x0e2\x03.OsB\0\x12\x14\n\no\
  4456. s_version\x18F\x20\x01(\rB\0\x12\x10\n\x06os_ext\x18P\x20\x01(\rB\0\x12#\
  4457. \n\x19system_information_string\x18Z\x20\x01(\tB\0\x12\x13\n\tdevice_id\
  4458. \x18d\x20\x01(\tB\0:\0\"|\n\x10LibspotifyAppKey\x12\x11\n\x07version\x18\
  4459. \x01\x20\x02(\rB\0\x12\x10\n\x06devkey\x18\x02\x20\x02(\x0cB\0\x12\x13\n\
  4460. \tsignature\x18\x03\x20\x02(\x0cB\0\x12\x13\n\tuseragent\x18\x04\x20\x02\
  4461. (\tB\0\x12\x17\n\rcallback_hash\x18\x05\x20\x02(\x0cB\0:\0\"X\n\nClientI\
  4462. nfo\x12\x11\n\x07limited\x18\x01\x20\x01(\x08B\0\x12!\n\x02fb\x18\x02\
  4463. \x20\x01(\x0b2\x13.ClientInfoFacebookB\0\x12\x12\n\x08language\x18\x03\
  4464. \x20\x01(\tB\0:\0\",\n\x12ClientInfoFacebook\x12\x14\n\nmachine_id\x18\
  4465. \x01\x20\x01(\tB\0:\0\"\xd3\x02\n\tAPWelcome\x12\x1c\n\x12canonical_user\
  4466. name\x18\n\x20\x02(\tB\0\x12.\n\x16account_type_logged_in\x18\x14\x20\
  4467. \x02(\x0e2\x0c.AccountTypeB\0\x122\n\x1acredentials_type_logged_in\x18\
  4468. \x19\x20\x02(\x0e2\x0c.AccountTypeB\0\x12=\n\x1ereusable_auth_credential\
  4469. s_type\x18\x1e\x20\x02(\x0e2\x13.AuthenticationTypeB\0\x12#\n\x19reusabl\
  4470. e_auth_credentials\x18(\x20\x02(\x0cB\0\x12\x14\n\nlfs_secret\x182\x20\
  4471. \x01(\x0cB\0\x12$\n\x0caccount_info\x18<\x20\x01(\x0b2\x0c.AccountInfoB\
  4472. \0\x12\"\n\x02fb\x18F\x20\x01(\x0b2\x14.AccountInfoFacebookB\0:\0\"a\n\
  4473. \x0bAccountInfo\x12&\n\x07spotify\x18\x01\x20\x01(\x0b2\x13.AccountInfoS\
  4474. potifyB\0\x12(\n\x08facebook\x18\x02\x20\x01(\x0b2\x14.AccountInfoFacebo\
  4475. okB\0:\0\"\x16\n\x12AccountInfoSpotify:\0\"E\n\x13AccountInfoFacebook\
  4476. \x12\x16\n\x0caccess_token\x18\x01\x20\x01(\tB\0\x12\x14\n\nmachine_id\
  4477. \x18\x02\x20\x01(\tB\0:\0*\xd8\x01\n\x12AuthenticationType\x12\x1c\n\x18\
  4478. AUTHENTICATION_USER_PASS\x10\0\x12-\n)AUTHENTICATION_STORED_SPOTIFY_CRED\
  4479. ENTIALS\x10\x01\x12.\n*AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS\x10\
  4480. \x02\x12\x20\n\x1cAUTHENTICATION_SPOTIFY_TOKEN\x10\x03\x12!\n\x1dAUTHENT\
  4481. ICATION_FACEBOOK_TOKEN\x10\x04\x1a\0*[\n\x0fAccountCreation\x12\"\n\x1eA\
  4482. CCOUNT_CREATION_ALWAYS_PROMPT\x10\x01\x12\"\n\x1eACCOUNT_CREATION_ALWAYS\
  4483. _CREATE\x10\x03\x1a\0*\x9f\x01\n\tCpuFamily\x12\x0f\n\x0bCPU_UNKNOWN\x10\
  4484. \0\x12\x0b\n\x07CPU_X86\x10\x01\x12\x0e\n\nCPU_X86_64\x10\x02\x12\x0b\n\
  4485. \x07CPU_PPC\x10\x03\x12\x0e\n\nCPU_PPC_64\x10\x04\x12\x0b\n\x07CPU_ARM\
  4486. \x10\x05\x12\x0c\n\x08CPU_IA64\x10\x06\x12\n\n\x06CPU_SH\x10\x07\x12\x0c\
  4487. \n\x08CPU_MIPS\x10\x08\x12\x10\n\x0cCPU_BLACKFIN\x10\t\x1a\0*M\n\x05Bran\
  4488. d\x12\x13\n\x0fBRAND_UNBRANDED\x10\0\x12\r\n\tBRAND_INQ\x10\x01\x12\r\n\
  4489. \tBRAND_HTC\x10\x02\x12\x0f\n\x0bBRAND_NOKIA\x10\x03\x1a\0*\xd3\x02\n\
  4490. \x02Os\x12\x0e\n\nOS_UNKNOWN\x10\0\x12\x0e\n\nOS_WINDOWS\x10\x01\x12\n\n\
  4491. \x06OS_OSX\x10\x02\x12\r\n\tOS_IPHONE\x10\x03\x12\n\n\x06OS_S60\x10\x04\
  4492. \x12\x0c\n\x08OS_LINUX\x10\x05\x12\x11\n\rOS_WINDOWS_CE\x10\x06\x12\x0e\
  4493. \n\nOS_ANDROID\x10\x07\x12\x0b\n\x07OS_PALM\x10\x08\x12\x0e\n\nOS_FREEBS\
  4494. D\x10\t\x12\x11\n\rOS_BLACKBERRY\x10\n\x12\x0c\n\x08OS_SONOS\x10\x0b\x12\
  4495. \x0f\n\x0bOS_LOGITECH\x10\x0c\x12\n\n\x06OS_WP7\x10\r\x12\x0c\n\x08OS_ON\
  4496. KYO\x10\x0e\x12\x0e\n\nOS_PHILIPS\x10\x0f\x12\t\n\x05OS_WD\x10\x10\x12\
  4497. \x0c\n\x08OS_VOLVO\x10\x11\x12\x0b\n\x07OS_TIVO\x10\x12\x12\x0b\n\x07OS_\
  4498. AWOX\x10\x13\x12\x0c\n\x08OS_MEEGO\x10\x14\x12\r\n\tOS_QNXNTO\x10\x15\
  4499. \x12\n\n\x06OS_BCO\x10\x16\x1a\0**\n\x0bAccountType\x12\x0b\n\x07Spotify\
  4500. \x10\0\x12\x0c\n\x08Facebook\x10\x01\x1a\0B\0b\x06proto2\
  4501. ";
  4502. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
  4503. lock: ::protobuf::lazy::ONCE_INIT,
  4504. ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
  4505. };
  4506. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  4507. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  4508. }
  4509. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  4510. unsafe {
  4511. file_descriptor_proto_lazy.get(|| {
  4512. parse_descriptor_proto()
  4513. })
  4514. }
  4515. }