keyexchange.rs 238 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025
  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 `keyexchange.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 ClientHello {
  25. // message fields
  26. build_info: ::protobuf::SingularPtrField<BuildInfo>,
  27. fingerprints_supported: ::std::vec::Vec<Fingerprint>,
  28. cryptosuites_supported: ::std::vec::Vec<Cryptosuite>,
  29. powschemes_supported: ::std::vec::Vec<Powscheme>,
  30. login_crypto_hello: ::protobuf::SingularPtrField<LoginCryptoHelloUnion>,
  31. client_nonce: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  32. padding: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  33. feature_set: ::protobuf::SingularPtrField<FeatureSet>,
  34. // special fields
  35. pub unknown_fields: ::protobuf::UnknownFields,
  36. pub cached_size: ::protobuf::CachedSize,
  37. }
  38. impl<'a> ::std::default::Default for &'a ClientHello {
  39. fn default() -> &'a ClientHello {
  40. <ClientHello as ::protobuf::Message>::default_instance()
  41. }
  42. }
  43. impl ClientHello {
  44. pub fn new() -> ClientHello {
  45. ::std::default::Default::default()
  46. }
  47. // required .BuildInfo build_info = 10;
  48. pub fn get_build_info(&self) -> &BuildInfo {
  49. self.build_info.as_ref().unwrap_or_else(|| BuildInfo::default_instance())
  50. }
  51. pub fn clear_build_info(&mut self) {
  52. self.build_info.clear();
  53. }
  54. pub fn has_build_info(&self) -> bool {
  55. self.build_info.is_some()
  56. }
  57. // Param is passed by value, moved
  58. pub fn set_build_info(&mut self, v: BuildInfo) {
  59. self.build_info = ::protobuf::SingularPtrField::some(v);
  60. }
  61. // Mutable pointer to the field.
  62. // If field is not initialized, it is initialized with default value first.
  63. pub fn mut_build_info(&mut self) -> &mut BuildInfo {
  64. if self.build_info.is_none() {
  65. self.build_info.set_default();
  66. }
  67. self.build_info.as_mut().unwrap()
  68. }
  69. // Take field
  70. pub fn take_build_info(&mut self) -> BuildInfo {
  71. self.build_info.take().unwrap_or_else(|| BuildInfo::new())
  72. }
  73. // repeated .Fingerprint fingerprints_supported = 20;
  74. pub fn get_fingerprints_supported(&self) -> &[Fingerprint] {
  75. &self.fingerprints_supported
  76. }
  77. pub fn clear_fingerprints_supported(&mut self) {
  78. self.fingerprints_supported.clear();
  79. }
  80. // Param is passed by value, moved
  81. pub fn set_fingerprints_supported(&mut self, v: ::std::vec::Vec<Fingerprint>) {
  82. self.fingerprints_supported = v;
  83. }
  84. // Mutable pointer to the field.
  85. pub fn mut_fingerprints_supported(&mut self) -> &mut ::std::vec::Vec<Fingerprint> {
  86. &mut self.fingerprints_supported
  87. }
  88. // Take field
  89. pub fn take_fingerprints_supported(&mut self) -> ::std::vec::Vec<Fingerprint> {
  90. ::std::mem::replace(&mut self.fingerprints_supported, ::std::vec::Vec::new())
  91. }
  92. // repeated .Cryptosuite cryptosuites_supported = 30;
  93. pub fn get_cryptosuites_supported(&self) -> &[Cryptosuite] {
  94. &self.cryptosuites_supported
  95. }
  96. pub fn clear_cryptosuites_supported(&mut self) {
  97. self.cryptosuites_supported.clear();
  98. }
  99. // Param is passed by value, moved
  100. pub fn set_cryptosuites_supported(&mut self, v: ::std::vec::Vec<Cryptosuite>) {
  101. self.cryptosuites_supported = v;
  102. }
  103. // Mutable pointer to the field.
  104. pub fn mut_cryptosuites_supported(&mut self) -> &mut ::std::vec::Vec<Cryptosuite> {
  105. &mut self.cryptosuites_supported
  106. }
  107. // Take field
  108. pub fn take_cryptosuites_supported(&mut self) -> ::std::vec::Vec<Cryptosuite> {
  109. ::std::mem::replace(&mut self.cryptosuites_supported, ::std::vec::Vec::new())
  110. }
  111. // repeated .Powscheme powschemes_supported = 40;
  112. pub fn get_powschemes_supported(&self) -> &[Powscheme] {
  113. &self.powschemes_supported
  114. }
  115. pub fn clear_powschemes_supported(&mut self) {
  116. self.powschemes_supported.clear();
  117. }
  118. // Param is passed by value, moved
  119. pub fn set_powschemes_supported(&mut self, v: ::std::vec::Vec<Powscheme>) {
  120. self.powschemes_supported = v;
  121. }
  122. // Mutable pointer to the field.
  123. pub fn mut_powschemes_supported(&mut self) -> &mut ::std::vec::Vec<Powscheme> {
  124. &mut self.powschemes_supported
  125. }
  126. // Take field
  127. pub fn take_powschemes_supported(&mut self) -> ::std::vec::Vec<Powscheme> {
  128. ::std::mem::replace(&mut self.powschemes_supported, ::std::vec::Vec::new())
  129. }
  130. // required .LoginCryptoHelloUnion login_crypto_hello = 50;
  131. pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion {
  132. self.login_crypto_hello.as_ref().unwrap_or_else(|| LoginCryptoHelloUnion::default_instance())
  133. }
  134. pub fn clear_login_crypto_hello(&mut self) {
  135. self.login_crypto_hello.clear();
  136. }
  137. pub fn has_login_crypto_hello(&self) -> bool {
  138. self.login_crypto_hello.is_some()
  139. }
  140. // Param is passed by value, moved
  141. pub fn set_login_crypto_hello(&mut self, v: LoginCryptoHelloUnion) {
  142. self.login_crypto_hello = ::protobuf::SingularPtrField::some(v);
  143. }
  144. // Mutable pointer to the field.
  145. // If field is not initialized, it is initialized with default value first.
  146. pub fn mut_login_crypto_hello(&mut self) -> &mut LoginCryptoHelloUnion {
  147. if self.login_crypto_hello.is_none() {
  148. self.login_crypto_hello.set_default();
  149. }
  150. self.login_crypto_hello.as_mut().unwrap()
  151. }
  152. // Take field
  153. pub fn take_login_crypto_hello(&mut self) -> LoginCryptoHelloUnion {
  154. self.login_crypto_hello.take().unwrap_or_else(|| LoginCryptoHelloUnion::new())
  155. }
  156. // required bytes client_nonce = 60;
  157. pub fn get_client_nonce(&self) -> &[u8] {
  158. match self.client_nonce.as_ref() {
  159. Some(v) => &v,
  160. None => &[],
  161. }
  162. }
  163. pub fn clear_client_nonce(&mut self) {
  164. self.client_nonce.clear();
  165. }
  166. pub fn has_client_nonce(&self) -> bool {
  167. self.client_nonce.is_some()
  168. }
  169. // Param is passed by value, moved
  170. pub fn set_client_nonce(&mut self, v: ::std::vec::Vec<u8>) {
  171. self.client_nonce = ::protobuf::SingularField::some(v);
  172. }
  173. // Mutable pointer to the field.
  174. // If field is not initialized, it is initialized with default value first.
  175. pub fn mut_client_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
  176. if self.client_nonce.is_none() {
  177. self.client_nonce.set_default();
  178. }
  179. self.client_nonce.as_mut().unwrap()
  180. }
  181. // Take field
  182. pub fn take_client_nonce(&mut self) -> ::std::vec::Vec<u8> {
  183. self.client_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new())
  184. }
  185. // optional bytes padding = 70;
  186. pub fn get_padding(&self) -> &[u8] {
  187. match self.padding.as_ref() {
  188. Some(v) => &v,
  189. None => &[],
  190. }
  191. }
  192. pub fn clear_padding(&mut self) {
  193. self.padding.clear();
  194. }
  195. pub fn has_padding(&self) -> bool {
  196. self.padding.is_some()
  197. }
  198. // Param is passed by value, moved
  199. pub fn set_padding(&mut self, v: ::std::vec::Vec<u8>) {
  200. self.padding = ::protobuf::SingularField::some(v);
  201. }
  202. // Mutable pointer to the field.
  203. // If field is not initialized, it is initialized with default value first.
  204. pub fn mut_padding(&mut self) -> &mut ::std::vec::Vec<u8> {
  205. if self.padding.is_none() {
  206. self.padding.set_default();
  207. }
  208. self.padding.as_mut().unwrap()
  209. }
  210. // Take field
  211. pub fn take_padding(&mut self) -> ::std::vec::Vec<u8> {
  212. self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new())
  213. }
  214. // optional .FeatureSet feature_set = 80;
  215. pub fn get_feature_set(&self) -> &FeatureSet {
  216. self.feature_set.as_ref().unwrap_or_else(|| FeatureSet::default_instance())
  217. }
  218. pub fn clear_feature_set(&mut self) {
  219. self.feature_set.clear();
  220. }
  221. pub fn has_feature_set(&self) -> bool {
  222. self.feature_set.is_some()
  223. }
  224. // Param is passed by value, moved
  225. pub fn set_feature_set(&mut self, v: FeatureSet) {
  226. self.feature_set = ::protobuf::SingularPtrField::some(v);
  227. }
  228. // Mutable pointer to the field.
  229. // If field is not initialized, it is initialized with default value first.
  230. pub fn mut_feature_set(&mut self) -> &mut FeatureSet {
  231. if self.feature_set.is_none() {
  232. self.feature_set.set_default();
  233. }
  234. self.feature_set.as_mut().unwrap()
  235. }
  236. // Take field
  237. pub fn take_feature_set(&mut self) -> FeatureSet {
  238. self.feature_set.take().unwrap_or_else(|| FeatureSet::new())
  239. }
  240. }
  241. impl ::protobuf::Message for ClientHello {
  242. fn is_initialized(&self) -> bool {
  243. if self.build_info.is_none() {
  244. return false;
  245. }
  246. if self.login_crypto_hello.is_none() {
  247. return false;
  248. }
  249. if self.client_nonce.is_none() {
  250. return false;
  251. }
  252. for v in &self.build_info {
  253. if !v.is_initialized() {
  254. return false;
  255. }
  256. };
  257. for v in &self.login_crypto_hello {
  258. if !v.is_initialized() {
  259. return false;
  260. }
  261. };
  262. for v in &self.feature_set {
  263. if !v.is_initialized() {
  264. return false;
  265. }
  266. };
  267. true
  268. }
  269. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  270. while !is.eof()? {
  271. let (field_number, wire_type) = is.read_tag_unpack()?;
  272. match field_number {
  273. 10 => {
  274. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.build_info)?;
  275. },
  276. 20 => {
  277. ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.fingerprints_supported, 20, &mut self.unknown_fields)?
  278. },
  279. 30 => {
  280. ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.cryptosuites_supported, 30, &mut self.unknown_fields)?
  281. },
  282. 40 => {
  283. ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.powschemes_supported, 40, &mut self.unknown_fields)?
  284. },
  285. 50 => {
  286. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_crypto_hello)?;
  287. },
  288. 60 => {
  289. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.client_nonce)?;
  290. },
  291. 70 => {
  292. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?;
  293. },
  294. 80 => {
  295. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.feature_set)?;
  296. },
  297. _ => {
  298. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  299. },
  300. };
  301. }
  302. ::std::result::Result::Ok(())
  303. }
  304. // Compute sizes of nested messages
  305. #[allow(unused_variables)]
  306. fn compute_size(&self) -> u32 {
  307. let mut my_size = 0;
  308. if let Some(ref v) = self.build_info.as_ref() {
  309. let len = v.compute_size();
  310. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  311. }
  312. for value in &self.fingerprints_supported {
  313. my_size += ::protobuf::rt::enum_size(20, *value);
  314. };
  315. for value in &self.cryptosuites_supported {
  316. my_size += ::protobuf::rt::enum_size(30, *value);
  317. };
  318. for value in &self.powschemes_supported {
  319. my_size += ::protobuf::rt::enum_size(40, *value);
  320. };
  321. if let Some(ref v) = self.login_crypto_hello.as_ref() {
  322. let len = v.compute_size();
  323. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  324. }
  325. if let Some(ref v) = self.client_nonce.as_ref() {
  326. my_size += ::protobuf::rt::bytes_size(60, &v);
  327. }
  328. if let Some(ref v) = self.padding.as_ref() {
  329. my_size += ::protobuf::rt::bytes_size(70, &v);
  330. }
  331. if let Some(ref v) = self.feature_set.as_ref() {
  332. let len = v.compute_size();
  333. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  334. }
  335. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  336. self.cached_size.set(my_size);
  337. my_size
  338. }
  339. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  340. if let Some(ref v) = self.build_info.as_ref() {
  341. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  342. os.write_raw_varint32(v.get_cached_size())?;
  343. v.write_to_with_cached_sizes(os)?;
  344. }
  345. for v in &self.fingerprints_supported {
  346. os.write_enum(20, v.value())?;
  347. };
  348. for v in &self.cryptosuites_supported {
  349. os.write_enum(30, v.value())?;
  350. };
  351. for v in &self.powschemes_supported {
  352. os.write_enum(40, v.value())?;
  353. };
  354. if let Some(ref v) = self.login_crypto_hello.as_ref() {
  355. os.write_tag(50, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  356. os.write_raw_varint32(v.get_cached_size())?;
  357. v.write_to_with_cached_sizes(os)?;
  358. }
  359. if let Some(ref v) = self.client_nonce.as_ref() {
  360. os.write_bytes(60, &v)?;
  361. }
  362. if let Some(ref v) = self.padding.as_ref() {
  363. os.write_bytes(70, &v)?;
  364. }
  365. if let Some(ref v) = self.feature_set.as_ref() {
  366. os.write_tag(80, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  367. os.write_raw_varint32(v.get_cached_size())?;
  368. v.write_to_with_cached_sizes(os)?;
  369. }
  370. os.write_unknown_fields(self.get_unknown_fields())?;
  371. ::std::result::Result::Ok(())
  372. }
  373. fn get_cached_size(&self) -> u32 {
  374. self.cached_size.get()
  375. }
  376. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  377. &self.unknown_fields
  378. }
  379. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  380. &mut self.unknown_fields
  381. }
  382. fn as_any(&self) -> &dyn (::std::any::Any) {
  383. self as &dyn (::std::any::Any)
  384. }
  385. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  386. self as &mut dyn (::std::any::Any)
  387. }
  388. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  389. self
  390. }
  391. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  392. Self::descriptor_static()
  393. }
  394. fn new() -> ClientHello {
  395. ClientHello::new()
  396. }
  397. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  398. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  399. lock: ::protobuf::lazy::ONCE_INIT,
  400. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  401. };
  402. unsafe {
  403. descriptor.get(|| {
  404. let mut fields = ::std::vec::Vec::new();
  405. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<BuildInfo>>(
  406. "build_info",
  407. |m: &ClientHello| { &m.build_info },
  408. |m: &mut ClientHello| { &mut m.build_info },
  409. ));
  410. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Fingerprint>>(
  411. "fingerprints_supported",
  412. |m: &ClientHello| { &m.fingerprints_supported },
  413. |m: &mut ClientHello| { &mut m.fingerprints_supported },
  414. ));
  415. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Cryptosuite>>(
  416. "cryptosuites_supported",
  417. |m: &ClientHello| { &m.cryptosuites_supported },
  418. |m: &mut ClientHello| { &mut m.cryptosuites_supported },
  419. ));
  420. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Powscheme>>(
  421. "powschemes_supported",
  422. |m: &ClientHello| { &m.powschemes_supported },
  423. |m: &mut ClientHello| { &mut m.powschemes_supported },
  424. ));
  425. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCryptoHelloUnion>>(
  426. "login_crypto_hello",
  427. |m: &ClientHello| { &m.login_crypto_hello },
  428. |m: &mut ClientHello| { &mut m.login_crypto_hello },
  429. ));
  430. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  431. "client_nonce",
  432. |m: &ClientHello| { &m.client_nonce },
  433. |m: &mut ClientHello| { &mut m.client_nonce },
  434. ));
  435. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  436. "padding",
  437. |m: &ClientHello| { &m.padding },
  438. |m: &mut ClientHello| { &mut m.padding },
  439. ));
  440. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FeatureSet>>(
  441. "feature_set",
  442. |m: &ClientHello| { &m.feature_set },
  443. |m: &mut ClientHello| { &mut m.feature_set },
  444. ));
  445. ::protobuf::reflect::MessageDescriptor::new::<ClientHello>(
  446. "ClientHello",
  447. fields,
  448. file_descriptor_proto()
  449. )
  450. })
  451. }
  452. }
  453. fn default_instance() -> &'static ClientHello {
  454. static mut instance: ::protobuf::lazy::Lazy<ClientHello> = ::protobuf::lazy::Lazy {
  455. lock: ::protobuf::lazy::ONCE_INIT,
  456. ptr: 0 as *const ClientHello,
  457. };
  458. unsafe {
  459. instance.get(ClientHello::new)
  460. }
  461. }
  462. }
  463. impl ::protobuf::Clear for ClientHello {
  464. fn clear(&mut self) {
  465. self.build_info.clear();
  466. self.fingerprints_supported.clear();
  467. self.cryptosuites_supported.clear();
  468. self.powschemes_supported.clear();
  469. self.login_crypto_hello.clear();
  470. self.client_nonce.clear();
  471. self.padding.clear();
  472. self.feature_set.clear();
  473. self.unknown_fields.clear();
  474. }
  475. }
  476. impl ::std::fmt::Debug for ClientHello {
  477. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  478. ::protobuf::text_format::fmt(self, f)
  479. }
  480. }
  481. impl ::protobuf::reflect::ProtobufValue for ClientHello {
  482. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  483. ::protobuf::reflect::ProtobufValueRef::Message(self)
  484. }
  485. }
  486. #[derive(PartialEq,Clone,Default)]
  487. pub struct BuildInfo {
  488. // message fields
  489. product: ::std::option::Option<Product>,
  490. product_flags: ::std::vec::Vec<ProductFlags>,
  491. platform: ::std::option::Option<Platform>,
  492. version: ::std::option::Option<u64>,
  493. // special fields
  494. pub unknown_fields: ::protobuf::UnknownFields,
  495. pub cached_size: ::protobuf::CachedSize,
  496. }
  497. impl<'a> ::std::default::Default for &'a BuildInfo {
  498. fn default() -> &'a BuildInfo {
  499. <BuildInfo as ::protobuf::Message>::default_instance()
  500. }
  501. }
  502. impl BuildInfo {
  503. pub fn new() -> BuildInfo {
  504. ::std::default::Default::default()
  505. }
  506. // required .Product product = 10;
  507. pub fn get_product(&self) -> Product {
  508. self.product.unwrap_or(Product::PRODUCT_CLIENT)
  509. }
  510. pub fn clear_product(&mut self) {
  511. self.product = ::std::option::Option::None;
  512. }
  513. pub fn has_product(&self) -> bool {
  514. self.product.is_some()
  515. }
  516. // Param is passed by value, moved
  517. pub fn set_product(&mut self, v: Product) {
  518. self.product = ::std::option::Option::Some(v);
  519. }
  520. // repeated .ProductFlags product_flags = 20;
  521. pub fn get_product_flags(&self) -> &[ProductFlags] {
  522. &self.product_flags
  523. }
  524. pub fn clear_product_flags(&mut self) {
  525. self.product_flags.clear();
  526. }
  527. // Param is passed by value, moved
  528. pub fn set_product_flags(&mut self, v: ::std::vec::Vec<ProductFlags>) {
  529. self.product_flags = v;
  530. }
  531. // Mutable pointer to the field.
  532. pub fn mut_product_flags(&mut self) -> &mut ::std::vec::Vec<ProductFlags> {
  533. &mut self.product_flags
  534. }
  535. // Take field
  536. pub fn take_product_flags(&mut self) -> ::std::vec::Vec<ProductFlags> {
  537. ::std::mem::replace(&mut self.product_flags, ::std::vec::Vec::new())
  538. }
  539. // required .Platform platform = 30;
  540. pub fn get_platform(&self) -> Platform {
  541. self.platform.unwrap_or(Platform::PLATFORM_WIN32_X86)
  542. }
  543. pub fn clear_platform(&mut self) {
  544. self.platform = ::std::option::Option::None;
  545. }
  546. pub fn has_platform(&self) -> bool {
  547. self.platform.is_some()
  548. }
  549. // Param is passed by value, moved
  550. pub fn set_platform(&mut self, v: Platform) {
  551. self.platform = ::std::option::Option::Some(v);
  552. }
  553. // required uint64 version = 40;
  554. pub fn get_version(&self) -> u64 {
  555. self.version.unwrap_or(0)
  556. }
  557. pub fn clear_version(&mut self) {
  558. self.version = ::std::option::Option::None;
  559. }
  560. pub fn has_version(&self) -> bool {
  561. self.version.is_some()
  562. }
  563. // Param is passed by value, moved
  564. pub fn set_version(&mut self, v: u64) {
  565. self.version = ::std::option::Option::Some(v);
  566. }
  567. }
  568. impl ::protobuf::Message for BuildInfo {
  569. fn is_initialized(&self) -> bool {
  570. if self.product.is_none() {
  571. return false;
  572. }
  573. if self.platform.is_none() {
  574. return false;
  575. }
  576. if self.version.is_none() {
  577. return false;
  578. }
  579. true
  580. }
  581. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  582. while !is.eof()? {
  583. let (field_number, wire_type) = is.read_tag_unpack()?;
  584. match field_number {
  585. 10 => {
  586. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.product, 10, &mut self.unknown_fields)?
  587. },
  588. 20 => {
  589. ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.product_flags, 20, &mut self.unknown_fields)?
  590. },
  591. 30 => {
  592. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.platform, 30, &mut self.unknown_fields)?
  593. },
  594. 40 => {
  595. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  596. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  597. }
  598. let tmp = is.read_uint64()?;
  599. self.version = ::std::option::Option::Some(tmp);
  600. },
  601. _ => {
  602. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  603. },
  604. };
  605. }
  606. ::std::result::Result::Ok(())
  607. }
  608. // Compute sizes of nested messages
  609. #[allow(unused_variables)]
  610. fn compute_size(&self) -> u32 {
  611. let mut my_size = 0;
  612. if let Some(v) = self.product {
  613. my_size += ::protobuf::rt::enum_size(10, v);
  614. }
  615. for value in &self.product_flags {
  616. my_size += ::protobuf::rt::enum_size(20, *value);
  617. };
  618. if let Some(v) = self.platform {
  619. my_size += ::protobuf::rt::enum_size(30, v);
  620. }
  621. if let Some(v) = self.version {
  622. my_size += ::protobuf::rt::value_size(40, v, ::protobuf::wire_format::WireTypeVarint);
  623. }
  624. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  625. self.cached_size.set(my_size);
  626. my_size
  627. }
  628. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  629. if let Some(v) = self.product {
  630. os.write_enum(10, v.value())?;
  631. }
  632. for v in &self.product_flags {
  633. os.write_enum(20, v.value())?;
  634. };
  635. if let Some(v) = self.platform {
  636. os.write_enum(30, v.value())?;
  637. }
  638. if let Some(v) = self.version {
  639. os.write_uint64(40, v)?;
  640. }
  641. os.write_unknown_fields(self.get_unknown_fields())?;
  642. ::std::result::Result::Ok(())
  643. }
  644. fn get_cached_size(&self) -> u32 {
  645. self.cached_size.get()
  646. }
  647. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  648. &self.unknown_fields
  649. }
  650. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  651. &mut self.unknown_fields
  652. }
  653. fn as_any(&self) -> &dyn (::std::any::Any) {
  654. self as &dyn (::std::any::Any)
  655. }
  656. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  657. self as &mut dyn (::std::any::Any)
  658. }
  659. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  660. self
  661. }
  662. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  663. Self::descriptor_static()
  664. }
  665. fn new() -> BuildInfo {
  666. BuildInfo::new()
  667. }
  668. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  669. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  670. lock: ::protobuf::lazy::ONCE_INIT,
  671. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  672. };
  673. unsafe {
  674. descriptor.get(|| {
  675. let mut fields = ::std::vec::Vec::new();
  676. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Product>>(
  677. "product",
  678. |m: &BuildInfo| { &m.product },
  679. |m: &mut BuildInfo| { &mut m.product },
  680. ));
  681. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ProductFlags>>(
  682. "product_flags",
  683. |m: &BuildInfo| { &m.product_flags },
  684. |m: &mut BuildInfo| { &mut m.product_flags },
  685. ));
  686. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Platform>>(
  687. "platform",
  688. |m: &BuildInfo| { &m.platform },
  689. |m: &mut BuildInfo| { &mut m.platform },
  690. ));
  691. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
  692. "version",
  693. |m: &BuildInfo| { &m.version },
  694. |m: &mut BuildInfo| { &mut m.version },
  695. ));
  696. ::protobuf::reflect::MessageDescriptor::new::<BuildInfo>(
  697. "BuildInfo",
  698. fields,
  699. file_descriptor_proto()
  700. )
  701. })
  702. }
  703. }
  704. fn default_instance() -> &'static BuildInfo {
  705. static mut instance: ::protobuf::lazy::Lazy<BuildInfo> = ::protobuf::lazy::Lazy {
  706. lock: ::protobuf::lazy::ONCE_INIT,
  707. ptr: 0 as *const BuildInfo,
  708. };
  709. unsafe {
  710. instance.get(BuildInfo::new)
  711. }
  712. }
  713. }
  714. impl ::protobuf::Clear for BuildInfo {
  715. fn clear(&mut self) {
  716. self.product = ::std::option::Option::None;
  717. self.product_flags.clear();
  718. self.platform = ::std::option::Option::None;
  719. self.version = ::std::option::Option::None;
  720. self.unknown_fields.clear();
  721. }
  722. }
  723. impl ::std::fmt::Debug for BuildInfo {
  724. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  725. ::protobuf::text_format::fmt(self, f)
  726. }
  727. }
  728. impl ::protobuf::reflect::ProtobufValue for BuildInfo {
  729. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  730. ::protobuf::reflect::ProtobufValueRef::Message(self)
  731. }
  732. }
  733. #[derive(PartialEq,Clone,Default)]
  734. pub struct LoginCryptoHelloUnion {
  735. // message fields
  736. diffie_hellman: ::protobuf::SingularPtrField<LoginCryptoDiffieHellmanHello>,
  737. // special fields
  738. pub unknown_fields: ::protobuf::UnknownFields,
  739. pub cached_size: ::protobuf::CachedSize,
  740. }
  741. impl<'a> ::std::default::Default for &'a LoginCryptoHelloUnion {
  742. fn default() -> &'a LoginCryptoHelloUnion {
  743. <LoginCryptoHelloUnion as ::protobuf::Message>::default_instance()
  744. }
  745. }
  746. impl LoginCryptoHelloUnion {
  747. pub fn new() -> LoginCryptoHelloUnion {
  748. ::std::default::Default::default()
  749. }
  750. // optional .LoginCryptoDiffieHellmanHello diffie_hellman = 10;
  751. pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello {
  752. self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance())
  753. }
  754. pub fn clear_diffie_hellman(&mut self) {
  755. self.diffie_hellman.clear();
  756. }
  757. pub fn has_diffie_hellman(&self) -> bool {
  758. self.diffie_hellman.is_some()
  759. }
  760. // Param is passed by value, moved
  761. pub fn set_diffie_hellman(&mut self, v: LoginCryptoDiffieHellmanHello) {
  762. self.diffie_hellman = ::protobuf::SingularPtrField::some(v);
  763. }
  764. // Mutable pointer to the field.
  765. // If field is not initialized, it is initialized with default value first.
  766. pub fn mut_diffie_hellman(&mut self) -> &mut LoginCryptoDiffieHellmanHello {
  767. if self.diffie_hellman.is_none() {
  768. self.diffie_hellman.set_default();
  769. }
  770. self.diffie_hellman.as_mut().unwrap()
  771. }
  772. // Take field
  773. pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanHello {
  774. self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::new())
  775. }
  776. }
  777. impl ::protobuf::Message for LoginCryptoHelloUnion {
  778. fn is_initialized(&self) -> bool {
  779. for v in &self.diffie_hellman {
  780. if !v.is_initialized() {
  781. return false;
  782. }
  783. };
  784. true
  785. }
  786. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  787. while !is.eof()? {
  788. let (field_number, wire_type) = is.read_tag_unpack()?;
  789. match field_number {
  790. 10 => {
  791. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diffie_hellman)?;
  792. },
  793. _ => {
  794. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  795. },
  796. };
  797. }
  798. ::std::result::Result::Ok(())
  799. }
  800. // Compute sizes of nested messages
  801. #[allow(unused_variables)]
  802. fn compute_size(&self) -> u32 {
  803. let mut my_size = 0;
  804. if let Some(ref v) = self.diffie_hellman.as_ref() {
  805. let len = v.compute_size();
  806. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  807. }
  808. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  809. self.cached_size.set(my_size);
  810. my_size
  811. }
  812. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  813. if let Some(ref v) = self.diffie_hellman.as_ref() {
  814. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  815. os.write_raw_varint32(v.get_cached_size())?;
  816. v.write_to_with_cached_sizes(os)?;
  817. }
  818. os.write_unknown_fields(self.get_unknown_fields())?;
  819. ::std::result::Result::Ok(())
  820. }
  821. fn get_cached_size(&self) -> u32 {
  822. self.cached_size.get()
  823. }
  824. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  825. &self.unknown_fields
  826. }
  827. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  828. &mut self.unknown_fields
  829. }
  830. fn as_any(&self) -> &dyn (::std::any::Any) {
  831. self as &dyn (::std::any::Any)
  832. }
  833. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  834. self as &mut dyn (::std::any::Any)
  835. }
  836. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  837. self
  838. }
  839. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  840. Self::descriptor_static()
  841. }
  842. fn new() -> LoginCryptoHelloUnion {
  843. LoginCryptoHelloUnion::new()
  844. }
  845. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  846. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  847. lock: ::protobuf::lazy::ONCE_INIT,
  848. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  849. };
  850. unsafe {
  851. descriptor.get(|| {
  852. let mut fields = ::std::vec::Vec::new();
  853. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCryptoDiffieHellmanHello>>(
  854. "diffie_hellman",
  855. |m: &LoginCryptoHelloUnion| { &m.diffie_hellman },
  856. |m: &mut LoginCryptoHelloUnion| { &mut m.diffie_hellman },
  857. ));
  858. ::protobuf::reflect::MessageDescriptor::new::<LoginCryptoHelloUnion>(
  859. "LoginCryptoHelloUnion",
  860. fields,
  861. file_descriptor_proto()
  862. )
  863. })
  864. }
  865. }
  866. fn default_instance() -> &'static LoginCryptoHelloUnion {
  867. static mut instance: ::protobuf::lazy::Lazy<LoginCryptoHelloUnion> = ::protobuf::lazy::Lazy {
  868. lock: ::protobuf::lazy::ONCE_INIT,
  869. ptr: 0 as *const LoginCryptoHelloUnion,
  870. };
  871. unsafe {
  872. instance.get(LoginCryptoHelloUnion::new)
  873. }
  874. }
  875. }
  876. impl ::protobuf::Clear for LoginCryptoHelloUnion {
  877. fn clear(&mut self) {
  878. self.diffie_hellman.clear();
  879. self.unknown_fields.clear();
  880. }
  881. }
  882. impl ::std::fmt::Debug for LoginCryptoHelloUnion {
  883. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  884. ::protobuf::text_format::fmt(self, f)
  885. }
  886. }
  887. impl ::protobuf::reflect::ProtobufValue for LoginCryptoHelloUnion {
  888. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  889. ::protobuf::reflect::ProtobufValueRef::Message(self)
  890. }
  891. }
  892. #[derive(PartialEq,Clone,Default)]
  893. pub struct LoginCryptoDiffieHellmanHello {
  894. // message fields
  895. gc: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  896. server_keys_known: ::std::option::Option<u32>,
  897. // special fields
  898. pub unknown_fields: ::protobuf::UnknownFields,
  899. pub cached_size: ::protobuf::CachedSize,
  900. }
  901. impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanHello {
  902. fn default() -> &'a LoginCryptoDiffieHellmanHello {
  903. <LoginCryptoDiffieHellmanHello as ::protobuf::Message>::default_instance()
  904. }
  905. }
  906. impl LoginCryptoDiffieHellmanHello {
  907. pub fn new() -> LoginCryptoDiffieHellmanHello {
  908. ::std::default::Default::default()
  909. }
  910. // required bytes gc = 10;
  911. pub fn get_gc(&self) -> &[u8] {
  912. match self.gc.as_ref() {
  913. Some(v) => &v,
  914. None => &[],
  915. }
  916. }
  917. pub fn clear_gc(&mut self) {
  918. self.gc.clear();
  919. }
  920. pub fn has_gc(&self) -> bool {
  921. self.gc.is_some()
  922. }
  923. // Param is passed by value, moved
  924. pub fn set_gc(&mut self, v: ::std::vec::Vec<u8>) {
  925. self.gc = ::protobuf::SingularField::some(v);
  926. }
  927. // Mutable pointer to the field.
  928. // If field is not initialized, it is initialized with default value first.
  929. pub fn mut_gc(&mut self) -> &mut ::std::vec::Vec<u8> {
  930. if self.gc.is_none() {
  931. self.gc.set_default();
  932. }
  933. self.gc.as_mut().unwrap()
  934. }
  935. // Take field
  936. pub fn take_gc(&mut self) -> ::std::vec::Vec<u8> {
  937. self.gc.take().unwrap_or_else(|| ::std::vec::Vec::new())
  938. }
  939. // required uint32 server_keys_known = 20;
  940. pub fn get_server_keys_known(&self) -> u32 {
  941. self.server_keys_known.unwrap_or(0)
  942. }
  943. pub fn clear_server_keys_known(&mut self) {
  944. self.server_keys_known = ::std::option::Option::None;
  945. }
  946. pub fn has_server_keys_known(&self) -> bool {
  947. self.server_keys_known.is_some()
  948. }
  949. // Param is passed by value, moved
  950. pub fn set_server_keys_known(&mut self, v: u32) {
  951. self.server_keys_known = ::std::option::Option::Some(v);
  952. }
  953. }
  954. impl ::protobuf::Message for LoginCryptoDiffieHellmanHello {
  955. fn is_initialized(&self) -> bool {
  956. if self.gc.is_none() {
  957. return false;
  958. }
  959. if self.server_keys_known.is_none() {
  960. return false;
  961. }
  962. true
  963. }
  964. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  965. while !is.eof()? {
  966. let (field_number, wire_type) = is.read_tag_unpack()?;
  967. match field_number {
  968. 10 => {
  969. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gc)?;
  970. },
  971. 20 => {
  972. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  973. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  974. }
  975. let tmp = is.read_uint32()?;
  976. self.server_keys_known = ::std::option::Option::Some(tmp);
  977. },
  978. _ => {
  979. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  980. },
  981. };
  982. }
  983. ::std::result::Result::Ok(())
  984. }
  985. // Compute sizes of nested messages
  986. #[allow(unused_variables)]
  987. fn compute_size(&self) -> u32 {
  988. let mut my_size = 0;
  989. if let Some(ref v) = self.gc.as_ref() {
  990. my_size += ::protobuf::rt::bytes_size(10, &v);
  991. }
  992. if let Some(v) = self.server_keys_known {
  993. my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
  994. }
  995. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  996. self.cached_size.set(my_size);
  997. my_size
  998. }
  999. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1000. if let Some(ref v) = self.gc.as_ref() {
  1001. os.write_bytes(10, &v)?;
  1002. }
  1003. if let Some(v) = self.server_keys_known {
  1004. os.write_uint32(20, v)?;
  1005. }
  1006. os.write_unknown_fields(self.get_unknown_fields())?;
  1007. ::std::result::Result::Ok(())
  1008. }
  1009. fn get_cached_size(&self) -> u32 {
  1010. self.cached_size.get()
  1011. }
  1012. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1013. &self.unknown_fields
  1014. }
  1015. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1016. &mut self.unknown_fields
  1017. }
  1018. fn as_any(&self) -> &dyn (::std::any::Any) {
  1019. self as &dyn (::std::any::Any)
  1020. }
  1021. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1022. self as &mut dyn (::std::any::Any)
  1023. }
  1024. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1025. self
  1026. }
  1027. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1028. Self::descriptor_static()
  1029. }
  1030. fn new() -> LoginCryptoDiffieHellmanHello {
  1031. LoginCryptoDiffieHellmanHello::new()
  1032. }
  1033. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1034. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1035. lock: ::protobuf::lazy::ONCE_INIT,
  1036. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1037. };
  1038. unsafe {
  1039. descriptor.get(|| {
  1040. let mut fields = ::std::vec::Vec::new();
  1041. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1042. "gc",
  1043. |m: &LoginCryptoDiffieHellmanHello| { &m.gc },
  1044. |m: &mut LoginCryptoDiffieHellmanHello| { &mut m.gc },
  1045. ));
  1046. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
  1047. "server_keys_known",
  1048. |m: &LoginCryptoDiffieHellmanHello| { &m.server_keys_known },
  1049. |m: &mut LoginCryptoDiffieHellmanHello| { &mut m.server_keys_known },
  1050. ));
  1051. ::protobuf::reflect::MessageDescriptor::new::<LoginCryptoDiffieHellmanHello>(
  1052. "LoginCryptoDiffieHellmanHello",
  1053. fields,
  1054. file_descriptor_proto()
  1055. )
  1056. })
  1057. }
  1058. }
  1059. fn default_instance() -> &'static LoginCryptoDiffieHellmanHello {
  1060. static mut instance: ::protobuf::lazy::Lazy<LoginCryptoDiffieHellmanHello> = ::protobuf::lazy::Lazy {
  1061. lock: ::protobuf::lazy::ONCE_INIT,
  1062. ptr: 0 as *const LoginCryptoDiffieHellmanHello,
  1063. };
  1064. unsafe {
  1065. instance.get(LoginCryptoDiffieHellmanHello::new)
  1066. }
  1067. }
  1068. }
  1069. impl ::protobuf::Clear for LoginCryptoDiffieHellmanHello {
  1070. fn clear(&mut self) {
  1071. self.gc.clear();
  1072. self.server_keys_known = ::std::option::Option::None;
  1073. self.unknown_fields.clear();
  1074. }
  1075. }
  1076. impl ::std::fmt::Debug for LoginCryptoDiffieHellmanHello {
  1077. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1078. ::protobuf::text_format::fmt(self, f)
  1079. }
  1080. }
  1081. impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanHello {
  1082. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1083. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1084. }
  1085. }
  1086. #[derive(PartialEq,Clone,Default)]
  1087. pub struct FeatureSet {
  1088. // message fields
  1089. autoupdate2: ::std::option::Option<bool>,
  1090. current_location: ::std::option::Option<bool>,
  1091. // special fields
  1092. pub unknown_fields: ::protobuf::UnknownFields,
  1093. pub cached_size: ::protobuf::CachedSize,
  1094. }
  1095. impl<'a> ::std::default::Default for &'a FeatureSet {
  1096. fn default() -> &'a FeatureSet {
  1097. <FeatureSet as ::protobuf::Message>::default_instance()
  1098. }
  1099. }
  1100. impl FeatureSet {
  1101. pub fn new() -> FeatureSet {
  1102. ::std::default::Default::default()
  1103. }
  1104. // optional bool autoupdate2 = 1;
  1105. pub fn get_autoupdate2(&self) -> bool {
  1106. self.autoupdate2.unwrap_or(false)
  1107. }
  1108. pub fn clear_autoupdate2(&mut self) {
  1109. self.autoupdate2 = ::std::option::Option::None;
  1110. }
  1111. pub fn has_autoupdate2(&self) -> bool {
  1112. self.autoupdate2.is_some()
  1113. }
  1114. // Param is passed by value, moved
  1115. pub fn set_autoupdate2(&mut self, v: bool) {
  1116. self.autoupdate2 = ::std::option::Option::Some(v);
  1117. }
  1118. // optional bool current_location = 2;
  1119. pub fn get_current_location(&self) -> bool {
  1120. self.current_location.unwrap_or(false)
  1121. }
  1122. pub fn clear_current_location(&mut self) {
  1123. self.current_location = ::std::option::Option::None;
  1124. }
  1125. pub fn has_current_location(&self) -> bool {
  1126. self.current_location.is_some()
  1127. }
  1128. // Param is passed by value, moved
  1129. pub fn set_current_location(&mut self, v: bool) {
  1130. self.current_location = ::std::option::Option::Some(v);
  1131. }
  1132. }
  1133. impl ::protobuf::Message for FeatureSet {
  1134. fn is_initialized(&self) -> bool {
  1135. true
  1136. }
  1137. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1138. while !is.eof()? {
  1139. let (field_number, wire_type) = is.read_tag_unpack()?;
  1140. match field_number {
  1141. 1 => {
  1142. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1143. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1144. }
  1145. let tmp = is.read_bool()?;
  1146. self.autoupdate2 = ::std::option::Option::Some(tmp);
  1147. },
  1148. 2 => {
  1149. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1150. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1151. }
  1152. let tmp = is.read_bool()?;
  1153. self.current_location = ::std::option::Option::Some(tmp);
  1154. },
  1155. _ => {
  1156. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1157. },
  1158. };
  1159. }
  1160. ::std::result::Result::Ok(())
  1161. }
  1162. // Compute sizes of nested messages
  1163. #[allow(unused_variables)]
  1164. fn compute_size(&self) -> u32 {
  1165. let mut my_size = 0;
  1166. if let Some(v) = self.autoupdate2 {
  1167. my_size += 2;
  1168. }
  1169. if let Some(v) = self.current_location {
  1170. my_size += 2;
  1171. }
  1172. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1173. self.cached_size.set(my_size);
  1174. my_size
  1175. }
  1176. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1177. if let Some(v) = self.autoupdate2 {
  1178. os.write_bool(1, v)?;
  1179. }
  1180. if let Some(v) = self.current_location {
  1181. os.write_bool(2, v)?;
  1182. }
  1183. os.write_unknown_fields(self.get_unknown_fields())?;
  1184. ::std::result::Result::Ok(())
  1185. }
  1186. fn get_cached_size(&self) -> u32 {
  1187. self.cached_size.get()
  1188. }
  1189. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1190. &self.unknown_fields
  1191. }
  1192. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1193. &mut self.unknown_fields
  1194. }
  1195. fn as_any(&self) -> &dyn (::std::any::Any) {
  1196. self as &dyn (::std::any::Any)
  1197. }
  1198. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1199. self as &mut dyn (::std::any::Any)
  1200. }
  1201. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1202. self
  1203. }
  1204. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1205. Self::descriptor_static()
  1206. }
  1207. fn new() -> FeatureSet {
  1208. FeatureSet::new()
  1209. }
  1210. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1211. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1212. lock: ::protobuf::lazy::ONCE_INIT,
  1213. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1214. };
  1215. unsafe {
  1216. descriptor.get(|| {
  1217. let mut fields = ::std::vec::Vec::new();
  1218. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1219. "autoupdate2",
  1220. |m: &FeatureSet| { &m.autoupdate2 },
  1221. |m: &mut FeatureSet| { &mut m.autoupdate2 },
  1222. ));
  1223. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1224. "current_location",
  1225. |m: &FeatureSet| { &m.current_location },
  1226. |m: &mut FeatureSet| { &mut m.current_location },
  1227. ));
  1228. ::protobuf::reflect::MessageDescriptor::new::<FeatureSet>(
  1229. "FeatureSet",
  1230. fields,
  1231. file_descriptor_proto()
  1232. )
  1233. })
  1234. }
  1235. }
  1236. fn default_instance() -> &'static FeatureSet {
  1237. static mut instance: ::protobuf::lazy::Lazy<FeatureSet> = ::protobuf::lazy::Lazy {
  1238. lock: ::protobuf::lazy::ONCE_INIT,
  1239. ptr: 0 as *const FeatureSet,
  1240. };
  1241. unsafe {
  1242. instance.get(FeatureSet::new)
  1243. }
  1244. }
  1245. }
  1246. impl ::protobuf::Clear for FeatureSet {
  1247. fn clear(&mut self) {
  1248. self.autoupdate2 = ::std::option::Option::None;
  1249. self.current_location = ::std::option::Option::None;
  1250. self.unknown_fields.clear();
  1251. }
  1252. }
  1253. impl ::std::fmt::Debug for FeatureSet {
  1254. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1255. ::protobuf::text_format::fmt(self, f)
  1256. }
  1257. }
  1258. impl ::protobuf::reflect::ProtobufValue for FeatureSet {
  1259. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1260. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1261. }
  1262. }
  1263. #[derive(PartialEq,Clone,Default)]
  1264. pub struct APResponseMessage {
  1265. // message fields
  1266. challenge: ::protobuf::SingularPtrField<APChallenge>,
  1267. upgrade: ::protobuf::SingularPtrField<UpgradeRequiredMessage>,
  1268. login_failed: ::protobuf::SingularPtrField<APLoginFailed>,
  1269. // special fields
  1270. pub unknown_fields: ::protobuf::UnknownFields,
  1271. pub cached_size: ::protobuf::CachedSize,
  1272. }
  1273. impl<'a> ::std::default::Default for &'a APResponseMessage {
  1274. fn default() -> &'a APResponseMessage {
  1275. <APResponseMessage as ::protobuf::Message>::default_instance()
  1276. }
  1277. }
  1278. impl APResponseMessage {
  1279. pub fn new() -> APResponseMessage {
  1280. ::std::default::Default::default()
  1281. }
  1282. // optional .APChallenge challenge = 10;
  1283. pub fn get_challenge(&self) -> &APChallenge {
  1284. self.challenge.as_ref().unwrap_or_else(|| APChallenge::default_instance())
  1285. }
  1286. pub fn clear_challenge(&mut self) {
  1287. self.challenge.clear();
  1288. }
  1289. pub fn has_challenge(&self) -> bool {
  1290. self.challenge.is_some()
  1291. }
  1292. // Param is passed by value, moved
  1293. pub fn set_challenge(&mut self, v: APChallenge) {
  1294. self.challenge = ::protobuf::SingularPtrField::some(v);
  1295. }
  1296. // Mutable pointer to the field.
  1297. // If field is not initialized, it is initialized with default value first.
  1298. pub fn mut_challenge(&mut self) -> &mut APChallenge {
  1299. if self.challenge.is_none() {
  1300. self.challenge.set_default();
  1301. }
  1302. self.challenge.as_mut().unwrap()
  1303. }
  1304. // Take field
  1305. pub fn take_challenge(&mut self) -> APChallenge {
  1306. self.challenge.take().unwrap_or_else(|| APChallenge::new())
  1307. }
  1308. // optional .UpgradeRequiredMessage upgrade = 20;
  1309. pub fn get_upgrade(&self) -> &UpgradeRequiredMessage {
  1310. self.upgrade.as_ref().unwrap_or_else(|| UpgradeRequiredMessage::default_instance())
  1311. }
  1312. pub fn clear_upgrade(&mut self) {
  1313. self.upgrade.clear();
  1314. }
  1315. pub fn has_upgrade(&self) -> bool {
  1316. self.upgrade.is_some()
  1317. }
  1318. // Param is passed by value, moved
  1319. pub fn set_upgrade(&mut self, v: UpgradeRequiredMessage) {
  1320. self.upgrade = ::protobuf::SingularPtrField::some(v);
  1321. }
  1322. // Mutable pointer to the field.
  1323. // If field is not initialized, it is initialized with default value first.
  1324. pub fn mut_upgrade(&mut self) -> &mut UpgradeRequiredMessage {
  1325. if self.upgrade.is_none() {
  1326. self.upgrade.set_default();
  1327. }
  1328. self.upgrade.as_mut().unwrap()
  1329. }
  1330. // Take field
  1331. pub fn take_upgrade(&mut self) -> UpgradeRequiredMessage {
  1332. self.upgrade.take().unwrap_or_else(|| UpgradeRequiredMessage::new())
  1333. }
  1334. // optional .APLoginFailed login_failed = 30;
  1335. pub fn get_login_failed(&self) -> &APLoginFailed {
  1336. self.login_failed.as_ref().unwrap_or_else(|| APLoginFailed::default_instance())
  1337. }
  1338. pub fn clear_login_failed(&mut self) {
  1339. self.login_failed.clear();
  1340. }
  1341. pub fn has_login_failed(&self) -> bool {
  1342. self.login_failed.is_some()
  1343. }
  1344. // Param is passed by value, moved
  1345. pub fn set_login_failed(&mut self, v: APLoginFailed) {
  1346. self.login_failed = ::protobuf::SingularPtrField::some(v);
  1347. }
  1348. // Mutable pointer to the field.
  1349. // If field is not initialized, it is initialized with default value first.
  1350. pub fn mut_login_failed(&mut self) -> &mut APLoginFailed {
  1351. if self.login_failed.is_none() {
  1352. self.login_failed.set_default();
  1353. }
  1354. self.login_failed.as_mut().unwrap()
  1355. }
  1356. // Take field
  1357. pub fn take_login_failed(&mut self) -> APLoginFailed {
  1358. self.login_failed.take().unwrap_or_else(|| APLoginFailed::new())
  1359. }
  1360. }
  1361. impl ::protobuf::Message for APResponseMessage {
  1362. fn is_initialized(&self) -> bool {
  1363. for v in &self.challenge {
  1364. if !v.is_initialized() {
  1365. return false;
  1366. }
  1367. };
  1368. for v in &self.upgrade {
  1369. if !v.is_initialized() {
  1370. return false;
  1371. }
  1372. };
  1373. for v in &self.login_failed {
  1374. if !v.is_initialized() {
  1375. return false;
  1376. }
  1377. };
  1378. true
  1379. }
  1380. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1381. while !is.eof()? {
  1382. let (field_number, wire_type) = is.read_tag_unpack()?;
  1383. match field_number {
  1384. 10 => {
  1385. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.challenge)?;
  1386. },
  1387. 20 => {
  1388. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.upgrade)?;
  1389. },
  1390. 30 => {
  1391. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_failed)?;
  1392. },
  1393. _ => {
  1394. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1395. },
  1396. };
  1397. }
  1398. ::std::result::Result::Ok(())
  1399. }
  1400. // Compute sizes of nested messages
  1401. #[allow(unused_variables)]
  1402. fn compute_size(&self) -> u32 {
  1403. let mut my_size = 0;
  1404. if let Some(ref v) = self.challenge.as_ref() {
  1405. let len = v.compute_size();
  1406. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1407. }
  1408. if let Some(ref v) = self.upgrade.as_ref() {
  1409. let len = v.compute_size();
  1410. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1411. }
  1412. if let Some(ref v) = self.login_failed.as_ref() {
  1413. let len = v.compute_size();
  1414. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1415. }
  1416. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1417. self.cached_size.set(my_size);
  1418. my_size
  1419. }
  1420. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1421. if let Some(ref v) = self.challenge.as_ref() {
  1422. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1423. os.write_raw_varint32(v.get_cached_size())?;
  1424. v.write_to_with_cached_sizes(os)?;
  1425. }
  1426. if let Some(ref v) = self.upgrade.as_ref() {
  1427. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1428. os.write_raw_varint32(v.get_cached_size())?;
  1429. v.write_to_with_cached_sizes(os)?;
  1430. }
  1431. if let Some(ref v) = self.login_failed.as_ref() {
  1432. os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1433. os.write_raw_varint32(v.get_cached_size())?;
  1434. v.write_to_with_cached_sizes(os)?;
  1435. }
  1436. os.write_unknown_fields(self.get_unknown_fields())?;
  1437. ::std::result::Result::Ok(())
  1438. }
  1439. fn get_cached_size(&self) -> u32 {
  1440. self.cached_size.get()
  1441. }
  1442. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1443. &self.unknown_fields
  1444. }
  1445. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1446. &mut self.unknown_fields
  1447. }
  1448. fn as_any(&self) -> &dyn (::std::any::Any) {
  1449. self as &dyn (::std::any::Any)
  1450. }
  1451. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1452. self as &mut dyn (::std::any::Any)
  1453. }
  1454. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1455. self
  1456. }
  1457. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1458. Self::descriptor_static()
  1459. }
  1460. fn new() -> APResponseMessage {
  1461. APResponseMessage::new()
  1462. }
  1463. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1464. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1465. lock: ::protobuf::lazy::ONCE_INIT,
  1466. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1467. };
  1468. unsafe {
  1469. descriptor.get(|| {
  1470. let mut fields = ::std::vec::Vec::new();
  1471. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<APChallenge>>(
  1472. "challenge",
  1473. |m: &APResponseMessage| { &m.challenge },
  1474. |m: &mut APResponseMessage| { &mut m.challenge },
  1475. ));
  1476. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<UpgradeRequiredMessage>>(
  1477. "upgrade",
  1478. |m: &APResponseMessage| { &m.upgrade },
  1479. |m: &mut APResponseMessage| { &mut m.upgrade },
  1480. ));
  1481. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<APLoginFailed>>(
  1482. "login_failed",
  1483. |m: &APResponseMessage| { &m.login_failed },
  1484. |m: &mut APResponseMessage| { &mut m.login_failed },
  1485. ));
  1486. ::protobuf::reflect::MessageDescriptor::new::<APResponseMessage>(
  1487. "APResponseMessage",
  1488. fields,
  1489. file_descriptor_proto()
  1490. )
  1491. })
  1492. }
  1493. }
  1494. fn default_instance() -> &'static APResponseMessage {
  1495. static mut instance: ::protobuf::lazy::Lazy<APResponseMessage> = ::protobuf::lazy::Lazy {
  1496. lock: ::protobuf::lazy::ONCE_INIT,
  1497. ptr: 0 as *const APResponseMessage,
  1498. };
  1499. unsafe {
  1500. instance.get(APResponseMessage::new)
  1501. }
  1502. }
  1503. }
  1504. impl ::protobuf::Clear for APResponseMessage {
  1505. fn clear(&mut self) {
  1506. self.challenge.clear();
  1507. self.upgrade.clear();
  1508. self.login_failed.clear();
  1509. self.unknown_fields.clear();
  1510. }
  1511. }
  1512. impl ::std::fmt::Debug for APResponseMessage {
  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 APResponseMessage {
  1518. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1519. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1520. }
  1521. }
  1522. #[derive(PartialEq,Clone,Default)]
  1523. pub struct APChallenge {
  1524. // message fields
  1525. login_crypto_challenge: ::protobuf::SingularPtrField<LoginCryptoChallengeUnion>,
  1526. fingerprint_challenge: ::protobuf::SingularPtrField<FingerprintChallengeUnion>,
  1527. pow_challenge: ::protobuf::SingularPtrField<PoWChallengeUnion>,
  1528. crypto_challenge: ::protobuf::SingularPtrField<CryptoChallengeUnion>,
  1529. server_nonce: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1530. padding: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1531. // special fields
  1532. pub unknown_fields: ::protobuf::UnknownFields,
  1533. pub cached_size: ::protobuf::CachedSize,
  1534. }
  1535. impl<'a> ::std::default::Default for &'a APChallenge {
  1536. fn default() -> &'a APChallenge {
  1537. <APChallenge as ::protobuf::Message>::default_instance()
  1538. }
  1539. }
  1540. impl APChallenge {
  1541. pub fn new() -> APChallenge {
  1542. ::std::default::Default::default()
  1543. }
  1544. // required .LoginCryptoChallengeUnion login_crypto_challenge = 10;
  1545. pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion {
  1546. self.login_crypto_challenge.as_ref().unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance())
  1547. }
  1548. pub fn clear_login_crypto_challenge(&mut self) {
  1549. self.login_crypto_challenge.clear();
  1550. }
  1551. pub fn has_login_crypto_challenge(&self) -> bool {
  1552. self.login_crypto_challenge.is_some()
  1553. }
  1554. // Param is passed by value, moved
  1555. pub fn set_login_crypto_challenge(&mut self, v: LoginCryptoChallengeUnion) {
  1556. self.login_crypto_challenge = ::protobuf::SingularPtrField::some(v);
  1557. }
  1558. // Mutable pointer to the field.
  1559. // If field is not initialized, it is initialized with default value first.
  1560. pub fn mut_login_crypto_challenge(&mut self) -> &mut LoginCryptoChallengeUnion {
  1561. if self.login_crypto_challenge.is_none() {
  1562. self.login_crypto_challenge.set_default();
  1563. }
  1564. self.login_crypto_challenge.as_mut().unwrap()
  1565. }
  1566. // Take field
  1567. pub fn take_login_crypto_challenge(&mut self) -> LoginCryptoChallengeUnion {
  1568. self.login_crypto_challenge.take().unwrap_or_else(|| LoginCryptoChallengeUnion::new())
  1569. }
  1570. // required .FingerprintChallengeUnion fingerprint_challenge = 20;
  1571. pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion {
  1572. self.fingerprint_challenge.as_ref().unwrap_or_else(|| FingerprintChallengeUnion::default_instance())
  1573. }
  1574. pub fn clear_fingerprint_challenge(&mut self) {
  1575. self.fingerprint_challenge.clear();
  1576. }
  1577. pub fn has_fingerprint_challenge(&self) -> bool {
  1578. self.fingerprint_challenge.is_some()
  1579. }
  1580. // Param is passed by value, moved
  1581. pub fn set_fingerprint_challenge(&mut self, v: FingerprintChallengeUnion) {
  1582. self.fingerprint_challenge = ::protobuf::SingularPtrField::some(v);
  1583. }
  1584. // Mutable pointer to the field.
  1585. // If field is not initialized, it is initialized with default value first.
  1586. pub fn mut_fingerprint_challenge(&mut self) -> &mut FingerprintChallengeUnion {
  1587. if self.fingerprint_challenge.is_none() {
  1588. self.fingerprint_challenge.set_default();
  1589. }
  1590. self.fingerprint_challenge.as_mut().unwrap()
  1591. }
  1592. // Take field
  1593. pub fn take_fingerprint_challenge(&mut self) -> FingerprintChallengeUnion {
  1594. self.fingerprint_challenge.take().unwrap_or_else(|| FingerprintChallengeUnion::new())
  1595. }
  1596. // required .PoWChallengeUnion pow_challenge = 30;
  1597. pub fn get_pow_challenge(&self) -> &PoWChallengeUnion {
  1598. self.pow_challenge.as_ref().unwrap_or_else(|| PoWChallengeUnion::default_instance())
  1599. }
  1600. pub fn clear_pow_challenge(&mut self) {
  1601. self.pow_challenge.clear();
  1602. }
  1603. pub fn has_pow_challenge(&self) -> bool {
  1604. self.pow_challenge.is_some()
  1605. }
  1606. // Param is passed by value, moved
  1607. pub fn set_pow_challenge(&mut self, v: PoWChallengeUnion) {
  1608. self.pow_challenge = ::protobuf::SingularPtrField::some(v);
  1609. }
  1610. // Mutable pointer to the field.
  1611. // If field is not initialized, it is initialized with default value first.
  1612. pub fn mut_pow_challenge(&mut self) -> &mut PoWChallengeUnion {
  1613. if self.pow_challenge.is_none() {
  1614. self.pow_challenge.set_default();
  1615. }
  1616. self.pow_challenge.as_mut().unwrap()
  1617. }
  1618. // Take field
  1619. pub fn take_pow_challenge(&mut self) -> PoWChallengeUnion {
  1620. self.pow_challenge.take().unwrap_or_else(|| PoWChallengeUnion::new())
  1621. }
  1622. // required .CryptoChallengeUnion crypto_challenge = 40;
  1623. pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion {
  1624. self.crypto_challenge.as_ref().unwrap_or_else(|| CryptoChallengeUnion::default_instance())
  1625. }
  1626. pub fn clear_crypto_challenge(&mut self) {
  1627. self.crypto_challenge.clear();
  1628. }
  1629. pub fn has_crypto_challenge(&self) -> bool {
  1630. self.crypto_challenge.is_some()
  1631. }
  1632. // Param is passed by value, moved
  1633. pub fn set_crypto_challenge(&mut self, v: CryptoChallengeUnion) {
  1634. self.crypto_challenge = ::protobuf::SingularPtrField::some(v);
  1635. }
  1636. // Mutable pointer to the field.
  1637. // If field is not initialized, it is initialized with default value first.
  1638. pub fn mut_crypto_challenge(&mut self) -> &mut CryptoChallengeUnion {
  1639. if self.crypto_challenge.is_none() {
  1640. self.crypto_challenge.set_default();
  1641. }
  1642. self.crypto_challenge.as_mut().unwrap()
  1643. }
  1644. // Take field
  1645. pub fn take_crypto_challenge(&mut self) -> CryptoChallengeUnion {
  1646. self.crypto_challenge.take().unwrap_or_else(|| CryptoChallengeUnion::new())
  1647. }
  1648. // required bytes server_nonce = 50;
  1649. pub fn get_server_nonce(&self) -> &[u8] {
  1650. match self.server_nonce.as_ref() {
  1651. Some(v) => &v,
  1652. None => &[],
  1653. }
  1654. }
  1655. pub fn clear_server_nonce(&mut self) {
  1656. self.server_nonce.clear();
  1657. }
  1658. pub fn has_server_nonce(&self) -> bool {
  1659. self.server_nonce.is_some()
  1660. }
  1661. // Param is passed by value, moved
  1662. pub fn set_server_nonce(&mut self, v: ::std::vec::Vec<u8>) {
  1663. self.server_nonce = ::protobuf::SingularField::some(v);
  1664. }
  1665. // Mutable pointer to the field.
  1666. // If field is not initialized, it is initialized with default value first.
  1667. pub fn mut_server_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
  1668. if self.server_nonce.is_none() {
  1669. self.server_nonce.set_default();
  1670. }
  1671. self.server_nonce.as_mut().unwrap()
  1672. }
  1673. // Take field
  1674. pub fn take_server_nonce(&mut self) -> ::std::vec::Vec<u8> {
  1675. self.server_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1676. }
  1677. // optional bytes padding = 60;
  1678. pub fn get_padding(&self) -> &[u8] {
  1679. match self.padding.as_ref() {
  1680. Some(v) => &v,
  1681. None => &[],
  1682. }
  1683. }
  1684. pub fn clear_padding(&mut self) {
  1685. self.padding.clear();
  1686. }
  1687. pub fn has_padding(&self) -> bool {
  1688. self.padding.is_some()
  1689. }
  1690. // Param is passed by value, moved
  1691. pub fn set_padding(&mut self, v: ::std::vec::Vec<u8>) {
  1692. self.padding = ::protobuf::SingularField::some(v);
  1693. }
  1694. // Mutable pointer to the field.
  1695. // If field is not initialized, it is initialized with default value first.
  1696. pub fn mut_padding(&mut self) -> &mut ::std::vec::Vec<u8> {
  1697. if self.padding.is_none() {
  1698. self.padding.set_default();
  1699. }
  1700. self.padding.as_mut().unwrap()
  1701. }
  1702. // Take field
  1703. pub fn take_padding(&mut self) -> ::std::vec::Vec<u8> {
  1704. self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1705. }
  1706. }
  1707. impl ::protobuf::Message for APChallenge {
  1708. fn is_initialized(&self) -> bool {
  1709. if self.login_crypto_challenge.is_none() {
  1710. return false;
  1711. }
  1712. if self.fingerprint_challenge.is_none() {
  1713. return false;
  1714. }
  1715. if self.pow_challenge.is_none() {
  1716. return false;
  1717. }
  1718. if self.crypto_challenge.is_none() {
  1719. return false;
  1720. }
  1721. if self.server_nonce.is_none() {
  1722. return false;
  1723. }
  1724. for v in &self.login_crypto_challenge {
  1725. if !v.is_initialized() {
  1726. return false;
  1727. }
  1728. };
  1729. for v in &self.fingerprint_challenge {
  1730. if !v.is_initialized() {
  1731. return false;
  1732. }
  1733. };
  1734. for v in &self.pow_challenge {
  1735. if !v.is_initialized() {
  1736. return false;
  1737. }
  1738. };
  1739. for v in &self.crypto_challenge {
  1740. if !v.is_initialized() {
  1741. return false;
  1742. }
  1743. };
  1744. true
  1745. }
  1746. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1747. while !is.eof()? {
  1748. let (field_number, wire_type) = is.read_tag_unpack()?;
  1749. match field_number {
  1750. 10 => {
  1751. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_crypto_challenge)?;
  1752. },
  1753. 20 => {
  1754. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fingerprint_challenge)?;
  1755. },
  1756. 30 => {
  1757. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pow_challenge)?;
  1758. },
  1759. 40 => {
  1760. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.crypto_challenge)?;
  1761. },
  1762. 50 => {
  1763. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.server_nonce)?;
  1764. },
  1765. 60 => {
  1766. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?;
  1767. },
  1768. _ => {
  1769. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1770. },
  1771. };
  1772. }
  1773. ::std::result::Result::Ok(())
  1774. }
  1775. // Compute sizes of nested messages
  1776. #[allow(unused_variables)]
  1777. fn compute_size(&self) -> u32 {
  1778. let mut my_size = 0;
  1779. if let Some(ref v) = self.login_crypto_challenge.as_ref() {
  1780. let len = v.compute_size();
  1781. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1782. }
  1783. if let Some(ref v) = self.fingerprint_challenge.as_ref() {
  1784. let len = v.compute_size();
  1785. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1786. }
  1787. if let Some(ref v) = self.pow_challenge.as_ref() {
  1788. let len = v.compute_size();
  1789. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1790. }
  1791. if let Some(ref v) = self.crypto_challenge.as_ref() {
  1792. let len = v.compute_size();
  1793. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1794. }
  1795. if let Some(ref v) = self.server_nonce.as_ref() {
  1796. my_size += ::protobuf::rt::bytes_size(50, &v);
  1797. }
  1798. if let Some(ref v) = self.padding.as_ref() {
  1799. my_size += ::protobuf::rt::bytes_size(60, &v);
  1800. }
  1801. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1802. self.cached_size.set(my_size);
  1803. my_size
  1804. }
  1805. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1806. if let Some(ref v) = self.login_crypto_challenge.as_ref() {
  1807. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1808. os.write_raw_varint32(v.get_cached_size())?;
  1809. v.write_to_with_cached_sizes(os)?;
  1810. }
  1811. if let Some(ref v) = self.fingerprint_challenge.as_ref() {
  1812. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1813. os.write_raw_varint32(v.get_cached_size())?;
  1814. v.write_to_with_cached_sizes(os)?;
  1815. }
  1816. if let Some(ref v) = self.pow_challenge.as_ref() {
  1817. os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1818. os.write_raw_varint32(v.get_cached_size())?;
  1819. v.write_to_with_cached_sizes(os)?;
  1820. }
  1821. if let Some(ref v) = self.crypto_challenge.as_ref() {
  1822. os.write_tag(40, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1823. os.write_raw_varint32(v.get_cached_size())?;
  1824. v.write_to_with_cached_sizes(os)?;
  1825. }
  1826. if let Some(ref v) = self.server_nonce.as_ref() {
  1827. os.write_bytes(50, &v)?;
  1828. }
  1829. if let Some(ref v) = self.padding.as_ref() {
  1830. os.write_bytes(60, &v)?;
  1831. }
  1832. os.write_unknown_fields(self.get_unknown_fields())?;
  1833. ::std::result::Result::Ok(())
  1834. }
  1835. fn get_cached_size(&self) -> u32 {
  1836. self.cached_size.get()
  1837. }
  1838. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1839. &self.unknown_fields
  1840. }
  1841. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1842. &mut self.unknown_fields
  1843. }
  1844. fn as_any(&self) -> &dyn (::std::any::Any) {
  1845. self as &dyn (::std::any::Any)
  1846. }
  1847. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1848. self as &mut dyn (::std::any::Any)
  1849. }
  1850. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1851. self
  1852. }
  1853. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1854. Self::descriptor_static()
  1855. }
  1856. fn new() -> APChallenge {
  1857. APChallenge::new()
  1858. }
  1859. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1860. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1861. lock: ::protobuf::lazy::ONCE_INIT,
  1862. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1863. };
  1864. unsafe {
  1865. descriptor.get(|| {
  1866. let mut fields = ::std::vec::Vec::new();
  1867. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCryptoChallengeUnion>>(
  1868. "login_crypto_challenge",
  1869. |m: &APChallenge| { &m.login_crypto_challenge },
  1870. |m: &mut APChallenge| { &mut m.login_crypto_challenge },
  1871. ));
  1872. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FingerprintChallengeUnion>>(
  1873. "fingerprint_challenge",
  1874. |m: &APChallenge| { &m.fingerprint_challenge },
  1875. |m: &mut APChallenge| { &mut m.fingerprint_challenge },
  1876. ));
  1877. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PoWChallengeUnion>>(
  1878. "pow_challenge",
  1879. |m: &APChallenge| { &m.pow_challenge },
  1880. |m: &mut APChallenge| { &mut m.pow_challenge },
  1881. ));
  1882. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CryptoChallengeUnion>>(
  1883. "crypto_challenge",
  1884. |m: &APChallenge| { &m.crypto_challenge },
  1885. |m: &mut APChallenge| { &mut m.crypto_challenge },
  1886. ));
  1887. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1888. "server_nonce",
  1889. |m: &APChallenge| { &m.server_nonce },
  1890. |m: &mut APChallenge| { &mut m.server_nonce },
  1891. ));
  1892. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1893. "padding",
  1894. |m: &APChallenge| { &m.padding },
  1895. |m: &mut APChallenge| { &mut m.padding },
  1896. ));
  1897. ::protobuf::reflect::MessageDescriptor::new::<APChallenge>(
  1898. "APChallenge",
  1899. fields,
  1900. file_descriptor_proto()
  1901. )
  1902. })
  1903. }
  1904. }
  1905. fn default_instance() -> &'static APChallenge {
  1906. static mut instance: ::protobuf::lazy::Lazy<APChallenge> = ::protobuf::lazy::Lazy {
  1907. lock: ::protobuf::lazy::ONCE_INIT,
  1908. ptr: 0 as *const APChallenge,
  1909. };
  1910. unsafe {
  1911. instance.get(APChallenge::new)
  1912. }
  1913. }
  1914. }
  1915. impl ::protobuf::Clear for APChallenge {
  1916. fn clear(&mut self) {
  1917. self.login_crypto_challenge.clear();
  1918. self.fingerprint_challenge.clear();
  1919. self.pow_challenge.clear();
  1920. self.crypto_challenge.clear();
  1921. self.server_nonce.clear();
  1922. self.padding.clear();
  1923. self.unknown_fields.clear();
  1924. }
  1925. }
  1926. impl ::std::fmt::Debug for APChallenge {
  1927. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1928. ::protobuf::text_format::fmt(self, f)
  1929. }
  1930. }
  1931. impl ::protobuf::reflect::ProtobufValue for APChallenge {
  1932. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1933. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1934. }
  1935. }
  1936. #[derive(PartialEq,Clone,Default)]
  1937. pub struct LoginCryptoChallengeUnion {
  1938. // message fields
  1939. diffie_hellman: ::protobuf::SingularPtrField<LoginCryptoDiffieHellmanChallenge>,
  1940. // special fields
  1941. pub unknown_fields: ::protobuf::UnknownFields,
  1942. pub cached_size: ::protobuf::CachedSize,
  1943. }
  1944. impl<'a> ::std::default::Default for &'a LoginCryptoChallengeUnion {
  1945. fn default() -> &'a LoginCryptoChallengeUnion {
  1946. <LoginCryptoChallengeUnion as ::protobuf::Message>::default_instance()
  1947. }
  1948. }
  1949. impl LoginCryptoChallengeUnion {
  1950. pub fn new() -> LoginCryptoChallengeUnion {
  1951. ::std::default::Default::default()
  1952. }
  1953. // optional .LoginCryptoDiffieHellmanChallenge diffie_hellman = 10;
  1954. pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge {
  1955. self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance())
  1956. }
  1957. pub fn clear_diffie_hellman(&mut self) {
  1958. self.diffie_hellman.clear();
  1959. }
  1960. pub fn has_diffie_hellman(&self) -> bool {
  1961. self.diffie_hellman.is_some()
  1962. }
  1963. // Param is passed by value, moved
  1964. pub fn set_diffie_hellman(&mut self, v: LoginCryptoDiffieHellmanChallenge) {
  1965. self.diffie_hellman = ::protobuf::SingularPtrField::some(v);
  1966. }
  1967. // Mutable pointer to the field.
  1968. // If field is not initialized, it is initialized with default value first.
  1969. pub fn mut_diffie_hellman(&mut self) -> &mut LoginCryptoDiffieHellmanChallenge {
  1970. if self.diffie_hellman.is_none() {
  1971. self.diffie_hellman.set_default();
  1972. }
  1973. self.diffie_hellman.as_mut().unwrap()
  1974. }
  1975. // Take field
  1976. pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanChallenge {
  1977. self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::new())
  1978. }
  1979. }
  1980. impl ::protobuf::Message for LoginCryptoChallengeUnion {
  1981. fn is_initialized(&self) -> bool {
  1982. for v in &self.diffie_hellman {
  1983. if !v.is_initialized() {
  1984. return false;
  1985. }
  1986. };
  1987. true
  1988. }
  1989. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1990. while !is.eof()? {
  1991. let (field_number, wire_type) = is.read_tag_unpack()?;
  1992. match field_number {
  1993. 10 => {
  1994. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diffie_hellman)?;
  1995. },
  1996. _ => {
  1997. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1998. },
  1999. };
  2000. }
  2001. ::std::result::Result::Ok(())
  2002. }
  2003. // Compute sizes of nested messages
  2004. #[allow(unused_variables)]
  2005. fn compute_size(&self) -> u32 {
  2006. let mut my_size = 0;
  2007. if let Some(ref v) = self.diffie_hellman.as_ref() {
  2008. let len = v.compute_size();
  2009. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2010. }
  2011. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2012. self.cached_size.set(my_size);
  2013. my_size
  2014. }
  2015. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2016. if let Some(ref v) = self.diffie_hellman.as_ref() {
  2017. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2018. os.write_raw_varint32(v.get_cached_size())?;
  2019. v.write_to_with_cached_sizes(os)?;
  2020. }
  2021. os.write_unknown_fields(self.get_unknown_fields())?;
  2022. ::std::result::Result::Ok(())
  2023. }
  2024. fn get_cached_size(&self) -> u32 {
  2025. self.cached_size.get()
  2026. }
  2027. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2028. &self.unknown_fields
  2029. }
  2030. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2031. &mut self.unknown_fields
  2032. }
  2033. fn as_any(&self) -> &dyn (::std::any::Any) {
  2034. self as &dyn (::std::any::Any)
  2035. }
  2036. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2037. self as &mut dyn (::std::any::Any)
  2038. }
  2039. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2040. self
  2041. }
  2042. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2043. Self::descriptor_static()
  2044. }
  2045. fn new() -> LoginCryptoChallengeUnion {
  2046. LoginCryptoChallengeUnion::new()
  2047. }
  2048. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2049. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2050. lock: ::protobuf::lazy::ONCE_INIT,
  2051. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2052. };
  2053. unsafe {
  2054. descriptor.get(|| {
  2055. let mut fields = ::std::vec::Vec::new();
  2056. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCryptoDiffieHellmanChallenge>>(
  2057. "diffie_hellman",
  2058. |m: &LoginCryptoChallengeUnion| { &m.diffie_hellman },
  2059. |m: &mut LoginCryptoChallengeUnion| { &mut m.diffie_hellman },
  2060. ));
  2061. ::protobuf::reflect::MessageDescriptor::new::<LoginCryptoChallengeUnion>(
  2062. "LoginCryptoChallengeUnion",
  2063. fields,
  2064. file_descriptor_proto()
  2065. )
  2066. })
  2067. }
  2068. }
  2069. fn default_instance() -> &'static LoginCryptoChallengeUnion {
  2070. static mut instance: ::protobuf::lazy::Lazy<LoginCryptoChallengeUnion> = ::protobuf::lazy::Lazy {
  2071. lock: ::protobuf::lazy::ONCE_INIT,
  2072. ptr: 0 as *const LoginCryptoChallengeUnion,
  2073. };
  2074. unsafe {
  2075. instance.get(LoginCryptoChallengeUnion::new)
  2076. }
  2077. }
  2078. }
  2079. impl ::protobuf::Clear for LoginCryptoChallengeUnion {
  2080. fn clear(&mut self) {
  2081. self.diffie_hellman.clear();
  2082. self.unknown_fields.clear();
  2083. }
  2084. }
  2085. impl ::std::fmt::Debug for LoginCryptoChallengeUnion {
  2086. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2087. ::protobuf::text_format::fmt(self, f)
  2088. }
  2089. }
  2090. impl ::protobuf::reflect::ProtobufValue for LoginCryptoChallengeUnion {
  2091. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2092. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2093. }
  2094. }
  2095. #[derive(PartialEq,Clone,Default)]
  2096. pub struct LoginCryptoDiffieHellmanChallenge {
  2097. // message fields
  2098. gs: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2099. server_signature_key: ::std::option::Option<i32>,
  2100. gs_signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2101. // special fields
  2102. pub unknown_fields: ::protobuf::UnknownFields,
  2103. pub cached_size: ::protobuf::CachedSize,
  2104. }
  2105. impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanChallenge {
  2106. fn default() -> &'a LoginCryptoDiffieHellmanChallenge {
  2107. <LoginCryptoDiffieHellmanChallenge as ::protobuf::Message>::default_instance()
  2108. }
  2109. }
  2110. impl LoginCryptoDiffieHellmanChallenge {
  2111. pub fn new() -> LoginCryptoDiffieHellmanChallenge {
  2112. ::std::default::Default::default()
  2113. }
  2114. // required bytes gs = 10;
  2115. pub fn get_gs(&self) -> &[u8] {
  2116. match self.gs.as_ref() {
  2117. Some(v) => &v,
  2118. None => &[],
  2119. }
  2120. }
  2121. pub fn clear_gs(&mut self) {
  2122. self.gs.clear();
  2123. }
  2124. pub fn has_gs(&self) -> bool {
  2125. self.gs.is_some()
  2126. }
  2127. // Param is passed by value, moved
  2128. pub fn set_gs(&mut self, v: ::std::vec::Vec<u8>) {
  2129. self.gs = ::protobuf::SingularField::some(v);
  2130. }
  2131. // Mutable pointer to the field.
  2132. // If field is not initialized, it is initialized with default value first.
  2133. pub fn mut_gs(&mut self) -> &mut ::std::vec::Vec<u8> {
  2134. if self.gs.is_none() {
  2135. self.gs.set_default();
  2136. }
  2137. self.gs.as_mut().unwrap()
  2138. }
  2139. // Take field
  2140. pub fn take_gs(&mut self) -> ::std::vec::Vec<u8> {
  2141. self.gs.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2142. }
  2143. // required int32 server_signature_key = 20;
  2144. pub fn get_server_signature_key(&self) -> i32 {
  2145. self.server_signature_key.unwrap_or(0)
  2146. }
  2147. pub fn clear_server_signature_key(&mut self) {
  2148. self.server_signature_key = ::std::option::Option::None;
  2149. }
  2150. pub fn has_server_signature_key(&self) -> bool {
  2151. self.server_signature_key.is_some()
  2152. }
  2153. // Param is passed by value, moved
  2154. pub fn set_server_signature_key(&mut self, v: i32) {
  2155. self.server_signature_key = ::std::option::Option::Some(v);
  2156. }
  2157. // required bytes gs_signature = 30;
  2158. pub fn get_gs_signature(&self) -> &[u8] {
  2159. match self.gs_signature.as_ref() {
  2160. Some(v) => &v,
  2161. None => &[],
  2162. }
  2163. }
  2164. pub fn clear_gs_signature(&mut self) {
  2165. self.gs_signature.clear();
  2166. }
  2167. pub fn has_gs_signature(&self) -> bool {
  2168. self.gs_signature.is_some()
  2169. }
  2170. // Param is passed by value, moved
  2171. pub fn set_gs_signature(&mut self, v: ::std::vec::Vec<u8>) {
  2172. self.gs_signature = ::protobuf::SingularField::some(v);
  2173. }
  2174. // Mutable pointer to the field.
  2175. // If field is not initialized, it is initialized with default value first.
  2176. pub fn mut_gs_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
  2177. if self.gs_signature.is_none() {
  2178. self.gs_signature.set_default();
  2179. }
  2180. self.gs_signature.as_mut().unwrap()
  2181. }
  2182. // Take field
  2183. pub fn take_gs_signature(&mut self) -> ::std::vec::Vec<u8> {
  2184. self.gs_signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2185. }
  2186. }
  2187. impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge {
  2188. fn is_initialized(&self) -> bool {
  2189. if self.gs.is_none() {
  2190. return false;
  2191. }
  2192. if self.server_signature_key.is_none() {
  2193. return false;
  2194. }
  2195. if self.gs_signature.is_none() {
  2196. return false;
  2197. }
  2198. true
  2199. }
  2200. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2201. while !is.eof()? {
  2202. let (field_number, wire_type) = is.read_tag_unpack()?;
  2203. match field_number {
  2204. 10 => {
  2205. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gs)?;
  2206. },
  2207. 20 => {
  2208. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2209. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2210. }
  2211. let tmp = is.read_int32()?;
  2212. self.server_signature_key = ::std::option::Option::Some(tmp);
  2213. },
  2214. 30 => {
  2215. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gs_signature)?;
  2216. },
  2217. _ => {
  2218. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2219. },
  2220. };
  2221. }
  2222. ::std::result::Result::Ok(())
  2223. }
  2224. // Compute sizes of nested messages
  2225. #[allow(unused_variables)]
  2226. fn compute_size(&self) -> u32 {
  2227. let mut my_size = 0;
  2228. if let Some(ref v) = self.gs.as_ref() {
  2229. my_size += ::protobuf::rt::bytes_size(10, &v);
  2230. }
  2231. if let Some(v) = self.server_signature_key {
  2232. my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
  2233. }
  2234. if let Some(ref v) = self.gs_signature.as_ref() {
  2235. my_size += ::protobuf::rt::bytes_size(30, &v);
  2236. }
  2237. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2238. self.cached_size.set(my_size);
  2239. my_size
  2240. }
  2241. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2242. if let Some(ref v) = self.gs.as_ref() {
  2243. os.write_bytes(10, &v)?;
  2244. }
  2245. if let Some(v) = self.server_signature_key {
  2246. os.write_int32(20, v)?;
  2247. }
  2248. if let Some(ref v) = self.gs_signature.as_ref() {
  2249. os.write_bytes(30, &v)?;
  2250. }
  2251. os.write_unknown_fields(self.get_unknown_fields())?;
  2252. ::std::result::Result::Ok(())
  2253. }
  2254. fn get_cached_size(&self) -> u32 {
  2255. self.cached_size.get()
  2256. }
  2257. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2258. &self.unknown_fields
  2259. }
  2260. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2261. &mut self.unknown_fields
  2262. }
  2263. fn as_any(&self) -> &dyn (::std::any::Any) {
  2264. self as &dyn (::std::any::Any)
  2265. }
  2266. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2267. self as &mut dyn (::std::any::Any)
  2268. }
  2269. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2270. self
  2271. }
  2272. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2273. Self::descriptor_static()
  2274. }
  2275. fn new() -> LoginCryptoDiffieHellmanChallenge {
  2276. LoginCryptoDiffieHellmanChallenge::new()
  2277. }
  2278. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2279. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2280. lock: ::protobuf::lazy::ONCE_INIT,
  2281. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2282. };
  2283. unsafe {
  2284. descriptor.get(|| {
  2285. let mut fields = ::std::vec::Vec::new();
  2286. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2287. "gs",
  2288. |m: &LoginCryptoDiffieHellmanChallenge| { &m.gs },
  2289. |m: &mut LoginCryptoDiffieHellmanChallenge| { &mut m.gs },
  2290. ));
  2291. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  2292. "server_signature_key",
  2293. |m: &LoginCryptoDiffieHellmanChallenge| { &m.server_signature_key },
  2294. |m: &mut LoginCryptoDiffieHellmanChallenge| { &mut m.server_signature_key },
  2295. ));
  2296. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2297. "gs_signature",
  2298. |m: &LoginCryptoDiffieHellmanChallenge| { &m.gs_signature },
  2299. |m: &mut LoginCryptoDiffieHellmanChallenge| { &mut m.gs_signature },
  2300. ));
  2301. ::protobuf::reflect::MessageDescriptor::new::<LoginCryptoDiffieHellmanChallenge>(
  2302. "LoginCryptoDiffieHellmanChallenge",
  2303. fields,
  2304. file_descriptor_proto()
  2305. )
  2306. })
  2307. }
  2308. }
  2309. fn default_instance() -> &'static LoginCryptoDiffieHellmanChallenge {
  2310. static mut instance: ::protobuf::lazy::Lazy<LoginCryptoDiffieHellmanChallenge> = ::protobuf::lazy::Lazy {
  2311. lock: ::protobuf::lazy::ONCE_INIT,
  2312. ptr: 0 as *const LoginCryptoDiffieHellmanChallenge,
  2313. };
  2314. unsafe {
  2315. instance.get(LoginCryptoDiffieHellmanChallenge::new)
  2316. }
  2317. }
  2318. }
  2319. impl ::protobuf::Clear for LoginCryptoDiffieHellmanChallenge {
  2320. fn clear(&mut self) {
  2321. self.gs.clear();
  2322. self.server_signature_key = ::std::option::Option::None;
  2323. self.gs_signature.clear();
  2324. self.unknown_fields.clear();
  2325. }
  2326. }
  2327. impl ::std::fmt::Debug for LoginCryptoDiffieHellmanChallenge {
  2328. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2329. ::protobuf::text_format::fmt(self, f)
  2330. }
  2331. }
  2332. impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanChallenge {
  2333. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2334. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2335. }
  2336. }
  2337. #[derive(PartialEq,Clone,Default)]
  2338. pub struct FingerprintChallengeUnion {
  2339. // message fields
  2340. grain: ::protobuf::SingularPtrField<FingerprintGrainChallenge>,
  2341. hmac_ripemd: ::protobuf::SingularPtrField<FingerprintHmacRipemdChallenge>,
  2342. // special fields
  2343. pub unknown_fields: ::protobuf::UnknownFields,
  2344. pub cached_size: ::protobuf::CachedSize,
  2345. }
  2346. impl<'a> ::std::default::Default for &'a FingerprintChallengeUnion {
  2347. fn default() -> &'a FingerprintChallengeUnion {
  2348. <FingerprintChallengeUnion as ::protobuf::Message>::default_instance()
  2349. }
  2350. }
  2351. impl FingerprintChallengeUnion {
  2352. pub fn new() -> FingerprintChallengeUnion {
  2353. ::std::default::Default::default()
  2354. }
  2355. // optional .FingerprintGrainChallenge grain = 10;
  2356. pub fn get_grain(&self) -> &FingerprintGrainChallenge {
  2357. self.grain.as_ref().unwrap_or_else(|| FingerprintGrainChallenge::default_instance())
  2358. }
  2359. pub fn clear_grain(&mut self) {
  2360. self.grain.clear();
  2361. }
  2362. pub fn has_grain(&self) -> bool {
  2363. self.grain.is_some()
  2364. }
  2365. // Param is passed by value, moved
  2366. pub fn set_grain(&mut self, v: FingerprintGrainChallenge) {
  2367. self.grain = ::protobuf::SingularPtrField::some(v);
  2368. }
  2369. // Mutable pointer to the field.
  2370. // If field is not initialized, it is initialized with default value first.
  2371. pub fn mut_grain(&mut self) -> &mut FingerprintGrainChallenge {
  2372. if self.grain.is_none() {
  2373. self.grain.set_default();
  2374. }
  2375. self.grain.as_mut().unwrap()
  2376. }
  2377. // Take field
  2378. pub fn take_grain(&mut self) -> FingerprintGrainChallenge {
  2379. self.grain.take().unwrap_or_else(|| FingerprintGrainChallenge::new())
  2380. }
  2381. // optional .FingerprintHmacRipemdChallenge hmac_ripemd = 20;
  2382. pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge {
  2383. self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance())
  2384. }
  2385. pub fn clear_hmac_ripemd(&mut self) {
  2386. self.hmac_ripemd.clear();
  2387. }
  2388. pub fn has_hmac_ripemd(&self) -> bool {
  2389. self.hmac_ripemd.is_some()
  2390. }
  2391. // Param is passed by value, moved
  2392. pub fn set_hmac_ripemd(&mut self, v: FingerprintHmacRipemdChallenge) {
  2393. self.hmac_ripemd = ::protobuf::SingularPtrField::some(v);
  2394. }
  2395. // Mutable pointer to the field.
  2396. // If field is not initialized, it is initialized with default value first.
  2397. pub fn mut_hmac_ripemd(&mut self) -> &mut FingerprintHmacRipemdChallenge {
  2398. if self.hmac_ripemd.is_none() {
  2399. self.hmac_ripemd.set_default();
  2400. }
  2401. self.hmac_ripemd.as_mut().unwrap()
  2402. }
  2403. // Take field
  2404. pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdChallenge {
  2405. self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdChallenge::new())
  2406. }
  2407. }
  2408. impl ::protobuf::Message for FingerprintChallengeUnion {
  2409. fn is_initialized(&self) -> bool {
  2410. for v in &self.grain {
  2411. if !v.is_initialized() {
  2412. return false;
  2413. }
  2414. };
  2415. for v in &self.hmac_ripemd {
  2416. if !v.is_initialized() {
  2417. return false;
  2418. }
  2419. };
  2420. true
  2421. }
  2422. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2423. while !is.eof()? {
  2424. let (field_number, wire_type) = is.read_tag_unpack()?;
  2425. match field_number {
  2426. 10 => {
  2427. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grain)?;
  2428. },
  2429. 20 => {
  2430. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hmac_ripemd)?;
  2431. },
  2432. _ => {
  2433. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2434. },
  2435. };
  2436. }
  2437. ::std::result::Result::Ok(())
  2438. }
  2439. // Compute sizes of nested messages
  2440. #[allow(unused_variables)]
  2441. fn compute_size(&self) -> u32 {
  2442. let mut my_size = 0;
  2443. if let Some(ref v) = self.grain.as_ref() {
  2444. let len = v.compute_size();
  2445. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2446. }
  2447. if let Some(ref v) = self.hmac_ripemd.as_ref() {
  2448. let len = v.compute_size();
  2449. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2450. }
  2451. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2452. self.cached_size.set(my_size);
  2453. my_size
  2454. }
  2455. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2456. if let Some(ref v) = self.grain.as_ref() {
  2457. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2458. os.write_raw_varint32(v.get_cached_size())?;
  2459. v.write_to_with_cached_sizes(os)?;
  2460. }
  2461. if let Some(ref v) = self.hmac_ripemd.as_ref() {
  2462. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2463. os.write_raw_varint32(v.get_cached_size())?;
  2464. v.write_to_with_cached_sizes(os)?;
  2465. }
  2466. os.write_unknown_fields(self.get_unknown_fields())?;
  2467. ::std::result::Result::Ok(())
  2468. }
  2469. fn get_cached_size(&self) -> u32 {
  2470. self.cached_size.get()
  2471. }
  2472. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2473. &self.unknown_fields
  2474. }
  2475. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2476. &mut self.unknown_fields
  2477. }
  2478. fn as_any(&self) -> &dyn (::std::any::Any) {
  2479. self as &dyn (::std::any::Any)
  2480. }
  2481. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2482. self as &mut dyn (::std::any::Any)
  2483. }
  2484. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2485. self
  2486. }
  2487. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2488. Self::descriptor_static()
  2489. }
  2490. fn new() -> FingerprintChallengeUnion {
  2491. FingerprintChallengeUnion::new()
  2492. }
  2493. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2494. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2495. lock: ::protobuf::lazy::ONCE_INIT,
  2496. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2497. };
  2498. unsafe {
  2499. descriptor.get(|| {
  2500. let mut fields = ::std::vec::Vec::new();
  2501. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FingerprintGrainChallenge>>(
  2502. "grain",
  2503. |m: &FingerprintChallengeUnion| { &m.grain },
  2504. |m: &mut FingerprintChallengeUnion| { &mut m.grain },
  2505. ));
  2506. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FingerprintHmacRipemdChallenge>>(
  2507. "hmac_ripemd",
  2508. |m: &FingerprintChallengeUnion| { &m.hmac_ripemd },
  2509. |m: &mut FingerprintChallengeUnion| { &mut m.hmac_ripemd },
  2510. ));
  2511. ::protobuf::reflect::MessageDescriptor::new::<FingerprintChallengeUnion>(
  2512. "FingerprintChallengeUnion",
  2513. fields,
  2514. file_descriptor_proto()
  2515. )
  2516. })
  2517. }
  2518. }
  2519. fn default_instance() -> &'static FingerprintChallengeUnion {
  2520. static mut instance: ::protobuf::lazy::Lazy<FingerprintChallengeUnion> = ::protobuf::lazy::Lazy {
  2521. lock: ::protobuf::lazy::ONCE_INIT,
  2522. ptr: 0 as *const FingerprintChallengeUnion,
  2523. };
  2524. unsafe {
  2525. instance.get(FingerprintChallengeUnion::new)
  2526. }
  2527. }
  2528. }
  2529. impl ::protobuf::Clear for FingerprintChallengeUnion {
  2530. fn clear(&mut self) {
  2531. self.grain.clear();
  2532. self.hmac_ripemd.clear();
  2533. self.unknown_fields.clear();
  2534. }
  2535. }
  2536. impl ::std::fmt::Debug for FingerprintChallengeUnion {
  2537. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2538. ::protobuf::text_format::fmt(self, f)
  2539. }
  2540. }
  2541. impl ::protobuf::reflect::ProtobufValue for FingerprintChallengeUnion {
  2542. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2543. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2544. }
  2545. }
  2546. #[derive(PartialEq,Clone,Default)]
  2547. pub struct FingerprintGrainChallenge {
  2548. // message fields
  2549. kek: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2550. // special fields
  2551. pub unknown_fields: ::protobuf::UnknownFields,
  2552. pub cached_size: ::protobuf::CachedSize,
  2553. }
  2554. impl<'a> ::std::default::Default for &'a FingerprintGrainChallenge {
  2555. fn default() -> &'a FingerprintGrainChallenge {
  2556. <FingerprintGrainChallenge as ::protobuf::Message>::default_instance()
  2557. }
  2558. }
  2559. impl FingerprintGrainChallenge {
  2560. pub fn new() -> FingerprintGrainChallenge {
  2561. ::std::default::Default::default()
  2562. }
  2563. // required bytes kek = 10;
  2564. pub fn get_kek(&self) -> &[u8] {
  2565. match self.kek.as_ref() {
  2566. Some(v) => &v,
  2567. None => &[],
  2568. }
  2569. }
  2570. pub fn clear_kek(&mut self) {
  2571. self.kek.clear();
  2572. }
  2573. pub fn has_kek(&self) -> bool {
  2574. self.kek.is_some()
  2575. }
  2576. // Param is passed by value, moved
  2577. pub fn set_kek(&mut self, v: ::std::vec::Vec<u8>) {
  2578. self.kek = ::protobuf::SingularField::some(v);
  2579. }
  2580. // Mutable pointer to the field.
  2581. // If field is not initialized, it is initialized with default value first.
  2582. pub fn mut_kek(&mut self) -> &mut ::std::vec::Vec<u8> {
  2583. if self.kek.is_none() {
  2584. self.kek.set_default();
  2585. }
  2586. self.kek.as_mut().unwrap()
  2587. }
  2588. // Take field
  2589. pub fn take_kek(&mut self) -> ::std::vec::Vec<u8> {
  2590. self.kek.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2591. }
  2592. }
  2593. impl ::protobuf::Message for FingerprintGrainChallenge {
  2594. fn is_initialized(&self) -> bool {
  2595. if self.kek.is_none() {
  2596. return false;
  2597. }
  2598. true
  2599. }
  2600. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2601. while !is.eof()? {
  2602. let (field_number, wire_type) = is.read_tag_unpack()?;
  2603. match field_number {
  2604. 10 => {
  2605. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.kek)?;
  2606. },
  2607. _ => {
  2608. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2609. },
  2610. };
  2611. }
  2612. ::std::result::Result::Ok(())
  2613. }
  2614. // Compute sizes of nested messages
  2615. #[allow(unused_variables)]
  2616. fn compute_size(&self) -> u32 {
  2617. let mut my_size = 0;
  2618. if let Some(ref v) = self.kek.as_ref() {
  2619. my_size += ::protobuf::rt::bytes_size(10, &v);
  2620. }
  2621. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2622. self.cached_size.set(my_size);
  2623. my_size
  2624. }
  2625. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2626. if let Some(ref v) = self.kek.as_ref() {
  2627. os.write_bytes(10, &v)?;
  2628. }
  2629. os.write_unknown_fields(self.get_unknown_fields())?;
  2630. ::std::result::Result::Ok(())
  2631. }
  2632. fn get_cached_size(&self) -> u32 {
  2633. self.cached_size.get()
  2634. }
  2635. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2636. &self.unknown_fields
  2637. }
  2638. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2639. &mut self.unknown_fields
  2640. }
  2641. fn as_any(&self) -> &dyn (::std::any::Any) {
  2642. self as &dyn (::std::any::Any)
  2643. }
  2644. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2645. self as &mut dyn (::std::any::Any)
  2646. }
  2647. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2648. self
  2649. }
  2650. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2651. Self::descriptor_static()
  2652. }
  2653. fn new() -> FingerprintGrainChallenge {
  2654. FingerprintGrainChallenge::new()
  2655. }
  2656. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2657. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2658. lock: ::protobuf::lazy::ONCE_INIT,
  2659. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2660. };
  2661. unsafe {
  2662. descriptor.get(|| {
  2663. let mut fields = ::std::vec::Vec::new();
  2664. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2665. "kek",
  2666. |m: &FingerprintGrainChallenge| { &m.kek },
  2667. |m: &mut FingerprintGrainChallenge| { &mut m.kek },
  2668. ));
  2669. ::protobuf::reflect::MessageDescriptor::new::<FingerprintGrainChallenge>(
  2670. "FingerprintGrainChallenge",
  2671. fields,
  2672. file_descriptor_proto()
  2673. )
  2674. })
  2675. }
  2676. }
  2677. fn default_instance() -> &'static FingerprintGrainChallenge {
  2678. static mut instance: ::protobuf::lazy::Lazy<FingerprintGrainChallenge> = ::protobuf::lazy::Lazy {
  2679. lock: ::protobuf::lazy::ONCE_INIT,
  2680. ptr: 0 as *const FingerprintGrainChallenge,
  2681. };
  2682. unsafe {
  2683. instance.get(FingerprintGrainChallenge::new)
  2684. }
  2685. }
  2686. }
  2687. impl ::protobuf::Clear for FingerprintGrainChallenge {
  2688. fn clear(&mut self) {
  2689. self.kek.clear();
  2690. self.unknown_fields.clear();
  2691. }
  2692. }
  2693. impl ::std::fmt::Debug for FingerprintGrainChallenge {
  2694. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2695. ::protobuf::text_format::fmt(self, f)
  2696. }
  2697. }
  2698. impl ::protobuf::reflect::ProtobufValue for FingerprintGrainChallenge {
  2699. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2700. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2701. }
  2702. }
  2703. #[derive(PartialEq,Clone,Default)]
  2704. pub struct FingerprintHmacRipemdChallenge {
  2705. // message fields
  2706. challenge: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2707. // special fields
  2708. pub unknown_fields: ::protobuf::UnknownFields,
  2709. pub cached_size: ::protobuf::CachedSize,
  2710. }
  2711. impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdChallenge {
  2712. fn default() -> &'a FingerprintHmacRipemdChallenge {
  2713. <FingerprintHmacRipemdChallenge as ::protobuf::Message>::default_instance()
  2714. }
  2715. }
  2716. impl FingerprintHmacRipemdChallenge {
  2717. pub fn new() -> FingerprintHmacRipemdChallenge {
  2718. ::std::default::Default::default()
  2719. }
  2720. // required bytes challenge = 10;
  2721. pub fn get_challenge(&self) -> &[u8] {
  2722. match self.challenge.as_ref() {
  2723. Some(v) => &v,
  2724. None => &[],
  2725. }
  2726. }
  2727. pub fn clear_challenge(&mut self) {
  2728. self.challenge.clear();
  2729. }
  2730. pub fn has_challenge(&self) -> bool {
  2731. self.challenge.is_some()
  2732. }
  2733. // Param is passed by value, moved
  2734. pub fn set_challenge(&mut self, v: ::std::vec::Vec<u8>) {
  2735. self.challenge = ::protobuf::SingularField::some(v);
  2736. }
  2737. // Mutable pointer to the field.
  2738. // If field is not initialized, it is initialized with default value first.
  2739. pub fn mut_challenge(&mut self) -> &mut ::std::vec::Vec<u8> {
  2740. if self.challenge.is_none() {
  2741. self.challenge.set_default();
  2742. }
  2743. self.challenge.as_mut().unwrap()
  2744. }
  2745. // Take field
  2746. pub fn take_challenge(&mut self) -> ::std::vec::Vec<u8> {
  2747. self.challenge.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2748. }
  2749. }
  2750. impl ::protobuf::Message for FingerprintHmacRipemdChallenge {
  2751. fn is_initialized(&self) -> bool {
  2752. if self.challenge.is_none() {
  2753. return false;
  2754. }
  2755. true
  2756. }
  2757. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2758. while !is.eof()? {
  2759. let (field_number, wire_type) = is.read_tag_unpack()?;
  2760. match field_number {
  2761. 10 => {
  2762. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.challenge)?;
  2763. },
  2764. _ => {
  2765. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2766. },
  2767. };
  2768. }
  2769. ::std::result::Result::Ok(())
  2770. }
  2771. // Compute sizes of nested messages
  2772. #[allow(unused_variables)]
  2773. fn compute_size(&self) -> u32 {
  2774. let mut my_size = 0;
  2775. if let Some(ref v) = self.challenge.as_ref() {
  2776. my_size += ::protobuf::rt::bytes_size(10, &v);
  2777. }
  2778. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2779. self.cached_size.set(my_size);
  2780. my_size
  2781. }
  2782. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2783. if let Some(ref v) = self.challenge.as_ref() {
  2784. os.write_bytes(10, &v)?;
  2785. }
  2786. os.write_unknown_fields(self.get_unknown_fields())?;
  2787. ::std::result::Result::Ok(())
  2788. }
  2789. fn get_cached_size(&self) -> u32 {
  2790. self.cached_size.get()
  2791. }
  2792. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2793. &self.unknown_fields
  2794. }
  2795. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2796. &mut self.unknown_fields
  2797. }
  2798. fn as_any(&self) -> &dyn (::std::any::Any) {
  2799. self as &dyn (::std::any::Any)
  2800. }
  2801. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2802. self as &mut dyn (::std::any::Any)
  2803. }
  2804. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2805. self
  2806. }
  2807. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2808. Self::descriptor_static()
  2809. }
  2810. fn new() -> FingerprintHmacRipemdChallenge {
  2811. FingerprintHmacRipemdChallenge::new()
  2812. }
  2813. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2814. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2815. lock: ::protobuf::lazy::ONCE_INIT,
  2816. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2817. };
  2818. unsafe {
  2819. descriptor.get(|| {
  2820. let mut fields = ::std::vec::Vec::new();
  2821. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2822. "challenge",
  2823. |m: &FingerprintHmacRipemdChallenge| { &m.challenge },
  2824. |m: &mut FingerprintHmacRipemdChallenge| { &mut m.challenge },
  2825. ));
  2826. ::protobuf::reflect::MessageDescriptor::new::<FingerprintHmacRipemdChallenge>(
  2827. "FingerprintHmacRipemdChallenge",
  2828. fields,
  2829. file_descriptor_proto()
  2830. )
  2831. })
  2832. }
  2833. }
  2834. fn default_instance() -> &'static FingerprintHmacRipemdChallenge {
  2835. static mut instance: ::protobuf::lazy::Lazy<FingerprintHmacRipemdChallenge> = ::protobuf::lazy::Lazy {
  2836. lock: ::protobuf::lazy::ONCE_INIT,
  2837. ptr: 0 as *const FingerprintHmacRipemdChallenge,
  2838. };
  2839. unsafe {
  2840. instance.get(FingerprintHmacRipemdChallenge::new)
  2841. }
  2842. }
  2843. }
  2844. impl ::protobuf::Clear for FingerprintHmacRipemdChallenge {
  2845. fn clear(&mut self) {
  2846. self.challenge.clear();
  2847. self.unknown_fields.clear();
  2848. }
  2849. }
  2850. impl ::std::fmt::Debug for FingerprintHmacRipemdChallenge {
  2851. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2852. ::protobuf::text_format::fmt(self, f)
  2853. }
  2854. }
  2855. impl ::protobuf::reflect::ProtobufValue for FingerprintHmacRipemdChallenge {
  2856. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  2857. ::protobuf::reflect::ProtobufValueRef::Message(self)
  2858. }
  2859. }
  2860. #[derive(PartialEq,Clone,Default)]
  2861. pub struct PoWChallengeUnion {
  2862. // message fields
  2863. hash_cash: ::protobuf::SingularPtrField<PoWHashCashChallenge>,
  2864. // special fields
  2865. pub unknown_fields: ::protobuf::UnknownFields,
  2866. pub cached_size: ::protobuf::CachedSize,
  2867. }
  2868. impl<'a> ::std::default::Default for &'a PoWChallengeUnion {
  2869. fn default() -> &'a PoWChallengeUnion {
  2870. <PoWChallengeUnion as ::protobuf::Message>::default_instance()
  2871. }
  2872. }
  2873. impl PoWChallengeUnion {
  2874. pub fn new() -> PoWChallengeUnion {
  2875. ::std::default::Default::default()
  2876. }
  2877. // optional .PoWHashCashChallenge hash_cash = 10;
  2878. pub fn get_hash_cash(&self) -> &PoWHashCashChallenge {
  2879. self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashChallenge::default_instance())
  2880. }
  2881. pub fn clear_hash_cash(&mut self) {
  2882. self.hash_cash.clear();
  2883. }
  2884. pub fn has_hash_cash(&self) -> bool {
  2885. self.hash_cash.is_some()
  2886. }
  2887. // Param is passed by value, moved
  2888. pub fn set_hash_cash(&mut self, v: PoWHashCashChallenge) {
  2889. self.hash_cash = ::protobuf::SingularPtrField::some(v);
  2890. }
  2891. // Mutable pointer to the field.
  2892. // If field is not initialized, it is initialized with default value first.
  2893. pub fn mut_hash_cash(&mut self) -> &mut PoWHashCashChallenge {
  2894. if self.hash_cash.is_none() {
  2895. self.hash_cash.set_default();
  2896. }
  2897. self.hash_cash.as_mut().unwrap()
  2898. }
  2899. // Take field
  2900. pub fn take_hash_cash(&mut self) -> PoWHashCashChallenge {
  2901. self.hash_cash.take().unwrap_or_else(|| PoWHashCashChallenge::new())
  2902. }
  2903. }
  2904. impl ::protobuf::Message for PoWChallengeUnion {
  2905. fn is_initialized(&self) -> bool {
  2906. for v in &self.hash_cash {
  2907. if !v.is_initialized() {
  2908. return false;
  2909. }
  2910. };
  2911. true
  2912. }
  2913. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2914. while !is.eof()? {
  2915. let (field_number, wire_type) = is.read_tag_unpack()?;
  2916. match field_number {
  2917. 10 => {
  2918. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hash_cash)?;
  2919. },
  2920. _ => {
  2921. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2922. },
  2923. };
  2924. }
  2925. ::std::result::Result::Ok(())
  2926. }
  2927. // Compute sizes of nested messages
  2928. #[allow(unused_variables)]
  2929. fn compute_size(&self) -> u32 {
  2930. let mut my_size = 0;
  2931. if let Some(ref v) = self.hash_cash.as_ref() {
  2932. let len = v.compute_size();
  2933. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2934. }
  2935. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2936. self.cached_size.set(my_size);
  2937. my_size
  2938. }
  2939. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2940. if let Some(ref v) = self.hash_cash.as_ref() {
  2941. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2942. os.write_raw_varint32(v.get_cached_size())?;
  2943. v.write_to_with_cached_sizes(os)?;
  2944. }
  2945. os.write_unknown_fields(self.get_unknown_fields())?;
  2946. ::std::result::Result::Ok(())
  2947. }
  2948. fn get_cached_size(&self) -> u32 {
  2949. self.cached_size.get()
  2950. }
  2951. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2952. &self.unknown_fields
  2953. }
  2954. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2955. &mut self.unknown_fields
  2956. }
  2957. fn as_any(&self) -> &dyn (::std::any::Any) {
  2958. self as &dyn (::std::any::Any)
  2959. }
  2960. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2961. self as &mut dyn (::std::any::Any)
  2962. }
  2963. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2964. self
  2965. }
  2966. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2967. Self::descriptor_static()
  2968. }
  2969. fn new() -> PoWChallengeUnion {
  2970. PoWChallengeUnion::new()
  2971. }
  2972. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2973. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  2974. lock: ::protobuf::lazy::ONCE_INIT,
  2975. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  2976. };
  2977. unsafe {
  2978. descriptor.get(|| {
  2979. let mut fields = ::std::vec::Vec::new();
  2980. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PoWHashCashChallenge>>(
  2981. "hash_cash",
  2982. |m: &PoWChallengeUnion| { &m.hash_cash },
  2983. |m: &mut PoWChallengeUnion| { &mut m.hash_cash },
  2984. ));
  2985. ::protobuf::reflect::MessageDescriptor::new::<PoWChallengeUnion>(
  2986. "PoWChallengeUnion",
  2987. fields,
  2988. file_descriptor_proto()
  2989. )
  2990. })
  2991. }
  2992. }
  2993. fn default_instance() -> &'static PoWChallengeUnion {
  2994. static mut instance: ::protobuf::lazy::Lazy<PoWChallengeUnion> = ::protobuf::lazy::Lazy {
  2995. lock: ::protobuf::lazy::ONCE_INIT,
  2996. ptr: 0 as *const PoWChallengeUnion,
  2997. };
  2998. unsafe {
  2999. instance.get(PoWChallengeUnion::new)
  3000. }
  3001. }
  3002. }
  3003. impl ::protobuf::Clear for PoWChallengeUnion {
  3004. fn clear(&mut self) {
  3005. self.hash_cash.clear();
  3006. self.unknown_fields.clear();
  3007. }
  3008. }
  3009. impl ::std::fmt::Debug for PoWChallengeUnion {
  3010. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3011. ::protobuf::text_format::fmt(self, f)
  3012. }
  3013. }
  3014. impl ::protobuf::reflect::ProtobufValue for PoWChallengeUnion {
  3015. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3016. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3017. }
  3018. }
  3019. #[derive(PartialEq,Clone,Default)]
  3020. pub struct PoWHashCashChallenge {
  3021. // message fields
  3022. prefix: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  3023. length: ::std::option::Option<i32>,
  3024. target: ::std::option::Option<i32>,
  3025. // special fields
  3026. pub unknown_fields: ::protobuf::UnknownFields,
  3027. pub cached_size: ::protobuf::CachedSize,
  3028. }
  3029. impl<'a> ::std::default::Default for &'a PoWHashCashChallenge {
  3030. fn default() -> &'a PoWHashCashChallenge {
  3031. <PoWHashCashChallenge as ::protobuf::Message>::default_instance()
  3032. }
  3033. }
  3034. impl PoWHashCashChallenge {
  3035. pub fn new() -> PoWHashCashChallenge {
  3036. ::std::default::Default::default()
  3037. }
  3038. // optional bytes prefix = 10;
  3039. pub fn get_prefix(&self) -> &[u8] {
  3040. match self.prefix.as_ref() {
  3041. Some(v) => &v,
  3042. None => &[],
  3043. }
  3044. }
  3045. pub fn clear_prefix(&mut self) {
  3046. self.prefix.clear();
  3047. }
  3048. pub fn has_prefix(&self) -> bool {
  3049. self.prefix.is_some()
  3050. }
  3051. // Param is passed by value, moved
  3052. pub fn set_prefix(&mut self, v: ::std::vec::Vec<u8>) {
  3053. self.prefix = ::protobuf::SingularField::some(v);
  3054. }
  3055. // Mutable pointer to the field.
  3056. // If field is not initialized, it is initialized with default value first.
  3057. pub fn mut_prefix(&mut self) -> &mut ::std::vec::Vec<u8> {
  3058. if self.prefix.is_none() {
  3059. self.prefix.set_default();
  3060. }
  3061. self.prefix.as_mut().unwrap()
  3062. }
  3063. // Take field
  3064. pub fn take_prefix(&mut self) -> ::std::vec::Vec<u8> {
  3065. self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3066. }
  3067. // optional int32 length = 20;
  3068. pub fn get_length(&self) -> i32 {
  3069. self.length.unwrap_or(0)
  3070. }
  3071. pub fn clear_length(&mut self) {
  3072. self.length = ::std::option::Option::None;
  3073. }
  3074. pub fn has_length(&self) -> bool {
  3075. self.length.is_some()
  3076. }
  3077. // Param is passed by value, moved
  3078. pub fn set_length(&mut self, v: i32) {
  3079. self.length = ::std::option::Option::Some(v);
  3080. }
  3081. // optional int32 target = 30;
  3082. pub fn get_target(&self) -> i32 {
  3083. self.target.unwrap_or(0)
  3084. }
  3085. pub fn clear_target(&mut self) {
  3086. self.target = ::std::option::Option::None;
  3087. }
  3088. pub fn has_target(&self) -> bool {
  3089. self.target.is_some()
  3090. }
  3091. // Param is passed by value, moved
  3092. pub fn set_target(&mut self, v: i32) {
  3093. self.target = ::std::option::Option::Some(v);
  3094. }
  3095. }
  3096. impl ::protobuf::Message for PoWHashCashChallenge {
  3097. fn is_initialized(&self) -> bool {
  3098. true
  3099. }
  3100. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3101. while !is.eof()? {
  3102. let (field_number, wire_type) = is.read_tag_unpack()?;
  3103. match field_number {
  3104. 10 => {
  3105. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.prefix)?;
  3106. },
  3107. 20 => {
  3108. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3109. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3110. }
  3111. let tmp = is.read_int32()?;
  3112. self.length = ::std::option::Option::Some(tmp);
  3113. },
  3114. 30 => {
  3115. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3116. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3117. }
  3118. let tmp = is.read_int32()?;
  3119. self.target = ::std::option::Option::Some(tmp);
  3120. },
  3121. _ => {
  3122. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3123. },
  3124. };
  3125. }
  3126. ::std::result::Result::Ok(())
  3127. }
  3128. // Compute sizes of nested messages
  3129. #[allow(unused_variables)]
  3130. fn compute_size(&self) -> u32 {
  3131. let mut my_size = 0;
  3132. if let Some(ref v) = self.prefix.as_ref() {
  3133. my_size += ::protobuf::rt::bytes_size(10, &v);
  3134. }
  3135. if let Some(v) = self.length {
  3136. my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
  3137. }
  3138. if let Some(v) = self.target {
  3139. my_size += ::protobuf::rt::value_size(30, v, ::protobuf::wire_format::WireTypeVarint);
  3140. }
  3141. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3142. self.cached_size.set(my_size);
  3143. my_size
  3144. }
  3145. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3146. if let Some(ref v) = self.prefix.as_ref() {
  3147. os.write_bytes(10, &v)?;
  3148. }
  3149. if let Some(v) = self.length {
  3150. os.write_int32(20, v)?;
  3151. }
  3152. if let Some(v) = self.target {
  3153. os.write_int32(30, v)?;
  3154. }
  3155. os.write_unknown_fields(self.get_unknown_fields())?;
  3156. ::std::result::Result::Ok(())
  3157. }
  3158. fn get_cached_size(&self) -> u32 {
  3159. self.cached_size.get()
  3160. }
  3161. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3162. &self.unknown_fields
  3163. }
  3164. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3165. &mut self.unknown_fields
  3166. }
  3167. fn as_any(&self) -> &dyn (::std::any::Any) {
  3168. self as &dyn (::std::any::Any)
  3169. }
  3170. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3171. self as &mut dyn (::std::any::Any)
  3172. }
  3173. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3174. self
  3175. }
  3176. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3177. Self::descriptor_static()
  3178. }
  3179. fn new() -> PoWHashCashChallenge {
  3180. PoWHashCashChallenge::new()
  3181. }
  3182. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3183. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3184. lock: ::protobuf::lazy::ONCE_INIT,
  3185. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3186. };
  3187. unsafe {
  3188. descriptor.get(|| {
  3189. let mut fields = ::std::vec::Vec::new();
  3190. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3191. "prefix",
  3192. |m: &PoWHashCashChallenge| { &m.prefix },
  3193. |m: &mut PoWHashCashChallenge| { &mut m.prefix },
  3194. ));
  3195. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  3196. "length",
  3197. |m: &PoWHashCashChallenge| { &m.length },
  3198. |m: &mut PoWHashCashChallenge| { &mut m.length },
  3199. ));
  3200. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  3201. "target",
  3202. |m: &PoWHashCashChallenge| { &m.target },
  3203. |m: &mut PoWHashCashChallenge| { &mut m.target },
  3204. ));
  3205. ::protobuf::reflect::MessageDescriptor::new::<PoWHashCashChallenge>(
  3206. "PoWHashCashChallenge",
  3207. fields,
  3208. file_descriptor_proto()
  3209. )
  3210. })
  3211. }
  3212. }
  3213. fn default_instance() -> &'static PoWHashCashChallenge {
  3214. static mut instance: ::protobuf::lazy::Lazy<PoWHashCashChallenge> = ::protobuf::lazy::Lazy {
  3215. lock: ::protobuf::lazy::ONCE_INIT,
  3216. ptr: 0 as *const PoWHashCashChallenge,
  3217. };
  3218. unsafe {
  3219. instance.get(PoWHashCashChallenge::new)
  3220. }
  3221. }
  3222. }
  3223. impl ::protobuf::Clear for PoWHashCashChallenge {
  3224. fn clear(&mut self) {
  3225. self.prefix.clear();
  3226. self.length = ::std::option::Option::None;
  3227. self.target = ::std::option::Option::None;
  3228. self.unknown_fields.clear();
  3229. }
  3230. }
  3231. impl ::std::fmt::Debug for PoWHashCashChallenge {
  3232. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3233. ::protobuf::text_format::fmt(self, f)
  3234. }
  3235. }
  3236. impl ::protobuf::reflect::ProtobufValue for PoWHashCashChallenge {
  3237. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3238. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3239. }
  3240. }
  3241. #[derive(PartialEq,Clone,Default)]
  3242. pub struct CryptoChallengeUnion {
  3243. // message fields
  3244. shannon: ::protobuf::SingularPtrField<CryptoShannonChallenge>,
  3245. rc4_sha1_hmac: ::protobuf::SingularPtrField<CryptoRc4Sha1HmacChallenge>,
  3246. // special fields
  3247. pub unknown_fields: ::protobuf::UnknownFields,
  3248. pub cached_size: ::protobuf::CachedSize,
  3249. }
  3250. impl<'a> ::std::default::Default for &'a CryptoChallengeUnion {
  3251. fn default() -> &'a CryptoChallengeUnion {
  3252. <CryptoChallengeUnion as ::protobuf::Message>::default_instance()
  3253. }
  3254. }
  3255. impl CryptoChallengeUnion {
  3256. pub fn new() -> CryptoChallengeUnion {
  3257. ::std::default::Default::default()
  3258. }
  3259. // optional .CryptoShannonChallenge shannon = 10;
  3260. pub fn get_shannon(&self) -> &CryptoShannonChallenge {
  3261. self.shannon.as_ref().unwrap_or_else(|| CryptoShannonChallenge::default_instance())
  3262. }
  3263. pub fn clear_shannon(&mut self) {
  3264. self.shannon.clear();
  3265. }
  3266. pub fn has_shannon(&self) -> bool {
  3267. self.shannon.is_some()
  3268. }
  3269. // Param is passed by value, moved
  3270. pub fn set_shannon(&mut self, v: CryptoShannonChallenge) {
  3271. self.shannon = ::protobuf::SingularPtrField::some(v);
  3272. }
  3273. // Mutable pointer to the field.
  3274. // If field is not initialized, it is initialized with default value first.
  3275. pub fn mut_shannon(&mut self) -> &mut CryptoShannonChallenge {
  3276. if self.shannon.is_none() {
  3277. self.shannon.set_default();
  3278. }
  3279. self.shannon.as_mut().unwrap()
  3280. }
  3281. // Take field
  3282. pub fn take_shannon(&mut self) -> CryptoShannonChallenge {
  3283. self.shannon.take().unwrap_or_else(|| CryptoShannonChallenge::new())
  3284. }
  3285. // optional .CryptoRc4Sha1HmacChallenge rc4_sha1_hmac = 20;
  3286. pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge {
  3287. self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance())
  3288. }
  3289. pub fn clear_rc4_sha1_hmac(&mut self) {
  3290. self.rc4_sha1_hmac.clear();
  3291. }
  3292. pub fn has_rc4_sha1_hmac(&self) -> bool {
  3293. self.rc4_sha1_hmac.is_some()
  3294. }
  3295. // Param is passed by value, moved
  3296. pub fn set_rc4_sha1_hmac(&mut self, v: CryptoRc4Sha1HmacChallenge) {
  3297. self.rc4_sha1_hmac = ::protobuf::SingularPtrField::some(v);
  3298. }
  3299. // Mutable pointer to the field.
  3300. // If field is not initialized, it is initialized with default value first.
  3301. pub fn mut_rc4_sha1_hmac(&mut self) -> &mut CryptoRc4Sha1HmacChallenge {
  3302. if self.rc4_sha1_hmac.is_none() {
  3303. self.rc4_sha1_hmac.set_default();
  3304. }
  3305. self.rc4_sha1_hmac.as_mut().unwrap()
  3306. }
  3307. // Take field
  3308. pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacChallenge {
  3309. self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::new())
  3310. }
  3311. }
  3312. impl ::protobuf::Message for CryptoChallengeUnion {
  3313. fn is_initialized(&self) -> bool {
  3314. for v in &self.shannon {
  3315. if !v.is_initialized() {
  3316. return false;
  3317. }
  3318. };
  3319. for v in &self.rc4_sha1_hmac {
  3320. if !v.is_initialized() {
  3321. return false;
  3322. }
  3323. };
  3324. true
  3325. }
  3326. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3327. while !is.eof()? {
  3328. let (field_number, wire_type) = is.read_tag_unpack()?;
  3329. match field_number {
  3330. 10 => {
  3331. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shannon)?;
  3332. },
  3333. 20 => {
  3334. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rc4_sha1_hmac)?;
  3335. },
  3336. _ => {
  3337. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3338. },
  3339. };
  3340. }
  3341. ::std::result::Result::Ok(())
  3342. }
  3343. // Compute sizes of nested messages
  3344. #[allow(unused_variables)]
  3345. fn compute_size(&self) -> u32 {
  3346. let mut my_size = 0;
  3347. if let Some(ref v) = self.shannon.as_ref() {
  3348. let len = v.compute_size();
  3349. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3350. }
  3351. if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
  3352. let len = v.compute_size();
  3353. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3354. }
  3355. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3356. self.cached_size.set(my_size);
  3357. my_size
  3358. }
  3359. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3360. if let Some(ref v) = self.shannon.as_ref() {
  3361. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3362. os.write_raw_varint32(v.get_cached_size())?;
  3363. v.write_to_with_cached_sizes(os)?;
  3364. }
  3365. if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
  3366. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3367. os.write_raw_varint32(v.get_cached_size())?;
  3368. v.write_to_with_cached_sizes(os)?;
  3369. }
  3370. os.write_unknown_fields(self.get_unknown_fields())?;
  3371. ::std::result::Result::Ok(())
  3372. }
  3373. fn get_cached_size(&self) -> u32 {
  3374. self.cached_size.get()
  3375. }
  3376. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3377. &self.unknown_fields
  3378. }
  3379. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3380. &mut self.unknown_fields
  3381. }
  3382. fn as_any(&self) -> &dyn (::std::any::Any) {
  3383. self as &dyn (::std::any::Any)
  3384. }
  3385. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3386. self as &mut dyn (::std::any::Any)
  3387. }
  3388. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3389. self
  3390. }
  3391. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3392. Self::descriptor_static()
  3393. }
  3394. fn new() -> CryptoChallengeUnion {
  3395. CryptoChallengeUnion::new()
  3396. }
  3397. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3398. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3399. lock: ::protobuf::lazy::ONCE_INIT,
  3400. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3401. };
  3402. unsafe {
  3403. descriptor.get(|| {
  3404. let mut fields = ::std::vec::Vec::new();
  3405. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CryptoShannonChallenge>>(
  3406. "shannon",
  3407. |m: &CryptoChallengeUnion| { &m.shannon },
  3408. |m: &mut CryptoChallengeUnion| { &mut m.shannon },
  3409. ));
  3410. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CryptoRc4Sha1HmacChallenge>>(
  3411. "rc4_sha1_hmac",
  3412. |m: &CryptoChallengeUnion| { &m.rc4_sha1_hmac },
  3413. |m: &mut CryptoChallengeUnion| { &mut m.rc4_sha1_hmac },
  3414. ));
  3415. ::protobuf::reflect::MessageDescriptor::new::<CryptoChallengeUnion>(
  3416. "CryptoChallengeUnion",
  3417. fields,
  3418. file_descriptor_proto()
  3419. )
  3420. })
  3421. }
  3422. }
  3423. fn default_instance() -> &'static CryptoChallengeUnion {
  3424. static mut instance: ::protobuf::lazy::Lazy<CryptoChallengeUnion> = ::protobuf::lazy::Lazy {
  3425. lock: ::protobuf::lazy::ONCE_INIT,
  3426. ptr: 0 as *const CryptoChallengeUnion,
  3427. };
  3428. unsafe {
  3429. instance.get(CryptoChallengeUnion::new)
  3430. }
  3431. }
  3432. }
  3433. impl ::protobuf::Clear for CryptoChallengeUnion {
  3434. fn clear(&mut self) {
  3435. self.shannon.clear();
  3436. self.rc4_sha1_hmac.clear();
  3437. self.unknown_fields.clear();
  3438. }
  3439. }
  3440. impl ::std::fmt::Debug for CryptoChallengeUnion {
  3441. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3442. ::protobuf::text_format::fmt(self, f)
  3443. }
  3444. }
  3445. impl ::protobuf::reflect::ProtobufValue for CryptoChallengeUnion {
  3446. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3447. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3448. }
  3449. }
  3450. #[derive(PartialEq,Clone,Default)]
  3451. pub struct CryptoShannonChallenge {
  3452. // special fields
  3453. pub unknown_fields: ::protobuf::UnknownFields,
  3454. pub cached_size: ::protobuf::CachedSize,
  3455. }
  3456. impl<'a> ::std::default::Default for &'a CryptoShannonChallenge {
  3457. fn default() -> &'a CryptoShannonChallenge {
  3458. <CryptoShannonChallenge as ::protobuf::Message>::default_instance()
  3459. }
  3460. }
  3461. impl CryptoShannonChallenge {
  3462. pub fn new() -> CryptoShannonChallenge {
  3463. ::std::default::Default::default()
  3464. }
  3465. }
  3466. impl ::protobuf::Message for CryptoShannonChallenge {
  3467. fn is_initialized(&self) -> bool {
  3468. true
  3469. }
  3470. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3471. while !is.eof()? {
  3472. let (field_number, wire_type) = is.read_tag_unpack()?;
  3473. match field_number {
  3474. _ => {
  3475. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3476. },
  3477. };
  3478. }
  3479. ::std::result::Result::Ok(())
  3480. }
  3481. // Compute sizes of nested messages
  3482. #[allow(unused_variables)]
  3483. fn compute_size(&self) -> u32 {
  3484. let mut my_size = 0;
  3485. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3486. self.cached_size.set(my_size);
  3487. my_size
  3488. }
  3489. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3490. os.write_unknown_fields(self.get_unknown_fields())?;
  3491. ::std::result::Result::Ok(())
  3492. }
  3493. fn get_cached_size(&self) -> u32 {
  3494. self.cached_size.get()
  3495. }
  3496. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3497. &self.unknown_fields
  3498. }
  3499. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3500. &mut self.unknown_fields
  3501. }
  3502. fn as_any(&self) -> &dyn (::std::any::Any) {
  3503. self as &dyn (::std::any::Any)
  3504. }
  3505. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3506. self as &mut dyn (::std::any::Any)
  3507. }
  3508. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3509. self
  3510. }
  3511. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3512. Self::descriptor_static()
  3513. }
  3514. fn new() -> CryptoShannonChallenge {
  3515. CryptoShannonChallenge::new()
  3516. }
  3517. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3518. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3519. lock: ::protobuf::lazy::ONCE_INIT,
  3520. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3521. };
  3522. unsafe {
  3523. descriptor.get(|| {
  3524. let fields = ::std::vec::Vec::new();
  3525. ::protobuf::reflect::MessageDescriptor::new::<CryptoShannonChallenge>(
  3526. "CryptoShannonChallenge",
  3527. fields,
  3528. file_descriptor_proto()
  3529. )
  3530. })
  3531. }
  3532. }
  3533. fn default_instance() -> &'static CryptoShannonChallenge {
  3534. static mut instance: ::protobuf::lazy::Lazy<CryptoShannonChallenge> = ::protobuf::lazy::Lazy {
  3535. lock: ::protobuf::lazy::ONCE_INIT,
  3536. ptr: 0 as *const CryptoShannonChallenge,
  3537. };
  3538. unsafe {
  3539. instance.get(CryptoShannonChallenge::new)
  3540. }
  3541. }
  3542. }
  3543. impl ::protobuf::Clear for CryptoShannonChallenge {
  3544. fn clear(&mut self) {
  3545. self.unknown_fields.clear();
  3546. }
  3547. }
  3548. impl ::std::fmt::Debug for CryptoShannonChallenge {
  3549. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3550. ::protobuf::text_format::fmt(self, f)
  3551. }
  3552. }
  3553. impl ::protobuf::reflect::ProtobufValue for CryptoShannonChallenge {
  3554. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3555. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3556. }
  3557. }
  3558. #[derive(PartialEq,Clone,Default)]
  3559. pub struct CryptoRc4Sha1HmacChallenge {
  3560. // special fields
  3561. pub unknown_fields: ::protobuf::UnknownFields,
  3562. pub cached_size: ::protobuf::CachedSize,
  3563. }
  3564. impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacChallenge {
  3565. fn default() -> &'a CryptoRc4Sha1HmacChallenge {
  3566. <CryptoRc4Sha1HmacChallenge as ::protobuf::Message>::default_instance()
  3567. }
  3568. }
  3569. impl CryptoRc4Sha1HmacChallenge {
  3570. pub fn new() -> CryptoRc4Sha1HmacChallenge {
  3571. ::std::default::Default::default()
  3572. }
  3573. }
  3574. impl ::protobuf::Message for CryptoRc4Sha1HmacChallenge {
  3575. fn is_initialized(&self) -> bool {
  3576. true
  3577. }
  3578. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3579. while !is.eof()? {
  3580. let (field_number, wire_type) = is.read_tag_unpack()?;
  3581. match field_number {
  3582. _ => {
  3583. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3584. },
  3585. };
  3586. }
  3587. ::std::result::Result::Ok(())
  3588. }
  3589. // Compute sizes of nested messages
  3590. #[allow(unused_variables)]
  3591. fn compute_size(&self) -> u32 {
  3592. let mut my_size = 0;
  3593. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3594. self.cached_size.set(my_size);
  3595. my_size
  3596. }
  3597. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3598. os.write_unknown_fields(self.get_unknown_fields())?;
  3599. ::std::result::Result::Ok(())
  3600. }
  3601. fn get_cached_size(&self) -> u32 {
  3602. self.cached_size.get()
  3603. }
  3604. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3605. &self.unknown_fields
  3606. }
  3607. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3608. &mut self.unknown_fields
  3609. }
  3610. fn as_any(&self) -> &dyn (::std::any::Any) {
  3611. self as &dyn (::std::any::Any)
  3612. }
  3613. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3614. self as &mut dyn (::std::any::Any)
  3615. }
  3616. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3617. self
  3618. }
  3619. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3620. Self::descriptor_static()
  3621. }
  3622. fn new() -> CryptoRc4Sha1HmacChallenge {
  3623. CryptoRc4Sha1HmacChallenge::new()
  3624. }
  3625. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3626. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3627. lock: ::protobuf::lazy::ONCE_INIT,
  3628. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3629. };
  3630. unsafe {
  3631. descriptor.get(|| {
  3632. let fields = ::std::vec::Vec::new();
  3633. ::protobuf::reflect::MessageDescriptor::new::<CryptoRc4Sha1HmacChallenge>(
  3634. "CryptoRc4Sha1HmacChallenge",
  3635. fields,
  3636. file_descriptor_proto()
  3637. )
  3638. })
  3639. }
  3640. }
  3641. fn default_instance() -> &'static CryptoRc4Sha1HmacChallenge {
  3642. static mut instance: ::protobuf::lazy::Lazy<CryptoRc4Sha1HmacChallenge> = ::protobuf::lazy::Lazy {
  3643. lock: ::protobuf::lazy::ONCE_INIT,
  3644. ptr: 0 as *const CryptoRc4Sha1HmacChallenge,
  3645. };
  3646. unsafe {
  3647. instance.get(CryptoRc4Sha1HmacChallenge::new)
  3648. }
  3649. }
  3650. }
  3651. impl ::protobuf::Clear for CryptoRc4Sha1HmacChallenge {
  3652. fn clear(&mut self) {
  3653. self.unknown_fields.clear();
  3654. }
  3655. }
  3656. impl ::std::fmt::Debug for CryptoRc4Sha1HmacChallenge {
  3657. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3658. ::protobuf::text_format::fmt(self, f)
  3659. }
  3660. }
  3661. impl ::protobuf::reflect::ProtobufValue for CryptoRc4Sha1HmacChallenge {
  3662. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3663. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3664. }
  3665. }
  3666. #[derive(PartialEq,Clone,Default)]
  3667. pub struct UpgradeRequiredMessage {
  3668. // message fields
  3669. upgrade_signed_part: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  3670. signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  3671. http_suffix: ::protobuf::SingularField<::std::string::String>,
  3672. // special fields
  3673. pub unknown_fields: ::protobuf::UnknownFields,
  3674. pub cached_size: ::protobuf::CachedSize,
  3675. }
  3676. impl<'a> ::std::default::Default for &'a UpgradeRequiredMessage {
  3677. fn default() -> &'a UpgradeRequiredMessage {
  3678. <UpgradeRequiredMessage as ::protobuf::Message>::default_instance()
  3679. }
  3680. }
  3681. impl UpgradeRequiredMessage {
  3682. pub fn new() -> UpgradeRequiredMessage {
  3683. ::std::default::Default::default()
  3684. }
  3685. // required bytes upgrade_signed_part = 10;
  3686. pub fn get_upgrade_signed_part(&self) -> &[u8] {
  3687. match self.upgrade_signed_part.as_ref() {
  3688. Some(v) => &v,
  3689. None => &[],
  3690. }
  3691. }
  3692. pub fn clear_upgrade_signed_part(&mut self) {
  3693. self.upgrade_signed_part.clear();
  3694. }
  3695. pub fn has_upgrade_signed_part(&self) -> bool {
  3696. self.upgrade_signed_part.is_some()
  3697. }
  3698. // Param is passed by value, moved
  3699. pub fn set_upgrade_signed_part(&mut self, v: ::std::vec::Vec<u8>) {
  3700. self.upgrade_signed_part = ::protobuf::SingularField::some(v);
  3701. }
  3702. // Mutable pointer to the field.
  3703. // If field is not initialized, it is initialized with default value first.
  3704. pub fn mut_upgrade_signed_part(&mut self) -> &mut ::std::vec::Vec<u8> {
  3705. if self.upgrade_signed_part.is_none() {
  3706. self.upgrade_signed_part.set_default();
  3707. }
  3708. self.upgrade_signed_part.as_mut().unwrap()
  3709. }
  3710. // Take field
  3711. pub fn take_upgrade_signed_part(&mut self) -> ::std::vec::Vec<u8> {
  3712. self.upgrade_signed_part.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3713. }
  3714. // required bytes signature = 20;
  3715. pub fn get_signature(&self) -> &[u8] {
  3716. match self.signature.as_ref() {
  3717. Some(v) => &v,
  3718. None => &[],
  3719. }
  3720. }
  3721. pub fn clear_signature(&mut self) {
  3722. self.signature.clear();
  3723. }
  3724. pub fn has_signature(&self) -> bool {
  3725. self.signature.is_some()
  3726. }
  3727. // Param is passed by value, moved
  3728. pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
  3729. self.signature = ::protobuf::SingularField::some(v);
  3730. }
  3731. // Mutable pointer to the field.
  3732. // If field is not initialized, it is initialized with default value first.
  3733. pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
  3734. if self.signature.is_none() {
  3735. self.signature.set_default();
  3736. }
  3737. self.signature.as_mut().unwrap()
  3738. }
  3739. // Take field
  3740. pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
  3741. self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
  3742. }
  3743. // optional string http_suffix = 30;
  3744. pub fn get_http_suffix(&self) -> &str {
  3745. match self.http_suffix.as_ref() {
  3746. Some(v) => &v,
  3747. None => "",
  3748. }
  3749. }
  3750. pub fn clear_http_suffix(&mut self) {
  3751. self.http_suffix.clear();
  3752. }
  3753. pub fn has_http_suffix(&self) -> bool {
  3754. self.http_suffix.is_some()
  3755. }
  3756. // Param is passed by value, moved
  3757. pub fn set_http_suffix(&mut self, v: ::std::string::String) {
  3758. self.http_suffix = ::protobuf::SingularField::some(v);
  3759. }
  3760. // Mutable pointer to the field.
  3761. // If field is not initialized, it is initialized with default value first.
  3762. pub fn mut_http_suffix(&mut self) -> &mut ::std::string::String {
  3763. if self.http_suffix.is_none() {
  3764. self.http_suffix.set_default();
  3765. }
  3766. self.http_suffix.as_mut().unwrap()
  3767. }
  3768. // Take field
  3769. pub fn take_http_suffix(&mut self) -> ::std::string::String {
  3770. self.http_suffix.take().unwrap_or_else(|| ::std::string::String::new())
  3771. }
  3772. }
  3773. impl ::protobuf::Message for UpgradeRequiredMessage {
  3774. fn is_initialized(&self) -> bool {
  3775. if self.upgrade_signed_part.is_none() {
  3776. return false;
  3777. }
  3778. if self.signature.is_none() {
  3779. return false;
  3780. }
  3781. true
  3782. }
  3783. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3784. while !is.eof()? {
  3785. let (field_number, wire_type) = is.read_tag_unpack()?;
  3786. match field_number {
  3787. 10 => {
  3788. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.upgrade_signed_part)?;
  3789. },
  3790. 20 => {
  3791. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?;
  3792. },
  3793. 30 => {
  3794. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.http_suffix)?;
  3795. },
  3796. _ => {
  3797. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3798. },
  3799. };
  3800. }
  3801. ::std::result::Result::Ok(())
  3802. }
  3803. // Compute sizes of nested messages
  3804. #[allow(unused_variables)]
  3805. fn compute_size(&self) -> u32 {
  3806. let mut my_size = 0;
  3807. if let Some(ref v) = self.upgrade_signed_part.as_ref() {
  3808. my_size += ::protobuf::rt::bytes_size(10, &v);
  3809. }
  3810. if let Some(ref v) = self.signature.as_ref() {
  3811. my_size += ::protobuf::rt::bytes_size(20, &v);
  3812. }
  3813. if let Some(ref v) = self.http_suffix.as_ref() {
  3814. my_size += ::protobuf::rt::string_size(30, &v);
  3815. }
  3816. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3817. self.cached_size.set(my_size);
  3818. my_size
  3819. }
  3820. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3821. if let Some(ref v) = self.upgrade_signed_part.as_ref() {
  3822. os.write_bytes(10, &v)?;
  3823. }
  3824. if let Some(ref v) = self.signature.as_ref() {
  3825. os.write_bytes(20, &v)?;
  3826. }
  3827. if let Some(ref v) = self.http_suffix.as_ref() {
  3828. os.write_string(30, &v)?;
  3829. }
  3830. os.write_unknown_fields(self.get_unknown_fields())?;
  3831. ::std::result::Result::Ok(())
  3832. }
  3833. fn get_cached_size(&self) -> u32 {
  3834. self.cached_size.get()
  3835. }
  3836. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3837. &self.unknown_fields
  3838. }
  3839. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3840. &mut self.unknown_fields
  3841. }
  3842. fn as_any(&self) -> &dyn (::std::any::Any) {
  3843. self as &dyn (::std::any::Any)
  3844. }
  3845. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3846. self as &mut dyn (::std::any::Any)
  3847. }
  3848. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3849. self
  3850. }
  3851. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3852. Self::descriptor_static()
  3853. }
  3854. fn new() -> UpgradeRequiredMessage {
  3855. UpgradeRequiredMessage::new()
  3856. }
  3857. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3858. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  3859. lock: ::protobuf::lazy::ONCE_INIT,
  3860. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  3861. };
  3862. unsafe {
  3863. descriptor.get(|| {
  3864. let mut fields = ::std::vec::Vec::new();
  3865. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3866. "upgrade_signed_part",
  3867. |m: &UpgradeRequiredMessage| { &m.upgrade_signed_part },
  3868. |m: &mut UpgradeRequiredMessage| { &mut m.upgrade_signed_part },
  3869. ));
  3870. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3871. "signature",
  3872. |m: &UpgradeRequiredMessage| { &m.signature },
  3873. |m: &mut UpgradeRequiredMessage| { &mut m.signature },
  3874. ));
  3875. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3876. "http_suffix",
  3877. |m: &UpgradeRequiredMessage| { &m.http_suffix },
  3878. |m: &mut UpgradeRequiredMessage| { &mut m.http_suffix },
  3879. ));
  3880. ::protobuf::reflect::MessageDescriptor::new::<UpgradeRequiredMessage>(
  3881. "UpgradeRequiredMessage",
  3882. fields,
  3883. file_descriptor_proto()
  3884. )
  3885. })
  3886. }
  3887. }
  3888. fn default_instance() -> &'static UpgradeRequiredMessage {
  3889. static mut instance: ::protobuf::lazy::Lazy<UpgradeRequiredMessage> = ::protobuf::lazy::Lazy {
  3890. lock: ::protobuf::lazy::ONCE_INIT,
  3891. ptr: 0 as *const UpgradeRequiredMessage,
  3892. };
  3893. unsafe {
  3894. instance.get(UpgradeRequiredMessage::new)
  3895. }
  3896. }
  3897. }
  3898. impl ::protobuf::Clear for UpgradeRequiredMessage {
  3899. fn clear(&mut self) {
  3900. self.upgrade_signed_part.clear();
  3901. self.signature.clear();
  3902. self.http_suffix.clear();
  3903. self.unknown_fields.clear();
  3904. }
  3905. }
  3906. impl ::std::fmt::Debug for UpgradeRequiredMessage {
  3907. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3908. ::protobuf::text_format::fmt(self, f)
  3909. }
  3910. }
  3911. impl ::protobuf::reflect::ProtobufValue for UpgradeRequiredMessage {
  3912. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  3913. ::protobuf::reflect::ProtobufValueRef::Message(self)
  3914. }
  3915. }
  3916. #[derive(PartialEq,Clone,Default)]
  3917. pub struct APLoginFailed {
  3918. // message fields
  3919. error_code: ::std::option::Option<ErrorCode>,
  3920. retry_delay: ::std::option::Option<i32>,
  3921. expiry: ::std::option::Option<i32>,
  3922. error_description: ::protobuf::SingularField<::std::string::String>,
  3923. // special fields
  3924. pub unknown_fields: ::protobuf::UnknownFields,
  3925. pub cached_size: ::protobuf::CachedSize,
  3926. }
  3927. impl<'a> ::std::default::Default for &'a APLoginFailed {
  3928. fn default() -> &'a APLoginFailed {
  3929. <APLoginFailed as ::protobuf::Message>::default_instance()
  3930. }
  3931. }
  3932. impl APLoginFailed {
  3933. pub fn new() -> APLoginFailed {
  3934. ::std::default::Default::default()
  3935. }
  3936. // required .ErrorCode error_code = 10;
  3937. pub fn get_error_code(&self) -> ErrorCode {
  3938. self.error_code.unwrap_or(ErrorCode::ProtocolError)
  3939. }
  3940. pub fn clear_error_code(&mut self) {
  3941. self.error_code = ::std::option::Option::None;
  3942. }
  3943. pub fn has_error_code(&self) -> bool {
  3944. self.error_code.is_some()
  3945. }
  3946. // Param is passed by value, moved
  3947. pub fn set_error_code(&mut self, v: ErrorCode) {
  3948. self.error_code = ::std::option::Option::Some(v);
  3949. }
  3950. // optional int32 retry_delay = 20;
  3951. pub fn get_retry_delay(&self) -> i32 {
  3952. self.retry_delay.unwrap_or(0)
  3953. }
  3954. pub fn clear_retry_delay(&mut self) {
  3955. self.retry_delay = ::std::option::Option::None;
  3956. }
  3957. pub fn has_retry_delay(&self) -> bool {
  3958. self.retry_delay.is_some()
  3959. }
  3960. // Param is passed by value, moved
  3961. pub fn set_retry_delay(&mut self, v: i32) {
  3962. self.retry_delay = ::std::option::Option::Some(v);
  3963. }
  3964. // optional int32 expiry = 30;
  3965. pub fn get_expiry(&self) -> i32 {
  3966. self.expiry.unwrap_or(0)
  3967. }
  3968. pub fn clear_expiry(&mut self) {
  3969. self.expiry = ::std::option::Option::None;
  3970. }
  3971. pub fn has_expiry(&self) -> bool {
  3972. self.expiry.is_some()
  3973. }
  3974. // Param is passed by value, moved
  3975. pub fn set_expiry(&mut self, v: i32) {
  3976. self.expiry = ::std::option::Option::Some(v);
  3977. }
  3978. // optional string error_description = 40;
  3979. pub fn get_error_description(&self) -> &str {
  3980. match self.error_description.as_ref() {
  3981. Some(v) => &v,
  3982. None => "",
  3983. }
  3984. }
  3985. pub fn clear_error_description(&mut self) {
  3986. self.error_description.clear();
  3987. }
  3988. pub fn has_error_description(&self) -> bool {
  3989. self.error_description.is_some()
  3990. }
  3991. // Param is passed by value, moved
  3992. pub fn set_error_description(&mut self, v: ::std::string::String) {
  3993. self.error_description = ::protobuf::SingularField::some(v);
  3994. }
  3995. // Mutable pointer to the field.
  3996. // If field is not initialized, it is initialized with default value first.
  3997. pub fn mut_error_description(&mut self) -> &mut ::std::string::String {
  3998. if self.error_description.is_none() {
  3999. self.error_description.set_default();
  4000. }
  4001. self.error_description.as_mut().unwrap()
  4002. }
  4003. // Take field
  4004. pub fn take_error_description(&mut self) -> ::std::string::String {
  4005. self.error_description.take().unwrap_or_else(|| ::std::string::String::new())
  4006. }
  4007. }
  4008. impl ::protobuf::Message for APLoginFailed {
  4009. fn is_initialized(&self) -> bool {
  4010. if self.error_code.is_none() {
  4011. return false;
  4012. }
  4013. true
  4014. }
  4015. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4016. while !is.eof()? {
  4017. let (field_number, wire_type) = is.read_tag_unpack()?;
  4018. match field_number {
  4019. 10 => {
  4020. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.error_code, 10, &mut self.unknown_fields)?
  4021. },
  4022. 20 => {
  4023. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  4024. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  4025. }
  4026. let tmp = is.read_int32()?;
  4027. self.retry_delay = ::std::option::Option::Some(tmp);
  4028. },
  4029. 30 => {
  4030. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  4031. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  4032. }
  4033. let tmp = is.read_int32()?;
  4034. self.expiry = ::std::option::Option::Some(tmp);
  4035. },
  4036. 40 => {
  4037. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.error_description)?;
  4038. },
  4039. _ => {
  4040. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4041. },
  4042. };
  4043. }
  4044. ::std::result::Result::Ok(())
  4045. }
  4046. // Compute sizes of nested messages
  4047. #[allow(unused_variables)]
  4048. fn compute_size(&self) -> u32 {
  4049. let mut my_size = 0;
  4050. if let Some(v) = self.error_code {
  4051. my_size += ::protobuf::rt::enum_size(10, v);
  4052. }
  4053. if let Some(v) = self.retry_delay {
  4054. my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
  4055. }
  4056. if let Some(v) = self.expiry {
  4057. my_size += ::protobuf::rt::value_size(30, v, ::protobuf::wire_format::WireTypeVarint);
  4058. }
  4059. if let Some(ref v) = self.error_description.as_ref() {
  4060. my_size += ::protobuf::rt::string_size(40, &v);
  4061. }
  4062. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4063. self.cached_size.set(my_size);
  4064. my_size
  4065. }
  4066. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4067. if let Some(v) = self.error_code {
  4068. os.write_enum(10, v.value())?;
  4069. }
  4070. if let Some(v) = self.retry_delay {
  4071. os.write_int32(20, v)?;
  4072. }
  4073. if let Some(v) = self.expiry {
  4074. os.write_int32(30, v)?;
  4075. }
  4076. if let Some(ref v) = self.error_description.as_ref() {
  4077. os.write_string(40, &v)?;
  4078. }
  4079. os.write_unknown_fields(self.get_unknown_fields())?;
  4080. ::std::result::Result::Ok(())
  4081. }
  4082. fn get_cached_size(&self) -> u32 {
  4083. self.cached_size.get()
  4084. }
  4085. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4086. &self.unknown_fields
  4087. }
  4088. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4089. &mut self.unknown_fields
  4090. }
  4091. fn as_any(&self) -> &dyn (::std::any::Any) {
  4092. self as &dyn (::std::any::Any)
  4093. }
  4094. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4095. self as &mut dyn (::std::any::Any)
  4096. }
  4097. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4098. self
  4099. }
  4100. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4101. Self::descriptor_static()
  4102. }
  4103. fn new() -> APLoginFailed {
  4104. APLoginFailed::new()
  4105. }
  4106. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4107. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  4108. lock: ::protobuf::lazy::ONCE_INIT,
  4109. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  4110. };
  4111. unsafe {
  4112. descriptor.get(|| {
  4113. let mut fields = ::std::vec::Vec::new();
  4114. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ErrorCode>>(
  4115. "error_code",
  4116. |m: &APLoginFailed| { &m.error_code },
  4117. |m: &mut APLoginFailed| { &mut m.error_code },
  4118. ));
  4119. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  4120. "retry_delay",
  4121. |m: &APLoginFailed| { &m.retry_delay },
  4122. |m: &mut APLoginFailed| { &mut m.retry_delay },
  4123. ));
  4124. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  4125. "expiry",
  4126. |m: &APLoginFailed| { &m.expiry },
  4127. |m: &mut APLoginFailed| { &mut m.expiry },
  4128. ));
  4129. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4130. "error_description",
  4131. |m: &APLoginFailed| { &m.error_description },
  4132. |m: &mut APLoginFailed| { &mut m.error_description },
  4133. ));
  4134. ::protobuf::reflect::MessageDescriptor::new::<APLoginFailed>(
  4135. "APLoginFailed",
  4136. fields,
  4137. file_descriptor_proto()
  4138. )
  4139. })
  4140. }
  4141. }
  4142. fn default_instance() -> &'static APLoginFailed {
  4143. static mut instance: ::protobuf::lazy::Lazy<APLoginFailed> = ::protobuf::lazy::Lazy {
  4144. lock: ::protobuf::lazy::ONCE_INIT,
  4145. ptr: 0 as *const APLoginFailed,
  4146. };
  4147. unsafe {
  4148. instance.get(APLoginFailed::new)
  4149. }
  4150. }
  4151. }
  4152. impl ::protobuf::Clear for APLoginFailed {
  4153. fn clear(&mut self) {
  4154. self.error_code = ::std::option::Option::None;
  4155. self.retry_delay = ::std::option::Option::None;
  4156. self.expiry = ::std::option::Option::None;
  4157. self.error_description.clear();
  4158. self.unknown_fields.clear();
  4159. }
  4160. }
  4161. impl ::std::fmt::Debug for APLoginFailed {
  4162. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4163. ::protobuf::text_format::fmt(self, f)
  4164. }
  4165. }
  4166. impl ::protobuf::reflect::ProtobufValue for APLoginFailed {
  4167. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4168. ::protobuf::reflect::ProtobufValueRef::Message(self)
  4169. }
  4170. }
  4171. #[derive(PartialEq,Clone,Default)]
  4172. pub struct ClientResponsePlaintext {
  4173. // message fields
  4174. login_crypto_response: ::protobuf::SingularPtrField<LoginCryptoResponseUnion>,
  4175. pow_response: ::protobuf::SingularPtrField<PoWResponseUnion>,
  4176. crypto_response: ::protobuf::SingularPtrField<CryptoResponseUnion>,
  4177. // special fields
  4178. pub unknown_fields: ::protobuf::UnknownFields,
  4179. pub cached_size: ::protobuf::CachedSize,
  4180. }
  4181. impl<'a> ::std::default::Default for &'a ClientResponsePlaintext {
  4182. fn default() -> &'a ClientResponsePlaintext {
  4183. <ClientResponsePlaintext as ::protobuf::Message>::default_instance()
  4184. }
  4185. }
  4186. impl ClientResponsePlaintext {
  4187. pub fn new() -> ClientResponsePlaintext {
  4188. ::std::default::Default::default()
  4189. }
  4190. // required .LoginCryptoResponseUnion login_crypto_response = 10;
  4191. pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion {
  4192. self.login_crypto_response.as_ref().unwrap_or_else(|| LoginCryptoResponseUnion::default_instance())
  4193. }
  4194. pub fn clear_login_crypto_response(&mut self) {
  4195. self.login_crypto_response.clear();
  4196. }
  4197. pub fn has_login_crypto_response(&self) -> bool {
  4198. self.login_crypto_response.is_some()
  4199. }
  4200. // Param is passed by value, moved
  4201. pub fn set_login_crypto_response(&mut self, v: LoginCryptoResponseUnion) {
  4202. self.login_crypto_response = ::protobuf::SingularPtrField::some(v);
  4203. }
  4204. // Mutable pointer to the field.
  4205. // If field is not initialized, it is initialized with default value first.
  4206. pub fn mut_login_crypto_response(&mut self) -> &mut LoginCryptoResponseUnion {
  4207. if self.login_crypto_response.is_none() {
  4208. self.login_crypto_response.set_default();
  4209. }
  4210. self.login_crypto_response.as_mut().unwrap()
  4211. }
  4212. // Take field
  4213. pub fn take_login_crypto_response(&mut self) -> LoginCryptoResponseUnion {
  4214. self.login_crypto_response.take().unwrap_or_else(|| LoginCryptoResponseUnion::new())
  4215. }
  4216. // required .PoWResponseUnion pow_response = 20;
  4217. pub fn get_pow_response(&self) -> &PoWResponseUnion {
  4218. self.pow_response.as_ref().unwrap_or_else(|| PoWResponseUnion::default_instance())
  4219. }
  4220. pub fn clear_pow_response(&mut self) {
  4221. self.pow_response.clear();
  4222. }
  4223. pub fn has_pow_response(&self) -> bool {
  4224. self.pow_response.is_some()
  4225. }
  4226. // Param is passed by value, moved
  4227. pub fn set_pow_response(&mut self, v: PoWResponseUnion) {
  4228. self.pow_response = ::protobuf::SingularPtrField::some(v);
  4229. }
  4230. // Mutable pointer to the field.
  4231. // If field is not initialized, it is initialized with default value first.
  4232. pub fn mut_pow_response(&mut self) -> &mut PoWResponseUnion {
  4233. if self.pow_response.is_none() {
  4234. self.pow_response.set_default();
  4235. }
  4236. self.pow_response.as_mut().unwrap()
  4237. }
  4238. // Take field
  4239. pub fn take_pow_response(&mut self) -> PoWResponseUnion {
  4240. self.pow_response.take().unwrap_or_else(|| PoWResponseUnion::new())
  4241. }
  4242. // required .CryptoResponseUnion crypto_response = 30;
  4243. pub fn get_crypto_response(&self) -> &CryptoResponseUnion {
  4244. self.crypto_response.as_ref().unwrap_or_else(|| CryptoResponseUnion::default_instance())
  4245. }
  4246. pub fn clear_crypto_response(&mut self) {
  4247. self.crypto_response.clear();
  4248. }
  4249. pub fn has_crypto_response(&self) -> bool {
  4250. self.crypto_response.is_some()
  4251. }
  4252. // Param is passed by value, moved
  4253. pub fn set_crypto_response(&mut self, v: CryptoResponseUnion) {
  4254. self.crypto_response = ::protobuf::SingularPtrField::some(v);
  4255. }
  4256. // Mutable pointer to the field.
  4257. // If field is not initialized, it is initialized with default value first.
  4258. pub fn mut_crypto_response(&mut self) -> &mut CryptoResponseUnion {
  4259. if self.crypto_response.is_none() {
  4260. self.crypto_response.set_default();
  4261. }
  4262. self.crypto_response.as_mut().unwrap()
  4263. }
  4264. // Take field
  4265. pub fn take_crypto_response(&mut self) -> CryptoResponseUnion {
  4266. self.crypto_response.take().unwrap_or_else(|| CryptoResponseUnion::new())
  4267. }
  4268. }
  4269. impl ::protobuf::Message for ClientResponsePlaintext {
  4270. fn is_initialized(&self) -> bool {
  4271. if self.login_crypto_response.is_none() {
  4272. return false;
  4273. }
  4274. if self.pow_response.is_none() {
  4275. return false;
  4276. }
  4277. if self.crypto_response.is_none() {
  4278. return false;
  4279. }
  4280. for v in &self.login_crypto_response {
  4281. if !v.is_initialized() {
  4282. return false;
  4283. }
  4284. };
  4285. for v in &self.pow_response {
  4286. if !v.is_initialized() {
  4287. return false;
  4288. }
  4289. };
  4290. for v in &self.crypto_response {
  4291. if !v.is_initialized() {
  4292. return false;
  4293. }
  4294. };
  4295. true
  4296. }
  4297. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4298. while !is.eof()? {
  4299. let (field_number, wire_type) = is.read_tag_unpack()?;
  4300. match field_number {
  4301. 10 => {
  4302. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.login_crypto_response)?;
  4303. },
  4304. 20 => {
  4305. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pow_response)?;
  4306. },
  4307. 30 => {
  4308. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.crypto_response)?;
  4309. },
  4310. _ => {
  4311. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4312. },
  4313. };
  4314. }
  4315. ::std::result::Result::Ok(())
  4316. }
  4317. // Compute sizes of nested messages
  4318. #[allow(unused_variables)]
  4319. fn compute_size(&self) -> u32 {
  4320. let mut my_size = 0;
  4321. if let Some(ref v) = self.login_crypto_response.as_ref() {
  4322. let len = v.compute_size();
  4323. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4324. }
  4325. if let Some(ref v) = self.pow_response.as_ref() {
  4326. let len = v.compute_size();
  4327. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4328. }
  4329. if let Some(ref v) = self.crypto_response.as_ref() {
  4330. let len = v.compute_size();
  4331. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4332. }
  4333. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4334. self.cached_size.set(my_size);
  4335. my_size
  4336. }
  4337. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4338. if let Some(ref v) = self.login_crypto_response.as_ref() {
  4339. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4340. os.write_raw_varint32(v.get_cached_size())?;
  4341. v.write_to_with_cached_sizes(os)?;
  4342. }
  4343. if let Some(ref v) = self.pow_response.as_ref() {
  4344. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4345. os.write_raw_varint32(v.get_cached_size())?;
  4346. v.write_to_with_cached_sizes(os)?;
  4347. }
  4348. if let Some(ref v) = self.crypto_response.as_ref() {
  4349. os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4350. os.write_raw_varint32(v.get_cached_size())?;
  4351. v.write_to_with_cached_sizes(os)?;
  4352. }
  4353. os.write_unknown_fields(self.get_unknown_fields())?;
  4354. ::std::result::Result::Ok(())
  4355. }
  4356. fn get_cached_size(&self) -> u32 {
  4357. self.cached_size.get()
  4358. }
  4359. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4360. &self.unknown_fields
  4361. }
  4362. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4363. &mut self.unknown_fields
  4364. }
  4365. fn as_any(&self) -> &dyn (::std::any::Any) {
  4366. self as &dyn (::std::any::Any)
  4367. }
  4368. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4369. self as &mut dyn (::std::any::Any)
  4370. }
  4371. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4372. self
  4373. }
  4374. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4375. Self::descriptor_static()
  4376. }
  4377. fn new() -> ClientResponsePlaintext {
  4378. ClientResponsePlaintext::new()
  4379. }
  4380. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4381. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  4382. lock: ::protobuf::lazy::ONCE_INIT,
  4383. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  4384. };
  4385. unsafe {
  4386. descriptor.get(|| {
  4387. let mut fields = ::std::vec::Vec::new();
  4388. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCryptoResponseUnion>>(
  4389. "login_crypto_response",
  4390. |m: &ClientResponsePlaintext| { &m.login_crypto_response },
  4391. |m: &mut ClientResponsePlaintext| { &mut m.login_crypto_response },
  4392. ));
  4393. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PoWResponseUnion>>(
  4394. "pow_response",
  4395. |m: &ClientResponsePlaintext| { &m.pow_response },
  4396. |m: &mut ClientResponsePlaintext| { &mut m.pow_response },
  4397. ));
  4398. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CryptoResponseUnion>>(
  4399. "crypto_response",
  4400. |m: &ClientResponsePlaintext| { &m.crypto_response },
  4401. |m: &mut ClientResponsePlaintext| { &mut m.crypto_response },
  4402. ));
  4403. ::protobuf::reflect::MessageDescriptor::new::<ClientResponsePlaintext>(
  4404. "ClientResponsePlaintext",
  4405. fields,
  4406. file_descriptor_proto()
  4407. )
  4408. })
  4409. }
  4410. }
  4411. fn default_instance() -> &'static ClientResponsePlaintext {
  4412. static mut instance: ::protobuf::lazy::Lazy<ClientResponsePlaintext> = ::protobuf::lazy::Lazy {
  4413. lock: ::protobuf::lazy::ONCE_INIT,
  4414. ptr: 0 as *const ClientResponsePlaintext,
  4415. };
  4416. unsafe {
  4417. instance.get(ClientResponsePlaintext::new)
  4418. }
  4419. }
  4420. }
  4421. impl ::protobuf::Clear for ClientResponsePlaintext {
  4422. fn clear(&mut self) {
  4423. self.login_crypto_response.clear();
  4424. self.pow_response.clear();
  4425. self.crypto_response.clear();
  4426. self.unknown_fields.clear();
  4427. }
  4428. }
  4429. impl ::std::fmt::Debug for ClientResponsePlaintext {
  4430. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4431. ::protobuf::text_format::fmt(self, f)
  4432. }
  4433. }
  4434. impl ::protobuf::reflect::ProtobufValue for ClientResponsePlaintext {
  4435. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4436. ::protobuf::reflect::ProtobufValueRef::Message(self)
  4437. }
  4438. }
  4439. #[derive(PartialEq,Clone,Default)]
  4440. pub struct LoginCryptoResponseUnion {
  4441. // message fields
  4442. diffie_hellman: ::protobuf::SingularPtrField<LoginCryptoDiffieHellmanResponse>,
  4443. // special fields
  4444. pub unknown_fields: ::protobuf::UnknownFields,
  4445. pub cached_size: ::protobuf::CachedSize,
  4446. }
  4447. impl<'a> ::std::default::Default for &'a LoginCryptoResponseUnion {
  4448. fn default() -> &'a LoginCryptoResponseUnion {
  4449. <LoginCryptoResponseUnion as ::protobuf::Message>::default_instance()
  4450. }
  4451. }
  4452. impl LoginCryptoResponseUnion {
  4453. pub fn new() -> LoginCryptoResponseUnion {
  4454. ::std::default::Default::default()
  4455. }
  4456. // optional .LoginCryptoDiffieHellmanResponse diffie_hellman = 10;
  4457. pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse {
  4458. self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance())
  4459. }
  4460. pub fn clear_diffie_hellman(&mut self) {
  4461. self.diffie_hellman.clear();
  4462. }
  4463. pub fn has_diffie_hellman(&self) -> bool {
  4464. self.diffie_hellman.is_some()
  4465. }
  4466. // Param is passed by value, moved
  4467. pub fn set_diffie_hellman(&mut self, v: LoginCryptoDiffieHellmanResponse) {
  4468. self.diffie_hellman = ::protobuf::SingularPtrField::some(v);
  4469. }
  4470. // Mutable pointer to the field.
  4471. // If field is not initialized, it is initialized with default value first.
  4472. pub fn mut_diffie_hellman(&mut self) -> &mut LoginCryptoDiffieHellmanResponse {
  4473. if self.diffie_hellman.is_none() {
  4474. self.diffie_hellman.set_default();
  4475. }
  4476. self.diffie_hellman.as_mut().unwrap()
  4477. }
  4478. // Take field
  4479. pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanResponse {
  4480. self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::new())
  4481. }
  4482. }
  4483. impl ::protobuf::Message for LoginCryptoResponseUnion {
  4484. fn is_initialized(&self) -> bool {
  4485. for v in &self.diffie_hellman {
  4486. if !v.is_initialized() {
  4487. return false;
  4488. }
  4489. };
  4490. true
  4491. }
  4492. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4493. while !is.eof()? {
  4494. let (field_number, wire_type) = is.read_tag_unpack()?;
  4495. match field_number {
  4496. 10 => {
  4497. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.diffie_hellman)?;
  4498. },
  4499. _ => {
  4500. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4501. },
  4502. };
  4503. }
  4504. ::std::result::Result::Ok(())
  4505. }
  4506. // Compute sizes of nested messages
  4507. #[allow(unused_variables)]
  4508. fn compute_size(&self) -> u32 {
  4509. let mut my_size = 0;
  4510. if let Some(ref v) = self.diffie_hellman.as_ref() {
  4511. let len = v.compute_size();
  4512. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4513. }
  4514. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4515. self.cached_size.set(my_size);
  4516. my_size
  4517. }
  4518. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4519. if let Some(ref v) = self.diffie_hellman.as_ref() {
  4520. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4521. os.write_raw_varint32(v.get_cached_size())?;
  4522. v.write_to_with_cached_sizes(os)?;
  4523. }
  4524. os.write_unknown_fields(self.get_unknown_fields())?;
  4525. ::std::result::Result::Ok(())
  4526. }
  4527. fn get_cached_size(&self) -> u32 {
  4528. self.cached_size.get()
  4529. }
  4530. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4531. &self.unknown_fields
  4532. }
  4533. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4534. &mut self.unknown_fields
  4535. }
  4536. fn as_any(&self) -> &dyn (::std::any::Any) {
  4537. self as &dyn (::std::any::Any)
  4538. }
  4539. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4540. self as &mut dyn (::std::any::Any)
  4541. }
  4542. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4543. self
  4544. }
  4545. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4546. Self::descriptor_static()
  4547. }
  4548. fn new() -> LoginCryptoResponseUnion {
  4549. LoginCryptoResponseUnion::new()
  4550. }
  4551. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4552. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  4553. lock: ::protobuf::lazy::ONCE_INIT,
  4554. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  4555. };
  4556. unsafe {
  4557. descriptor.get(|| {
  4558. let mut fields = ::std::vec::Vec::new();
  4559. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LoginCryptoDiffieHellmanResponse>>(
  4560. "diffie_hellman",
  4561. |m: &LoginCryptoResponseUnion| { &m.diffie_hellman },
  4562. |m: &mut LoginCryptoResponseUnion| { &mut m.diffie_hellman },
  4563. ));
  4564. ::protobuf::reflect::MessageDescriptor::new::<LoginCryptoResponseUnion>(
  4565. "LoginCryptoResponseUnion",
  4566. fields,
  4567. file_descriptor_proto()
  4568. )
  4569. })
  4570. }
  4571. }
  4572. fn default_instance() -> &'static LoginCryptoResponseUnion {
  4573. static mut instance: ::protobuf::lazy::Lazy<LoginCryptoResponseUnion> = ::protobuf::lazy::Lazy {
  4574. lock: ::protobuf::lazy::ONCE_INIT,
  4575. ptr: 0 as *const LoginCryptoResponseUnion,
  4576. };
  4577. unsafe {
  4578. instance.get(LoginCryptoResponseUnion::new)
  4579. }
  4580. }
  4581. }
  4582. impl ::protobuf::Clear for LoginCryptoResponseUnion {
  4583. fn clear(&mut self) {
  4584. self.diffie_hellman.clear();
  4585. self.unknown_fields.clear();
  4586. }
  4587. }
  4588. impl ::std::fmt::Debug for LoginCryptoResponseUnion {
  4589. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4590. ::protobuf::text_format::fmt(self, f)
  4591. }
  4592. }
  4593. impl ::protobuf::reflect::ProtobufValue for LoginCryptoResponseUnion {
  4594. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4595. ::protobuf::reflect::ProtobufValueRef::Message(self)
  4596. }
  4597. }
  4598. #[derive(PartialEq,Clone,Default)]
  4599. pub struct LoginCryptoDiffieHellmanResponse {
  4600. // message fields
  4601. hmac: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  4602. // special fields
  4603. pub unknown_fields: ::protobuf::UnknownFields,
  4604. pub cached_size: ::protobuf::CachedSize,
  4605. }
  4606. impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanResponse {
  4607. fn default() -> &'a LoginCryptoDiffieHellmanResponse {
  4608. <LoginCryptoDiffieHellmanResponse as ::protobuf::Message>::default_instance()
  4609. }
  4610. }
  4611. impl LoginCryptoDiffieHellmanResponse {
  4612. pub fn new() -> LoginCryptoDiffieHellmanResponse {
  4613. ::std::default::Default::default()
  4614. }
  4615. // required bytes hmac = 10;
  4616. pub fn get_hmac(&self) -> &[u8] {
  4617. match self.hmac.as_ref() {
  4618. Some(v) => &v,
  4619. None => &[],
  4620. }
  4621. }
  4622. pub fn clear_hmac(&mut self) {
  4623. self.hmac.clear();
  4624. }
  4625. pub fn has_hmac(&self) -> bool {
  4626. self.hmac.is_some()
  4627. }
  4628. // Param is passed by value, moved
  4629. pub fn set_hmac(&mut self, v: ::std::vec::Vec<u8>) {
  4630. self.hmac = ::protobuf::SingularField::some(v);
  4631. }
  4632. // Mutable pointer to the field.
  4633. // If field is not initialized, it is initialized with default value first.
  4634. pub fn mut_hmac(&mut self) -> &mut ::std::vec::Vec<u8> {
  4635. if self.hmac.is_none() {
  4636. self.hmac.set_default();
  4637. }
  4638. self.hmac.as_mut().unwrap()
  4639. }
  4640. // Take field
  4641. pub fn take_hmac(&mut self) -> ::std::vec::Vec<u8> {
  4642. self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new())
  4643. }
  4644. }
  4645. impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse {
  4646. fn is_initialized(&self) -> bool {
  4647. if self.hmac.is_none() {
  4648. return false;
  4649. }
  4650. true
  4651. }
  4652. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4653. while !is.eof()? {
  4654. let (field_number, wire_type) = is.read_tag_unpack()?;
  4655. match field_number {
  4656. 10 => {
  4657. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hmac)?;
  4658. },
  4659. _ => {
  4660. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4661. },
  4662. };
  4663. }
  4664. ::std::result::Result::Ok(())
  4665. }
  4666. // Compute sizes of nested messages
  4667. #[allow(unused_variables)]
  4668. fn compute_size(&self) -> u32 {
  4669. let mut my_size = 0;
  4670. if let Some(ref v) = self.hmac.as_ref() {
  4671. my_size += ::protobuf::rt::bytes_size(10, &v);
  4672. }
  4673. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4674. self.cached_size.set(my_size);
  4675. my_size
  4676. }
  4677. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4678. if let Some(ref v) = self.hmac.as_ref() {
  4679. os.write_bytes(10, &v)?;
  4680. }
  4681. os.write_unknown_fields(self.get_unknown_fields())?;
  4682. ::std::result::Result::Ok(())
  4683. }
  4684. fn get_cached_size(&self) -> u32 {
  4685. self.cached_size.get()
  4686. }
  4687. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4688. &self.unknown_fields
  4689. }
  4690. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4691. &mut self.unknown_fields
  4692. }
  4693. fn as_any(&self) -> &dyn (::std::any::Any) {
  4694. self as &dyn (::std::any::Any)
  4695. }
  4696. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4697. self as &mut dyn (::std::any::Any)
  4698. }
  4699. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4700. self
  4701. }
  4702. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4703. Self::descriptor_static()
  4704. }
  4705. fn new() -> LoginCryptoDiffieHellmanResponse {
  4706. LoginCryptoDiffieHellmanResponse::new()
  4707. }
  4708. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4709. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  4710. lock: ::protobuf::lazy::ONCE_INIT,
  4711. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  4712. };
  4713. unsafe {
  4714. descriptor.get(|| {
  4715. let mut fields = ::std::vec::Vec::new();
  4716. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  4717. "hmac",
  4718. |m: &LoginCryptoDiffieHellmanResponse| { &m.hmac },
  4719. |m: &mut LoginCryptoDiffieHellmanResponse| { &mut m.hmac },
  4720. ));
  4721. ::protobuf::reflect::MessageDescriptor::new::<LoginCryptoDiffieHellmanResponse>(
  4722. "LoginCryptoDiffieHellmanResponse",
  4723. fields,
  4724. file_descriptor_proto()
  4725. )
  4726. })
  4727. }
  4728. }
  4729. fn default_instance() -> &'static LoginCryptoDiffieHellmanResponse {
  4730. static mut instance: ::protobuf::lazy::Lazy<LoginCryptoDiffieHellmanResponse> = ::protobuf::lazy::Lazy {
  4731. lock: ::protobuf::lazy::ONCE_INIT,
  4732. ptr: 0 as *const LoginCryptoDiffieHellmanResponse,
  4733. };
  4734. unsafe {
  4735. instance.get(LoginCryptoDiffieHellmanResponse::new)
  4736. }
  4737. }
  4738. }
  4739. impl ::protobuf::Clear for LoginCryptoDiffieHellmanResponse {
  4740. fn clear(&mut self) {
  4741. self.hmac.clear();
  4742. self.unknown_fields.clear();
  4743. }
  4744. }
  4745. impl ::std::fmt::Debug for LoginCryptoDiffieHellmanResponse {
  4746. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4747. ::protobuf::text_format::fmt(self, f)
  4748. }
  4749. }
  4750. impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanResponse {
  4751. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4752. ::protobuf::reflect::ProtobufValueRef::Message(self)
  4753. }
  4754. }
  4755. #[derive(PartialEq,Clone,Default)]
  4756. pub struct PoWResponseUnion {
  4757. // message fields
  4758. hash_cash: ::protobuf::SingularPtrField<PoWHashCashResponse>,
  4759. // special fields
  4760. pub unknown_fields: ::protobuf::UnknownFields,
  4761. pub cached_size: ::protobuf::CachedSize,
  4762. }
  4763. impl<'a> ::std::default::Default for &'a PoWResponseUnion {
  4764. fn default() -> &'a PoWResponseUnion {
  4765. <PoWResponseUnion as ::protobuf::Message>::default_instance()
  4766. }
  4767. }
  4768. impl PoWResponseUnion {
  4769. pub fn new() -> PoWResponseUnion {
  4770. ::std::default::Default::default()
  4771. }
  4772. // optional .PoWHashCashResponse hash_cash = 10;
  4773. pub fn get_hash_cash(&self) -> &PoWHashCashResponse {
  4774. self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashResponse::default_instance())
  4775. }
  4776. pub fn clear_hash_cash(&mut self) {
  4777. self.hash_cash.clear();
  4778. }
  4779. pub fn has_hash_cash(&self) -> bool {
  4780. self.hash_cash.is_some()
  4781. }
  4782. // Param is passed by value, moved
  4783. pub fn set_hash_cash(&mut self, v: PoWHashCashResponse) {
  4784. self.hash_cash = ::protobuf::SingularPtrField::some(v);
  4785. }
  4786. // Mutable pointer to the field.
  4787. // If field is not initialized, it is initialized with default value first.
  4788. pub fn mut_hash_cash(&mut self) -> &mut PoWHashCashResponse {
  4789. if self.hash_cash.is_none() {
  4790. self.hash_cash.set_default();
  4791. }
  4792. self.hash_cash.as_mut().unwrap()
  4793. }
  4794. // Take field
  4795. pub fn take_hash_cash(&mut self) -> PoWHashCashResponse {
  4796. self.hash_cash.take().unwrap_or_else(|| PoWHashCashResponse::new())
  4797. }
  4798. }
  4799. impl ::protobuf::Message for PoWResponseUnion {
  4800. fn is_initialized(&self) -> bool {
  4801. for v in &self.hash_cash {
  4802. if !v.is_initialized() {
  4803. return false;
  4804. }
  4805. };
  4806. true
  4807. }
  4808. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4809. while !is.eof()? {
  4810. let (field_number, wire_type) = is.read_tag_unpack()?;
  4811. match field_number {
  4812. 10 => {
  4813. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hash_cash)?;
  4814. },
  4815. _ => {
  4816. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4817. },
  4818. };
  4819. }
  4820. ::std::result::Result::Ok(())
  4821. }
  4822. // Compute sizes of nested messages
  4823. #[allow(unused_variables)]
  4824. fn compute_size(&self) -> u32 {
  4825. let mut my_size = 0;
  4826. if let Some(ref v) = self.hash_cash.as_ref() {
  4827. let len = v.compute_size();
  4828. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4829. }
  4830. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4831. self.cached_size.set(my_size);
  4832. my_size
  4833. }
  4834. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4835. if let Some(ref v) = self.hash_cash.as_ref() {
  4836. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4837. os.write_raw_varint32(v.get_cached_size())?;
  4838. v.write_to_with_cached_sizes(os)?;
  4839. }
  4840. os.write_unknown_fields(self.get_unknown_fields())?;
  4841. ::std::result::Result::Ok(())
  4842. }
  4843. fn get_cached_size(&self) -> u32 {
  4844. self.cached_size.get()
  4845. }
  4846. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4847. &self.unknown_fields
  4848. }
  4849. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4850. &mut self.unknown_fields
  4851. }
  4852. fn as_any(&self) -> &dyn (::std::any::Any) {
  4853. self as &dyn (::std::any::Any)
  4854. }
  4855. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4856. self as &mut dyn (::std::any::Any)
  4857. }
  4858. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4859. self
  4860. }
  4861. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4862. Self::descriptor_static()
  4863. }
  4864. fn new() -> PoWResponseUnion {
  4865. PoWResponseUnion::new()
  4866. }
  4867. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4868. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  4869. lock: ::protobuf::lazy::ONCE_INIT,
  4870. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  4871. };
  4872. unsafe {
  4873. descriptor.get(|| {
  4874. let mut fields = ::std::vec::Vec::new();
  4875. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PoWHashCashResponse>>(
  4876. "hash_cash",
  4877. |m: &PoWResponseUnion| { &m.hash_cash },
  4878. |m: &mut PoWResponseUnion| { &mut m.hash_cash },
  4879. ));
  4880. ::protobuf::reflect::MessageDescriptor::new::<PoWResponseUnion>(
  4881. "PoWResponseUnion",
  4882. fields,
  4883. file_descriptor_proto()
  4884. )
  4885. })
  4886. }
  4887. }
  4888. fn default_instance() -> &'static PoWResponseUnion {
  4889. static mut instance: ::protobuf::lazy::Lazy<PoWResponseUnion> = ::protobuf::lazy::Lazy {
  4890. lock: ::protobuf::lazy::ONCE_INIT,
  4891. ptr: 0 as *const PoWResponseUnion,
  4892. };
  4893. unsafe {
  4894. instance.get(PoWResponseUnion::new)
  4895. }
  4896. }
  4897. }
  4898. impl ::protobuf::Clear for PoWResponseUnion {
  4899. fn clear(&mut self) {
  4900. self.hash_cash.clear();
  4901. self.unknown_fields.clear();
  4902. }
  4903. }
  4904. impl ::std::fmt::Debug for PoWResponseUnion {
  4905. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4906. ::protobuf::text_format::fmt(self, f)
  4907. }
  4908. }
  4909. impl ::protobuf::reflect::ProtobufValue for PoWResponseUnion {
  4910. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  4911. ::protobuf::reflect::ProtobufValueRef::Message(self)
  4912. }
  4913. }
  4914. #[derive(PartialEq,Clone,Default)]
  4915. pub struct PoWHashCashResponse {
  4916. // message fields
  4917. hash_suffix: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  4918. // special fields
  4919. pub unknown_fields: ::protobuf::UnknownFields,
  4920. pub cached_size: ::protobuf::CachedSize,
  4921. }
  4922. impl<'a> ::std::default::Default for &'a PoWHashCashResponse {
  4923. fn default() -> &'a PoWHashCashResponse {
  4924. <PoWHashCashResponse as ::protobuf::Message>::default_instance()
  4925. }
  4926. }
  4927. impl PoWHashCashResponse {
  4928. pub fn new() -> PoWHashCashResponse {
  4929. ::std::default::Default::default()
  4930. }
  4931. // required bytes hash_suffix = 10;
  4932. pub fn get_hash_suffix(&self) -> &[u8] {
  4933. match self.hash_suffix.as_ref() {
  4934. Some(v) => &v,
  4935. None => &[],
  4936. }
  4937. }
  4938. pub fn clear_hash_suffix(&mut self) {
  4939. self.hash_suffix.clear();
  4940. }
  4941. pub fn has_hash_suffix(&self) -> bool {
  4942. self.hash_suffix.is_some()
  4943. }
  4944. // Param is passed by value, moved
  4945. pub fn set_hash_suffix(&mut self, v: ::std::vec::Vec<u8>) {
  4946. self.hash_suffix = ::protobuf::SingularField::some(v);
  4947. }
  4948. // Mutable pointer to the field.
  4949. // If field is not initialized, it is initialized with default value first.
  4950. pub fn mut_hash_suffix(&mut self) -> &mut ::std::vec::Vec<u8> {
  4951. if self.hash_suffix.is_none() {
  4952. self.hash_suffix.set_default();
  4953. }
  4954. self.hash_suffix.as_mut().unwrap()
  4955. }
  4956. // Take field
  4957. pub fn take_hash_suffix(&mut self) -> ::std::vec::Vec<u8> {
  4958. self.hash_suffix.take().unwrap_or_else(|| ::std::vec::Vec::new())
  4959. }
  4960. }
  4961. impl ::protobuf::Message for PoWHashCashResponse {
  4962. fn is_initialized(&self) -> bool {
  4963. if self.hash_suffix.is_none() {
  4964. return false;
  4965. }
  4966. true
  4967. }
  4968. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4969. while !is.eof()? {
  4970. let (field_number, wire_type) = is.read_tag_unpack()?;
  4971. match field_number {
  4972. 10 => {
  4973. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hash_suffix)?;
  4974. },
  4975. _ => {
  4976. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4977. },
  4978. };
  4979. }
  4980. ::std::result::Result::Ok(())
  4981. }
  4982. // Compute sizes of nested messages
  4983. #[allow(unused_variables)]
  4984. fn compute_size(&self) -> u32 {
  4985. let mut my_size = 0;
  4986. if let Some(ref v) = self.hash_suffix.as_ref() {
  4987. my_size += ::protobuf::rt::bytes_size(10, &v);
  4988. }
  4989. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4990. self.cached_size.set(my_size);
  4991. my_size
  4992. }
  4993. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4994. if let Some(ref v) = self.hash_suffix.as_ref() {
  4995. os.write_bytes(10, &v)?;
  4996. }
  4997. os.write_unknown_fields(self.get_unknown_fields())?;
  4998. ::std::result::Result::Ok(())
  4999. }
  5000. fn get_cached_size(&self) -> u32 {
  5001. self.cached_size.get()
  5002. }
  5003. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5004. &self.unknown_fields
  5005. }
  5006. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5007. &mut self.unknown_fields
  5008. }
  5009. fn as_any(&self) -> &dyn (::std::any::Any) {
  5010. self as &dyn (::std::any::Any)
  5011. }
  5012. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5013. self as &mut dyn (::std::any::Any)
  5014. }
  5015. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5016. self
  5017. }
  5018. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5019. Self::descriptor_static()
  5020. }
  5021. fn new() -> PoWHashCashResponse {
  5022. PoWHashCashResponse::new()
  5023. }
  5024. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5025. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  5026. lock: ::protobuf::lazy::ONCE_INIT,
  5027. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  5028. };
  5029. unsafe {
  5030. descriptor.get(|| {
  5031. let mut fields = ::std::vec::Vec::new();
  5032. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  5033. "hash_suffix",
  5034. |m: &PoWHashCashResponse| { &m.hash_suffix },
  5035. |m: &mut PoWHashCashResponse| { &mut m.hash_suffix },
  5036. ));
  5037. ::protobuf::reflect::MessageDescriptor::new::<PoWHashCashResponse>(
  5038. "PoWHashCashResponse",
  5039. fields,
  5040. file_descriptor_proto()
  5041. )
  5042. })
  5043. }
  5044. }
  5045. fn default_instance() -> &'static PoWHashCashResponse {
  5046. static mut instance: ::protobuf::lazy::Lazy<PoWHashCashResponse> = ::protobuf::lazy::Lazy {
  5047. lock: ::protobuf::lazy::ONCE_INIT,
  5048. ptr: 0 as *const PoWHashCashResponse,
  5049. };
  5050. unsafe {
  5051. instance.get(PoWHashCashResponse::new)
  5052. }
  5053. }
  5054. }
  5055. impl ::protobuf::Clear for PoWHashCashResponse {
  5056. fn clear(&mut self) {
  5057. self.hash_suffix.clear();
  5058. self.unknown_fields.clear();
  5059. }
  5060. }
  5061. impl ::std::fmt::Debug for PoWHashCashResponse {
  5062. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5063. ::protobuf::text_format::fmt(self, f)
  5064. }
  5065. }
  5066. impl ::protobuf::reflect::ProtobufValue for PoWHashCashResponse {
  5067. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5068. ::protobuf::reflect::ProtobufValueRef::Message(self)
  5069. }
  5070. }
  5071. #[derive(PartialEq,Clone,Default)]
  5072. pub struct CryptoResponseUnion {
  5073. // message fields
  5074. shannon: ::protobuf::SingularPtrField<CryptoShannonResponse>,
  5075. rc4_sha1_hmac: ::protobuf::SingularPtrField<CryptoRc4Sha1HmacResponse>,
  5076. // special fields
  5077. pub unknown_fields: ::protobuf::UnknownFields,
  5078. pub cached_size: ::protobuf::CachedSize,
  5079. }
  5080. impl<'a> ::std::default::Default for &'a CryptoResponseUnion {
  5081. fn default() -> &'a CryptoResponseUnion {
  5082. <CryptoResponseUnion as ::protobuf::Message>::default_instance()
  5083. }
  5084. }
  5085. impl CryptoResponseUnion {
  5086. pub fn new() -> CryptoResponseUnion {
  5087. ::std::default::Default::default()
  5088. }
  5089. // optional .CryptoShannonResponse shannon = 10;
  5090. pub fn get_shannon(&self) -> &CryptoShannonResponse {
  5091. self.shannon.as_ref().unwrap_or_else(|| CryptoShannonResponse::default_instance())
  5092. }
  5093. pub fn clear_shannon(&mut self) {
  5094. self.shannon.clear();
  5095. }
  5096. pub fn has_shannon(&self) -> bool {
  5097. self.shannon.is_some()
  5098. }
  5099. // Param is passed by value, moved
  5100. pub fn set_shannon(&mut self, v: CryptoShannonResponse) {
  5101. self.shannon = ::protobuf::SingularPtrField::some(v);
  5102. }
  5103. // Mutable pointer to the field.
  5104. // If field is not initialized, it is initialized with default value first.
  5105. pub fn mut_shannon(&mut self) -> &mut CryptoShannonResponse {
  5106. if self.shannon.is_none() {
  5107. self.shannon.set_default();
  5108. }
  5109. self.shannon.as_mut().unwrap()
  5110. }
  5111. // Take field
  5112. pub fn take_shannon(&mut self) -> CryptoShannonResponse {
  5113. self.shannon.take().unwrap_or_else(|| CryptoShannonResponse::new())
  5114. }
  5115. // optional .CryptoRc4Sha1HmacResponse rc4_sha1_hmac = 20;
  5116. pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse {
  5117. self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance())
  5118. }
  5119. pub fn clear_rc4_sha1_hmac(&mut self) {
  5120. self.rc4_sha1_hmac.clear();
  5121. }
  5122. pub fn has_rc4_sha1_hmac(&self) -> bool {
  5123. self.rc4_sha1_hmac.is_some()
  5124. }
  5125. // Param is passed by value, moved
  5126. pub fn set_rc4_sha1_hmac(&mut self, v: CryptoRc4Sha1HmacResponse) {
  5127. self.rc4_sha1_hmac = ::protobuf::SingularPtrField::some(v);
  5128. }
  5129. // Mutable pointer to the field.
  5130. // If field is not initialized, it is initialized with default value first.
  5131. pub fn mut_rc4_sha1_hmac(&mut self) -> &mut CryptoRc4Sha1HmacResponse {
  5132. if self.rc4_sha1_hmac.is_none() {
  5133. self.rc4_sha1_hmac.set_default();
  5134. }
  5135. self.rc4_sha1_hmac.as_mut().unwrap()
  5136. }
  5137. // Take field
  5138. pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacResponse {
  5139. self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::new())
  5140. }
  5141. }
  5142. impl ::protobuf::Message for CryptoResponseUnion {
  5143. fn is_initialized(&self) -> bool {
  5144. for v in &self.shannon {
  5145. if !v.is_initialized() {
  5146. return false;
  5147. }
  5148. };
  5149. for v in &self.rc4_sha1_hmac {
  5150. if !v.is_initialized() {
  5151. return false;
  5152. }
  5153. };
  5154. true
  5155. }
  5156. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  5157. while !is.eof()? {
  5158. let (field_number, wire_type) = is.read_tag_unpack()?;
  5159. match field_number {
  5160. 10 => {
  5161. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shannon)?;
  5162. },
  5163. 20 => {
  5164. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rc4_sha1_hmac)?;
  5165. },
  5166. _ => {
  5167. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  5168. },
  5169. };
  5170. }
  5171. ::std::result::Result::Ok(())
  5172. }
  5173. // Compute sizes of nested messages
  5174. #[allow(unused_variables)]
  5175. fn compute_size(&self) -> u32 {
  5176. let mut my_size = 0;
  5177. if let Some(ref v) = self.shannon.as_ref() {
  5178. let len = v.compute_size();
  5179. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  5180. }
  5181. if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
  5182. let len = v.compute_size();
  5183. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  5184. }
  5185. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5186. self.cached_size.set(my_size);
  5187. my_size
  5188. }
  5189. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  5190. if let Some(ref v) = self.shannon.as_ref() {
  5191. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  5192. os.write_raw_varint32(v.get_cached_size())?;
  5193. v.write_to_with_cached_sizes(os)?;
  5194. }
  5195. if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
  5196. os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  5197. os.write_raw_varint32(v.get_cached_size())?;
  5198. v.write_to_with_cached_sizes(os)?;
  5199. }
  5200. os.write_unknown_fields(self.get_unknown_fields())?;
  5201. ::std::result::Result::Ok(())
  5202. }
  5203. fn get_cached_size(&self) -> u32 {
  5204. self.cached_size.get()
  5205. }
  5206. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5207. &self.unknown_fields
  5208. }
  5209. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5210. &mut self.unknown_fields
  5211. }
  5212. fn as_any(&self) -> &dyn (::std::any::Any) {
  5213. self as &dyn (::std::any::Any)
  5214. }
  5215. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5216. self as &mut dyn (::std::any::Any)
  5217. }
  5218. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5219. self
  5220. }
  5221. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5222. Self::descriptor_static()
  5223. }
  5224. fn new() -> CryptoResponseUnion {
  5225. CryptoResponseUnion::new()
  5226. }
  5227. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5228. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  5229. lock: ::protobuf::lazy::ONCE_INIT,
  5230. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  5231. };
  5232. unsafe {
  5233. descriptor.get(|| {
  5234. let mut fields = ::std::vec::Vec::new();
  5235. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CryptoShannonResponse>>(
  5236. "shannon",
  5237. |m: &CryptoResponseUnion| { &m.shannon },
  5238. |m: &mut CryptoResponseUnion| { &mut m.shannon },
  5239. ));
  5240. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<CryptoRc4Sha1HmacResponse>>(
  5241. "rc4_sha1_hmac",
  5242. |m: &CryptoResponseUnion| { &m.rc4_sha1_hmac },
  5243. |m: &mut CryptoResponseUnion| { &mut m.rc4_sha1_hmac },
  5244. ));
  5245. ::protobuf::reflect::MessageDescriptor::new::<CryptoResponseUnion>(
  5246. "CryptoResponseUnion",
  5247. fields,
  5248. file_descriptor_proto()
  5249. )
  5250. })
  5251. }
  5252. }
  5253. fn default_instance() -> &'static CryptoResponseUnion {
  5254. static mut instance: ::protobuf::lazy::Lazy<CryptoResponseUnion> = ::protobuf::lazy::Lazy {
  5255. lock: ::protobuf::lazy::ONCE_INIT,
  5256. ptr: 0 as *const CryptoResponseUnion,
  5257. };
  5258. unsafe {
  5259. instance.get(CryptoResponseUnion::new)
  5260. }
  5261. }
  5262. }
  5263. impl ::protobuf::Clear for CryptoResponseUnion {
  5264. fn clear(&mut self) {
  5265. self.shannon.clear();
  5266. self.rc4_sha1_hmac.clear();
  5267. self.unknown_fields.clear();
  5268. }
  5269. }
  5270. impl ::std::fmt::Debug for CryptoResponseUnion {
  5271. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5272. ::protobuf::text_format::fmt(self, f)
  5273. }
  5274. }
  5275. impl ::protobuf::reflect::ProtobufValue for CryptoResponseUnion {
  5276. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5277. ::protobuf::reflect::ProtobufValueRef::Message(self)
  5278. }
  5279. }
  5280. #[derive(PartialEq,Clone,Default)]
  5281. pub struct CryptoShannonResponse {
  5282. // message fields
  5283. dummy: ::std::option::Option<i32>,
  5284. // special fields
  5285. pub unknown_fields: ::protobuf::UnknownFields,
  5286. pub cached_size: ::protobuf::CachedSize,
  5287. }
  5288. impl<'a> ::std::default::Default for &'a CryptoShannonResponse {
  5289. fn default() -> &'a CryptoShannonResponse {
  5290. <CryptoShannonResponse as ::protobuf::Message>::default_instance()
  5291. }
  5292. }
  5293. impl CryptoShannonResponse {
  5294. pub fn new() -> CryptoShannonResponse {
  5295. ::std::default::Default::default()
  5296. }
  5297. // optional int32 dummy = 1;
  5298. pub fn get_dummy(&self) -> i32 {
  5299. self.dummy.unwrap_or(0)
  5300. }
  5301. pub fn clear_dummy(&mut self) {
  5302. self.dummy = ::std::option::Option::None;
  5303. }
  5304. pub fn has_dummy(&self) -> bool {
  5305. self.dummy.is_some()
  5306. }
  5307. // Param is passed by value, moved
  5308. pub fn set_dummy(&mut self, v: i32) {
  5309. self.dummy = ::std::option::Option::Some(v);
  5310. }
  5311. }
  5312. impl ::protobuf::Message for CryptoShannonResponse {
  5313. fn is_initialized(&self) -> bool {
  5314. true
  5315. }
  5316. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  5317. while !is.eof()? {
  5318. let (field_number, wire_type) = is.read_tag_unpack()?;
  5319. match field_number {
  5320. 1 => {
  5321. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  5322. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  5323. }
  5324. let tmp = is.read_int32()?;
  5325. self.dummy = ::std::option::Option::Some(tmp);
  5326. },
  5327. _ => {
  5328. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  5329. },
  5330. };
  5331. }
  5332. ::std::result::Result::Ok(())
  5333. }
  5334. // Compute sizes of nested messages
  5335. #[allow(unused_variables)]
  5336. fn compute_size(&self) -> u32 {
  5337. let mut my_size = 0;
  5338. if let Some(v) = self.dummy {
  5339. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  5340. }
  5341. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5342. self.cached_size.set(my_size);
  5343. my_size
  5344. }
  5345. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  5346. if let Some(v) = self.dummy {
  5347. os.write_int32(1, v)?;
  5348. }
  5349. os.write_unknown_fields(self.get_unknown_fields())?;
  5350. ::std::result::Result::Ok(())
  5351. }
  5352. fn get_cached_size(&self) -> u32 {
  5353. self.cached_size.get()
  5354. }
  5355. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5356. &self.unknown_fields
  5357. }
  5358. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5359. &mut self.unknown_fields
  5360. }
  5361. fn as_any(&self) -> &dyn (::std::any::Any) {
  5362. self as &dyn (::std::any::Any)
  5363. }
  5364. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5365. self as &mut dyn (::std::any::Any)
  5366. }
  5367. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5368. self
  5369. }
  5370. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5371. Self::descriptor_static()
  5372. }
  5373. fn new() -> CryptoShannonResponse {
  5374. CryptoShannonResponse::new()
  5375. }
  5376. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5377. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  5378. lock: ::protobuf::lazy::ONCE_INIT,
  5379. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  5380. };
  5381. unsafe {
  5382. descriptor.get(|| {
  5383. let mut fields = ::std::vec::Vec::new();
  5384. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  5385. "dummy",
  5386. |m: &CryptoShannonResponse| { &m.dummy },
  5387. |m: &mut CryptoShannonResponse| { &mut m.dummy },
  5388. ));
  5389. ::protobuf::reflect::MessageDescriptor::new::<CryptoShannonResponse>(
  5390. "CryptoShannonResponse",
  5391. fields,
  5392. file_descriptor_proto()
  5393. )
  5394. })
  5395. }
  5396. }
  5397. fn default_instance() -> &'static CryptoShannonResponse {
  5398. static mut instance: ::protobuf::lazy::Lazy<CryptoShannonResponse> = ::protobuf::lazy::Lazy {
  5399. lock: ::protobuf::lazy::ONCE_INIT,
  5400. ptr: 0 as *const CryptoShannonResponse,
  5401. };
  5402. unsafe {
  5403. instance.get(CryptoShannonResponse::new)
  5404. }
  5405. }
  5406. }
  5407. impl ::protobuf::Clear for CryptoShannonResponse {
  5408. fn clear(&mut self) {
  5409. self.dummy = ::std::option::Option::None;
  5410. self.unknown_fields.clear();
  5411. }
  5412. }
  5413. impl ::std::fmt::Debug for CryptoShannonResponse {
  5414. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5415. ::protobuf::text_format::fmt(self, f)
  5416. }
  5417. }
  5418. impl ::protobuf::reflect::ProtobufValue for CryptoShannonResponse {
  5419. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5420. ::protobuf::reflect::ProtobufValueRef::Message(self)
  5421. }
  5422. }
  5423. #[derive(PartialEq,Clone,Default)]
  5424. pub struct CryptoRc4Sha1HmacResponse {
  5425. // message fields
  5426. dummy: ::std::option::Option<i32>,
  5427. // special fields
  5428. pub unknown_fields: ::protobuf::UnknownFields,
  5429. pub cached_size: ::protobuf::CachedSize,
  5430. }
  5431. impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacResponse {
  5432. fn default() -> &'a CryptoRc4Sha1HmacResponse {
  5433. <CryptoRc4Sha1HmacResponse as ::protobuf::Message>::default_instance()
  5434. }
  5435. }
  5436. impl CryptoRc4Sha1HmacResponse {
  5437. pub fn new() -> CryptoRc4Sha1HmacResponse {
  5438. ::std::default::Default::default()
  5439. }
  5440. // optional int32 dummy = 1;
  5441. pub fn get_dummy(&self) -> i32 {
  5442. self.dummy.unwrap_or(0)
  5443. }
  5444. pub fn clear_dummy(&mut self) {
  5445. self.dummy = ::std::option::Option::None;
  5446. }
  5447. pub fn has_dummy(&self) -> bool {
  5448. self.dummy.is_some()
  5449. }
  5450. // Param is passed by value, moved
  5451. pub fn set_dummy(&mut self, v: i32) {
  5452. self.dummy = ::std::option::Option::Some(v);
  5453. }
  5454. }
  5455. impl ::protobuf::Message for CryptoRc4Sha1HmacResponse {
  5456. fn is_initialized(&self) -> bool {
  5457. true
  5458. }
  5459. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  5460. while !is.eof()? {
  5461. let (field_number, wire_type) = is.read_tag_unpack()?;
  5462. match field_number {
  5463. 1 => {
  5464. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  5465. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  5466. }
  5467. let tmp = is.read_int32()?;
  5468. self.dummy = ::std::option::Option::Some(tmp);
  5469. },
  5470. _ => {
  5471. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  5472. },
  5473. };
  5474. }
  5475. ::std::result::Result::Ok(())
  5476. }
  5477. // Compute sizes of nested messages
  5478. #[allow(unused_variables)]
  5479. fn compute_size(&self) -> u32 {
  5480. let mut my_size = 0;
  5481. if let Some(v) = self.dummy {
  5482. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  5483. }
  5484. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5485. self.cached_size.set(my_size);
  5486. my_size
  5487. }
  5488. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  5489. if let Some(v) = self.dummy {
  5490. os.write_int32(1, v)?;
  5491. }
  5492. os.write_unknown_fields(self.get_unknown_fields())?;
  5493. ::std::result::Result::Ok(())
  5494. }
  5495. fn get_cached_size(&self) -> u32 {
  5496. self.cached_size.get()
  5497. }
  5498. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5499. &self.unknown_fields
  5500. }
  5501. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5502. &mut self.unknown_fields
  5503. }
  5504. fn as_any(&self) -> &dyn (::std::any::Any) {
  5505. self as &dyn (::std::any::Any)
  5506. }
  5507. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5508. self as &mut dyn (::std::any::Any)
  5509. }
  5510. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5511. self
  5512. }
  5513. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5514. Self::descriptor_static()
  5515. }
  5516. fn new() -> CryptoRc4Sha1HmacResponse {
  5517. CryptoRc4Sha1HmacResponse::new()
  5518. }
  5519. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5520. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  5521. lock: ::protobuf::lazy::ONCE_INIT,
  5522. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  5523. };
  5524. unsafe {
  5525. descriptor.get(|| {
  5526. let mut fields = ::std::vec::Vec::new();
  5527. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  5528. "dummy",
  5529. |m: &CryptoRc4Sha1HmacResponse| { &m.dummy },
  5530. |m: &mut CryptoRc4Sha1HmacResponse| { &mut m.dummy },
  5531. ));
  5532. ::protobuf::reflect::MessageDescriptor::new::<CryptoRc4Sha1HmacResponse>(
  5533. "CryptoRc4Sha1HmacResponse",
  5534. fields,
  5535. file_descriptor_proto()
  5536. )
  5537. })
  5538. }
  5539. }
  5540. fn default_instance() -> &'static CryptoRc4Sha1HmacResponse {
  5541. static mut instance: ::protobuf::lazy::Lazy<CryptoRc4Sha1HmacResponse> = ::protobuf::lazy::Lazy {
  5542. lock: ::protobuf::lazy::ONCE_INIT,
  5543. ptr: 0 as *const CryptoRc4Sha1HmacResponse,
  5544. };
  5545. unsafe {
  5546. instance.get(CryptoRc4Sha1HmacResponse::new)
  5547. }
  5548. }
  5549. }
  5550. impl ::protobuf::Clear for CryptoRc4Sha1HmacResponse {
  5551. fn clear(&mut self) {
  5552. self.dummy = ::std::option::Option::None;
  5553. self.unknown_fields.clear();
  5554. }
  5555. }
  5556. impl ::std::fmt::Debug for CryptoRc4Sha1HmacResponse {
  5557. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5558. ::protobuf::text_format::fmt(self, f)
  5559. }
  5560. }
  5561. impl ::protobuf::reflect::ProtobufValue for CryptoRc4Sha1HmacResponse {
  5562. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5563. ::protobuf::reflect::ProtobufValueRef::Message(self)
  5564. }
  5565. }
  5566. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5567. pub enum Product {
  5568. PRODUCT_CLIENT = 0,
  5569. PRODUCT_LIBSPOTIFY = 1,
  5570. PRODUCT_MOBILE = 2,
  5571. PRODUCT_PARTNER = 3,
  5572. PRODUCT_LIBSPOTIFY_EMBEDDED = 5,
  5573. }
  5574. impl ::protobuf::ProtobufEnum for Product {
  5575. fn value(&self) -> i32 {
  5576. *self as i32
  5577. }
  5578. fn from_i32(value: i32) -> ::std::option::Option<Product> {
  5579. match value {
  5580. 0 => ::std::option::Option::Some(Product::PRODUCT_CLIENT),
  5581. 1 => ::std::option::Option::Some(Product::PRODUCT_LIBSPOTIFY),
  5582. 2 => ::std::option::Option::Some(Product::PRODUCT_MOBILE),
  5583. 3 => ::std::option::Option::Some(Product::PRODUCT_PARTNER),
  5584. 5 => ::std::option::Option::Some(Product::PRODUCT_LIBSPOTIFY_EMBEDDED),
  5585. _ => ::std::option::Option::None
  5586. }
  5587. }
  5588. fn values() -> &'static [Self] {
  5589. static values: &'static [Product] = &[
  5590. Product::PRODUCT_CLIENT,
  5591. Product::PRODUCT_LIBSPOTIFY,
  5592. Product::PRODUCT_MOBILE,
  5593. Product::PRODUCT_PARTNER,
  5594. Product::PRODUCT_LIBSPOTIFY_EMBEDDED,
  5595. ];
  5596. values
  5597. }
  5598. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5599. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5600. lock: ::protobuf::lazy::ONCE_INIT,
  5601. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5602. };
  5603. unsafe {
  5604. descriptor.get(|| {
  5605. ::protobuf::reflect::EnumDescriptor::new("Product", file_descriptor_proto())
  5606. })
  5607. }
  5608. }
  5609. }
  5610. impl ::std::marker::Copy for Product {
  5611. }
  5612. impl ::std::default::Default for Product {
  5613. fn default() -> Self {
  5614. Product::PRODUCT_CLIENT
  5615. }
  5616. }
  5617. impl ::protobuf::reflect::ProtobufValue for Product {
  5618. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5619. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5620. }
  5621. }
  5622. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5623. pub enum ProductFlags {
  5624. PRODUCT_FLAG_NONE = 0,
  5625. PRODUCT_FLAG_DEV_BUILD = 1,
  5626. }
  5627. impl ::protobuf::ProtobufEnum for ProductFlags {
  5628. fn value(&self) -> i32 {
  5629. *self as i32
  5630. }
  5631. fn from_i32(value: i32) -> ::std::option::Option<ProductFlags> {
  5632. match value {
  5633. 0 => ::std::option::Option::Some(ProductFlags::PRODUCT_FLAG_NONE),
  5634. 1 => ::std::option::Option::Some(ProductFlags::PRODUCT_FLAG_DEV_BUILD),
  5635. _ => ::std::option::Option::None
  5636. }
  5637. }
  5638. fn values() -> &'static [Self] {
  5639. static values: &'static [ProductFlags] = &[
  5640. ProductFlags::PRODUCT_FLAG_NONE,
  5641. ProductFlags::PRODUCT_FLAG_DEV_BUILD,
  5642. ];
  5643. values
  5644. }
  5645. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5646. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5647. lock: ::protobuf::lazy::ONCE_INIT,
  5648. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5649. };
  5650. unsafe {
  5651. descriptor.get(|| {
  5652. ::protobuf::reflect::EnumDescriptor::new("ProductFlags", file_descriptor_proto())
  5653. })
  5654. }
  5655. }
  5656. }
  5657. impl ::std::marker::Copy for ProductFlags {
  5658. }
  5659. impl ::std::default::Default for ProductFlags {
  5660. fn default() -> Self {
  5661. ProductFlags::PRODUCT_FLAG_NONE
  5662. }
  5663. }
  5664. impl ::protobuf::reflect::ProtobufValue for ProductFlags {
  5665. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5666. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5667. }
  5668. }
  5669. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5670. pub enum Platform {
  5671. PLATFORM_WIN32_X86 = 0,
  5672. PLATFORM_OSX_X86 = 1,
  5673. PLATFORM_LINUX_X86 = 2,
  5674. PLATFORM_IPHONE_ARM = 3,
  5675. PLATFORM_S60_ARM = 4,
  5676. PLATFORM_OSX_PPC = 5,
  5677. PLATFORM_ANDROID_ARM = 6,
  5678. PLATFORM_WINDOWS_CE_ARM = 7,
  5679. PLATFORM_LINUX_X86_64 = 8,
  5680. PLATFORM_OSX_X86_64 = 9,
  5681. PLATFORM_PALM_ARM = 10,
  5682. PLATFORM_LINUX_SH = 11,
  5683. PLATFORM_FREEBSD_X86 = 12,
  5684. PLATFORM_FREEBSD_X86_64 = 13,
  5685. PLATFORM_BLACKBERRY_ARM = 14,
  5686. PLATFORM_SONOS = 15,
  5687. PLATFORM_LINUX_MIPS = 16,
  5688. PLATFORM_LINUX_ARM = 17,
  5689. PLATFORM_LOGITECH_ARM = 18,
  5690. PLATFORM_LINUX_BLACKFIN = 19,
  5691. PLATFORM_WP7_ARM = 20,
  5692. PLATFORM_ONKYO_ARM = 21,
  5693. PLATFORM_QNXNTO_ARM = 22,
  5694. PLATFORM_BCO_ARM = 23,
  5695. }
  5696. impl ::protobuf::ProtobufEnum for Platform {
  5697. fn value(&self) -> i32 {
  5698. *self as i32
  5699. }
  5700. fn from_i32(value: i32) -> ::std::option::Option<Platform> {
  5701. match value {
  5702. 0 => ::std::option::Option::Some(Platform::PLATFORM_WIN32_X86),
  5703. 1 => ::std::option::Option::Some(Platform::PLATFORM_OSX_X86),
  5704. 2 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_X86),
  5705. 3 => ::std::option::Option::Some(Platform::PLATFORM_IPHONE_ARM),
  5706. 4 => ::std::option::Option::Some(Platform::PLATFORM_S60_ARM),
  5707. 5 => ::std::option::Option::Some(Platform::PLATFORM_OSX_PPC),
  5708. 6 => ::std::option::Option::Some(Platform::PLATFORM_ANDROID_ARM),
  5709. 7 => ::std::option::Option::Some(Platform::PLATFORM_WINDOWS_CE_ARM),
  5710. 8 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_X86_64),
  5711. 9 => ::std::option::Option::Some(Platform::PLATFORM_OSX_X86_64),
  5712. 10 => ::std::option::Option::Some(Platform::PLATFORM_PALM_ARM),
  5713. 11 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_SH),
  5714. 12 => ::std::option::Option::Some(Platform::PLATFORM_FREEBSD_X86),
  5715. 13 => ::std::option::Option::Some(Platform::PLATFORM_FREEBSD_X86_64),
  5716. 14 => ::std::option::Option::Some(Platform::PLATFORM_BLACKBERRY_ARM),
  5717. 15 => ::std::option::Option::Some(Platform::PLATFORM_SONOS),
  5718. 16 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_MIPS),
  5719. 17 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_ARM),
  5720. 18 => ::std::option::Option::Some(Platform::PLATFORM_LOGITECH_ARM),
  5721. 19 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_BLACKFIN),
  5722. 20 => ::std::option::Option::Some(Platform::PLATFORM_WP7_ARM),
  5723. 21 => ::std::option::Option::Some(Platform::PLATFORM_ONKYO_ARM),
  5724. 22 => ::std::option::Option::Some(Platform::PLATFORM_QNXNTO_ARM),
  5725. 23 => ::std::option::Option::Some(Platform::PLATFORM_BCO_ARM),
  5726. _ => ::std::option::Option::None
  5727. }
  5728. }
  5729. fn values() -> &'static [Self] {
  5730. static values: &'static [Platform] = &[
  5731. Platform::PLATFORM_WIN32_X86,
  5732. Platform::PLATFORM_OSX_X86,
  5733. Platform::PLATFORM_LINUX_X86,
  5734. Platform::PLATFORM_IPHONE_ARM,
  5735. Platform::PLATFORM_S60_ARM,
  5736. Platform::PLATFORM_OSX_PPC,
  5737. Platform::PLATFORM_ANDROID_ARM,
  5738. Platform::PLATFORM_WINDOWS_CE_ARM,
  5739. Platform::PLATFORM_LINUX_X86_64,
  5740. Platform::PLATFORM_OSX_X86_64,
  5741. Platform::PLATFORM_PALM_ARM,
  5742. Platform::PLATFORM_LINUX_SH,
  5743. Platform::PLATFORM_FREEBSD_X86,
  5744. Platform::PLATFORM_FREEBSD_X86_64,
  5745. Platform::PLATFORM_BLACKBERRY_ARM,
  5746. Platform::PLATFORM_SONOS,
  5747. Platform::PLATFORM_LINUX_MIPS,
  5748. Platform::PLATFORM_LINUX_ARM,
  5749. Platform::PLATFORM_LOGITECH_ARM,
  5750. Platform::PLATFORM_LINUX_BLACKFIN,
  5751. Platform::PLATFORM_WP7_ARM,
  5752. Platform::PLATFORM_ONKYO_ARM,
  5753. Platform::PLATFORM_QNXNTO_ARM,
  5754. Platform::PLATFORM_BCO_ARM,
  5755. ];
  5756. values
  5757. }
  5758. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5759. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5760. lock: ::protobuf::lazy::ONCE_INIT,
  5761. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5762. };
  5763. unsafe {
  5764. descriptor.get(|| {
  5765. ::protobuf::reflect::EnumDescriptor::new("Platform", file_descriptor_proto())
  5766. })
  5767. }
  5768. }
  5769. }
  5770. impl ::std::marker::Copy for Platform {
  5771. }
  5772. impl ::std::default::Default for Platform {
  5773. fn default() -> Self {
  5774. Platform::PLATFORM_WIN32_X86
  5775. }
  5776. }
  5777. impl ::protobuf::reflect::ProtobufValue for Platform {
  5778. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5779. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5780. }
  5781. }
  5782. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5783. pub enum Fingerprint {
  5784. FINGERPRINT_GRAIN = 0,
  5785. FINGERPRINT_HMAC_RIPEMD = 1,
  5786. }
  5787. impl ::protobuf::ProtobufEnum for Fingerprint {
  5788. fn value(&self) -> i32 {
  5789. *self as i32
  5790. }
  5791. fn from_i32(value: i32) -> ::std::option::Option<Fingerprint> {
  5792. match value {
  5793. 0 => ::std::option::Option::Some(Fingerprint::FINGERPRINT_GRAIN),
  5794. 1 => ::std::option::Option::Some(Fingerprint::FINGERPRINT_HMAC_RIPEMD),
  5795. _ => ::std::option::Option::None
  5796. }
  5797. }
  5798. fn values() -> &'static [Self] {
  5799. static values: &'static [Fingerprint] = &[
  5800. Fingerprint::FINGERPRINT_GRAIN,
  5801. Fingerprint::FINGERPRINT_HMAC_RIPEMD,
  5802. ];
  5803. values
  5804. }
  5805. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5806. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5807. lock: ::protobuf::lazy::ONCE_INIT,
  5808. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5809. };
  5810. unsafe {
  5811. descriptor.get(|| {
  5812. ::protobuf::reflect::EnumDescriptor::new("Fingerprint", file_descriptor_proto())
  5813. })
  5814. }
  5815. }
  5816. }
  5817. impl ::std::marker::Copy for Fingerprint {
  5818. }
  5819. impl ::std::default::Default for Fingerprint {
  5820. fn default() -> Self {
  5821. Fingerprint::FINGERPRINT_GRAIN
  5822. }
  5823. }
  5824. impl ::protobuf::reflect::ProtobufValue for Fingerprint {
  5825. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5826. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5827. }
  5828. }
  5829. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5830. pub enum Cryptosuite {
  5831. CRYPTO_SUITE_SHANNON = 0,
  5832. CRYPTO_SUITE_RC4_SHA1_HMAC = 1,
  5833. }
  5834. impl ::protobuf::ProtobufEnum for Cryptosuite {
  5835. fn value(&self) -> i32 {
  5836. *self as i32
  5837. }
  5838. fn from_i32(value: i32) -> ::std::option::Option<Cryptosuite> {
  5839. match value {
  5840. 0 => ::std::option::Option::Some(Cryptosuite::CRYPTO_SUITE_SHANNON),
  5841. 1 => ::std::option::Option::Some(Cryptosuite::CRYPTO_SUITE_RC4_SHA1_HMAC),
  5842. _ => ::std::option::Option::None
  5843. }
  5844. }
  5845. fn values() -> &'static [Self] {
  5846. static values: &'static [Cryptosuite] = &[
  5847. Cryptosuite::CRYPTO_SUITE_SHANNON,
  5848. Cryptosuite::CRYPTO_SUITE_RC4_SHA1_HMAC,
  5849. ];
  5850. values
  5851. }
  5852. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5853. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5854. lock: ::protobuf::lazy::ONCE_INIT,
  5855. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5856. };
  5857. unsafe {
  5858. descriptor.get(|| {
  5859. ::protobuf::reflect::EnumDescriptor::new("Cryptosuite", file_descriptor_proto())
  5860. })
  5861. }
  5862. }
  5863. }
  5864. impl ::std::marker::Copy for Cryptosuite {
  5865. }
  5866. impl ::std::default::Default for Cryptosuite {
  5867. fn default() -> Self {
  5868. Cryptosuite::CRYPTO_SUITE_SHANNON
  5869. }
  5870. }
  5871. impl ::protobuf::reflect::ProtobufValue for Cryptosuite {
  5872. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5873. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5874. }
  5875. }
  5876. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5877. pub enum Powscheme {
  5878. POW_HASH_CASH = 0,
  5879. }
  5880. impl ::protobuf::ProtobufEnum for Powscheme {
  5881. fn value(&self) -> i32 {
  5882. *self as i32
  5883. }
  5884. fn from_i32(value: i32) -> ::std::option::Option<Powscheme> {
  5885. match value {
  5886. 0 => ::std::option::Option::Some(Powscheme::POW_HASH_CASH),
  5887. _ => ::std::option::Option::None
  5888. }
  5889. }
  5890. fn values() -> &'static [Self] {
  5891. static values: &'static [Powscheme] = &[
  5892. Powscheme::POW_HASH_CASH,
  5893. ];
  5894. values
  5895. }
  5896. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5897. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5898. lock: ::protobuf::lazy::ONCE_INIT,
  5899. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5900. };
  5901. unsafe {
  5902. descriptor.get(|| {
  5903. ::protobuf::reflect::EnumDescriptor::new("Powscheme", file_descriptor_proto())
  5904. })
  5905. }
  5906. }
  5907. }
  5908. impl ::std::marker::Copy for Powscheme {
  5909. }
  5910. impl ::std::default::Default for Powscheme {
  5911. fn default() -> Self {
  5912. Powscheme::POW_HASH_CASH
  5913. }
  5914. }
  5915. impl ::protobuf::reflect::ProtobufValue for Powscheme {
  5916. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5917. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5918. }
  5919. }
  5920. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  5921. pub enum ErrorCode {
  5922. ProtocolError = 0,
  5923. TryAnotherAP = 2,
  5924. BadConnectionId = 5,
  5925. TravelRestriction = 9,
  5926. PremiumAccountRequired = 11,
  5927. BadCredentials = 12,
  5928. CouldNotValidateCredentials = 13,
  5929. AccountExists = 14,
  5930. ExtraVerificationRequired = 15,
  5931. InvalidAppKey = 16,
  5932. ApplicationBanned = 17,
  5933. }
  5934. impl ::protobuf::ProtobufEnum for ErrorCode {
  5935. fn value(&self) -> i32 {
  5936. *self as i32
  5937. }
  5938. fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
  5939. match value {
  5940. 0 => ::std::option::Option::Some(ErrorCode::ProtocolError),
  5941. 2 => ::std::option::Option::Some(ErrorCode::TryAnotherAP),
  5942. 5 => ::std::option::Option::Some(ErrorCode::BadConnectionId),
  5943. 9 => ::std::option::Option::Some(ErrorCode::TravelRestriction),
  5944. 11 => ::std::option::Option::Some(ErrorCode::PremiumAccountRequired),
  5945. 12 => ::std::option::Option::Some(ErrorCode::BadCredentials),
  5946. 13 => ::std::option::Option::Some(ErrorCode::CouldNotValidateCredentials),
  5947. 14 => ::std::option::Option::Some(ErrorCode::AccountExists),
  5948. 15 => ::std::option::Option::Some(ErrorCode::ExtraVerificationRequired),
  5949. 16 => ::std::option::Option::Some(ErrorCode::InvalidAppKey),
  5950. 17 => ::std::option::Option::Some(ErrorCode::ApplicationBanned),
  5951. _ => ::std::option::Option::None
  5952. }
  5953. }
  5954. fn values() -> &'static [Self] {
  5955. static values: &'static [ErrorCode] = &[
  5956. ErrorCode::ProtocolError,
  5957. ErrorCode::TryAnotherAP,
  5958. ErrorCode::BadConnectionId,
  5959. ErrorCode::TravelRestriction,
  5960. ErrorCode::PremiumAccountRequired,
  5961. ErrorCode::BadCredentials,
  5962. ErrorCode::CouldNotValidateCredentials,
  5963. ErrorCode::AccountExists,
  5964. ErrorCode::ExtraVerificationRequired,
  5965. ErrorCode::InvalidAppKey,
  5966. ErrorCode::ApplicationBanned,
  5967. ];
  5968. values
  5969. }
  5970. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5971. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  5972. lock: ::protobuf::lazy::ONCE_INIT,
  5973. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  5974. };
  5975. unsafe {
  5976. descriptor.get(|| {
  5977. ::protobuf::reflect::EnumDescriptor::new("ErrorCode", file_descriptor_proto())
  5978. })
  5979. }
  5980. }
  5981. }
  5982. impl ::std::marker::Copy for ErrorCode {
  5983. }
  5984. impl ::std::default::Default for ErrorCode {
  5985. fn default() -> Self {
  5986. ErrorCode::ProtocolError
  5987. }
  5988. }
  5989. impl ::protobuf::reflect::ProtobufValue for ErrorCode {
  5990. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  5991. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  5992. }
  5993. }
  5994. static file_descriptor_proto_data: &'static [u8] = b"\
  5995. \n\x11keyexchange.proto\x12\0\"\xc2\x02\n\x0bClientHello\x12\x20\n\nbuil\
  5996. d_info\x18\n\x20\x02(\x0b2\n.BuildInfoB\0\x12.\n\x16fingerprints_support\
  5997. ed\x18\x14\x20\x03(\x0e2\x0c.FingerprintB\0\x12.\n\x16cryptosuites_suppo\
  5998. rted\x18\x1e\x20\x03(\x0e2\x0c.CryptosuiteB\0\x12*\n\x14powschemes_suppo\
  5999. rted\x18(\x20\x03(\x0e2\n.PowschemeB\0\x124\n\x12login_crypto_hello\x182\
  6000. \x20\x02(\x0b2\x16.LoginCryptoHelloUnionB\0\x12\x16\n\x0cclient_nonce\
  6001. \x18<\x20\x02(\x0cB\0\x12\x11\n\x07padding\x18F\x20\x01(\x0cB\0\x12\"\n\
  6002. \x0bfeature_set\x18P\x20\x01(\x0b2\x0b.FeatureSetB\0:\0\"\x84\x01\n\tBui\
  6003. ldInfo\x12\x1b\n\x07product\x18\n\x20\x02(\x0e2\x08.ProductB\0\x12&\n\rp\
  6004. roduct_flags\x18\x14\x20\x03(\x0e2\r.ProductFlagsB\0\x12\x1d\n\x08platfo\
  6005. rm\x18\x1e\x20\x02(\x0e2\t.PlatformB\0\x12\x11\n\x07version\x18(\x20\x02\
  6006. (\x04B\0:\0\"S\n\x15LoginCryptoHelloUnion\x128\n\x0ediffie_hellman\x18\n\
  6007. \x20\x01(\x0b2\x1e.LoginCryptoDiffieHellmanHelloB\0:\0\"L\n\x1dLoginCryp\
  6008. toDiffieHellmanHello\x12\x0c\n\x02gc\x18\n\x20\x02(\x0cB\0\x12\x1b\n\x11\
  6009. server_keys_known\x18\x14\x20\x02(\rB\0:\0\"A\n\nFeatureSet\x12\x15\n\
  6010. \x0bautoupdate2\x18\x01\x20\x01(\x08B\0\x12\x1a\n\x10current_location\
  6011. \x18\x02\x20\x01(\x08B\0:\0\"\x8c\x01\n\x11APResponseMessage\x12!\n\tcha\
  6012. llenge\x18\n\x20\x01(\x0b2\x0c.APChallengeB\0\x12*\n\x07upgrade\x18\x14\
  6013. \x20\x01(\x0b2\x17.UpgradeRequiredMessageB\0\x12&\n\x0clogin_failed\x18\
  6014. \x1e\x20\x01(\x0b2\x0e.APLoginFailedB\0:\0\"\x95\x02\n\x0bAPChallenge\
  6015. \x12<\n\x16login_crypto_challenge\x18\n\x20\x02(\x0b2\x1a.LoginCryptoCha\
  6016. llengeUnionB\0\x12;\n\x15fingerprint_challenge\x18\x14\x20\x02(\x0b2\x1a\
  6017. .FingerprintChallengeUnionB\0\x12+\n\rpow_challenge\x18\x1e\x20\x02(\x0b\
  6018. 2\x12.PoWChallengeUnionB\0\x121\n\x10crypto_challenge\x18(\x20\x02(\x0b2\
  6019. \x15.CryptoChallengeUnionB\0\x12\x16\n\x0cserver_nonce\x182\x20\x02(\x0c\
  6020. B\0\x12\x11\n\x07padding\x18<\x20\x01(\x0cB\0:\0\"[\n\x19LoginCryptoChal\
  6021. lengeUnion\x12<\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2\".LoginCryptoDif\
  6022. fieHellmanChallengeB\0:\0\"k\n!LoginCryptoDiffieHellmanChallenge\x12\x0c\
  6023. \n\x02gs\x18\n\x20\x02(\x0cB\0\x12\x1e\n\x14server_signature_key\x18\x14\
  6024. \x20\x02(\x05B\0\x12\x16\n\x0cgs_signature\x18\x1e\x20\x02(\x0cB\0:\0\"\
  6025. \x82\x01\n\x19FingerprintChallengeUnion\x12+\n\x05grain\x18\n\x20\x01(\
  6026. \x0b2\x1a.FingerprintGrainChallengeB\0\x126\n\x0bhmac_ripemd\x18\x14\x20\
  6027. \x01(\x0b2\x1f.FingerprintHmacRipemdChallengeB\0:\0\",\n\x19FingerprintG\
  6028. rainChallenge\x12\r\n\x03kek\x18\n\x20\x02(\x0cB\0:\0\"7\n\x1eFingerprin\
  6029. tHmacRipemdChallenge\x12\x13\n\tchallenge\x18\n\x20\x02(\x0cB\0:\0\"A\n\
  6030. \x11PoWChallengeUnion\x12*\n\thash_cash\x18\n\x20\x01(\x0b2\x15.PoWHashC\
  6031. ashChallengeB\0:\0\"N\n\x14PoWHashCashChallenge\x12\x10\n\x06prefix\x18\
  6032. \n\x20\x01(\x0cB\0\x12\x10\n\x06length\x18\x14\x20\x01(\x05B\0\x12\x10\n\
  6033. \x06target\x18\x1e\x20\x01(\x05B\0:\0\"z\n\x14CryptoChallengeUnion\x12*\
  6034. \n\x07shannon\x18\n\x20\x01(\x0b2\x17.CryptoShannonChallengeB\0\x124\n\r\
  6035. rc4_sha1_hmac\x18\x14\x20\x01(\x0b2\x1b.CryptoRc4Sha1HmacChallengeB\0:\0\
  6036. \"\x1a\n\x16CryptoShannonChallenge:\0\"\x1e\n\x1aCryptoRc4Sha1HmacChalle\
  6037. nge:\0\"e\n\x16UpgradeRequiredMessage\x12\x1d\n\x13upgrade_signed_part\
  6038. \x18\n\x20\x02(\x0cB\0\x12\x13\n\tsignature\x18\x14\x20\x02(\x0cB\0\x12\
  6039. \x15\n\x0bhttp_suffix\x18\x1e\x20\x01(\tB\0:\0\"y\n\rAPLoginFailed\x12\
  6040. \x20\n\nerror_code\x18\n\x20\x02(\x0e2\n.ErrorCodeB\0\x12\x15\n\x0bretry\
  6041. _delay\x18\x14\x20\x01(\x05B\0\x12\x10\n\x06expiry\x18\x1e\x20\x01(\x05B\
  6042. \0\x12\x1b\n\x11error_description\x18(\x20\x01(\tB\0:\0\"\xb3\x01\n\x17C\
  6043. lientResponsePlaintext\x12:\n\x15login_crypto_response\x18\n\x20\x02(\
  6044. \x0b2\x19.LoginCryptoResponseUnionB\0\x12)\n\x0cpow_response\x18\x14\x20\
  6045. \x02(\x0b2\x11.PoWResponseUnionB\0\x12/\n\x0fcrypto_response\x18\x1e\x20\
  6046. \x02(\x0b2\x14.CryptoResponseUnionB\0:\0\"Y\n\x18LoginCryptoResponseUnio\
  6047. n\x12;\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2!.LoginCryptoDiffieHellman\
  6048. ResponseB\0:\0\"4\n\x20LoginCryptoDiffieHellmanResponse\x12\x0e\n\x04hma\
  6049. c\x18\n\x20\x02(\x0cB\0:\0\"?\n\x10PoWResponseUnion\x12)\n\thash_cash\
  6050. \x18\n\x20\x01(\x0b2\x14.PoWHashCashResponseB\0:\0\".\n\x13PoWHashCashRe\
  6051. sponse\x12\x15\n\x0bhash_suffix\x18\n\x20\x02(\x0cB\0:\0\"w\n\x13CryptoR\
  6052. esponseUnion\x12)\n\x07shannon\x18\n\x20\x01(\x0b2\x16.CryptoShannonResp\
  6053. onseB\0\x123\n\rrc4_sha1_hmac\x18\x14\x20\x01(\x0b2\x1a.CryptoRc4Sha1Hma\
  6054. cResponseB\0:\0\"*\n\x15CryptoShannonResponse\x12\x0f\n\x05dummy\x18\x01\
  6055. \x20\x01(\x05B\0:\0\".\n\x19CryptoRc4Sha1HmacResponse\x12\x0f\n\x05dummy\
  6056. \x18\x01\x20\x01(\x05B\0:\0*\x81\x01\n\x07Product\x12\x12\n\x0ePRODUCT_C\
  6057. LIENT\x10\0\x12\x16\n\x12PRODUCT_LIBSPOTIFY\x10\x01\x12\x12\n\x0ePRODUCT\
  6058. _MOBILE\x10\x02\x12\x13\n\x0fPRODUCT_PARTNER\x10\x03\x12\x1f\n\x1bPRODUC\
  6059. T_LIBSPOTIFY_EMBEDDED\x10\x05\x1a\0*C\n\x0cProductFlags\x12\x15\n\x11PRO\
  6060. DUCT_FLAG_NONE\x10\0\x12\x1a\n\x16PRODUCT_FLAG_DEV_BUILD\x10\x01\x1a\0*\
  6061. \xde\x04\n\x08Platform\x12\x16\n\x12PLATFORM_WIN32_X86\x10\0\x12\x14\n\
  6062. \x10PLATFORM_OSX_X86\x10\x01\x12\x16\n\x12PLATFORM_LINUX_X86\x10\x02\x12\
  6063. \x17\n\x13PLATFORM_IPHONE_ARM\x10\x03\x12\x14\n\x10PLATFORM_S60_ARM\x10\
  6064. \x04\x12\x14\n\x10PLATFORM_OSX_PPC\x10\x05\x12\x18\n\x14PLATFORM_ANDROID\
  6065. _ARM\x10\x06\x12\x1b\n\x17PLATFORM_WINDOWS_CE_ARM\x10\x07\x12\x19\n\x15P\
  6066. LATFORM_LINUX_X86_64\x10\x08\x12\x17\n\x13PLATFORM_OSX_X86_64\x10\t\x12\
  6067. \x15\n\x11PLATFORM_PALM_ARM\x10\n\x12\x15\n\x11PLATFORM_LINUX_SH\x10\x0b\
  6068. \x12\x18\n\x14PLATFORM_FREEBSD_X86\x10\x0c\x12\x1b\n\x17PLATFORM_FREEBSD\
  6069. _X86_64\x10\r\x12\x1b\n\x17PLATFORM_BLACKBERRY_ARM\x10\x0e\x12\x12\n\x0e\
  6070. PLATFORM_SONOS\x10\x0f\x12\x17\n\x13PLATFORM_LINUX_MIPS\x10\x10\x12\x16\
  6071. \n\x12PLATFORM_LINUX_ARM\x10\x11\x12\x19\n\x15PLATFORM_LOGITECH_ARM\x10\
  6072. \x12\x12\x1b\n\x17PLATFORM_LINUX_BLACKFIN\x10\x13\x12\x14\n\x10PLATFORM_\
  6073. WP7_ARM\x10\x14\x12\x16\n\x12PLATFORM_ONKYO_ARM\x10\x15\x12\x17\n\x13PLA\
  6074. TFORM_QNXNTO_ARM\x10\x16\x12\x14\n\x10PLATFORM_BCO_ARM\x10\x17\x1a\0*C\n\
  6075. \x0bFingerprint\x12\x15\n\x11FINGERPRINT_GRAIN\x10\0\x12\x1b\n\x17FINGER\
  6076. PRINT_HMAC_RIPEMD\x10\x01\x1a\0*I\n\x0bCryptosuite\x12\x18\n\x14CRYPTO_S\
  6077. UITE_SHANNON\x10\0\x12\x1e\n\x1aCRYPTO_SUITE_RC4_SHA1_HMAC\x10\x01\x1a\0\
  6078. *\x20\n\tPowscheme\x12\x11\n\rPOW_HASH_CASH\x10\0\x1a\0*\x8b\x02\n\tErro\
  6079. rCode\x12\x11\n\rProtocolError\x10\0\x12\x10\n\x0cTryAnotherAP\x10\x02\
  6080. \x12\x13\n\x0fBadConnectionId\x10\x05\x12\x15\n\x11TravelRestriction\x10\
  6081. \t\x12\x1a\n\x16PremiumAccountRequired\x10\x0b\x12\x12\n\x0eBadCredentia\
  6082. ls\x10\x0c\x12\x1f\n\x1bCouldNotValidateCredentials\x10\r\x12\x11\n\rAcc\
  6083. ountExists\x10\x0e\x12\x1d\n\x19ExtraVerificationRequired\x10\x0f\x12\
  6084. \x11\n\rInvalidAppKey\x10\x10\x12\x15\n\x11ApplicationBanned\x10\x11\x1a\
  6085. \0B\0b\x06proto2\
  6086. ";
  6087. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
  6088. lock: ::protobuf::lazy::ONCE_INIT,
  6089. ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
  6090. };
  6091. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  6092. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  6093. }
  6094. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  6095. unsafe {
  6096. file_descriptor_proto_lazy.get(|| {
  6097. parse_descriptor_proto()
  6098. })
  6099. }
  6100. }