keyexchange.rs 247 KB

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