metadata.rs 344 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647
  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 `metadata.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 TopTracks {
  25. // message fields
  26. country: ::protobuf::SingularField<::std::string::String>,
  27. track: ::protobuf::RepeatedField<Track>,
  28. // special fields
  29. pub unknown_fields: ::protobuf::UnknownFields,
  30. pub cached_size: ::protobuf::CachedSize,
  31. }
  32. impl<'a> ::std::default::Default for &'a TopTracks {
  33. fn default() -> &'a TopTracks {
  34. <TopTracks as ::protobuf::Message>::default_instance()
  35. }
  36. }
  37. impl TopTracks {
  38. pub fn new() -> TopTracks {
  39. ::std::default::Default::default()
  40. }
  41. // optional string country = 1;
  42. pub fn get_country(&self) -> &str {
  43. match self.country.as_ref() {
  44. Some(v) => &v,
  45. None => "",
  46. }
  47. }
  48. pub fn clear_country(&mut self) {
  49. self.country.clear();
  50. }
  51. pub fn has_country(&self) -> bool {
  52. self.country.is_some()
  53. }
  54. // Param is passed by value, moved
  55. pub fn set_country(&mut self, v: ::std::string::String) {
  56. self.country = ::protobuf::SingularField::some(v);
  57. }
  58. // Mutable pointer to the field.
  59. // If field is not initialized, it is initialized with default value first.
  60. pub fn mut_country(&mut self) -> &mut ::std::string::String {
  61. if self.country.is_none() {
  62. self.country.set_default();
  63. }
  64. self.country.as_mut().unwrap()
  65. }
  66. // Take field
  67. pub fn take_country(&mut self) -> ::std::string::String {
  68. self.country
  69. .take()
  70. .unwrap_or_else(|| ::std::string::String::new())
  71. }
  72. // repeated .Track track = 2;
  73. pub fn get_track(&self) -> &[Track] {
  74. &self.track
  75. }
  76. pub fn clear_track(&mut self) {
  77. self.track.clear();
  78. }
  79. // Param is passed by value, moved
  80. pub fn set_track(&mut self, v: ::protobuf::RepeatedField<Track>) {
  81. self.track = v;
  82. }
  83. // Mutable pointer to the field.
  84. pub fn mut_track(&mut self) -> &mut ::protobuf::RepeatedField<Track> {
  85. &mut self.track
  86. }
  87. // Take field
  88. pub fn take_track(&mut self) -> ::protobuf::RepeatedField<Track> {
  89. ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new())
  90. }
  91. }
  92. impl ::protobuf::Message for TopTracks {
  93. fn is_initialized(&self) -> bool {
  94. for v in &self.track {
  95. if !v.is_initialized() {
  96. return false;
  97. }
  98. }
  99. true
  100. }
  101. fn merge_from(
  102. &mut self,
  103. is: &mut ::protobuf::CodedInputStream<'_>,
  104. ) -> ::protobuf::ProtobufResult<()> {
  105. while !is.eof()? {
  106. let (field_number, wire_type) = is.read_tag_unpack()?;
  107. match field_number {
  108. 1 => {
  109. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.country)?;
  110. }
  111. 2 => {
  112. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?;
  113. }
  114. _ => {
  115. ::protobuf::rt::read_unknown_or_skip_group(
  116. field_number,
  117. wire_type,
  118. is,
  119. self.mut_unknown_fields(),
  120. )?;
  121. }
  122. };
  123. }
  124. ::std::result::Result::Ok(())
  125. }
  126. // Compute sizes of nested messages
  127. #[allow(unused_variables)]
  128. fn compute_size(&self) -> u32 {
  129. let mut my_size = 0;
  130. if let Some(ref v) = self.country.as_ref() {
  131. my_size += ::protobuf::rt::string_size(1, &v);
  132. }
  133. for value in &self.track {
  134. let len = value.compute_size();
  135. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  136. }
  137. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  138. self.cached_size.set(my_size);
  139. my_size
  140. }
  141. fn write_to_with_cached_sizes(
  142. &self,
  143. os: &mut ::protobuf::CodedOutputStream<'_>,
  144. ) -> ::protobuf::ProtobufResult<()> {
  145. if let Some(ref v) = self.country.as_ref() {
  146. os.write_string(1, &v)?;
  147. }
  148. for v in &self.track {
  149. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  150. os.write_raw_varint32(v.get_cached_size())?;
  151. v.write_to_with_cached_sizes(os)?;
  152. }
  153. os.write_unknown_fields(self.get_unknown_fields())?;
  154. ::std::result::Result::Ok(())
  155. }
  156. fn get_cached_size(&self) -> u32 {
  157. self.cached_size.get()
  158. }
  159. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  160. &self.unknown_fields
  161. }
  162. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  163. &mut self.unknown_fields
  164. }
  165. fn as_any(&self) -> &dyn (::std::any::Any) {
  166. self as &dyn (::std::any::Any)
  167. }
  168. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  169. self as &mut dyn (::std::any::Any)
  170. }
  171. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  172. self
  173. }
  174. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  175. Self::descriptor_static()
  176. }
  177. fn new() -> TopTracks {
  178. TopTracks::new()
  179. }
  180. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  181. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  182. ::protobuf::lazy::Lazy::INIT;
  183. unsafe {
  184. descriptor.get(|| {
  185. let mut fields = ::std::vec::Vec::new();
  186. fields.push(
  187. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  188. _,
  189. ::protobuf::types::ProtobufTypeString,
  190. >(
  191. "country",
  192. |m: &TopTracks| &m.country,
  193. |m: &mut TopTracks| &mut m.country,
  194. ),
  195. );
  196. fields.push(
  197. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  198. _,
  199. ::protobuf::types::ProtobufTypeMessage<Track>,
  200. >(
  201. "track",
  202. |m: &TopTracks| &m.track,
  203. |m: &mut TopTracks| &mut m.track,
  204. ),
  205. );
  206. ::protobuf::reflect::MessageDescriptor::new_pb_name::<TopTracks>(
  207. "TopTracks",
  208. fields,
  209. file_descriptor_proto(),
  210. )
  211. })
  212. }
  213. }
  214. fn default_instance() -> &'static TopTracks {
  215. static mut instance: ::protobuf::lazy::Lazy<TopTracks> = ::protobuf::lazy::Lazy::INIT;
  216. unsafe { instance.get(TopTracks::new) }
  217. }
  218. }
  219. impl ::protobuf::Clear for TopTracks {
  220. fn clear(&mut self) {
  221. self.country.clear();
  222. self.track.clear();
  223. self.unknown_fields.clear();
  224. }
  225. }
  226. impl ::std::fmt::Debug for TopTracks {
  227. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  228. ::protobuf::text_format::fmt(self, f)
  229. }
  230. }
  231. impl ::protobuf::reflect::ProtobufValue for TopTracks {
  232. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  233. ::protobuf::reflect::ReflectValueRef::Message(self)
  234. }
  235. }
  236. #[derive(PartialEq, Clone, Default)]
  237. pub struct ActivityPeriod {
  238. // message fields
  239. start_year: ::std::option::Option<i32>,
  240. end_year: ::std::option::Option<i32>,
  241. decade: ::std::option::Option<i32>,
  242. // special fields
  243. pub unknown_fields: ::protobuf::UnknownFields,
  244. pub cached_size: ::protobuf::CachedSize,
  245. }
  246. impl<'a> ::std::default::Default for &'a ActivityPeriod {
  247. fn default() -> &'a ActivityPeriod {
  248. <ActivityPeriod as ::protobuf::Message>::default_instance()
  249. }
  250. }
  251. impl ActivityPeriod {
  252. pub fn new() -> ActivityPeriod {
  253. ::std::default::Default::default()
  254. }
  255. // optional sint32 start_year = 1;
  256. pub fn get_start_year(&self) -> i32 {
  257. self.start_year.unwrap_or(0)
  258. }
  259. pub fn clear_start_year(&mut self) {
  260. self.start_year = ::std::option::Option::None;
  261. }
  262. pub fn has_start_year(&self) -> bool {
  263. self.start_year.is_some()
  264. }
  265. // Param is passed by value, moved
  266. pub fn set_start_year(&mut self, v: i32) {
  267. self.start_year = ::std::option::Option::Some(v);
  268. }
  269. // optional sint32 end_year = 2;
  270. pub fn get_end_year(&self) -> i32 {
  271. self.end_year.unwrap_or(0)
  272. }
  273. pub fn clear_end_year(&mut self) {
  274. self.end_year = ::std::option::Option::None;
  275. }
  276. pub fn has_end_year(&self) -> bool {
  277. self.end_year.is_some()
  278. }
  279. // Param is passed by value, moved
  280. pub fn set_end_year(&mut self, v: i32) {
  281. self.end_year = ::std::option::Option::Some(v);
  282. }
  283. // optional sint32 decade = 3;
  284. pub fn get_decade(&self) -> i32 {
  285. self.decade.unwrap_or(0)
  286. }
  287. pub fn clear_decade(&mut self) {
  288. self.decade = ::std::option::Option::None;
  289. }
  290. pub fn has_decade(&self) -> bool {
  291. self.decade.is_some()
  292. }
  293. // Param is passed by value, moved
  294. pub fn set_decade(&mut self, v: i32) {
  295. self.decade = ::std::option::Option::Some(v);
  296. }
  297. }
  298. impl ::protobuf::Message for ActivityPeriod {
  299. fn is_initialized(&self) -> bool {
  300. true
  301. }
  302. fn merge_from(
  303. &mut self,
  304. is: &mut ::protobuf::CodedInputStream<'_>,
  305. ) -> ::protobuf::ProtobufResult<()> {
  306. while !is.eof()? {
  307. let (field_number, wire_type) = is.read_tag_unpack()?;
  308. match field_number {
  309. 1 => {
  310. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  311. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  312. wire_type,
  313. ));
  314. }
  315. let tmp = is.read_sint32()?;
  316. self.start_year = ::std::option::Option::Some(tmp);
  317. }
  318. 2 => {
  319. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  320. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  321. wire_type,
  322. ));
  323. }
  324. let tmp = is.read_sint32()?;
  325. self.end_year = ::std::option::Option::Some(tmp);
  326. }
  327. 3 => {
  328. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  329. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  330. wire_type,
  331. ));
  332. }
  333. let tmp = is.read_sint32()?;
  334. self.decade = ::std::option::Option::Some(tmp);
  335. }
  336. _ => {
  337. ::protobuf::rt::read_unknown_or_skip_group(
  338. field_number,
  339. wire_type,
  340. is,
  341. self.mut_unknown_fields(),
  342. )?;
  343. }
  344. };
  345. }
  346. ::std::result::Result::Ok(())
  347. }
  348. // Compute sizes of nested messages
  349. #[allow(unused_variables)]
  350. fn compute_size(&self) -> u32 {
  351. let mut my_size = 0;
  352. if let Some(v) = self.start_year {
  353. my_size += ::protobuf::rt::value_varint_zigzag_size(1, v);
  354. }
  355. if let Some(v) = self.end_year {
  356. my_size += ::protobuf::rt::value_varint_zigzag_size(2, v);
  357. }
  358. if let Some(v) = self.decade {
  359. my_size += ::protobuf::rt::value_varint_zigzag_size(3, v);
  360. }
  361. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  362. self.cached_size.set(my_size);
  363. my_size
  364. }
  365. fn write_to_with_cached_sizes(
  366. &self,
  367. os: &mut ::protobuf::CodedOutputStream<'_>,
  368. ) -> ::protobuf::ProtobufResult<()> {
  369. if let Some(v) = self.start_year {
  370. os.write_sint32(1, v)?;
  371. }
  372. if let Some(v) = self.end_year {
  373. os.write_sint32(2, v)?;
  374. }
  375. if let Some(v) = self.decade {
  376. os.write_sint32(3, v)?;
  377. }
  378. os.write_unknown_fields(self.get_unknown_fields())?;
  379. ::std::result::Result::Ok(())
  380. }
  381. fn get_cached_size(&self) -> u32 {
  382. self.cached_size.get()
  383. }
  384. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  385. &self.unknown_fields
  386. }
  387. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  388. &mut self.unknown_fields
  389. }
  390. fn as_any(&self) -> &dyn (::std::any::Any) {
  391. self as &dyn (::std::any::Any)
  392. }
  393. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  394. self as &mut dyn (::std::any::Any)
  395. }
  396. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  397. self
  398. }
  399. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  400. Self::descriptor_static()
  401. }
  402. fn new() -> ActivityPeriod {
  403. ActivityPeriod::new()
  404. }
  405. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  406. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  407. ::protobuf::lazy::Lazy::INIT;
  408. unsafe {
  409. descriptor.get(|| {
  410. let mut fields = ::std::vec::Vec::new();
  411. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  412. _,
  413. ::protobuf::types::ProtobufTypeSint32,
  414. >(
  415. "start_year",
  416. |m: &ActivityPeriod| &m.start_year,
  417. |m: &mut ActivityPeriod| &mut m.start_year,
  418. ));
  419. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  420. _,
  421. ::protobuf::types::ProtobufTypeSint32,
  422. >(
  423. "end_year",
  424. |m: &ActivityPeriod| &m.end_year,
  425. |m: &mut ActivityPeriod| &mut m.end_year,
  426. ));
  427. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  428. _,
  429. ::protobuf::types::ProtobufTypeSint32,
  430. >(
  431. "decade",
  432. |m: &ActivityPeriod| &m.decade,
  433. |m: &mut ActivityPeriod| &mut m.decade,
  434. ));
  435. ::protobuf::reflect::MessageDescriptor::new_pb_name::<ActivityPeriod>(
  436. "ActivityPeriod",
  437. fields,
  438. file_descriptor_proto(),
  439. )
  440. })
  441. }
  442. }
  443. fn default_instance() -> &'static ActivityPeriod {
  444. static mut instance: ::protobuf::lazy::Lazy<ActivityPeriod> = ::protobuf::lazy::Lazy::INIT;
  445. unsafe { instance.get(ActivityPeriod::new) }
  446. }
  447. }
  448. impl ::protobuf::Clear for ActivityPeriod {
  449. fn clear(&mut self) {
  450. self.start_year = ::std::option::Option::None;
  451. self.end_year = ::std::option::Option::None;
  452. self.decade = ::std::option::Option::None;
  453. self.unknown_fields.clear();
  454. }
  455. }
  456. impl ::std::fmt::Debug for ActivityPeriod {
  457. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  458. ::protobuf::text_format::fmt(self, f)
  459. }
  460. }
  461. impl ::protobuf::reflect::ProtobufValue for ActivityPeriod {
  462. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  463. ::protobuf::reflect::ReflectValueRef::Message(self)
  464. }
  465. }
  466. #[derive(PartialEq, Clone, Default)]
  467. pub struct Artist {
  468. // message fields
  469. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  470. name: ::protobuf::SingularField<::std::string::String>,
  471. popularity: ::std::option::Option<i32>,
  472. top_track: ::protobuf::RepeatedField<TopTracks>,
  473. album_group: ::protobuf::RepeatedField<AlbumGroup>,
  474. single_group: ::protobuf::RepeatedField<AlbumGroup>,
  475. compilation_group: ::protobuf::RepeatedField<AlbumGroup>,
  476. appears_on_group: ::protobuf::RepeatedField<AlbumGroup>,
  477. genre: ::protobuf::RepeatedField<::std::string::String>,
  478. external_id: ::protobuf::RepeatedField<ExternalId>,
  479. portrait: ::protobuf::RepeatedField<Image>,
  480. biography: ::protobuf::RepeatedField<Biography>,
  481. activity_period: ::protobuf::RepeatedField<ActivityPeriod>,
  482. restriction: ::protobuf::RepeatedField<Restriction>,
  483. related: ::protobuf::RepeatedField<Artist>,
  484. is_portrait_album_cover: ::std::option::Option<bool>,
  485. portrait_group: ::protobuf::SingularPtrField<ImageGroup>,
  486. // special fields
  487. pub unknown_fields: ::protobuf::UnknownFields,
  488. pub cached_size: ::protobuf::CachedSize,
  489. }
  490. impl<'a> ::std::default::Default for &'a Artist {
  491. fn default() -> &'a Artist {
  492. <Artist as ::protobuf::Message>::default_instance()
  493. }
  494. }
  495. impl Artist {
  496. pub fn new() -> Artist {
  497. ::std::default::Default::default()
  498. }
  499. // optional bytes gid = 1;
  500. pub fn get_gid(&self) -> &[u8] {
  501. match self.gid.as_ref() {
  502. Some(v) => &v,
  503. None => &[],
  504. }
  505. }
  506. pub fn clear_gid(&mut self) {
  507. self.gid.clear();
  508. }
  509. pub fn has_gid(&self) -> bool {
  510. self.gid.is_some()
  511. }
  512. // Param is passed by value, moved
  513. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  514. self.gid = ::protobuf::SingularField::some(v);
  515. }
  516. // Mutable pointer to the field.
  517. // If field is not initialized, it is initialized with default value first.
  518. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  519. if self.gid.is_none() {
  520. self.gid.set_default();
  521. }
  522. self.gid.as_mut().unwrap()
  523. }
  524. // Take field
  525. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  526. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  527. }
  528. // optional string name = 2;
  529. pub fn get_name(&self) -> &str {
  530. match self.name.as_ref() {
  531. Some(v) => &v,
  532. None => "",
  533. }
  534. }
  535. pub fn clear_name(&mut self) {
  536. self.name.clear();
  537. }
  538. pub fn has_name(&self) -> bool {
  539. self.name.is_some()
  540. }
  541. // Param is passed by value, moved
  542. pub fn set_name(&mut self, v: ::std::string::String) {
  543. self.name = ::protobuf::SingularField::some(v);
  544. }
  545. // Mutable pointer to the field.
  546. // If field is not initialized, it is initialized with default value first.
  547. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  548. if self.name.is_none() {
  549. self.name.set_default();
  550. }
  551. self.name.as_mut().unwrap()
  552. }
  553. // Take field
  554. pub fn take_name(&mut self) -> ::std::string::String {
  555. self.name
  556. .take()
  557. .unwrap_or_else(|| ::std::string::String::new())
  558. }
  559. // optional sint32 popularity = 3;
  560. pub fn get_popularity(&self) -> i32 {
  561. self.popularity.unwrap_or(0)
  562. }
  563. pub fn clear_popularity(&mut self) {
  564. self.popularity = ::std::option::Option::None;
  565. }
  566. pub fn has_popularity(&self) -> bool {
  567. self.popularity.is_some()
  568. }
  569. // Param is passed by value, moved
  570. pub fn set_popularity(&mut self, v: i32) {
  571. self.popularity = ::std::option::Option::Some(v);
  572. }
  573. // repeated .TopTracks top_track = 4;
  574. pub fn get_top_track(&self) -> &[TopTracks] {
  575. &self.top_track
  576. }
  577. pub fn clear_top_track(&mut self) {
  578. self.top_track.clear();
  579. }
  580. // Param is passed by value, moved
  581. pub fn set_top_track(&mut self, v: ::protobuf::RepeatedField<TopTracks>) {
  582. self.top_track = v;
  583. }
  584. // Mutable pointer to the field.
  585. pub fn mut_top_track(&mut self) -> &mut ::protobuf::RepeatedField<TopTracks> {
  586. &mut self.top_track
  587. }
  588. // Take field
  589. pub fn take_top_track(&mut self) -> ::protobuf::RepeatedField<TopTracks> {
  590. ::std::mem::replace(&mut self.top_track, ::protobuf::RepeatedField::new())
  591. }
  592. // repeated .AlbumGroup album_group = 5;
  593. pub fn get_album_group(&self) -> &[AlbumGroup] {
  594. &self.album_group
  595. }
  596. pub fn clear_album_group(&mut self) {
  597. self.album_group.clear();
  598. }
  599. // Param is passed by value, moved
  600. pub fn set_album_group(&mut self, v: ::protobuf::RepeatedField<AlbumGroup>) {
  601. self.album_group = v;
  602. }
  603. // Mutable pointer to the field.
  604. pub fn mut_album_group(&mut self) -> &mut ::protobuf::RepeatedField<AlbumGroup> {
  605. &mut self.album_group
  606. }
  607. // Take field
  608. pub fn take_album_group(&mut self) -> ::protobuf::RepeatedField<AlbumGroup> {
  609. ::std::mem::replace(&mut self.album_group, ::protobuf::RepeatedField::new())
  610. }
  611. // repeated .AlbumGroup single_group = 6;
  612. pub fn get_single_group(&self) -> &[AlbumGroup] {
  613. &self.single_group
  614. }
  615. pub fn clear_single_group(&mut self) {
  616. self.single_group.clear();
  617. }
  618. // Param is passed by value, moved
  619. pub fn set_single_group(&mut self, v: ::protobuf::RepeatedField<AlbumGroup>) {
  620. self.single_group = v;
  621. }
  622. // Mutable pointer to the field.
  623. pub fn mut_single_group(&mut self) -> &mut ::protobuf::RepeatedField<AlbumGroup> {
  624. &mut self.single_group
  625. }
  626. // Take field
  627. pub fn take_single_group(&mut self) -> ::protobuf::RepeatedField<AlbumGroup> {
  628. ::std::mem::replace(&mut self.single_group, ::protobuf::RepeatedField::new())
  629. }
  630. // repeated .AlbumGroup compilation_group = 7;
  631. pub fn get_compilation_group(&self) -> &[AlbumGroup] {
  632. &self.compilation_group
  633. }
  634. pub fn clear_compilation_group(&mut self) {
  635. self.compilation_group.clear();
  636. }
  637. // Param is passed by value, moved
  638. pub fn set_compilation_group(&mut self, v: ::protobuf::RepeatedField<AlbumGroup>) {
  639. self.compilation_group = v;
  640. }
  641. // Mutable pointer to the field.
  642. pub fn mut_compilation_group(&mut self) -> &mut ::protobuf::RepeatedField<AlbumGroup> {
  643. &mut self.compilation_group
  644. }
  645. // Take field
  646. pub fn take_compilation_group(&mut self) -> ::protobuf::RepeatedField<AlbumGroup> {
  647. ::std::mem::replace(
  648. &mut self.compilation_group,
  649. ::protobuf::RepeatedField::new(),
  650. )
  651. }
  652. // repeated .AlbumGroup appears_on_group = 8;
  653. pub fn get_appears_on_group(&self) -> &[AlbumGroup] {
  654. &self.appears_on_group
  655. }
  656. pub fn clear_appears_on_group(&mut self) {
  657. self.appears_on_group.clear();
  658. }
  659. // Param is passed by value, moved
  660. pub fn set_appears_on_group(&mut self, v: ::protobuf::RepeatedField<AlbumGroup>) {
  661. self.appears_on_group = v;
  662. }
  663. // Mutable pointer to the field.
  664. pub fn mut_appears_on_group(&mut self) -> &mut ::protobuf::RepeatedField<AlbumGroup> {
  665. &mut self.appears_on_group
  666. }
  667. // Take field
  668. pub fn take_appears_on_group(&mut self) -> ::protobuf::RepeatedField<AlbumGroup> {
  669. ::std::mem::replace(&mut self.appears_on_group, ::protobuf::RepeatedField::new())
  670. }
  671. // repeated string genre = 9;
  672. pub fn get_genre(&self) -> &[::std::string::String] {
  673. &self.genre
  674. }
  675. pub fn clear_genre(&mut self) {
  676. self.genre.clear();
  677. }
  678. // Param is passed by value, moved
  679. pub fn set_genre(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  680. self.genre = v;
  681. }
  682. // Mutable pointer to the field.
  683. pub fn mut_genre(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  684. &mut self.genre
  685. }
  686. // Take field
  687. pub fn take_genre(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  688. ::std::mem::replace(&mut self.genre, ::protobuf::RepeatedField::new())
  689. }
  690. // repeated .ExternalId external_id = 10;
  691. pub fn get_external_id(&self) -> &[ExternalId] {
  692. &self.external_id
  693. }
  694. pub fn clear_external_id(&mut self) {
  695. self.external_id.clear();
  696. }
  697. // Param is passed by value, moved
  698. pub fn set_external_id(&mut self, v: ::protobuf::RepeatedField<ExternalId>) {
  699. self.external_id = v;
  700. }
  701. // Mutable pointer to the field.
  702. pub fn mut_external_id(&mut self) -> &mut ::protobuf::RepeatedField<ExternalId> {
  703. &mut self.external_id
  704. }
  705. // Take field
  706. pub fn take_external_id(&mut self) -> ::protobuf::RepeatedField<ExternalId> {
  707. ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new())
  708. }
  709. // repeated .Image portrait = 11;
  710. pub fn get_portrait(&self) -> &[Image] {
  711. &self.portrait
  712. }
  713. pub fn clear_portrait(&mut self) {
  714. self.portrait.clear();
  715. }
  716. // Param is passed by value, moved
  717. pub fn set_portrait(&mut self, v: ::protobuf::RepeatedField<Image>) {
  718. self.portrait = v;
  719. }
  720. // Mutable pointer to the field.
  721. pub fn mut_portrait(&mut self) -> &mut ::protobuf::RepeatedField<Image> {
  722. &mut self.portrait
  723. }
  724. // Take field
  725. pub fn take_portrait(&mut self) -> ::protobuf::RepeatedField<Image> {
  726. ::std::mem::replace(&mut self.portrait, ::protobuf::RepeatedField::new())
  727. }
  728. // repeated .Biography biography = 12;
  729. pub fn get_biography(&self) -> &[Biography] {
  730. &self.biography
  731. }
  732. pub fn clear_biography(&mut self) {
  733. self.biography.clear();
  734. }
  735. // Param is passed by value, moved
  736. pub fn set_biography(&mut self, v: ::protobuf::RepeatedField<Biography>) {
  737. self.biography = v;
  738. }
  739. // Mutable pointer to the field.
  740. pub fn mut_biography(&mut self) -> &mut ::protobuf::RepeatedField<Biography> {
  741. &mut self.biography
  742. }
  743. // Take field
  744. pub fn take_biography(&mut self) -> ::protobuf::RepeatedField<Biography> {
  745. ::std::mem::replace(&mut self.biography, ::protobuf::RepeatedField::new())
  746. }
  747. // repeated .ActivityPeriod activity_period = 13;
  748. pub fn get_activity_period(&self) -> &[ActivityPeriod] {
  749. &self.activity_period
  750. }
  751. pub fn clear_activity_period(&mut self) {
  752. self.activity_period.clear();
  753. }
  754. // Param is passed by value, moved
  755. pub fn set_activity_period(&mut self, v: ::protobuf::RepeatedField<ActivityPeriod>) {
  756. self.activity_period = v;
  757. }
  758. // Mutable pointer to the field.
  759. pub fn mut_activity_period(&mut self) -> &mut ::protobuf::RepeatedField<ActivityPeriod> {
  760. &mut self.activity_period
  761. }
  762. // Take field
  763. pub fn take_activity_period(&mut self) -> ::protobuf::RepeatedField<ActivityPeriod> {
  764. ::std::mem::replace(&mut self.activity_period, ::protobuf::RepeatedField::new())
  765. }
  766. // repeated .Restriction restriction = 14;
  767. pub fn get_restriction(&self) -> &[Restriction] {
  768. &self.restriction
  769. }
  770. pub fn clear_restriction(&mut self) {
  771. self.restriction.clear();
  772. }
  773. // Param is passed by value, moved
  774. pub fn set_restriction(&mut self, v: ::protobuf::RepeatedField<Restriction>) {
  775. self.restriction = v;
  776. }
  777. // Mutable pointer to the field.
  778. pub fn mut_restriction(&mut self) -> &mut ::protobuf::RepeatedField<Restriction> {
  779. &mut self.restriction
  780. }
  781. // Take field
  782. pub fn take_restriction(&mut self) -> ::protobuf::RepeatedField<Restriction> {
  783. ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new())
  784. }
  785. // repeated .Artist related = 15;
  786. pub fn get_related(&self) -> &[Artist] {
  787. &self.related
  788. }
  789. pub fn clear_related(&mut self) {
  790. self.related.clear();
  791. }
  792. // Param is passed by value, moved
  793. pub fn set_related(&mut self, v: ::protobuf::RepeatedField<Artist>) {
  794. self.related = v;
  795. }
  796. // Mutable pointer to the field.
  797. pub fn mut_related(&mut self) -> &mut ::protobuf::RepeatedField<Artist> {
  798. &mut self.related
  799. }
  800. // Take field
  801. pub fn take_related(&mut self) -> ::protobuf::RepeatedField<Artist> {
  802. ::std::mem::replace(&mut self.related, ::protobuf::RepeatedField::new())
  803. }
  804. // optional bool is_portrait_album_cover = 16;
  805. pub fn get_is_portrait_album_cover(&self) -> bool {
  806. self.is_portrait_album_cover.unwrap_or(false)
  807. }
  808. pub fn clear_is_portrait_album_cover(&mut self) {
  809. self.is_portrait_album_cover = ::std::option::Option::None;
  810. }
  811. pub fn has_is_portrait_album_cover(&self) -> bool {
  812. self.is_portrait_album_cover.is_some()
  813. }
  814. // Param is passed by value, moved
  815. pub fn set_is_portrait_album_cover(&mut self, v: bool) {
  816. self.is_portrait_album_cover = ::std::option::Option::Some(v);
  817. }
  818. // optional .ImageGroup portrait_group = 17;
  819. pub fn get_portrait_group(&self) -> &ImageGroup {
  820. self.portrait_group
  821. .as_ref()
  822. .unwrap_or_else(|| ImageGroup::default_instance())
  823. }
  824. pub fn clear_portrait_group(&mut self) {
  825. self.portrait_group.clear();
  826. }
  827. pub fn has_portrait_group(&self) -> bool {
  828. self.portrait_group.is_some()
  829. }
  830. // Param is passed by value, moved
  831. pub fn set_portrait_group(&mut self, v: ImageGroup) {
  832. self.portrait_group = ::protobuf::SingularPtrField::some(v);
  833. }
  834. // Mutable pointer to the field.
  835. // If field is not initialized, it is initialized with default value first.
  836. pub fn mut_portrait_group(&mut self) -> &mut ImageGroup {
  837. if self.portrait_group.is_none() {
  838. self.portrait_group.set_default();
  839. }
  840. self.portrait_group.as_mut().unwrap()
  841. }
  842. // Take field
  843. pub fn take_portrait_group(&mut self) -> ImageGroup {
  844. self.portrait_group
  845. .take()
  846. .unwrap_or_else(|| ImageGroup::new())
  847. }
  848. }
  849. impl ::protobuf::Message for Artist {
  850. fn is_initialized(&self) -> bool {
  851. for v in &self.top_track {
  852. if !v.is_initialized() {
  853. return false;
  854. }
  855. }
  856. for v in &self.album_group {
  857. if !v.is_initialized() {
  858. return false;
  859. }
  860. }
  861. for v in &self.single_group {
  862. if !v.is_initialized() {
  863. return false;
  864. }
  865. }
  866. for v in &self.compilation_group {
  867. if !v.is_initialized() {
  868. return false;
  869. }
  870. }
  871. for v in &self.appears_on_group {
  872. if !v.is_initialized() {
  873. return false;
  874. }
  875. }
  876. for v in &self.external_id {
  877. if !v.is_initialized() {
  878. return false;
  879. }
  880. }
  881. for v in &self.portrait {
  882. if !v.is_initialized() {
  883. return false;
  884. }
  885. }
  886. for v in &self.biography {
  887. if !v.is_initialized() {
  888. return false;
  889. }
  890. }
  891. for v in &self.activity_period {
  892. if !v.is_initialized() {
  893. return false;
  894. }
  895. }
  896. for v in &self.restriction {
  897. if !v.is_initialized() {
  898. return false;
  899. }
  900. }
  901. for v in &self.related {
  902. if !v.is_initialized() {
  903. return false;
  904. }
  905. }
  906. for v in &self.portrait_group {
  907. if !v.is_initialized() {
  908. return false;
  909. }
  910. }
  911. true
  912. }
  913. fn merge_from(
  914. &mut self,
  915. is: &mut ::protobuf::CodedInputStream<'_>,
  916. ) -> ::protobuf::ProtobufResult<()> {
  917. while !is.eof()? {
  918. let (field_number, wire_type) = is.read_tag_unpack()?;
  919. match field_number {
  920. 1 => {
  921. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  922. }
  923. 2 => {
  924. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  925. }
  926. 3 => {
  927. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  928. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  929. wire_type,
  930. ));
  931. }
  932. let tmp = is.read_sint32()?;
  933. self.popularity = ::std::option::Option::Some(tmp);
  934. }
  935. 4 => {
  936. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.top_track)?;
  937. }
  938. 5 => {
  939. ::protobuf::rt::read_repeated_message_into(
  940. wire_type,
  941. is,
  942. &mut self.album_group,
  943. )?;
  944. }
  945. 6 => {
  946. ::protobuf::rt::read_repeated_message_into(
  947. wire_type,
  948. is,
  949. &mut self.single_group,
  950. )?;
  951. }
  952. 7 => {
  953. ::protobuf::rt::read_repeated_message_into(
  954. wire_type,
  955. is,
  956. &mut self.compilation_group,
  957. )?;
  958. }
  959. 8 => {
  960. ::protobuf::rt::read_repeated_message_into(
  961. wire_type,
  962. is,
  963. &mut self.appears_on_group,
  964. )?;
  965. }
  966. 9 => {
  967. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.genre)?;
  968. }
  969. 10 => {
  970. ::protobuf::rt::read_repeated_message_into(
  971. wire_type,
  972. is,
  973. &mut self.external_id,
  974. )?;
  975. }
  976. 11 => {
  977. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.portrait)?;
  978. }
  979. 12 => {
  980. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.biography)?;
  981. }
  982. 13 => {
  983. ::protobuf::rt::read_repeated_message_into(
  984. wire_type,
  985. is,
  986. &mut self.activity_period,
  987. )?;
  988. }
  989. 14 => {
  990. ::protobuf::rt::read_repeated_message_into(
  991. wire_type,
  992. is,
  993. &mut self.restriction,
  994. )?;
  995. }
  996. 15 => {
  997. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.related)?;
  998. }
  999. 16 => {
  1000. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1001. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1002. wire_type,
  1003. ));
  1004. }
  1005. let tmp = is.read_bool()?;
  1006. self.is_portrait_album_cover = ::std::option::Option::Some(tmp);
  1007. }
  1008. 17 => {
  1009. ::protobuf::rt::read_singular_message_into(
  1010. wire_type,
  1011. is,
  1012. &mut self.portrait_group,
  1013. )?;
  1014. }
  1015. _ => {
  1016. ::protobuf::rt::read_unknown_or_skip_group(
  1017. field_number,
  1018. wire_type,
  1019. is,
  1020. self.mut_unknown_fields(),
  1021. )?;
  1022. }
  1023. };
  1024. }
  1025. ::std::result::Result::Ok(())
  1026. }
  1027. // Compute sizes of nested messages
  1028. #[allow(unused_variables)]
  1029. fn compute_size(&self) -> u32 {
  1030. let mut my_size = 0;
  1031. if let Some(ref v) = self.gid.as_ref() {
  1032. my_size += ::protobuf::rt::bytes_size(1, &v);
  1033. }
  1034. if let Some(ref v) = self.name.as_ref() {
  1035. my_size += ::protobuf::rt::string_size(2, &v);
  1036. }
  1037. if let Some(v) = self.popularity {
  1038. my_size += ::protobuf::rt::value_varint_zigzag_size(3, v);
  1039. }
  1040. for value in &self.top_track {
  1041. let len = value.compute_size();
  1042. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1043. }
  1044. for value in &self.album_group {
  1045. let len = value.compute_size();
  1046. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1047. }
  1048. for value in &self.single_group {
  1049. let len = value.compute_size();
  1050. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1051. }
  1052. for value in &self.compilation_group {
  1053. let len = value.compute_size();
  1054. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1055. }
  1056. for value in &self.appears_on_group {
  1057. let len = value.compute_size();
  1058. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1059. }
  1060. for value in &self.genre {
  1061. my_size += ::protobuf::rt::string_size(9, &value);
  1062. }
  1063. for value in &self.external_id {
  1064. let len = value.compute_size();
  1065. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1066. }
  1067. for value in &self.portrait {
  1068. let len = value.compute_size();
  1069. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1070. }
  1071. for value in &self.biography {
  1072. let len = value.compute_size();
  1073. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1074. }
  1075. for value in &self.activity_period {
  1076. let len = value.compute_size();
  1077. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1078. }
  1079. for value in &self.restriction {
  1080. let len = value.compute_size();
  1081. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1082. }
  1083. for value in &self.related {
  1084. let len = value.compute_size();
  1085. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1086. }
  1087. if let Some(v) = self.is_portrait_album_cover {
  1088. my_size += 3;
  1089. }
  1090. if let Some(ref v) = self.portrait_group.as_ref() {
  1091. let len = v.compute_size();
  1092. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1093. }
  1094. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1095. self.cached_size.set(my_size);
  1096. my_size
  1097. }
  1098. fn write_to_with_cached_sizes(
  1099. &self,
  1100. os: &mut ::protobuf::CodedOutputStream<'_>,
  1101. ) -> ::protobuf::ProtobufResult<()> {
  1102. if let Some(ref v) = self.gid.as_ref() {
  1103. os.write_bytes(1, &v)?;
  1104. }
  1105. if let Some(ref v) = self.name.as_ref() {
  1106. os.write_string(2, &v)?;
  1107. }
  1108. if let Some(v) = self.popularity {
  1109. os.write_sint32(3, v)?;
  1110. }
  1111. for v in &self.top_track {
  1112. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1113. os.write_raw_varint32(v.get_cached_size())?;
  1114. v.write_to_with_cached_sizes(os)?;
  1115. }
  1116. for v in &self.album_group {
  1117. os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1118. os.write_raw_varint32(v.get_cached_size())?;
  1119. v.write_to_with_cached_sizes(os)?;
  1120. }
  1121. for v in &self.single_group {
  1122. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1123. os.write_raw_varint32(v.get_cached_size())?;
  1124. v.write_to_with_cached_sizes(os)?;
  1125. }
  1126. for v in &self.compilation_group {
  1127. os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1128. os.write_raw_varint32(v.get_cached_size())?;
  1129. v.write_to_with_cached_sizes(os)?;
  1130. }
  1131. for v in &self.appears_on_group {
  1132. os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1133. os.write_raw_varint32(v.get_cached_size())?;
  1134. v.write_to_with_cached_sizes(os)?;
  1135. }
  1136. for v in &self.genre {
  1137. os.write_string(9, &v)?;
  1138. }
  1139. for v in &self.external_id {
  1140. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1141. os.write_raw_varint32(v.get_cached_size())?;
  1142. v.write_to_with_cached_sizes(os)?;
  1143. }
  1144. for v in &self.portrait {
  1145. os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1146. os.write_raw_varint32(v.get_cached_size())?;
  1147. v.write_to_with_cached_sizes(os)?;
  1148. }
  1149. for v in &self.biography {
  1150. os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1151. os.write_raw_varint32(v.get_cached_size())?;
  1152. v.write_to_with_cached_sizes(os)?;
  1153. }
  1154. for v in &self.activity_period {
  1155. os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1156. os.write_raw_varint32(v.get_cached_size())?;
  1157. v.write_to_with_cached_sizes(os)?;
  1158. }
  1159. for v in &self.restriction {
  1160. os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1161. os.write_raw_varint32(v.get_cached_size())?;
  1162. v.write_to_with_cached_sizes(os)?;
  1163. }
  1164. for v in &self.related {
  1165. os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1166. os.write_raw_varint32(v.get_cached_size())?;
  1167. v.write_to_with_cached_sizes(os)?;
  1168. }
  1169. if let Some(v) = self.is_portrait_album_cover {
  1170. os.write_bool(16, v)?;
  1171. }
  1172. if let Some(ref v) = self.portrait_group.as_ref() {
  1173. os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1174. os.write_raw_varint32(v.get_cached_size())?;
  1175. v.write_to_with_cached_sizes(os)?;
  1176. }
  1177. os.write_unknown_fields(self.get_unknown_fields())?;
  1178. ::std::result::Result::Ok(())
  1179. }
  1180. fn get_cached_size(&self) -> u32 {
  1181. self.cached_size.get()
  1182. }
  1183. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1184. &self.unknown_fields
  1185. }
  1186. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1187. &mut self.unknown_fields
  1188. }
  1189. fn as_any(&self) -> &dyn (::std::any::Any) {
  1190. self as &dyn (::std::any::Any)
  1191. }
  1192. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1193. self as &mut dyn (::std::any::Any)
  1194. }
  1195. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1196. self
  1197. }
  1198. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1199. Self::descriptor_static()
  1200. }
  1201. fn new() -> Artist {
  1202. Artist::new()
  1203. }
  1204. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1205. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  1206. ::protobuf::lazy::Lazy::INIT;
  1207. unsafe {
  1208. descriptor.get(|| {
  1209. let mut fields = ::std::vec::Vec::new();
  1210. fields.push(
  1211. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  1212. _,
  1213. ::protobuf::types::ProtobufTypeBytes,
  1214. >("gid", |m: &Artist| &m.gid, |m: &mut Artist| &mut m.gid),
  1215. );
  1216. fields.push(
  1217. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  1218. _,
  1219. ::protobuf::types::ProtobufTypeString,
  1220. >(
  1221. "name", |m: &Artist| &m.name, |m: &mut Artist| &mut m.name
  1222. ),
  1223. );
  1224. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1225. _,
  1226. ::protobuf::types::ProtobufTypeSint32,
  1227. >(
  1228. "popularity",
  1229. |m: &Artist| &m.popularity,
  1230. |m: &mut Artist| &mut m.popularity,
  1231. ));
  1232. fields.push(
  1233. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1234. _,
  1235. ::protobuf::types::ProtobufTypeMessage<TopTracks>,
  1236. >(
  1237. "top_track",
  1238. |m: &Artist| &m.top_track,
  1239. |m: &mut Artist| &mut m.top_track,
  1240. ),
  1241. );
  1242. fields.push(
  1243. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1244. _,
  1245. ::protobuf::types::ProtobufTypeMessage<AlbumGroup>,
  1246. >(
  1247. "album_group",
  1248. |m: &Artist| &m.album_group,
  1249. |m: &mut Artist| &mut m.album_group,
  1250. ),
  1251. );
  1252. fields.push(
  1253. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1254. _,
  1255. ::protobuf::types::ProtobufTypeMessage<AlbumGroup>,
  1256. >(
  1257. "single_group",
  1258. |m: &Artist| &m.single_group,
  1259. |m: &mut Artist| &mut m.single_group,
  1260. ),
  1261. );
  1262. fields.push(
  1263. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1264. _,
  1265. ::protobuf::types::ProtobufTypeMessage<AlbumGroup>,
  1266. >(
  1267. "compilation_group",
  1268. |m: &Artist| &m.compilation_group,
  1269. |m: &mut Artist| &mut m.compilation_group,
  1270. ),
  1271. );
  1272. fields.push(
  1273. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1274. _,
  1275. ::protobuf::types::ProtobufTypeMessage<AlbumGroup>,
  1276. >(
  1277. "appears_on_group",
  1278. |m: &Artist| &m.appears_on_group,
  1279. |m: &mut Artist| &mut m.appears_on_group,
  1280. ),
  1281. );
  1282. fields.push(
  1283. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1284. _,
  1285. ::protobuf::types::ProtobufTypeString,
  1286. >(
  1287. "genre",
  1288. |m: &Artist| &m.genre,
  1289. |m: &mut Artist| &mut m.genre,
  1290. ),
  1291. );
  1292. fields.push(
  1293. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1294. _,
  1295. ::protobuf::types::ProtobufTypeMessage<ExternalId>,
  1296. >(
  1297. "external_id",
  1298. |m: &Artist| &m.external_id,
  1299. |m: &mut Artist| &mut m.external_id,
  1300. ),
  1301. );
  1302. fields.push(
  1303. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1304. _,
  1305. ::protobuf::types::ProtobufTypeMessage<Image>,
  1306. >(
  1307. "portrait",
  1308. |m: &Artist| &m.portrait,
  1309. |m: &mut Artist| &mut m.portrait,
  1310. ),
  1311. );
  1312. fields.push(
  1313. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1314. _,
  1315. ::protobuf::types::ProtobufTypeMessage<Biography>,
  1316. >(
  1317. "biography",
  1318. |m: &Artist| &m.biography,
  1319. |m: &mut Artist| &mut m.biography,
  1320. ),
  1321. );
  1322. fields.push(
  1323. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1324. _,
  1325. ::protobuf::types::ProtobufTypeMessage<ActivityPeriod>,
  1326. >(
  1327. "activity_period",
  1328. |m: &Artist| &m.activity_period,
  1329. |m: &mut Artist| &mut m.activity_period,
  1330. ),
  1331. );
  1332. fields.push(
  1333. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1334. _,
  1335. ::protobuf::types::ProtobufTypeMessage<Restriction>,
  1336. >(
  1337. "restriction",
  1338. |m: &Artist| &m.restriction,
  1339. |m: &mut Artist| &mut m.restriction,
  1340. ),
  1341. );
  1342. fields.push(
  1343. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1344. _,
  1345. ::protobuf::types::ProtobufTypeMessage<Artist>,
  1346. >(
  1347. "related",
  1348. |m: &Artist| &m.related,
  1349. |m: &mut Artist| &mut m.related,
  1350. ),
  1351. );
  1352. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1353. _,
  1354. ::protobuf::types::ProtobufTypeBool,
  1355. >(
  1356. "is_portrait_album_cover",
  1357. |m: &Artist| &m.is_portrait_album_cover,
  1358. |m: &mut Artist| &mut m.is_portrait_album_cover,
  1359. ));
  1360. fields.push(
  1361. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  1362. _,
  1363. ::protobuf::types::ProtobufTypeMessage<ImageGroup>,
  1364. >(
  1365. "portrait_group",
  1366. |m: &Artist| &m.portrait_group,
  1367. |m: &mut Artist| &mut m.portrait_group,
  1368. ),
  1369. );
  1370. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Artist>(
  1371. "Artist",
  1372. fields,
  1373. file_descriptor_proto(),
  1374. )
  1375. })
  1376. }
  1377. }
  1378. fn default_instance() -> &'static Artist {
  1379. static mut instance: ::protobuf::lazy::Lazy<Artist> = ::protobuf::lazy::Lazy::INIT;
  1380. unsafe { instance.get(Artist::new) }
  1381. }
  1382. }
  1383. impl ::protobuf::Clear for Artist {
  1384. fn clear(&mut self) {
  1385. self.gid.clear();
  1386. self.name.clear();
  1387. self.popularity = ::std::option::Option::None;
  1388. self.top_track.clear();
  1389. self.album_group.clear();
  1390. self.single_group.clear();
  1391. self.compilation_group.clear();
  1392. self.appears_on_group.clear();
  1393. self.genre.clear();
  1394. self.external_id.clear();
  1395. self.portrait.clear();
  1396. self.biography.clear();
  1397. self.activity_period.clear();
  1398. self.restriction.clear();
  1399. self.related.clear();
  1400. self.is_portrait_album_cover = ::std::option::Option::None;
  1401. self.portrait_group.clear();
  1402. self.unknown_fields.clear();
  1403. }
  1404. }
  1405. impl ::std::fmt::Debug for Artist {
  1406. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1407. ::protobuf::text_format::fmt(self, f)
  1408. }
  1409. }
  1410. impl ::protobuf::reflect::ProtobufValue for Artist {
  1411. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1412. ::protobuf::reflect::ReflectValueRef::Message(self)
  1413. }
  1414. }
  1415. #[derive(PartialEq, Clone, Default)]
  1416. pub struct AlbumGroup {
  1417. // message fields
  1418. album: ::protobuf::RepeatedField<Album>,
  1419. // special fields
  1420. pub unknown_fields: ::protobuf::UnknownFields,
  1421. pub cached_size: ::protobuf::CachedSize,
  1422. }
  1423. impl<'a> ::std::default::Default for &'a AlbumGroup {
  1424. fn default() -> &'a AlbumGroup {
  1425. <AlbumGroup as ::protobuf::Message>::default_instance()
  1426. }
  1427. }
  1428. impl AlbumGroup {
  1429. pub fn new() -> AlbumGroup {
  1430. ::std::default::Default::default()
  1431. }
  1432. // repeated .Album album = 1;
  1433. pub fn get_album(&self) -> &[Album] {
  1434. &self.album
  1435. }
  1436. pub fn clear_album(&mut self) {
  1437. self.album.clear();
  1438. }
  1439. // Param is passed by value, moved
  1440. pub fn set_album(&mut self, v: ::protobuf::RepeatedField<Album>) {
  1441. self.album = v;
  1442. }
  1443. // Mutable pointer to the field.
  1444. pub fn mut_album(&mut self) -> &mut ::protobuf::RepeatedField<Album> {
  1445. &mut self.album
  1446. }
  1447. // Take field
  1448. pub fn take_album(&mut self) -> ::protobuf::RepeatedField<Album> {
  1449. ::std::mem::replace(&mut self.album, ::protobuf::RepeatedField::new())
  1450. }
  1451. }
  1452. impl ::protobuf::Message for AlbumGroup {
  1453. fn is_initialized(&self) -> bool {
  1454. for v in &self.album {
  1455. if !v.is_initialized() {
  1456. return false;
  1457. }
  1458. }
  1459. true
  1460. }
  1461. fn merge_from(
  1462. &mut self,
  1463. is: &mut ::protobuf::CodedInputStream<'_>,
  1464. ) -> ::protobuf::ProtobufResult<()> {
  1465. while !is.eof()? {
  1466. let (field_number, wire_type) = is.read_tag_unpack()?;
  1467. match field_number {
  1468. 1 => {
  1469. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.album)?;
  1470. }
  1471. _ => {
  1472. ::protobuf::rt::read_unknown_or_skip_group(
  1473. field_number,
  1474. wire_type,
  1475. is,
  1476. self.mut_unknown_fields(),
  1477. )?;
  1478. }
  1479. };
  1480. }
  1481. ::std::result::Result::Ok(())
  1482. }
  1483. // Compute sizes of nested messages
  1484. #[allow(unused_variables)]
  1485. fn compute_size(&self) -> u32 {
  1486. let mut my_size = 0;
  1487. for value in &self.album {
  1488. let len = value.compute_size();
  1489. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1490. }
  1491. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1492. self.cached_size.set(my_size);
  1493. my_size
  1494. }
  1495. fn write_to_with_cached_sizes(
  1496. &self,
  1497. os: &mut ::protobuf::CodedOutputStream<'_>,
  1498. ) -> ::protobuf::ProtobufResult<()> {
  1499. for v in &self.album {
  1500. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1501. os.write_raw_varint32(v.get_cached_size())?;
  1502. v.write_to_with_cached_sizes(os)?;
  1503. }
  1504. os.write_unknown_fields(self.get_unknown_fields())?;
  1505. ::std::result::Result::Ok(())
  1506. }
  1507. fn get_cached_size(&self) -> u32 {
  1508. self.cached_size.get()
  1509. }
  1510. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1511. &self.unknown_fields
  1512. }
  1513. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1514. &mut self.unknown_fields
  1515. }
  1516. fn as_any(&self) -> &dyn (::std::any::Any) {
  1517. self as &dyn (::std::any::Any)
  1518. }
  1519. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1520. self as &mut dyn (::std::any::Any)
  1521. }
  1522. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1523. self
  1524. }
  1525. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1526. Self::descriptor_static()
  1527. }
  1528. fn new() -> AlbumGroup {
  1529. AlbumGroup::new()
  1530. }
  1531. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1532. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  1533. ::protobuf::lazy::Lazy::INIT;
  1534. unsafe {
  1535. descriptor.get(|| {
  1536. let mut fields = ::std::vec::Vec::new();
  1537. fields.push(
  1538. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  1539. _,
  1540. ::protobuf::types::ProtobufTypeMessage<Album>,
  1541. >(
  1542. "album",
  1543. |m: &AlbumGroup| &m.album,
  1544. |m: &mut AlbumGroup| &mut m.album,
  1545. ),
  1546. );
  1547. ::protobuf::reflect::MessageDescriptor::new_pb_name::<AlbumGroup>(
  1548. "AlbumGroup",
  1549. fields,
  1550. file_descriptor_proto(),
  1551. )
  1552. })
  1553. }
  1554. }
  1555. fn default_instance() -> &'static AlbumGroup {
  1556. static mut instance: ::protobuf::lazy::Lazy<AlbumGroup> = ::protobuf::lazy::Lazy::INIT;
  1557. unsafe { instance.get(AlbumGroup::new) }
  1558. }
  1559. }
  1560. impl ::protobuf::Clear for AlbumGroup {
  1561. fn clear(&mut self) {
  1562. self.album.clear();
  1563. self.unknown_fields.clear();
  1564. }
  1565. }
  1566. impl ::std::fmt::Debug for AlbumGroup {
  1567. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1568. ::protobuf::text_format::fmt(self, f)
  1569. }
  1570. }
  1571. impl ::protobuf::reflect::ProtobufValue for AlbumGroup {
  1572. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1573. ::protobuf::reflect::ReflectValueRef::Message(self)
  1574. }
  1575. }
  1576. #[derive(PartialEq, Clone, Default)]
  1577. pub struct Date {
  1578. // message fields
  1579. year: ::std::option::Option<i32>,
  1580. month: ::std::option::Option<i32>,
  1581. day: ::std::option::Option<i32>,
  1582. hour: ::std::option::Option<i32>,
  1583. minute: ::std::option::Option<i32>,
  1584. // special fields
  1585. pub unknown_fields: ::protobuf::UnknownFields,
  1586. pub cached_size: ::protobuf::CachedSize,
  1587. }
  1588. impl<'a> ::std::default::Default for &'a Date {
  1589. fn default() -> &'a Date {
  1590. <Date as ::protobuf::Message>::default_instance()
  1591. }
  1592. }
  1593. impl Date {
  1594. pub fn new() -> Date {
  1595. ::std::default::Default::default()
  1596. }
  1597. // optional sint32 year = 1;
  1598. pub fn get_year(&self) -> i32 {
  1599. self.year.unwrap_or(0)
  1600. }
  1601. pub fn clear_year(&mut self) {
  1602. self.year = ::std::option::Option::None;
  1603. }
  1604. pub fn has_year(&self) -> bool {
  1605. self.year.is_some()
  1606. }
  1607. // Param is passed by value, moved
  1608. pub fn set_year(&mut self, v: i32) {
  1609. self.year = ::std::option::Option::Some(v);
  1610. }
  1611. // optional sint32 month = 2;
  1612. pub fn get_month(&self) -> i32 {
  1613. self.month.unwrap_or(0)
  1614. }
  1615. pub fn clear_month(&mut self) {
  1616. self.month = ::std::option::Option::None;
  1617. }
  1618. pub fn has_month(&self) -> bool {
  1619. self.month.is_some()
  1620. }
  1621. // Param is passed by value, moved
  1622. pub fn set_month(&mut self, v: i32) {
  1623. self.month = ::std::option::Option::Some(v);
  1624. }
  1625. // optional sint32 day = 3;
  1626. pub fn get_day(&self) -> i32 {
  1627. self.day.unwrap_or(0)
  1628. }
  1629. pub fn clear_day(&mut self) {
  1630. self.day = ::std::option::Option::None;
  1631. }
  1632. pub fn has_day(&self) -> bool {
  1633. self.day.is_some()
  1634. }
  1635. // Param is passed by value, moved
  1636. pub fn set_day(&mut self, v: i32) {
  1637. self.day = ::std::option::Option::Some(v);
  1638. }
  1639. // optional sint32 hour = 4;
  1640. pub fn get_hour(&self) -> i32 {
  1641. self.hour.unwrap_or(0)
  1642. }
  1643. pub fn clear_hour(&mut self) {
  1644. self.hour = ::std::option::Option::None;
  1645. }
  1646. pub fn has_hour(&self) -> bool {
  1647. self.hour.is_some()
  1648. }
  1649. // Param is passed by value, moved
  1650. pub fn set_hour(&mut self, v: i32) {
  1651. self.hour = ::std::option::Option::Some(v);
  1652. }
  1653. // optional sint32 minute = 5;
  1654. pub fn get_minute(&self) -> i32 {
  1655. self.minute.unwrap_or(0)
  1656. }
  1657. pub fn clear_minute(&mut self) {
  1658. self.minute = ::std::option::Option::None;
  1659. }
  1660. pub fn has_minute(&self) -> bool {
  1661. self.minute.is_some()
  1662. }
  1663. // Param is passed by value, moved
  1664. pub fn set_minute(&mut self, v: i32) {
  1665. self.minute = ::std::option::Option::Some(v);
  1666. }
  1667. }
  1668. impl ::protobuf::Message for Date {
  1669. fn is_initialized(&self) -> bool {
  1670. true
  1671. }
  1672. fn merge_from(
  1673. &mut self,
  1674. is: &mut ::protobuf::CodedInputStream<'_>,
  1675. ) -> ::protobuf::ProtobufResult<()> {
  1676. while !is.eof()? {
  1677. let (field_number, wire_type) = is.read_tag_unpack()?;
  1678. match field_number {
  1679. 1 => {
  1680. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1681. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1682. wire_type,
  1683. ));
  1684. }
  1685. let tmp = is.read_sint32()?;
  1686. self.year = ::std::option::Option::Some(tmp);
  1687. }
  1688. 2 => {
  1689. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1690. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1691. wire_type,
  1692. ));
  1693. }
  1694. let tmp = is.read_sint32()?;
  1695. self.month = ::std::option::Option::Some(tmp);
  1696. }
  1697. 3 => {
  1698. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1699. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1700. wire_type,
  1701. ));
  1702. }
  1703. let tmp = is.read_sint32()?;
  1704. self.day = ::std::option::Option::Some(tmp);
  1705. }
  1706. 4 => {
  1707. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1708. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1709. wire_type,
  1710. ));
  1711. }
  1712. let tmp = is.read_sint32()?;
  1713. self.hour = ::std::option::Option::Some(tmp);
  1714. }
  1715. 5 => {
  1716. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1717. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  1718. wire_type,
  1719. ));
  1720. }
  1721. let tmp = is.read_sint32()?;
  1722. self.minute = ::std::option::Option::Some(tmp);
  1723. }
  1724. _ => {
  1725. ::protobuf::rt::read_unknown_or_skip_group(
  1726. field_number,
  1727. wire_type,
  1728. is,
  1729. self.mut_unknown_fields(),
  1730. )?;
  1731. }
  1732. };
  1733. }
  1734. ::std::result::Result::Ok(())
  1735. }
  1736. // Compute sizes of nested messages
  1737. #[allow(unused_variables)]
  1738. fn compute_size(&self) -> u32 {
  1739. let mut my_size = 0;
  1740. if let Some(v) = self.year {
  1741. my_size += ::protobuf::rt::value_varint_zigzag_size(1, v);
  1742. }
  1743. if let Some(v) = self.month {
  1744. my_size += ::protobuf::rt::value_varint_zigzag_size(2, v);
  1745. }
  1746. if let Some(v) = self.day {
  1747. my_size += ::protobuf::rt::value_varint_zigzag_size(3, v);
  1748. }
  1749. if let Some(v) = self.hour {
  1750. my_size += ::protobuf::rt::value_varint_zigzag_size(4, v);
  1751. }
  1752. if let Some(v) = self.minute {
  1753. my_size += ::protobuf::rt::value_varint_zigzag_size(5, v);
  1754. }
  1755. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1756. self.cached_size.set(my_size);
  1757. my_size
  1758. }
  1759. fn write_to_with_cached_sizes(
  1760. &self,
  1761. os: &mut ::protobuf::CodedOutputStream<'_>,
  1762. ) -> ::protobuf::ProtobufResult<()> {
  1763. if let Some(v) = self.year {
  1764. os.write_sint32(1, v)?;
  1765. }
  1766. if let Some(v) = self.month {
  1767. os.write_sint32(2, v)?;
  1768. }
  1769. if let Some(v) = self.day {
  1770. os.write_sint32(3, v)?;
  1771. }
  1772. if let Some(v) = self.hour {
  1773. os.write_sint32(4, v)?;
  1774. }
  1775. if let Some(v) = self.minute {
  1776. os.write_sint32(5, v)?;
  1777. }
  1778. os.write_unknown_fields(self.get_unknown_fields())?;
  1779. ::std::result::Result::Ok(())
  1780. }
  1781. fn get_cached_size(&self) -> u32 {
  1782. self.cached_size.get()
  1783. }
  1784. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1785. &self.unknown_fields
  1786. }
  1787. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1788. &mut self.unknown_fields
  1789. }
  1790. fn as_any(&self) -> &dyn (::std::any::Any) {
  1791. self as &dyn (::std::any::Any)
  1792. }
  1793. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1794. self as &mut dyn (::std::any::Any)
  1795. }
  1796. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1797. self
  1798. }
  1799. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1800. Self::descriptor_static()
  1801. }
  1802. fn new() -> Date {
  1803. Date::new()
  1804. }
  1805. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1806. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  1807. ::protobuf::lazy::Lazy::INIT;
  1808. unsafe {
  1809. descriptor.get(|| {
  1810. let mut fields = ::std::vec::Vec::new();
  1811. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1812. _,
  1813. ::protobuf::types::ProtobufTypeSint32,
  1814. >(
  1815. "year", |m: &Date| &m.year, |m: &mut Date| &mut m.year
  1816. ));
  1817. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1818. _,
  1819. ::protobuf::types::ProtobufTypeSint32,
  1820. >(
  1821. "month", |m: &Date| &m.month, |m: &mut Date| &mut m.month
  1822. ));
  1823. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1824. _,
  1825. ::protobuf::types::ProtobufTypeSint32,
  1826. >(
  1827. "day", |m: &Date| &m.day, |m: &mut Date| &mut m.day
  1828. ));
  1829. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1830. _,
  1831. ::protobuf::types::ProtobufTypeSint32,
  1832. >(
  1833. "hour", |m: &Date| &m.hour, |m: &mut Date| &mut m.hour
  1834. ));
  1835. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  1836. _,
  1837. ::protobuf::types::ProtobufTypeSint32,
  1838. >(
  1839. "minute",
  1840. |m: &Date| &m.minute,
  1841. |m: &mut Date| &mut m.minute,
  1842. ));
  1843. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Date>(
  1844. "Date",
  1845. fields,
  1846. file_descriptor_proto(),
  1847. )
  1848. })
  1849. }
  1850. }
  1851. fn default_instance() -> &'static Date {
  1852. static mut instance: ::protobuf::lazy::Lazy<Date> = ::protobuf::lazy::Lazy::INIT;
  1853. unsafe { instance.get(Date::new) }
  1854. }
  1855. }
  1856. impl ::protobuf::Clear for Date {
  1857. fn clear(&mut self) {
  1858. self.year = ::std::option::Option::None;
  1859. self.month = ::std::option::Option::None;
  1860. self.day = ::std::option::Option::None;
  1861. self.hour = ::std::option::Option::None;
  1862. self.minute = ::std::option::Option::None;
  1863. self.unknown_fields.clear();
  1864. }
  1865. }
  1866. impl ::std::fmt::Debug for Date {
  1867. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1868. ::protobuf::text_format::fmt(self, f)
  1869. }
  1870. }
  1871. impl ::protobuf::reflect::ProtobufValue for Date {
  1872. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1873. ::protobuf::reflect::ReflectValueRef::Message(self)
  1874. }
  1875. }
  1876. #[derive(PartialEq, Clone, Default)]
  1877. pub struct Album {
  1878. // message fields
  1879. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  1880. name: ::protobuf::SingularField<::std::string::String>,
  1881. artist: ::protobuf::RepeatedField<Artist>,
  1882. typ: ::std::option::Option<Album_Type>,
  1883. label: ::protobuf::SingularField<::std::string::String>,
  1884. date: ::protobuf::SingularPtrField<Date>,
  1885. popularity: ::std::option::Option<i32>,
  1886. genre: ::protobuf::RepeatedField<::std::string::String>,
  1887. cover: ::protobuf::RepeatedField<Image>,
  1888. external_id: ::protobuf::RepeatedField<ExternalId>,
  1889. disc: ::protobuf::RepeatedField<Disc>,
  1890. review: ::protobuf::RepeatedField<::std::string::String>,
  1891. copyright: ::protobuf::RepeatedField<Copyright>,
  1892. restriction: ::protobuf::RepeatedField<Restriction>,
  1893. related: ::protobuf::RepeatedField<Album>,
  1894. sale_period: ::protobuf::RepeatedField<SalePeriod>,
  1895. cover_group: ::protobuf::SingularPtrField<ImageGroup>,
  1896. // special fields
  1897. pub unknown_fields: ::protobuf::UnknownFields,
  1898. pub cached_size: ::protobuf::CachedSize,
  1899. }
  1900. impl<'a> ::std::default::Default for &'a Album {
  1901. fn default() -> &'a Album {
  1902. <Album as ::protobuf::Message>::default_instance()
  1903. }
  1904. }
  1905. impl Album {
  1906. pub fn new() -> Album {
  1907. ::std::default::Default::default()
  1908. }
  1909. // optional bytes gid = 1;
  1910. pub fn get_gid(&self) -> &[u8] {
  1911. match self.gid.as_ref() {
  1912. Some(v) => &v,
  1913. None => &[],
  1914. }
  1915. }
  1916. pub fn clear_gid(&mut self) {
  1917. self.gid.clear();
  1918. }
  1919. pub fn has_gid(&self) -> bool {
  1920. self.gid.is_some()
  1921. }
  1922. // Param is passed by value, moved
  1923. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  1924. self.gid = ::protobuf::SingularField::some(v);
  1925. }
  1926. // Mutable pointer to the field.
  1927. // If field is not initialized, it is initialized with default value first.
  1928. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  1929. if self.gid.is_none() {
  1930. self.gid.set_default();
  1931. }
  1932. self.gid.as_mut().unwrap()
  1933. }
  1934. // Take field
  1935. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  1936. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  1937. }
  1938. // optional string name = 2;
  1939. pub fn get_name(&self) -> &str {
  1940. match self.name.as_ref() {
  1941. Some(v) => &v,
  1942. None => "",
  1943. }
  1944. }
  1945. pub fn clear_name(&mut self) {
  1946. self.name.clear();
  1947. }
  1948. pub fn has_name(&self) -> bool {
  1949. self.name.is_some()
  1950. }
  1951. // Param is passed by value, moved
  1952. pub fn set_name(&mut self, v: ::std::string::String) {
  1953. self.name = ::protobuf::SingularField::some(v);
  1954. }
  1955. // Mutable pointer to the field.
  1956. // If field is not initialized, it is initialized with default value first.
  1957. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  1958. if self.name.is_none() {
  1959. self.name.set_default();
  1960. }
  1961. self.name.as_mut().unwrap()
  1962. }
  1963. // Take field
  1964. pub fn take_name(&mut self) -> ::std::string::String {
  1965. self.name
  1966. .take()
  1967. .unwrap_or_else(|| ::std::string::String::new())
  1968. }
  1969. // repeated .Artist artist = 3;
  1970. pub fn get_artist(&self) -> &[Artist] {
  1971. &self.artist
  1972. }
  1973. pub fn clear_artist(&mut self) {
  1974. self.artist.clear();
  1975. }
  1976. // Param is passed by value, moved
  1977. pub fn set_artist(&mut self, v: ::protobuf::RepeatedField<Artist>) {
  1978. self.artist = v;
  1979. }
  1980. // Mutable pointer to the field.
  1981. pub fn mut_artist(&mut self) -> &mut ::protobuf::RepeatedField<Artist> {
  1982. &mut self.artist
  1983. }
  1984. // Take field
  1985. pub fn take_artist(&mut self) -> ::protobuf::RepeatedField<Artist> {
  1986. ::std::mem::replace(&mut self.artist, ::protobuf::RepeatedField::new())
  1987. }
  1988. // optional .Album.Type typ = 4;
  1989. pub fn get_typ(&self) -> Album_Type {
  1990. self.typ.unwrap_or(Album_Type::ALBUM)
  1991. }
  1992. pub fn clear_typ(&mut self) {
  1993. self.typ = ::std::option::Option::None;
  1994. }
  1995. pub fn has_typ(&self) -> bool {
  1996. self.typ.is_some()
  1997. }
  1998. // Param is passed by value, moved
  1999. pub fn set_typ(&mut self, v: Album_Type) {
  2000. self.typ = ::std::option::Option::Some(v);
  2001. }
  2002. // optional string label = 5;
  2003. pub fn get_label(&self) -> &str {
  2004. match self.label.as_ref() {
  2005. Some(v) => &v,
  2006. None => "",
  2007. }
  2008. }
  2009. pub fn clear_label(&mut self) {
  2010. self.label.clear();
  2011. }
  2012. pub fn has_label(&self) -> bool {
  2013. self.label.is_some()
  2014. }
  2015. // Param is passed by value, moved
  2016. pub fn set_label(&mut self, v: ::std::string::String) {
  2017. self.label = ::protobuf::SingularField::some(v);
  2018. }
  2019. // Mutable pointer to the field.
  2020. // If field is not initialized, it is initialized with default value first.
  2021. pub fn mut_label(&mut self) -> &mut ::std::string::String {
  2022. if self.label.is_none() {
  2023. self.label.set_default();
  2024. }
  2025. self.label.as_mut().unwrap()
  2026. }
  2027. // Take field
  2028. pub fn take_label(&mut self) -> ::std::string::String {
  2029. self.label
  2030. .take()
  2031. .unwrap_or_else(|| ::std::string::String::new())
  2032. }
  2033. // optional .Date date = 6;
  2034. pub fn get_date(&self) -> &Date {
  2035. self.date
  2036. .as_ref()
  2037. .unwrap_or_else(|| Date::default_instance())
  2038. }
  2039. pub fn clear_date(&mut self) {
  2040. self.date.clear();
  2041. }
  2042. pub fn has_date(&self) -> bool {
  2043. self.date.is_some()
  2044. }
  2045. // Param is passed by value, moved
  2046. pub fn set_date(&mut self, v: Date) {
  2047. self.date = ::protobuf::SingularPtrField::some(v);
  2048. }
  2049. // Mutable pointer to the field.
  2050. // If field is not initialized, it is initialized with default value first.
  2051. pub fn mut_date(&mut self) -> &mut Date {
  2052. if self.date.is_none() {
  2053. self.date.set_default();
  2054. }
  2055. self.date.as_mut().unwrap()
  2056. }
  2057. // Take field
  2058. pub fn take_date(&mut self) -> Date {
  2059. self.date.take().unwrap_or_else(|| Date::new())
  2060. }
  2061. // optional sint32 popularity = 7;
  2062. pub fn get_popularity(&self) -> i32 {
  2063. self.popularity.unwrap_or(0)
  2064. }
  2065. pub fn clear_popularity(&mut self) {
  2066. self.popularity = ::std::option::Option::None;
  2067. }
  2068. pub fn has_popularity(&self) -> bool {
  2069. self.popularity.is_some()
  2070. }
  2071. // Param is passed by value, moved
  2072. pub fn set_popularity(&mut self, v: i32) {
  2073. self.popularity = ::std::option::Option::Some(v);
  2074. }
  2075. // repeated string genre = 8;
  2076. pub fn get_genre(&self) -> &[::std::string::String] {
  2077. &self.genre
  2078. }
  2079. pub fn clear_genre(&mut self) {
  2080. self.genre.clear();
  2081. }
  2082. // Param is passed by value, moved
  2083. pub fn set_genre(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  2084. self.genre = v;
  2085. }
  2086. // Mutable pointer to the field.
  2087. pub fn mut_genre(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  2088. &mut self.genre
  2089. }
  2090. // Take field
  2091. pub fn take_genre(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  2092. ::std::mem::replace(&mut self.genre, ::protobuf::RepeatedField::new())
  2093. }
  2094. // repeated .Image cover = 9;
  2095. pub fn get_cover(&self) -> &[Image] {
  2096. &self.cover
  2097. }
  2098. pub fn clear_cover(&mut self) {
  2099. self.cover.clear();
  2100. }
  2101. // Param is passed by value, moved
  2102. pub fn set_cover(&mut self, v: ::protobuf::RepeatedField<Image>) {
  2103. self.cover = v;
  2104. }
  2105. // Mutable pointer to the field.
  2106. pub fn mut_cover(&mut self) -> &mut ::protobuf::RepeatedField<Image> {
  2107. &mut self.cover
  2108. }
  2109. // Take field
  2110. pub fn take_cover(&mut self) -> ::protobuf::RepeatedField<Image> {
  2111. ::std::mem::replace(&mut self.cover, ::protobuf::RepeatedField::new())
  2112. }
  2113. // repeated .ExternalId external_id = 10;
  2114. pub fn get_external_id(&self) -> &[ExternalId] {
  2115. &self.external_id
  2116. }
  2117. pub fn clear_external_id(&mut self) {
  2118. self.external_id.clear();
  2119. }
  2120. // Param is passed by value, moved
  2121. pub fn set_external_id(&mut self, v: ::protobuf::RepeatedField<ExternalId>) {
  2122. self.external_id = v;
  2123. }
  2124. // Mutable pointer to the field.
  2125. pub fn mut_external_id(&mut self) -> &mut ::protobuf::RepeatedField<ExternalId> {
  2126. &mut self.external_id
  2127. }
  2128. // Take field
  2129. pub fn take_external_id(&mut self) -> ::protobuf::RepeatedField<ExternalId> {
  2130. ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new())
  2131. }
  2132. // repeated .Disc disc = 11;
  2133. pub fn get_disc(&self) -> &[Disc] {
  2134. &self.disc
  2135. }
  2136. pub fn clear_disc(&mut self) {
  2137. self.disc.clear();
  2138. }
  2139. // Param is passed by value, moved
  2140. pub fn set_disc(&mut self, v: ::protobuf::RepeatedField<Disc>) {
  2141. self.disc = v;
  2142. }
  2143. // Mutable pointer to the field.
  2144. pub fn mut_disc(&mut self) -> &mut ::protobuf::RepeatedField<Disc> {
  2145. &mut self.disc
  2146. }
  2147. // Take field
  2148. pub fn take_disc(&mut self) -> ::protobuf::RepeatedField<Disc> {
  2149. ::std::mem::replace(&mut self.disc, ::protobuf::RepeatedField::new())
  2150. }
  2151. // repeated string review = 12;
  2152. pub fn get_review(&self) -> &[::std::string::String] {
  2153. &self.review
  2154. }
  2155. pub fn clear_review(&mut self) {
  2156. self.review.clear();
  2157. }
  2158. // Param is passed by value, moved
  2159. pub fn set_review(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  2160. self.review = v;
  2161. }
  2162. // Mutable pointer to the field.
  2163. pub fn mut_review(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  2164. &mut self.review
  2165. }
  2166. // Take field
  2167. pub fn take_review(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  2168. ::std::mem::replace(&mut self.review, ::protobuf::RepeatedField::new())
  2169. }
  2170. // repeated .Copyright copyright = 13;
  2171. pub fn get_copyright(&self) -> &[Copyright] {
  2172. &self.copyright
  2173. }
  2174. pub fn clear_copyright(&mut self) {
  2175. self.copyright.clear();
  2176. }
  2177. // Param is passed by value, moved
  2178. pub fn set_copyright(&mut self, v: ::protobuf::RepeatedField<Copyright>) {
  2179. self.copyright = v;
  2180. }
  2181. // Mutable pointer to the field.
  2182. pub fn mut_copyright(&mut self) -> &mut ::protobuf::RepeatedField<Copyright> {
  2183. &mut self.copyright
  2184. }
  2185. // Take field
  2186. pub fn take_copyright(&mut self) -> ::protobuf::RepeatedField<Copyright> {
  2187. ::std::mem::replace(&mut self.copyright, ::protobuf::RepeatedField::new())
  2188. }
  2189. // repeated .Restriction restriction = 14;
  2190. pub fn get_restriction(&self) -> &[Restriction] {
  2191. &self.restriction
  2192. }
  2193. pub fn clear_restriction(&mut self) {
  2194. self.restriction.clear();
  2195. }
  2196. // Param is passed by value, moved
  2197. pub fn set_restriction(&mut self, v: ::protobuf::RepeatedField<Restriction>) {
  2198. self.restriction = v;
  2199. }
  2200. // Mutable pointer to the field.
  2201. pub fn mut_restriction(&mut self) -> &mut ::protobuf::RepeatedField<Restriction> {
  2202. &mut self.restriction
  2203. }
  2204. // Take field
  2205. pub fn take_restriction(&mut self) -> ::protobuf::RepeatedField<Restriction> {
  2206. ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new())
  2207. }
  2208. // repeated .Album related = 15;
  2209. pub fn get_related(&self) -> &[Album] {
  2210. &self.related
  2211. }
  2212. pub fn clear_related(&mut self) {
  2213. self.related.clear();
  2214. }
  2215. // Param is passed by value, moved
  2216. pub fn set_related(&mut self, v: ::protobuf::RepeatedField<Album>) {
  2217. self.related = v;
  2218. }
  2219. // Mutable pointer to the field.
  2220. pub fn mut_related(&mut self) -> &mut ::protobuf::RepeatedField<Album> {
  2221. &mut self.related
  2222. }
  2223. // Take field
  2224. pub fn take_related(&mut self) -> ::protobuf::RepeatedField<Album> {
  2225. ::std::mem::replace(&mut self.related, ::protobuf::RepeatedField::new())
  2226. }
  2227. // repeated .SalePeriod sale_period = 16;
  2228. pub fn get_sale_period(&self) -> &[SalePeriod] {
  2229. &self.sale_period
  2230. }
  2231. pub fn clear_sale_period(&mut self) {
  2232. self.sale_period.clear();
  2233. }
  2234. // Param is passed by value, moved
  2235. pub fn set_sale_period(&mut self, v: ::protobuf::RepeatedField<SalePeriod>) {
  2236. self.sale_period = v;
  2237. }
  2238. // Mutable pointer to the field.
  2239. pub fn mut_sale_period(&mut self) -> &mut ::protobuf::RepeatedField<SalePeriod> {
  2240. &mut self.sale_period
  2241. }
  2242. // Take field
  2243. pub fn take_sale_period(&mut self) -> ::protobuf::RepeatedField<SalePeriod> {
  2244. ::std::mem::replace(&mut self.sale_period, ::protobuf::RepeatedField::new())
  2245. }
  2246. // optional .ImageGroup cover_group = 17;
  2247. pub fn get_cover_group(&self) -> &ImageGroup {
  2248. self.cover_group
  2249. .as_ref()
  2250. .unwrap_or_else(|| ImageGroup::default_instance())
  2251. }
  2252. pub fn clear_cover_group(&mut self) {
  2253. self.cover_group.clear();
  2254. }
  2255. pub fn has_cover_group(&self) -> bool {
  2256. self.cover_group.is_some()
  2257. }
  2258. // Param is passed by value, moved
  2259. pub fn set_cover_group(&mut self, v: ImageGroup) {
  2260. self.cover_group = ::protobuf::SingularPtrField::some(v);
  2261. }
  2262. // Mutable pointer to the field.
  2263. // If field is not initialized, it is initialized with default value first.
  2264. pub fn mut_cover_group(&mut self) -> &mut ImageGroup {
  2265. if self.cover_group.is_none() {
  2266. self.cover_group.set_default();
  2267. }
  2268. self.cover_group.as_mut().unwrap()
  2269. }
  2270. // Take field
  2271. pub fn take_cover_group(&mut self) -> ImageGroup {
  2272. self.cover_group.take().unwrap_or_else(|| ImageGroup::new())
  2273. }
  2274. }
  2275. impl ::protobuf::Message for Album {
  2276. fn is_initialized(&self) -> bool {
  2277. for v in &self.artist {
  2278. if !v.is_initialized() {
  2279. return false;
  2280. }
  2281. }
  2282. for v in &self.date {
  2283. if !v.is_initialized() {
  2284. return false;
  2285. }
  2286. }
  2287. for v in &self.cover {
  2288. if !v.is_initialized() {
  2289. return false;
  2290. }
  2291. }
  2292. for v in &self.external_id {
  2293. if !v.is_initialized() {
  2294. return false;
  2295. }
  2296. }
  2297. for v in &self.disc {
  2298. if !v.is_initialized() {
  2299. return false;
  2300. }
  2301. }
  2302. for v in &self.copyright {
  2303. if !v.is_initialized() {
  2304. return false;
  2305. }
  2306. }
  2307. for v in &self.restriction {
  2308. if !v.is_initialized() {
  2309. return false;
  2310. }
  2311. }
  2312. for v in &self.related {
  2313. if !v.is_initialized() {
  2314. return false;
  2315. }
  2316. }
  2317. for v in &self.sale_period {
  2318. if !v.is_initialized() {
  2319. return false;
  2320. }
  2321. }
  2322. for v in &self.cover_group {
  2323. if !v.is_initialized() {
  2324. return false;
  2325. }
  2326. }
  2327. true
  2328. }
  2329. fn merge_from(
  2330. &mut self,
  2331. is: &mut ::protobuf::CodedInputStream<'_>,
  2332. ) -> ::protobuf::ProtobufResult<()> {
  2333. while !is.eof()? {
  2334. let (field_number, wire_type) = is.read_tag_unpack()?;
  2335. match field_number {
  2336. 1 => {
  2337. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  2338. }
  2339. 2 => {
  2340. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  2341. }
  2342. 3 => {
  2343. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.artist)?;
  2344. }
  2345. 4 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  2346. wire_type,
  2347. is,
  2348. &mut self.typ,
  2349. 4,
  2350. &mut self.unknown_fields,
  2351. )?,
  2352. 5 => {
  2353. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.label)?;
  2354. }
  2355. 6 => {
  2356. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.date)?;
  2357. }
  2358. 7 => {
  2359. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2360. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  2361. wire_type,
  2362. ));
  2363. }
  2364. let tmp = is.read_sint32()?;
  2365. self.popularity = ::std::option::Option::Some(tmp);
  2366. }
  2367. 8 => {
  2368. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.genre)?;
  2369. }
  2370. 9 => {
  2371. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.cover)?;
  2372. }
  2373. 10 => {
  2374. ::protobuf::rt::read_repeated_message_into(
  2375. wire_type,
  2376. is,
  2377. &mut self.external_id,
  2378. )?;
  2379. }
  2380. 11 => {
  2381. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.disc)?;
  2382. }
  2383. 12 => {
  2384. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.review)?;
  2385. }
  2386. 13 => {
  2387. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.copyright)?;
  2388. }
  2389. 14 => {
  2390. ::protobuf::rt::read_repeated_message_into(
  2391. wire_type,
  2392. is,
  2393. &mut self.restriction,
  2394. )?;
  2395. }
  2396. 15 => {
  2397. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.related)?;
  2398. }
  2399. 16 => {
  2400. ::protobuf::rt::read_repeated_message_into(
  2401. wire_type,
  2402. is,
  2403. &mut self.sale_period,
  2404. )?;
  2405. }
  2406. 17 => {
  2407. ::protobuf::rt::read_singular_message_into(
  2408. wire_type,
  2409. is,
  2410. &mut self.cover_group,
  2411. )?;
  2412. }
  2413. _ => {
  2414. ::protobuf::rt::read_unknown_or_skip_group(
  2415. field_number,
  2416. wire_type,
  2417. is,
  2418. self.mut_unknown_fields(),
  2419. )?;
  2420. }
  2421. };
  2422. }
  2423. ::std::result::Result::Ok(())
  2424. }
  2425. // Compute sizes of nested messages
  2426. #[allow(unused_variables)]
  2427. fn compute_size(&self) -> u32 {
  2428. let mut my_size = 0;
  2429. if let Some(ref v) = self.gid.as_ref() {
  2430. my_size += ::protobuf::rt::bytes_size(1, &v);
  2431. }
  2432. if let Some(ref v) = self.name.as_ref() {
  2433. my_size += ::protobuf::rt::string_size(2, &v);
  2434. }
  2435. for value in &self.artist {
  2436. let len = value.compute_size();
  2437. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2438. }
  2439. if let Some(v) = self.typ {
  2440. my_size += ::protobuf::rt::enum_size(4, v);
  2441. }
  2442. if let Some(ref v) = self.label.as_ref() {
  2443. my_size += ::protobuf::rt::string_size(5, &v);
  2444. }
  2445. if let Some(ref v) = self.date.as_ref() {
  2446. let len = v.compute_size();
  2447. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2448. }
  2449. if let Some(v) = self.popularity {
  2450. my_size += ::protobuf::rt::value_varint_zigzag_size(7, v);
  2451. }
  2452. for value in &self.genre {
  2453. my_size += ::protobuf::rt::string_size(8, &value);
  2454. }
  2455. for value in &self.cover {
  2456. let len = value.compute_size();
  2457. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2458. }
  2459. for value in &self.external_id {
  2460. let len = value.compute_size();
  2461. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2462. }
  2463. for value in &self.disc {
  2464. let len = value.compute_size();
  2465. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2466. }
  2467. for value in &self.review {
  2468. my_size += ::protobuf::rt::string_size(12, &value);
  2469. }
  2470. for value in &self.copyright {
  2471. let len = value.compute_size();
  2472. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2473. }
  2474. for value in &self.restriction {
  2475. let len = value.compute_size();
  2476. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2477. }
  2478. for value in &self.related {
  2479. let len = value.compute_size();
  2480. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2481. }
  2482. for value in &self.sale_period {
  2483. let len = value.compute_size();
  2484. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2485. }
  2486. if let Some(ref v) = self.cover_group.as_ref() {
  2487. let len = v.compute_size();
  2488. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2489. }
  2490. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2491. self.cached_size.set(my_size);
  2492. my_size
  2493. }
  2494. fn write_to_with_cached_sizes(
  2495. &self,
  2496. os: &mut ::protobuf::CodedOutputStream<'_>,
  2497. ) -> ::protobuf::ProtobufResult<()> {
  2498. if let Some(ref v) = self.gid.as_ref() {
  2499. os.write_bytes(1, &v)?;
  2500. }
  2501. if let Some(ref v) = self.name.as_ref() {
  2502. os.write_string(2, &v)?;
  2503. }
  2504. for v in &self.artist {
  2505. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2506. os.write_raw_varint32(v.get_cached_size())?;
  2507. v.write_to_with_cached_sizes(os)?;
  2508. }
  2509. if let Some(v) = self.typ {
  2510. os.write_enum(4, v.value())?;
  2511. }
  2512. if let Some(ref v) = self.label.as_ref() {
  2513. os.write_string(5, &v)?;
  2514. }
  2515. if let Some(ref v) = self.date.as_ref() {
  2516. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2517. os.write_raw_varint32(v.get_cached_size())?;
  2518. v.write_to_with_cached_sizes(os)?;
  2519. }
  2520. if let Some(v) = self.popularity {
  2521. os.write_sint32(7, v)?;
  2522. }
  2523. for v in &self.genre {
  2524. os.write_string(8, &v)?;
  2525. }
  2526. for v in &self.cover {
  2527. os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2528. os.write_raw_varint32(v.get_cached_size())?;
  2529. v.write_to_with_cached_sizes(os)?;
  2530. }
  2531. for v in &self.external_id {
  2532. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2533. os.write_raw_varint32(v.get_cached_size())?;
  2534. v.write_to_with_cached_sizes(os)?;
  2535. }
  2536. for v in &self.disc {
  2537. os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2538. os.write_raw_varint32(v.get_cached_size())?;
  2539. v.write_to_with_cached_sizes(os)?;
  2540. }
  2541. for v in &self.review {
  2542. os.write_string(12, &v)?;
  2543. }
  2544. for v in &self.copyright {
  2545. os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2546. os.write_raw_varint32(v.get_cached_size())?;
  2547. v.write_to_with_cached_sizes(os)?;
  2548. }
  2549. for v in &self.restriction {
  2550. os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2551. os.write_raw_varint32(v.get_cached_size())?;
  2552. v.write_to_with_cached_sizes(os)?;
  2553. }
  2554. for v in &self.related {
  2555. os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2556. os.write_raw_varint32(v.get_cached_size())?;
  2557. v.write_to_with_cached_sizes(os)?;
  2558. }
  2559. for v in &self.sale_period {
  2560. os.write_tag(16, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2561. os.write_raw_varint32(v.get_cached_size())?;
  2562. v.write_to_with_cached_sizes(os)?;
  2563. }
  2564. if let Some(ref v) = self.cover_group.as_ref() {
  2565. os.write_tag(17, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2566. os.write_raw_varint32(v.get_cached_size())?;
  2567. v.write_to_with_cached_sizes(os)?;
  2568. }
  2569. os.write_unknown_fields(self.get_unknown_fields())?;
  2570. ::std::result::Result::Ok(())
  2571. }
  2572. fn get_cached_size(&self) -> u32 {
  2573. self.cached_size.get()
  2574. }
  2575. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2576. &self.unknown_fields
  2577. }
  2578. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2579. &mut self.unknown_fields
  2580. }
  2581. fn as_any(&self) -> &dyn (::std::any::Any) {
  2582. self as &dyn (::std::any::Any)
  2583. }
  2584. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2585. self as &mut dyn (::std::any::Any)
  2586. }
  2587. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2588. self
  2589. }
  2590. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2591. Self::descriptor_static()
  2592. }
  2593. fn new() -> Album {
  2594. Album::new()
  2595. }
  2596. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2597. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  2598. ::protobuf::lazy::Lazy::INIT;
  2599. unsafe {
  2600. descriptor.get(|| {
  2601. let mut fields = ::std::vec::Vec::new();
  2602. fields.push(
  2603. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  2604. _,
  2605. ::protobuf::types::ProtobufTypeBytes,
  2606. >("gid", |m: &Album| &m.gid, |m: &mut Album| &mut m.gid),
  2607. );
  2608. fields.push(
  2609. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  2610. _,
  2611. ::protobuf::types::ProtobufTypeString,
  2612. >("name", |m: &Album| &m.name, |m: &mut Album| &mut m.name),
  2613. );
  2614. fields.push(
  2615. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2616. _,
  2617. ::protobuf::types::ProtobufTypeMessage<Artist>,
  2618. >(
  2619. "artist",
  2620. |m: &Album| &m.artist,
  2621. |m: &mut Album| &mut m.artist,
  2622. ),
  2623. );
  2624. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  2625. _,
  2626. ::protobuf::types::ProtobufTypeEnum<Album_Type>,
  2627. >(
  2628. "typ", |m: &Album| &m.typ, |m: &mut Album| &mut m.typ
  2629. ));
  2630. fields.push(
  2631. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  2632. _,
  2633. ::protobuf::types::ProtobufTypeString,
  2634. >(
  2635. "label", |m: &Album| &m.label, |m: &mut Album| &mut m.label
  2636. ),
  2637. );
  2638. fields.push(
  2639. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2640. _,
  2641. ::protobuf::types::ProtobufTypeMessage<Date>,
  2642. >("date", |m: &Album| &m.date, |m: &mut Album| &mut m.date),
  2643. );
  2644. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  2645. _,
  2646. ::protobuf::types::ProtobufTypeSint32,
  2647. >(
  2648. "popularity",
  2649. |m: &Album| &m.popularity,
  2650. |m: &mut Album| &mut m.popularity,
  2651. ));
  2652. fields.push(
  2653. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2654. _,
  2655. ::protobuf::types::ProtobufTypeString,
  2656. >(
  2657. "genre", |m: &Album| &m.genre, |m: &mut Album| &mut m.genre
  2658. ),
  2659. );
  2660. fields.push(
  2661. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2662. _,
  2663. ::protobuf::types::ProtobufTypeMessage<Image>,
  2664. >(
  2665. "cover", |m: &Album| &m.cover, |m: &mut Album| &mut m.cover
  2666. ),
  2667. );
  2668. fields.push(
  2669. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2670. _,
  2671. ::protobuf::types::ProtobufTypeMessage<ExternalId>,
  2672. >(
  2673. "external_id",
  2674. |m: &Album| &m.external_id,
  2675. |m: &mut Album| &mut m.external_id,
  2676. ),
  2677. );
  2678. fields.push(
  2679. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2680. _,
  2681. ::protobuf::types::ProtobufTypeMessage<Disc>,
  2682. >("disc", |m: &Album| &m.disc, |m: &mut Album| &mut m.disc),
  2683. );
  2684. fields.push(
  2685. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2686. _,
  2687. ::protobuf::types::ProtobufTypeString,
  2688. >(
  2689. "review",
  2690. |m: &Album| &m.review,
  2691. |m: &mut Album| &mut m.review,
  2692. ),
  2693. );
  2694. fields.push(
  2695. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2696. _,
  2697. ::protobuf::types::ProtobufTypeMessage<Copyright>,
  2698. >(
  2699. "copyright",
  2700. |m: &Album| &m.copyright,
  2701. |m: &mut Album| &mut m.copyright,
  2702. ),
  2703. );
  2704. fields.push(
  2705. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2706. _,
  2707. ::protobuf::types::ProtobufTypeMessage<Restriction>,
  2708. >(
  2709. "restriction",
  2710. |m: &Album| &m.restriction,
  2711. |m: &mut Album| &mut m.restriction,
  2712. ),
  2713. );
  2714. fields.push(
  2715. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2716. _,
  2717. ::protobuf::types::ProtobufTypeMessage<Album>,
  2718. >(
  2719. "related",
  2720. |m: &Album| &m.related,
  2721. |m: &mut Album| &mut m.related,
  2722. ),
  2723. );
  2724. fields.push(
  2725. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  2726. _,
  2727. ::protobuf::types::ProtobufTypeMessage<SalePeriod>,
  2728. >(
  2729. "sale_period",
  2730. |m: &Album| &m.sale_period,
  2731. |m: &mut Album| &mut m.sale_period,
  2732. ),
  2733. );
  2734. fields.push(
  2735. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  2736. _,
  2737. ::protobuf::types::ProtobufTypeMessage<ImageGroup>,
  2738. >(
  2739. "cover_group",
  2740. |m: &Album| &m.cover_group,
  2741. |m: &mut Album| &mut m.cover_group,
  2742. ),
  2743. );
  2744. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Album>(
  2745. "Album",
  2746. fields,
  2747. file_descriptor_proto(),
  2748. )
  2749. })
  2750. }
  2751. }
  2752. fn default_instance() -> &'static Album {
  2753. static mut instance: ::protobuf::lazy::Lazy<Album> = ::protobuf::lazy::Lazy::INIT;
  2754. unsafe { instance.get(Album::new) }
  2755. }
  2756. }
  2757. impl ::protobuf::Clear for Album {
  2758. fn clear(&mut self) {
  2759. self.gid.clear();
  2760. self.name.clear();
  2761. self.artist.clear();
  2762. self.typ = ::std::option::Option::None;
  2763. self.label.clear();
  2764. self.date.clear();
  2765. self.popularity = ::std::option::Option::None;
  2766. self.genre.clear();
  2767. self.cover.clear();
  2768. self.external_id.clear();
  2769. self.disc.clear();
  2770. self.review.clear();
  2771. self.copyright.clear();
  2772. self.restriction.clear();
  2773. self.related.clear();
  2774. self.sale_period.clear();
  2775. self.cover_group.clear();
  2776. self.unknown_fields.clear();
  2777. }
  2778. }
  2779. impl ::std::fmt::Debug for Album {
  2780. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2781. ::protobuf::text_format::fmt(self, f)
  2782. }
  2783. }
  2784. impl ::protobuf::reflect::ProtobufValue for Album {
  2785. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2786. ::protobuf::reflect::ReflectValueRef::Message(self)
  2787. }
  2788. }
  2789. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  2790. pub enum Album_Type {
  2791. ALBUM = 1,
  2792. SINGLE = 2,
  2793. COMPILATION = 3,
  2794. EP = 4,
  2795. }
  2796. impl ::protobuf::ProtobufEnum for Album_Type {
  2797. fn value(&self) -> i32 {
  2798. *self as i32
  2799. }
  2800. fn from_i32(value: i32) -> ::std::option::Option<Album_Type> {
  2801. match value {
  2802. 1 => ::std::option::Option::Some(Album_Type::ALBUM),
  2803. 2 => ::std::option::Option::Some(Album_Type::SINGLE),
  2804. 3 => ::std::option::Option::Some(Album_Type::COMPILATION),
  2805. 4 => ::std::option::Option::Some(Album_Type::EP),
  2806. _ => ::std::option::Option::None,
  2807. }
  2808. }
  2809. fn values() -> &'static [Self] {
  2810. static values: &'static [Album_Type] = &[
  2811. Album_Type::ALBUM,
  2812. Album_Type::SINGLE,
  2813. Album_Type::COMPILATION,
  2814. Album_Type::EP,
  2815. ];
  2816. values
  2817. }
  2818. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  2819. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  2820. ::protobuf::lazy::Lazy::INIT;
  2821. unsafe {
  2822. descriptor.get(|| {
  2823. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Album_Type>(
  2824. "Album.Type",
  2825. file_descriptor_proto(),
  2826. )
  2827. })
  2828. }
  2829. }
  2830. }
  2831. impl ::std::marker::Copy for Album_Type {}
  2832. // Note, `Default` is implemented although default value is not 0
  2833. impl ::std::default::Default for Album_Type {
  2834. fn default() -> Self {
  2835. Album_Type::ALBUM
  2836. }
  2837. }
  2838. impl ::protobuf::reflect::ProtobufValue for Album_Type {
  2839. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2840. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  2841. }
  2842. }
  2843. #[derive(PartialEq, Clone, Default)]
  2844. pub struct Track {
  2845. // message fields
  2846. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  2847. name: ::protobuf::SingularField<::std::string::String>,
  2848. album: ::protobuf::SingularPtrField<Album>,
  2849. artist: ::protobuf::RepeatedField<Artist>,
  2850. number: ::std::option::Option<i32>,
  2851. disc_number: ::std::option::Option<i32>,
  2852. duration: ::std::option::Option<i32>,
  2853. popularity: ::std::option::Option<i32>,
  2854. explicit: ::std::option::Option<bool>,
  2855. external_id: ::protobuf::RepeatedField<ExternalId>,
  2856. restriction: ::protobuf::RepeatedField<Restriction>,
  2857. file: ::protobuf::RepeatedField<AudioFile>,
  2858. alternative: ::protobuf::RepeatedField<Track>,
  2859. sale_period: ::protobuf::RepeatedField<SalePeriod>,
  2860. preview: ::protobuf::RepeatedField<AudioFile>,
  2861. // special fields
  2862. pub unknown_fields: ::protobuf::UnknownFields,
  2863. pub cached_size: ::protobuf::CachedSize,
  2864. }
  2865. impl<'a> ::std::default::Default for &'a Track {
  2866. fn default() -> &'a Track {
  2867. <Track as ::protobuf::Message>::default_instance()
  2868. }
  2869. }
  2870. impl Track {
  2871. pub fn new() -> Track {
  2872. ::std::default::Default::default()
  2873. }
  2874. // optional bytes gid = 1;
  2875. pub fn get_gid(&self) -> &[u8] {
  2876. match self.gid.as_ref() {
  2877. Some(v) => &v,
  2878. None => &[],
  2879. }
  2880. }
  2881. pub fn clear_gid(&mut self) {
  2882. self.gid.clear();
  2883. }
  2884. pub fn has_gid(&self) -> bool {
  2885. self.gid.is_some()
  2886. }
  2887. // Param is passed by value, moved
  2888. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  2889. self.gid = ::protobuf::SingularField::some(v);
  2890. }
  2891. // Mutable pointer to the field.
  2892. // If field is not initialized, it is initialized with default value first.
  2893. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  2894. if self.gid.is_none() {
  2895. self.gid.set_default();
  2896. }
  2897. self.gid.as_mut().unwrap()
  2898. }
  2899. // Take field
  2900. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  2901. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  2902. }
  2903. // optional string name = 2;
  2904. pub fn get_name(&self) -> &str {
  2905. match self.name.as_ref() {
  2906. Some(v) => &v,
  2907. None => "",
  2908. }
  2909. }
  2910. pub fn clear_name(&mut self) {
  2911. self.name.clear();
  2912. }
  2913. pub fn has_name(&self) -> bool {
  2914. self.name.is_some()
  2915. }
  2916. // Param is passed by value, moved
  2917. pub fn set_name(&mut self, v: ::std::string::String) {
  2918. self.name = ::protobuf::SingularField::some(v);
  2919. }
  2920. // Mutable pointer to the field.
  2921. // If field is not initialized, it is initialized with default value first.
  2922. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  2923. if self.name.is_none() {
  2924. self.name.set_default();
  2925. }
  2926. self.name.as_mut().unwrap()
  2927. }
  2928. // Take field
  2929. pub fn take_name(&mut self) -> ::std::string::String {
  2930. self.name
  2931. .take()
  2932. .unwrap_or_else(|| ::std::string::String::new())
  2933. }
  2934. // optional .Album album = 3;
  2935. pub fn get_album(&self) -> &Album {
  2936. self.album
  2937. .as_ref()
  2938. .unwrap_or_else(|| Album::default_instance())
  2939. }
  2940. pub fn clear_album(&mut self) {
  2941. self.album.clear();
  2942. }
  2943. pub fn has_album(&self) -> bool {
  2944. self.album.is_some()
  2945. }
  2946. // Param is passed by value, moved
  2947. pub fn set_album(&mut self, v: Album) {
  2948. self.album = ::protobuf::SingularPtrField::some(v);
  2949. }
  2950. // Mutable pointer to the field.
  2951. // If field is not initialized, it is initialized with default value first.
  2952. pub fn mut_album(&mut self) -> &mut Album {
  2953. if self.album.is_none() {
  2954. self.album.set_default();
  2955. }
  2956. self.album.as_mut().unwrap()
  2957. }
  2958. // Take field
  2959. pub fn take_album(&mut self) -> Album {
  2960. self.album.take().unwrap_or_else(|| Album::new())
  2961. }
  2962. // repeated .Artist artist = 4;
  2963. pub fn get_artist(&self) -> &[Artist] {
  2964. &self.artist
  2965. }
  2966. pub fn clear_artist(&mut self) {
  2967. self.artist.clear();
  2968. }
  2969. // Param is passed by value, moved
  2970. pub fn set_artist(&mut self, v: ::protobuf::RepeatedField<Artist>) {
  2971. self.artist = v;
  2972. }
  2973. // Mutable pointer to the field.
  2974. pub fn mut_artist(&mut self) -> &mut ::protobuf::RepeatedField<Artist> {
  2975. &mut self.artist
  2976. }
  2977. // Take field
  2978. pub fn take_artist(&mut self) -> ::protobuf::RepeatedField<Artist> {
  2979. ::std::mem::replace(&mut self.artist, ::protobuf::RepeatedField::new())
  2980. }
  2981. // optional sint32 number = 5;
  2982. pub fn get_number(&self) -> i32 {
  2983. self.number.unwrap_or(0)
  2984. }
  2985. pub fn clear_number(&mut self) {
  2986. self.number = ::std::option::Option::None;
  2987. }
  2988. pub fn has_number(&self) -> bool {
  2989. self.number.is_some()
  2990. }
  2991. // Param is passed by value, moved
  2992. pub fn set_number(&mut self, v: i32) {
  2993. self.number = ::std::option::Option::Some(v);
  2994. }
  2995. // optional sint32 disc_number = 6;
  2996. pub fn get_disc_number(&self) -> i32 {
  2997. self.disc_number.unwrap_or(0)
  2998. }
  2999. pub fn clear_disc_number(&mut self) {
  3000. self.disc_number = ::std::option::Option::None;
  3001. }
  3002. pub fn has_disc_number(&self) -> bool {
  3003. self.disc_number.is_some()
  3004. }
  3005. // Param is passed by value, moved
  3006. pub fn set_disc_number(&mut self, v: i32) {
  3007. self.disc_number = ::std::option::Option::Some(v);
  3008. }
  3009. // optional sint32 duration = 7;
  3010. pub fn get_duration(&self) -> i32 {
  3011. self.duration.unwrap_or(0)
  3012. }
  3013. pub fn clear_duration(&mut self) {
  3014. self.duration = ::std::option::Option::None;
  3015. }
  3016. pub fn has_duration(&self) -> bool {
  3017. self.duration.is_some()
  3018. }
  3019. // Param is passed by value, moved
  3020. pub fn set_duration(&mut self, v: i32) {
  3021. self.duration = ::std::option::Option::Some(v);
  3022. }
  3023. // optional sint32 popularity = 8;
  3024. pub fn get_popularity(&self) -> i32 {
  3025. self.popularity.unwrap_or(0)
  3026. }
  3027. pub fn clear_popularity(&mut self) {
  3028. self.popularity = ::std::option::Option::None;
  3029. }
  3030. pub fn has_popularity(&self) -> bool {
  3031. self.popularity.is_some()
  3032. }
  3033. // Param is passed by value, moved
  3034. pub fn set_popularity(&mut self, v: i32) {
  3035. self.popularity = ::std::option::Option::Some(v);
  3036. }
  3037. // optional bool explicit = 9;
  3038. pub fn get_explicit(&self) -> bool {
  3039. self.explicit.unwrap_or(false)
  3040. }
  3041. pub fn clear_explicit(&mut self) {
  3042. self.explicit = ::std::option::Option::None;
  3043. }
  3044. pub fn has_explicit(&self) -> bool {
  3045. self.explicit.is_some()
  3046. }
  3047. // Param is passed by value, moved
  3048. pub fn set_explicit(&mut self, v: bool) {
  3049. self.explicit = ::std::option::Option::Some(v);
  3050. }
  3051. // repeated .ExternalId external_id = 10;
  3052. pub fn get_external_id(&self) -> &[ExternalId] {
  3053. &self.external_id
  3054. }
  3055. pub fn clear_external_id(&mut self) {
  3056. self.external_id.clear();
  3057. }
  3058. // Param is passed by value, moved
  3059. pub fn set_external_id(&mut self, v: ::protobuf::RepeatedField<ExternalId>) {
  3060. self.external_id = v;
  3061. }
  3062. // Mutable pointer to the field.
  3063. pub fn mut_external_id(&mut self) -> &mut ::protobuf::RepeatedField<ExternalId> {
  3064. &mut self.external_id
  3065. }
  3066. // Take field
  3067. pub fn take_external_id(&mut self) -> ::protobuf::RepeatedField<ExternalId> {
  3068. ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new())
  3069. }
  3070. // repeated .Restriction restriction = 11;
  3071. pub fn get_restriction(&self) -> &[Restriction] {
  3072. &self.restriction
  3073. }
  3074. pub fn clear_restriction(&mut self) {
  3075. self.restriction.clear();
  3076. }
  3077. // Param is passed by value, moved
  3078. pub fn set_restriction(&mut self, v: ::protobuf::RepeatedField<Restriction>) {
  3079. self.restriction = v;
  3080. }
  3081. // Mutable pointer to the field.
  3082. pub fn mut_restriction(&mut self) -> &mut ::protobuf::RepeatedField<Restriction> {
  3083. &mut self.restriction
  3084. }
  3085. // Take field
  3086. pub fn take_restriction(&mut self) -> ::protobuf::RepeatedField<Restriction> {
  3087. ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new())
  3088. }
  3089. // repeated .AudioFile file = 12;
  3090. pub fn get_file(&self) -> &[AudioFile] {
  3091. &self.file
  3092. }
  3093. pub fn clear_file(&mut self) {
  3094. self.file.clear();
  3095. }
  3096. // Param is passed by value, moved
  3097. pub fn set_file(&mut self, v: ::protobuf::RepeatedField<AudioFile>) {
  3098. self.file = v;
  3099. }
  3100. // Mutable pointer to the field.
  3101. pub fn mut_file(&mut self) -> &mut ::protobuf::RepeatedField<AudioFile> {
  3102. &mut self.file
  3103. }
  3104. // Take field
  3105. pub fn take_file(&mut self) -> ::protobuf::RepeatedField<AudioFile> {
  3106. ::std::mem::replace(&mut self.file, ::protobuf::RepeatedField::new())
  3107. }
  3108. // repeated .Track alternative = 13;
  3109. pub fn get_alternative(&self) -> &[Track] {
  3110. &self.alternative
  3111. }
  3112. pub fn clear_alternative(&mut self) {
  3113. self.alternative.clear();
  3114. }
  3115. // Param is passed by value, moved
  3116. pub fn set_alternative(&mut self, v: ::protobuf::RepeatedField<Track>) {
  3117. self.alternative = v;
  3118. }
  3119. // Mutable pointer to the field.
  3120. pub fn mut_alternative(&mut self) -> &mut ::protobuf::RepeatedField<Track> {
  3121. &mut self.alternative
  3122. }
  3123. // Take field
  3124. pub fn take_alternative(&mut self) -> ::protobuf::RepeatedField<Track> {
  3125. ::std::mem::replace(&mut self.alternative, ::protobuf::RepeatedField::new())
  3126. }
  3127. // repeated .SalePeriod sale_period = 14;
  3128. pub fn get_sale_period(&self) -> &[SalePeriod] {
  3129. &self.sale_period
  3130. }
  3131. pub fn clear_sale_period(&mut self) {
  3132. self.sale_period.clear();
  3133. }
  3134. // Param is passed by value, moved
  3135. pub fn set_sale_period(&mut self, v: ::protobuf::RepeatedField<SalePeriod>) {
  3136. self.sale_period = v;
  3137. }
  3138. // Mutable pointer to the field.
  3139. pub fn mut_sale_period(&mut self) -> &mut ::protobuf::RepeatedField<SalePeriod> {
  3140. &mut self.sale_period
  3141. }
  3142. // Take field
  3143. pub fn take_sale_period(&mut self) -> ::protobuf::RepeatedField<SalePeriod> {
  3144. ::std::mem::replace(&mut self.sale_period, ::protobuf::RepeatedField::new())
  3145. }
  3146. // repeated .AudioFile preview = 15;
  3147. pub fn get_preview(&self) -> &[AudioFile] {
  3148. &self.preview
  3149. }
  3150. pub fn clear_preview(&mut self) {
  3151. self.preview.clear();
  3152. }
  3153. // Param is passed by value, moved
  3154. pub fn set_preview(&mut self, v: ::protobuf::RepeatedField<AudioFile>) {
  3155. self.preview = v;
  3156. }
  3157. // Mutable pointer to the field.
  3158. pub fn mut_preview(&mut self) -> &mut ::protobuf::RepeatedField<AudioFile> {
  3159. &mut self.preview
  3160. }
  3161. // Take field
  3162. pub fn take_preview(&mut self) -> ::protobuf::RepeatedField<AudioFile> {
  3163. ::std::mem::replace(&mut self.preview, ::protobuf::RepeatedField::new())
  3164. }
  3165. }
  3166. impl ::protobuf::Message for Track {
  3167. fn is_initialized(&self) -> bool {
  3168. for v in &self.album {
  3169. if !v.is_initialized() {
  3170. return false;
  3171. }
  3172. }
  3173. for v in &self.artist {
  3174. if !v.is_initialized() {
  3175. return false;
  3176. }
  3177. }
  3178. for v in &self.external_id {
  3179. if !v.is_initialized() {
  3180. return false;
  3181. }
  3182. }
  3183. for v in &self.restriction {
  3184. if !v.is_initialized() {
  3185. return false;
  3186. }
  3187. }
  3188. for v in &self.file {
  3189. if !v.is_initialized() {
  3190. return false;
  3191. }
  3192. }
  3193. for v in &self.alternative {
  3194. if !v.is_initialized() {
  3195. return false;
  3196. }
  3197. }
  3198. for v in &self.sale_period {
  3199. if !v.is_initialized() {
  3200. return false;
  3201. }
  3202. }
  3203. for v in &self.preview {
  3204. if !v.is_initialized() {
  3205. return false;
  3206. }
  3207. }
  3208. true
  3209. }
  3210. fn merge_from(
  3211. &mut self,
  3212. is: &mut ::protobuf::CodedInputStream<'_>,
  3213. ) -> ::protobuf::ProtobufResult<()> {
  3214. while !is.eof()? {
  3215. let (field_number, wire_type) = is.read_tag_unpack()?;
  3216. match field_number {
  3217. 1 => {
  3218. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  3219. }
  3220. 2 => {
  3221. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  3222. }
  3223. 3 => {
  3224. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.album)?;
  3225. }
  3226. 4 => {
  3227. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.artist)?;
  3228. }
  3229. 5 => {
  3230. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3231. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3232. wire_type,
  3233. ));
  3234. }
  3235. let tmp = is.read_sint32()?;
  3236. self.number = ::std::option::Option::Some(tmp);
  3237. }
  3238. 6 => {
  3239. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3240. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3241. wire_type,
  3242. ));
  3243. }
  3244. let tmp = is.read_sint32()?;
  3245. self.disc_number = ::std::option::Option::Some(tmp);
  3246. }
  3247. 7 => {
  3248. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3249. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3250. wire_type,
  3251. ));
  3252. }
  3253. let tmp = is.read_sint32()?;
  3254. self.duration = ::std::option::Option::Some(tmp);
  3255. }
  3256. 8 => {
  3257. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3258. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3259. wire_type,
  3260. ));
  3261. }
  3262. let tmp = is.read_sint32()?;
  3263. self.popularity = ::std::option::Option::Some(tmp);
  3264. }
  3265. 9 => {
  3266. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3267. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3268. wire_type,
  3269. ));
  3270. }
  3271. let tmp = is.read_bool()?;
  3272. self.explicit = ::std::option::Option::Some(tmp);
  3273. }
  3274. 10 => {
  3275. ::protobuf::rt::read_repeated_message_into(
  3276. wire_type,
  3277. is,
  3278. &mut self.external_id,
  3279. )?;
  3280. }
  3281. 11 => {
  3282. ::protobuf::rt::read_repeated_message_into(
  3283. wire_type,
  3284. is,
  3285. &mut self.restriction,
  3286. )?;
  3287. }
  3288. 12 => {
  3289. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.file)?;
  3290. }
  3291. 13 => {
  3292. ::protobuf::rt::read_repeated_message_into(
  3293. wire_type,
  3294. is,
  3295. &mut self.alternative,
  3296. )?;
  3297. }
  3298. 14 => {
  3299. ::protobuf::rt::read_repeated_message_into(
  3300. wire_type,
  3301. is,
  3302. &mut self.sale_period,
  3303. )?;
  3304. }
  3305. 15 => {
  3306. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.preview)?;
  3307. }
  3308. _ => {
  3309. ::protobuf::rt::read_unknown_or_skip_group(
  3310. field_number,
  3311. wire_type,
  3312. is,
  3313. self.mut_unknown_fields(),
  3314. )?;
  3315. }
  3316. };
  3317. }
  3318. ::std::result::Result::Ok(())
  3319. }
  3320. // Compute sizes of nested messages
  3321. #[allow(unused_variables)]
  3322. fn compute_size(&self) -> u32 {
  3323. let mut my_size = 0;
  3324. if let Some(ref v) = self.gid.as_ref() {
  3325. my_size += ::protobuf::rt::bytes_size(1, &v);
  3326. }
  3327. if let Some(ref v) = self.name.as_ref() {
  3328. my_size += ::protobuf::rt::string_size(2, &v);
  3329. }
  3330. if let Some(ref v) = self.album.as_ref() {
  3331. let len = v.compute_size();
  3332. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3333. }
  3334. for value in &self.artist {
  3335. let len = value.compute_size();
  3336. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3337. }
  3338. if let Some(v) = self.number {
  3339. my_size += ::protobuf::rt::value_varint_zigzag_size(5, v);
  3340. }
  3341. if let Some(v) = self.disc_number {
  3342. my_size += ::protobuf::rt::value_varint_zigzag_size(6, v);
  3343. }
  3344. if let Some(v) = self.duration {
  3345. my_size += ::protobuf::rt::value_varint_zigzag_size(7, v);
  3346. }
  3347. if let Some(v) = self.popularity {
  3348. my_size += ::protobuf::rt::value_varint_zigzag_size(8, v);
  3349. }
  3350. if let Some(v) = self.explicit {
  3351. my_size += 2;
  3352. }
  3353. for value in &self.external_id {
  3354. let len = value.compute_size();
  3355. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3356. }
  3357. for value in &self.restriction {
  3358. let len = value.compute_size();
  3359. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3360. }
  3361. for value in &self.file {
  3362. let len = value.compute_size();
  3363. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3364. }
  3365. for value in &self.alternative {
  3366. let len = value.compute_size();
  3367. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3368. }
  3369. for value in &self.sale_period {
  3370. let len = value.compute_size();
  3371. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3372. }
  3373. for value in &self.preview {
  3374. let len = value.compute_size();
  3375. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3376. }
  3377. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3378. self.cached_size.set(my_size);
  3379. my_size
  3380. }
  3381. fn write_to_with_cached_sizes(
  3382. &self,
  3383. os: &mut ::protobuf::CodedOutputStream<'_>,
  3384. ) -> ::protobuf::ProtobufResult<()> {
  3385. if let Some(ref v) = self.gid.as_ref() {
  3386. os.write_bytes(1, &v)?;
  3387. }
  3388. if let Some(ref v) = self.name.as_ref() {
  3389. os.write_string(2, &v)?;
  3390. }
  3391. if let Some(ref v) = self.album.as_ref() {
  3392. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3393. os.write_raw_varint32(v.get_cached_size())?;
  3394. v.write_to_with_cached_sizes(os)?;
  3395. }
  3396. for v in &self.artist {
  3397. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3398. os.write_raw_varint32(v.get_cached_size())?;
  3399. v.write_to_with_cached_sizes(os)?;
  3400. }
  3401. if let Some(v) = self.number {
  3402. os.write_sint32(5, v)?;
  3403. }
  3404. if let Some(v) = self.disc_number {
  3405. os.write_sint32(6, v)?;
  3406. }
  3407. if let Some(v) = self.duration {
  3408. os.write_sint32(7, v)?;
  3409. }
  3410. if let Some(v) = self.popularity {
  3411. os.write_sint32(8, v)?;
  3412. }
  3413. if let Some(v) = self.explicit {
  3414. os.write_bool(9, v)?;
  3415. }
  3416. for v in &self.external_id {
  3417. os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3418. os.write_raw_varint32(v.get_cached_size())?;
  3419. v.write_to_with_cached_sizes(os)?;
  3420. }
  3421. for v in &self.restriction {
  3422. os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3423. os.write_raw_varint32(v.get_cached_size())?;
  3424. v.write_to_with_cached_sizes(os)?;
  3425. }
  3426. for v in &self.file {
  3427. os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3428. os.write_raw_varint32(v.get_cached_size())?;
  3429. v.write_to_with_cached_sizes(os)?;
  3430. }
  3431. for v in &self.alternative {
  3432. os.write_tag(13, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3433. os.write_raw_varint32(v.get_cached_size())?;
  3434. v.write_to_with_cached_sizes(os)?;
  3435. }
  3436. for v in &self.sale_period {
  3437. os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3438. os.write_raw_varint32(v.get_cached_size())?;
  3439. v.write_to_with_cached_sizes(os)?;
  3440. }
  3441. for v in &self.preview {
  3442. os.write_tag(15, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3443. os.write_raw_varint32(v.get_cached_size())?;
  3444. v.write_to_with_cached_sizes(os)?;
  3445. }
  3446. os.write_unknown_fields(self.get_unknown_fields())?;
  3447. ::std::result::Result::Ok(())
  3448. }
  3449. fn get_cached_size(&self) -> u32 {
  3450. self.cached_size.get()
  3451. }
  3452. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3453. &self.unknown_fields
  3454. }
  3455. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3456. &mut self.unknown_fields
  3457. }
  3458. fn as_any(&self) -> &dyn (::std::any::Any) {
  3459. self as &dyn (::std::any::Any)
  3460. }
  3461. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3462. self as &mut dyn (::std::any::Any)
  3463. }
  3464. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3465. self
  3466. }
  3467. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3468. Self::descriptor_static()
  3469. }
  3470. fn new() -> Track {
  3471. Track::new()
  3472. }
  3473. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3474. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  3475. ::protobuf::lazy::Lazy::INIT;
  3476. unsafe {
  3477. descriptor.get(|| {
  3478. let mut fields = ::std::vec::Vec::new();
  3479. fields.push(
  3480. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  3481. _,
  3482. ::protobuf::types::ProtobufTypeBytes,
  3483. >("gid", |m: &Track| &m.gid, |m: &mut Track| &mut m.gid),
  3484. );
  3485. fields.push(
  3486. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  3487. _,
  3488. ::protobuf::types::ProtobufTypeString,
  3489. >("name", |m: &Track| &m.name, |m: &mut Track| &mut m.name),
  3490. );
  3491. fields.push(
  3492. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  3493. _,
  3494. ::protobuf::types::ProtobufTypeMessage<Album>,
  3495. >(
  3496. "album", |m: &Track| &m.album, |m: &mut Track| &mut m.album
  3497. ),
  3498. );
  3499. fields.push(
  3500. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3501. _,
  3502. ::protobuf::types::ProtobufTypeMessage<Artist>,
  3503. >(
  3504. "artist",
  3505. |m: &Track| &m.artist,
  3506. |m: &mut Track| &mut m.artist,
  3507. ),
  3508. );
  3509. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3510. _,
  3511. ::protobuf::types::ProtobufTypeSint32,
  3512. >(
  3513. "number",
  3514. |m: &Track| &m.number,
  3515. |m: &mut Track| &mut m.number,
  3516. ));
  3517. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3518. _,
  3519. ::protobuf::types::ProtobufTypeSint32,
  3520. >(
  3521. "disc_number",
  3522. |m: &Track| &m.disc_number,
  3523. |m: &mut Track| &mut m.disc_number,
  3524. ));
  3525. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3526. _,
  3527. ::protobuf::types::ProtobufTypeSint32,
  3528. >(
  3529. "duration",
  3530. |m: &Track| &m.duration,
  3531. |m: &mut Track| &mut m.duration,
  3532. ));
  3533. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3534. _,
  3535. ::protobuf::types::ProtobufTypeSint32,
  3536. >(
  3537. "popularity",
  3538. |m: &Track| &m.popularity,
  3539. |m: &mut Track| &mut m.popularity,
  3540. ));
  3541. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3542. _,
  3543. ::protobuf::types::ProtobufTypeBool,
  3544. >(
  3545. "explicit",
  3546. |m: &Track| &m.explicit,
  3547. |m: &mut Track| &mut m.explicit,
  3548. ));
  3549. fields.push(
  3550. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3551. _,
  3552. ::protobuf::types::ProtobufTypeMessage<ExternalId>,
  3553. >(
  3554. "external_id",
  3555. |m: &Track| &m.external_id,
  3556. |m: &mut Track| &mut m.external_id,
  3557. ),
  3558. );
  3559. fields.push(
  3560. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3561. _,
  3562. ::protobuf::types::ProtobufTypeMessage<Restriction>,
  3563. >(
  3564. "restriction",
  3565. |m: &Track| &m.restriction,
  3566. |m: &mut Track| &mut m.restriction,
  3567. ),
  3568. );
  3569. fields.push(
  3570. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3571. _,
  3572. ::protobuf::types::ProtobufTypeMessage<AudioFile>,
  3573. >("file", |m: &Track| &m.file, |m: &mut Track| &mut m.file),
  3574. );
  3575. fields.push(
  3576. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3577. _,
  3578. ::protobuf::types::ProtobufTypeMessage<Track>,
  3579. >(
  3580. "alternative",
  3581. |m: &Track| &m.alternative,
  3582. |m: &mut Track| &mut m.alternative,
  3583. ),
  3584. );
  3585. fields.push(
  3586. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3587. _,
  3588. ::protobuf::types::ProtobufTypeMessage<SalePeriod>,
  3589. >(
  3590. "sale_period",
  3591. |m: &Track| &m.sale_period,
  3592. |m: &mut Track| &mut m.sale_period,
  3593. ),
  3594. );
  3595. fields.push(
  3596. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  3597. _,
  3598. ::protobuf::types::ProtobufTypeMessage<AudioFile>,
  3599. >(
  3600. "preview",
  3601. |m: &Track| &m.preview,
  3602. |m: &mut Track| &mut m.preview,
  3603. ),
  3604. );
  3605. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Track>(
  3606. "Track",
  3607. fields,
  3608. file_descriptor_proto(),
  3609. )
  3610. })
  3611. }
  3612. }
  3613. fn default_instance() -> &'static Track {
  3614. static mut instance: ::protobuf::lazy::Lazy<Track> = ::protobuf::lazy::Lazy::INIT;
  3615. unsafe { instance.get(Track::new) }
  3616. }
  3617. }
  3618. impl ::protobuf::Clear for Track {
  3619. fn clear(&mut self) {
  3620. self.gid.clear();
  3621. self.name.clear();
  3622. self.album.clear();
  3623. self.artist.clear();
  3624. self.number = ::std::option::Option::None;
  3625. self.disc_number = ::std::option::Option::None;
  3626. self.duration = ::std::option::Option::None;
  3627. self.popularity = ::std::option::Option::None;
  3628. self.explicit = ::std::option::Option::None;
  3629. self.external_id.clear();
  3630. self.restriction.clear();
  3631. self.file.clear();
  3632. self.alternative.clear();
  3633. self.sale_period.clear();
  3634. self.preview.clear();
  3635. self.unknown_fields.clear();
  3636. }
  3637. }
  3638. impl ::std::fmt::Debug for Track {
  3639. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3640. ::protobuf::text_format::fmt(self, f)
  3641. }
  3642. }
  3643. impl ::protobuf::reflect::ProtobufValue for Track {
  3644. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3645. ::protobuf::reflect::ReflectValueRef::Message(self)
  3646. }
  3647. }
  3648. #[derive(PartialEq, Clone, Default)]
  3649. pub struct Image {
  3650. // message fields
  3651. file_id: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  3652. size: ::std::option::Option<Image_Size>,
  3653. width: ::std::option::Option<i32>,
  3654. height: ::std::option::Option<i32>,
  3655. // special fields
  3656. pub unknown_fields: ::protobuf::UnknownFields,
  3657. pub cached_size: ::protobuf::CachedSize,
  3658. }
  3659. impl<'a> ::std::default::Default for &'a Image {
  3660. fn default() -> &'a Image {
  3661. <Image as ::protobuf::Message>::default_instance()
  3662. }
  3663. }
  3664. impl Image {
  3665. pub fn new() -> Image {
  3666. ::std::default::Default::default()
  3667. }
  3668. // optional bytes file_id = 1;
  3669. pub fn get_file_id(&self) -> &[u8] {
  3670. match self.file_id.as_ref() {
  3671. Some(v) => &v,
  3672. None => &[],
  3673. }
  3674. }
  3675. pub fn clear_file_id(&mut self) {
  3676. self.file_id.clear();
  3677. }
  3678. pub fn has_file_id(&self) -> bool {
  3679. self.file_id.is_some()
  3680. }
  3681. // Param is passed by value, moved
  3682. pub fn set_file_id(&mut self, v: ::std::vec::Vec<u8>) {
  3683. self.file_id = ::protobuf::SingularField::some(v);
  3684. }
  3685. // Mutable pointer to the field.
  3686. // If field is not initialized, it is initialized with default value first.
  3687. pub fn mut_file_id(&mut self) -> &mut ::std::vec::Vec<u8> {
  3688. if self.file_id.is_none() {
  3689. self.file_id.set_default();
  3690. }
  3691. self.file_id.as_mut().unwrap()
  3692. }
  3693. // Take field
  3694. pub fn take_file_id(&mut self) -> ::std::vec::Vec<u8> {
  3695. self.file_id
  3696. .take()
  3697. .unwrap_or_else(|| ::std::vec::Vec::new())
  3698. }
  3699. // optional .Image.Size size = 2;
  3700. pub fn get_size(&self) -> Image_Size {
  3701. self.size.unwrap_or(Image_Size::DEFAULT)
  3702. }
  3703. pub fn clear_size(&mut self) {
  3704. self.size = ::std::option::Option::None;
  3705. }
  3706. pub fn has_size(&self) -> bool {
  3707. self.size.is_some()
  3708. }
  3709. // Param is passed by value, moved
  3710. pub fn set_size(&mut self, v: Image_Size) {
  3711. self.size = ::std::option::Option::Some(v);
  3712. }
  3713. // optional sint32 width = 3;
  3714. pub fn get_width(&self) -> i32 {
  3715. self.width.unwrap_or(0)
  3716. }
  3717. pub fn clear_width(&mut self) {
  3718. self.width = ::std::option::Option::None;
  3719. }
  3720. pub fn has_width(&self) -> bool {
  3721. self.width.is_some()
  3722. }
  3723. // Param is passed by value, moved
  3724. pub fn set_width(&mut self, v: i32) {
  3725. self.width = ::std::option::Option::Some(v);
  3726. }
  3727. // optional sint32 height = 4;
  3728. pub fn get_height(&self) -> i32 {
  3729. self.height.unwrap_or(0)
  3730. }
  3731. pub fn clear_height(&mut self) {
  3732. self.height = ::std::option::Option::None;
  3733. }
  3734. pub fn has_height(&self) -> bool {
  3735. self.height.is_some()
  3736. }
  3737. // Param is passed by value, moved
  3738. pub fn set_height(&mut self, v: i32) {
  3739. self.height = ::std::option::Option::Some(v);
  3740. }
  3741. }
  3742. impl ::protobuf::Message for Image {
  3743. fn is_initialized(&self) -> bool {
  3744. true
  3745. }
  3746. fn merge_from(
  3747. &mut self,
  3748. is: &mut ::protobuf::CodedInputStream<'_>,
  3749. ) -> ::protobuf::ProtobufResult<()> {
  3750. while !is.eof()? {
  3751. let (field_number, wire_type) = is.read_tag_unpack()?;
  3752. match field_number {
  3753. 1 => {
  3754. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.file_id)?;
  3755. }
  3756. 2 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  3757. wire_type,
  3758. is,
  3759. &mut self.size,
  3760. 2,
  3761. &mut self.unknown_fields,
  3762. )?,
  3763. 3 => {
  3764. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3765. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3766. wire_type,
  3767. ));
  3768. }
  3769. let tmp = is.read_sint32()?;
  3770. self.width = ::std::option::Option::Some(tmp);
  3771. }
  3772. 4 => {
  3773. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3774. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  3775. wire_type,
  3776. ));
  3777. }
  3778. let tmp = is.read_sint32()?;
  3779. self.height = ::std::option::Option::Some(tmp);
  3780. }
  3781. _ => {
  3782. ::protobuf::rt::read_unknown_or_skip_group(
  3783. field_number,
  3784. wire_type,
  3785. is,
  3786. self.mut_unknown_fields(),
  3787. )?;
  3788. }
  3789. };
  3790. }
  3791. ::std::result::Result::Ok(())
  3792. }
  3793. // Compute sizes of nested messages
  3794. #[allow(unused_variables)]
  3795. fn compute_size(&self) -> u32 {
  3796. let mut my_size = 0;
  3797. if let Some(ref v) = self.file_id.as_ref() {
  3798. my_size += ::protobuf::rt::bytes_size(1, &v);
  3799. }
  3800. if let Some(v) = self.size {
  3801. my_size += ::protobuf::rt::enum_size(2, v);
  3802. }
  3803. if let Some(v) = self.width {
  3804. my_size += ::protobuf::rt::value_varint_zigzag_size(3, v);
  3805. }
  3806. if let Some(v) = self.height {
  3807. my_size += ::protobuf::rt::value_varint_zigzag_size(4, v);
  3808. }
  3809. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3810. self.cached_size.set(my_size);
  3811. my_size
  3812. }
  3813. fn write_to_with_cached_sizes(
  3814. &self,
  3815. os: &mut ::protobuf::CodedOutputStream<'_>,
  3816. ) -> ::protobuf::ProtobufResult<()> {
  3817. if let Some(ref v) = self.file_id.as_ref() {
  3818. os.write_bytes(1, &v)?;
  3819. }
  3820. if let Some(v) = self.size {
  3821. os.write_enum(2, v.value())?;
  3822. }
  3823. if let Some(v) = self.width {
  3824. os.write_sint32(3, v)?;
  3825. }
  3826. if let Some(v) = self.height {
  3827. os.write_sint32(4, v)?;
  3828. }
  3829. os.write_unknown_fields(self.get_unknown_fields())?;
  3830. ::std::result::Result::Ok(())
  3831. }
  3832. fn get_cached_size(&self) -> u32 {
  3833. self.cached_size.get()
  3834. }
  3835. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3836. &self.unknown_fields
  3837. }
  3838. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3839. &mut self.unknown_fields
  3840. }
  3841. fn as_any(&self) -> &dyn (::std::any::Any) {
  3842. self as &dyn (::std::any::Any)
  3843. }
  3844. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3845. self as &mut dyn (::std::any::Any)
  3846. }
  3847. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3848. self
  3849. }
  3850. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3851. Self::descriptor_static()
  3852. }
  3853. fn new() -> Image {
  3854. Image::new()
  3855. }
  3856. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3857. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  3858. ::protobuf::lazy::Lazy::INIT;
  3859. unsafe {
  3860. descriptor.get(|| {
  3861. let mut fields = ::std::vec::Vec::new();
  3862. fields.push(
  3863. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  3864. _,
  3865. ::protobuf::types::ProtobufTypeBytes,
  3866. >(
  3867. "file_id",
  3868. |m: &Image| &m.file_id,
  3869. |m: &mut Image| &mut m.file_id,
  3870. ),
  3871. );
  3872. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3873. _,
  3874. ::protobuf::types::ProtobufTypeEnum<Image_Size>,
  3875. >(
  3876. "size", |m: &Image| &m.size, |m: &mut Image| &mut m.size
  3877. ));
  3878. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3879. _,
  3880. ::protobuf::types::ProtobufTypeSint32,
  3881. >(
  3882. "width",
  3883. |m: &Image| &m.width,
  3884. |m: &mut Image| &mut m.width,
  3885. ));
  3886. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  3887. _,
  3888. ::protobuf::types::ProtobufTypeSint32,
  3889. >(
  3890. "height",
  3891. |m: &Image| &m.height,
  3892. |m: &mut Image| &mut m.height,
  3893. ));
  3894. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Image>(
  3895. "Image",
  3896. fields,
  3897. file_descriptor_proto(),
  3898. )
  3899. })
  3900. }
  3901. }
  3902. fn default_instance() -> &'static Image {
  3903. static mut instance: ::protobuf::lazy::Lazy<Image> = ::protobuf::lazy::Lazy::INIT;
  3904. unsafe { instance.get(Image::new) }
  3905. }
  3906. }
  3907. impl ::protobuf::Clear for Image {
  3908. fn clear(&mut self) {
  3909. self.file_id.clear();
  3910. self.size = ::std::option::Option::None;
  3911. self.width = ::std::option::Option::None;
  3912. self.height = ::std::option::Option::None;
  3913. self.unknown_fields.clear();
  3914. }
  3915. }
  3916. impl ::std::fmt::Debug for Image {
  3917. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3918. ::protobuf::text_format::fmt(self, f)
  3919. }
  3920. }
  3921. impl ::protobuf::reflect::ProtobufValue for Image {
  3922. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3923. ::protobuf::reflect::ReflectValueRef::Message(self)
  3924. }
  3925. }
  3926. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  3927. pub enum Image_Size {
  3928. DEFAULT = 0,
  3929. SMALL = 1,
  3930. LARGE = 2,
  3931. XLARGE = 3,
  3932. }
  3933. impl ::protobuf::ProtobufEnum for Image_Size {
  3934. fn value(&self) -> i32 {
  3935. *self as i32
  3936. }
  3937. fn from_i32(value: i32) -> ::std::option::Option<Image_Size> {
  3938. match value {
  3939. 0 => ::std::option::Option::Some(Image_Size::DEFAULT),
  3940. 1 => ::std::option::Option::Some(Image_Size::SMALL),
  3941. 2 => ::std::option::Option::Some(Image_Size::LARGE),
  3942. 3 => ::std::option::Option::Some(Image_Size::XLARGE),
  3943. _ => ::std::option::Option::None,
  3944. }
  3945. }
  3946. fn values() -> &'static [Self] {
  3947. static values: &'static [Image_Size] = &[
  3948. Image_Size::DEFAULT,
  3949. Image_Size::SMALL,
  3950. Image_Size::LARGE,
  3951. Image_Size::XLARGE,
  3952. ];
  3953. values
  3954. }
  3955. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  3956. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  3957. ::protobuf::lazy::Lazy::INIT;
  3958. unsafe {
  3959. descriptor.get(|| {
  3960. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Image_Size>(
  3961. "Image.Size",
  3962. file_descriptor_proto(),
  3963. )
  3964. })
  3965. }
  3966. }
  3967. }
  3968. impl ::std::marker::Copy for Image_Size {}
  3969. impl ::std::default::Default for Image_Size {
  3970. fn default() -> Self {
  3971. Image_Size::DEFAULT
  3972. }
  3973. }
  3974. impl ::protobuf::reflect::ProtobufValue for Image_Size {
  3975. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3976. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  3977. }
  3978. }
  3979. #[derive(PartialEq, Clone, Default)]
  3980. pub struct ImageGroup {
  3981. // message fields
  3982. image: ::protobuf::RepeatedField<Image>,
  3983. // special fields
  3984. pub unknown_fields: ::protobuf::UnknownFields,
  3985. pub cached_size: ::protobuf::CachedSize,
  3986. }
  3987. impl<'a> ::std::default::Default for &'a ImageGroup {
  3988. fn default() -> &'a ImageGroup {
  3989. <ImageGroup as ::protobuf::Message>::default_instance()
  3990. }
  3991. }
  3992. impl ImageGroup {
  3993. pub fn new() -> ImageGroup {
  3994. ::std::default::Default::default()
  3995. }
  3996. // repeated .Image image = 1;
  3997. pub fn get_image(&self) -> &[Image] {
  3998. &self.image
  3999. }
  4000. pub fn clear_image(&mut self) {
  4001. self.image.clear();
  4002. }
  4003. // Param is passed by value, moved
  4004. pub fn set_image(&mut self, v: ::protobuf::RepeatedField<Image>) {
  4005. self.image = v;
  4006. }
  4007. // Mutable pointer to the field.
  4008. pub fn mut_image(&mut self) -> &mut ::protobuf::RepeatedField<Image> {
  4009. &mut self.image
  4010. }
  4011. // Take field
  4012. pub fn take_image(&mut self) -> ::protobuf::RepeatedField<Image> {
  4013. ::std::mem::replace(&mut self.image, ::protobuf::RepeatedField::new())
  4014. }
  4015. }
  4016. impl ::protobuf::Message for ImageGroup {
  4017. fn is_initialized(&self) -> bool {
  4018. for v in &self.image {
  4019. if !v.is_initialized() {
  4020. return false;
  4021. }
  4022. }
  4023. true
  4024. }
  4025. fn merge_from(
  4026. &mut self,
  4027. is: &mut ::protobuf::CodedInputStream<'_>,
  4028. ) -> ::protobuf::ProtobufResult<()> {
  4029. while !is.eof()? {
  4030. let (field_number, wire_type) = is.read_tag_unpack()?;
  4031. match field_number {
  4032. 1 => {
  4033. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.image)?;
  4034. }
  4035. _ => {
  4036. ::protobuf::rt::read_unknown_or_skip_group(
  4037. field_number,
  4038. wire_type,
  4039. is,
  4040. self.mut_unknown_fields(),
  4041. )?;
  4042. }
  4043. };
  4044. }
  4045. ::std::result::Result::Ok(())
  4046. }
  4047. // Compute sizes of nested messages
  4048. #[allow(unused_variables)]
  4049. fn compute_size(&self) -> u32 {
  4050. let mut my_size = 0;
  4051. for value in &self.image {
  4052. let len = value.compute_size();
  4053. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4054. }
  4055. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4056. self.cached_size.set(my_size);
  4057. my_size
  4058. }
  4059. fn write_to_with_cached_sizes(
  4060. &self,
  4061. os: &mut ::protobuf::CodedOutputStream<'_>,
  4062. ) -> ::protobuf::ProtobufResult<()> {
  4063. for v in &self.image {
  4064. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4065. os.write_raw_varint32(v.get_cached_size())?;
  4066. v.write_to_with_cached_sizes(os)?;
  4067. }
  4068. os.write_unknown_fields(self.get_unknown_fields())?;
  4069. ::std::result::Result::Ok(())
  4070. }
  4071. fn get_cached_size(&self) -> u32 {
  4072. self.cached_size.get()
  4073. }
  4074. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4075. &self.unknown_fields
  4076. }
  4077. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4078. &mut self.unknown_fields
  4079. }
  4080. fn as_any(&self) -> &dyn (::std::any::Any) {
  4081. self as &dyn (::std::any::Any)
  4082. }
  4083. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4084. self as &mut dyn (::std::any::Any)
  4085. }
  4086. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4087. self
  4088. }
  4089. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4090. Self::descriptor_static()
  4091. }
  4092. fn new() -> ImageGroup {
  4093. ImageGroup::new()
  4094. }
  4095. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4096. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  4097. ::protobuf::lazy::Lazy::INIT;
  4098. unsafe {
  4099. descriptor.get(|| {
  4100. let mut fields = ::std::vec::Vec::new();
  4101. fields.push(
  4102. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  4103. _,
  4104. ::protobuf::types::ProtobufTypeMessage<Image>,
  4105. >(
  4106. "image",
  4107. |m: &ImageGroup| &m.image,
  4108. |m: &mut ImageGroup| &mut m.image,
  4109. ),
  4110. );
  4111. ::protobuf::reflect::MessageDescriptor::new_pb_name::<ImageGroup>(
  4112. "ImageGroup",
  4113. fields,
  4114. file_descriptor_proto(),
  4115. )
  4116. })
  4117. }
  4118. }
  4119. fn default_instance() -> &'static ImageGroup {
  4120. static mut instance: ::protobuf::lazy::Lazy<ImageGroup> = ::protobuf::lazy::Lazy::INIT;
  4121. unsafe { instance.get(ImageGroup::new) }
  4122. }
  4123. }
  4124. impl ::protobuf::Clear for ImageGroup {
  4125. fn clear(&mut self) {
  4126. self.image.clear();
  4127. self.unknown_fields.clear();
  4128. }
  4129. }
  4130. impl ::std::fmt::Debug for ImageGroup {
  4131. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4132. ::protobuf::text_format::fmt(self, f)
  4133. }
  4134. }
  4135. impl ::protobuf::reflect::ProtobufValue for ImageGroup {
  4136. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4137. ::protobuf::reflect::ReflectValueRef::Message(self)
  4138. }
  4139. }
  4140. #[derive(PartialEq, Clone, Default)]
  4141. pub struct Biography {
  4142. // message fields
  4143. text: ::protobuf::SingularField<::std::string::String>,
  4144. portrait: ::protobuf::RepeatedField<Image>,
  4145. portrait_group: ::protobuf::RepeatedField<ImageGroup>,
  4146. // special fields
  4147. pub unknown_fields: ::protobuf::UnknownFields,
  4148. pub cached_size: ::protobuf::CachedSize,
  4149. }
  4150. impl<'a> ::std::default::Default for &'a Biography {
  4151. fn default() -> &'a Biography {
  4152. <Biography as ::protobuf::Message>::default_instance()
  4153. }
  4154. }
  4155. impl Biography {
  4156. pub fn new() -> Biography {
  4157. ::std::default::Default::default()
  4158. }
  4159. // optional string text = 1;
  4160. pub fn get_text(&self) -> &str {
  4161. match self.text.as_ref() {
  4162. Some(v) => &v,
  4163. None => "",
  4164. }
  4165. }
  4166. pub fn clear_text(&mut self) {
  4167. self.text.clear();
  4168. }
  4169. pub fn has_text(&self) -> bool {
  4170. self.text.is_some()
  4171. }
  4172. // Param is passed by value, moved
  4173. pub fn set_text(&mut self, v: ::std::string::String) {
  4174. self.text = ::protobuf::SingularField::some(v);
  4175. }
  4176. // Mutable pointer to the field.
  4177. // If field is not initialized, it is initialized with default value first.
  4178. pub fn mut_text(&mut self) -> &mut ::std::string::String {
  4179. if self.text.is_none() {
  4180. self.text.set_default();
  4181. }
  4182. self.text.as_mut().unwrap()
  4183. }
  4184. // Take field
  4185. pub fn take_text(&mut self) -> ::std::string::String {
  4186. self.text
  4187. .take()
  4188. .unwrap_or_else(|| ::std::string::String::new())
  4189. }
  4190. // repeated .Image portrait = 2;
  4191. pub fn get_portrait(&self) -> &[Image] {
  4192. &self.portrait
  4193. }
  4194. pub fn clear_portrait(&mut self) {
  4195. self.portrait.clear();
  4196. }
  4197. // Param is passed by value, moved
  4198. pub fn set_portrait(&mut self, v: ::protobuf::RepeatedField<Image>) {
  4199. self.portrait = v;
  4200. }
  4201. // Mutable pointer to the field.
  4202. pub fn mut_portrait(&mut self) -> &mut ::protobuf::RepeatedField<Image> {
  4203. &mut self.portrait
  4204. }
  4205. // Take field
  4206. pub fn take_portrait(&mut self) -> ::protobuf::RepeatedField<Image> {
  4207. ::std::mem::replace(&mut self.portrait, ::protobuf::RepeatedField::new())
  4208. }
  4209. // repeated .ImageGroup portrait_group = 3;
  4210. pub fn get_portrait_group(&self) -> &[ImageGroup] {
  4211. &self.portrait_group
  4212. }
  4213. pub fn clear_portrait_group(&mut self) {
  4214. self.portrait_group.clear();
  4215. }
  4216. // Param is passed by value, moved
  4217. pub fn set_portrait_group(&mut self, v: ::protobuf::RepeatedField<ImageGroup>) {
  4218. self.portrait_group = v;
  4219. }
  4220. // Mutable pointer to the field.
  4221. pub fn mut_portrait_group(&mut self) -> &mut ::protobuf::RepeatedField<ImageGroup> {
  4222. &mut self.portrait_group
  4223. }
  4224. // Take field
  4225. pub fn take_portrait_group(&mut self) -> ::protobuf::RepeatedField<ImageGroup> {
  4226. ::std::mem::replace(&mut self.portrait_group, ::protobuf::RepeatedField::new())
  4227. }
  4228. }
  4229. impl ::protobuf::Message for Biography {
  4230. fn is_initialized(&self) -> bool {
  4231. for v in &self.portrait {
  4232. if !v.is_initialized() {
  4233. return false;
  4234. }
  4235. }
  4236. for v in &self.portrait_group {
  4237. if !v.is_initialized() {
  4238. return false;
  4239. }
  4240. }
  4241. true
  4242. }
  4243. fn merge_from(
  4244. &mut self,
  4245. is: &mut ::protobuf::CodedInputStream<'_>,
  4246. ) -> ::protobuf::ProtobufResult<()> {
  4247. while !is.eof()? {
  4248. let (field_number, wire_type) = is.read_tag_unpack()?;
  4249. match field_number {
  4250. 1 => {
  4251. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.text)?;
  4252. }
  4253. 2 => {
  4254. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.portrait)?;
  4255. }
  4256. 3 => {
  4257. ::protobuf::rt::read_repeated_message_into(
  4258. wire_type,
  4259. is,
  4260. &mut self.portrait_group,
  4261. )?;
  4262. }
  4263. _ => {
  4264. ::protobuf::rt::read_unknown_or_skip_group(
  4265. field_number,
  4266. wire_type,
  4267. is,
  4268. self.mut_unknown_fields(),
  4269. )?;
  4270. }
  4271. };
  4272. }
  4273. ::std::result::Result::Ok(())
  4274. }
  4275. // Compute sizes of nested messages
  4276. #[allow(unused_variables)]
  4277. fn compute_size(&self) -> u32 {
  4278. let mut my_size = 0;
  4279. if let Some(ref v) = self.text.as_ref() {
  4280. my_size += ::protobuf::rt::string_size(1, &v);
  4281. }
  4282. for value in &self.portrait {
  4283. let len = value.compute_size();
  4284. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4285. }
  4286. for value in &self.portrait_group {
  4287. let len = value.compute_size();
  4288. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4289. }
  4290. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4291. self.cached_size.set(my_size);
  4292. my_size
  4293. }
  4294. fn write_to_with_cached_sizes(
  4295. &self,
  4296. os: &mut ::protobuf::CodedOutputStream<'_>,
  4297. ) -> ::protobuf::ProtobufResult<()> {
  4298. if let Some(ref v) = self.text.as_ref() {
  4299. os.write_string(1, &v)?;
  4300. }
  4301. for v in &self.portrait {
  4302. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4303. os.write_raw_varint32(v.get_cached_size())?;
  4304. v.write_to_with_cached_sizes(os)?;
  4305. }
  4306. for v in &self.portrait_group {
  4307. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4308. os.write_raw_varint32(v.get_cached_size())?;
  4309. v.write_to_with_cached_sizes(os)?;
  4310. }
  4311. os.write_unknown_fields(self.get_unknown_fields())?;
  4312. ::std::result::Result::Ok(())
  4313. }
  4314. fn get_cached_size(&self) -> u32 {
  4315. self.cached_size.get()
  4316. }
  4317. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4318. &self.unknown_fields
  4319. }
  4320. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4321. &mut self.unknown_fields
  4322. }
  4323. fn as_any(&self) -> &dyn (::std::any::Any) {
  4324. self as &dyn (::std::any::Any)
  4325. }
  4326. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4327. self as &mut dyn (::std::any::Any)
  4328. }
  4329. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4330. self
  4331. }
  4332. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4333. Self::descriptor_static()
  4334. }
  4335. fn new() -> Biography {
  4336. Biography::new()
  4337. }
  4338. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4339. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  4340. ::protobuf::lazy::Lazy::INIT;
  4341. unsafe {
  4342. descriptor.get(|| {
  4343. let mut fields = ::std::vec::Vec::new();
  4344. fields.push(
  4345. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  4346. _,
  4347. ::protobuf::types::ProtobufTypeString,
  4348. >(
  4349. "text",
  4350. |m: &Biography| &m.text,
  4351. |m: &mut Biography| &mut m.text,
  4352. ),
  4353. );
  4354. fields.push(
  4355. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  4356. _,
  4357. ::protobuf::types::ProtobufTypeMessage<Image>,
  4358. >(
  4359. "portrait",
  4360. |m: &Biography| &m.portrait,
  4361. |m: &mut Biography| &mut m.portrait,
  4362. ),
  4363. );
  4364. fields.push(
  4365. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  4366. _,
  4367. ::protobuf::types::ProtobufTypeMessage<ImageGroup>,
  4368. >(
  4369. "portrait_group",
  4370. |m: &Biography| &m.portrait_group,
  4371. |m: &mut Biography| &mut m.portrait_group,
  4372. ),
  4373. );
  4374. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Biography>(
  4375. "Biography",
  4376. fields,
  4377. file_descriptor_proto(),
  4378. )
  4379. })
  4380. }
  4381. }
  4382. fn default_instance() -> &'static Biography {
  4383. static mut instance: ::protobuf::lazy::Lazy<Biography> = ::protobuf::lazy::Lazy::INIT;
  4384. unsafe { instance.get(Biography::new) }
  4385. }
  4386. }
  4387. impl ::protobuf::Clear for Biography {
  4388. fn clear(&mut self) {
  4389. self.text.clear();
  4390. self.portrait.clear();
  4391. self.portrait_group.clear();
  4392. self.unknown_fields.clear();
  4393. }
  4394. }
  4395. impl ::std::fmt::Debug for Biography {
  4396. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4397. ::protobuf::text_format::fmt(self, f)
  4398. }
  4399. }
  4400. impl ::protobuf::reflect::ProtobufValue for Biography {
  4401. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4402. ::protobuf::reflect::ReflectValueRef::Message(self)
  4403. }
  4404. }
  4405. #[derive(PartialEq, Clone, Default)]
  4406. pub struct Disc {
  4407. // message fields
  4408. number: ::std::option::Option<i32>,
  4409. name: ::protobuf::SingularField<::std::string::String>,
  4410. track: ::protobuf::RepeatedField<Track>,
  4411. // special fields
  4412. pub unknown_fields: ::protobuf::UnknownFields,
  4413. pub cached_size: ::protobuf::CachedSize,
  4414. }
  4415. impl<'a> ::std::default::Default for &'a Disc {
  4416. fn default() -> &'a Disc {
  4417. <Disc as ::protobuf::Message>::default_instance()
  4418. }
  4419. }
  4420. impl Disc {
  4421. pub fn new() -> Disc {
  4422. ::std::default::Default::default()
  4423. }
  4424. // optional sint32 number = 1;
  4425. pub fn get_number(&self) -> i32 {
  4426. self.number.unwrap_or(0)
  4427. }
  4428. pub fn clear_number(&mut self) {
  4429. self.number = ::std::option::Option::None;
  4430. }
  4431. pub fn has_number(&self) -> bool {
  4432. self.number.is_some()
  4433. }
  4434. // Param is passed by value, moved
  4435. pub fn set_number(&mut self, v: i32) {
  4436. self.number = ::std::option::Option::Some(v);
  4437. }
  4438. // optional string name = 2;
  4439. pub fn get_name(&self) -> &str {
  4440. match self.name.as_ref() {
  4441. Some(v) => &v,
  4442. None => "",
  4443. }
  4444. }
  4445. pub fn clear_name(&mut self) {
  4446. self.name.clear();
  4447. }
  4448. pub fn has_name(&self) -> bool {
  4449. self.name.is_some()
  4450. }
  4451. // Param is passed by value, moved
  4452. pub fn set_name(&mut self, v: ::std::string::String) {
  4453. self.name = ::protobuf::SingularField::some(v);
  4454. }
  4455. // Mutable pointer to the field.
  4456. // If field is not initialized, it is initialized with default value first.
  4457. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  4458. if self.name.is_none() {
  4459. self.name.set_default();
  4460. }
  4461. self.name.as_mut().unwrap()
  4462. }
  4463. // Take field
  4464. pub fn take_name(&mut self) -> ::std::string::String {
  4465. self.name
  4466. .take()
  4467. .unwrap_or_else(|| ::std::string::String::new())
  4468. }
  4469. // repeated .Track track = 3;
  4470. pub fn get_track(&self) -> &[Track] {
  4471. &self.track
  4472. }
  4473. pub fn clear_track(&mut self) {
  4474. self.track.clear();
  4475. }
  4476. // Param is passed by value, moved
  4477. pub fn set_track(&mut self, v: ::protobuf::RepeatedField<Track>) {
  4478. self.track = v;
  4479. }
  4480. // Mutable pointer to the field.
  4481. pub fn mut_track(&mut self) -> &mut ::protobuf::RepeatedField<Track> {
  4482. &mut self.track
  4483. }
  4484. // Take field
  4485. pub fn take_track(&mut self) -> ::protobuf::RepeatedField<Track> {
  4486. ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new())
  4487. }
  4488. }
  4489. impl ::protobuf::Message for Disc {
  4490. fn is_initialized(&self) -> bool {
  4491. for v in &self.track {
  4492. if !v.is_initialized() {
  4493. return false;
  4494. }
  4495. }
  4496. true
  4497. }
  4498. fn merge_from(
  4499. &mut self,
  4500. is: &mut ::protobuf::CodedInputStream<'_>,
  4501. ) -> ::protobuf::ProtobufResult<()> {
  4502. while !is.eof()? {
  4503. let (field_number, wire_type) = is.read_tag_unpack()?;
  4504. match field_number {
  4505. 1 => {
  4506. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  4507. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  4508. wire_type,
  4509. ));
  4510. }
  4511. let tmp = is.read_sint32()?;
  4512. self.number = ::std::option::Option::Some(tmp);
  4513. }
  4514. 2 => {
  4515. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  4516. }
  4517. 3 => {
  4518. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.track)?;
  4519. }
  4520. _ => {
  4521. ::protobuf::rt::read_unknown_or_skip_group(
  4522. field_number,
  4523. wire_type,
  4524. is,
  4525. self.mut_unknown_fields(),
  4526. )?;
  4527. }
  4528. };
  4529. }
  4530. ::std::result::Result::Ok(())
  4531. }
  4532. // Compute sizes of nested messages
  4533. #[allow(unused_variables)]
  4534. fn compute_size(&self) -> u32 {
  4535. let mut my_size = 0;
  4536. if let Some(v) = self.number {
  4537. my_size += ::protobuf::rt::value_varint_zigzag_size(1, v);
  4538. }
  4539. if let Some(ref v) = self.name.as_ref() {
  4540. my_size += ::protobuf::rt::string_size(2, &v);
  4541. }
  4542. for value in &self.track {
  4543. let len = value.compute_size();
  4544. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4545. }
  4546. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4547. self.cached_size.set(my_size);
  4548. my_size
  4549. }
  4550. fn write_to_with_cached_sizes(
  4551. &self,
  4552. os: &mut ::protobuf::CodedOutputStream<'_>,
  4553. ) -> ::protobuf::ProtobufResult<()> {
  4554. if let Some(v) = self.number {
  4555. os.write_sint32(1, v)?;
  4556. }
  4557. if let Some(ref v) = self.name.as_ref() {
  4558. os.write_string(2, &v)?;
  4559. }
  4560. for v in &self.track {
  4561. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4562. os.write_raw_varint32(v.get_cached_size())?;
  4563. v.write_to_with_cached_sizes(os)?;
  4564. }
  4565. os.write_unknown_fields(self.get_unknown_fields())?;
  4566. ::std::result::Result::Ok(())
  4567. }
  4568. fn get_cached_size(&self) -> u32 {
  4569. self.cached_size.get()
  4570. }
  4571. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4572. &self.unknown_fields
  4573. }
  4574. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4575. &mut self.unknown_fields
  4576. }
  4577. fn as_any(&self) -> &dyn (::std::any::Any) {
  4578. self as &dyn (::std::any::Any)
  4579. }
  4580. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4581. self as &mut dyn (::std::any::Any)
  4582. }
  4583. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4584. self
  4585. }
  4586. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4587. Self::descriptor_static()
  4588. }
  4589. fn new() -> Disc {
  4590. Disc::new()
  4591. }
  4592. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4593. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  4594. ::protobuf::lazy::Lazy::INIT;
  4595. unsafe {
  4596. descriptor.get(|| {
  4597. let mut fields = ::std::vec::Vec::new();
  4598. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  4599. _,
  4600. ::protobuf::types::ProtobufTypeSint32,
  4601. >(
  4602. "number",
  4603. |m: &Disc| &m.number,
  4604. |m: &mut Disc| &mut m.number,
  4605. ));
  4606. fields.push(
  4607. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  4608. _,
  4609. ::protobuf::types::ProtobufTypeString,
  4610. >("name", |m: &Disc| &m.name, |m: &mut Disc| &mut m.name),
  4611. );
  4612. fields.push(
  4613. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  4614. _,
  4615. ::protobuf::types::ProtobufTypeMessage<Track>,
  4616. >("track", |m: &Disc| &m.track, |m: &mut Disc| &mut m.track),
  4617. );
  4618. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Disc>(
  4619. "Disc",
  4620. fields,
  4621. file_descriptor_proto(),
  4622. )
  4623. })
  4624. }
  4625. }
  4626. fn default_instance() -> &'static Disc {
  4627. static mut instance: ::protobuf::lazy::Lazy<Disc> = ::protobuf::lazy::Lazy::INIT;
  4628. unsafe { instance.get(Disc::new) }
  4629. }
  4630. }
  4631. impl ::protobuf::Clear for Disc {
  4632. fn clear(&mut self) {
  4633. self.number = ::std::option::Option::None;
  4634. self.name.clear();
  4635. self.track.clear();
  4636. self.unknown_fields.clear();
  4637. }
  4638. }
  4639. impl ::std::fmt::Debug for Disc {
  4640. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4641. ::protobuf::text_format::fmt(self, f)
  4642. }
  4643. }
  4644. impl ::protobuf::reflect::ProtobufValue for Disc {
  4645. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4646. ::protobuf::reflect::ReflectValueRef::Message(self)
  4647. }
  4648. }
  4649. #[derive(PartialEq, Clone, Default)]
  4650. pub struct Copyright {
  4651. // message fields
  4652. typ: ::std::option::Option<Copyright_Type>,
  4653. text: ::protobuf::SingularField<::std::string::String>,
  4654. // special fields
  4655. pub unknown_fields: ::protobuf::UnknownFields,
  4656. pub cached_size: ::protobuf::CachedSize,
  4657. }
  4658. impl<'a> ::std::default::Default for &'a Copyright {
  4659. fn default() -> &'a Copyright {
  4660. <Copyright as ::protobuf::Message>::default_instance()
  4661. }
  4662. }
  4663. impl Copyright {
  4664. pub fn new() -> Copyright {
  4665. ::std::default::Default::default()
  4666. }
  4667. // optional .Copyright.Type typ = 1;
  4668. pub fn get_typ(&self) -> Copyright_Type {
  4669. self.typ.unwrap_or(Copyright_Type::P)
  4670. }
  4671. pub fn clear_typ(&mut self) {
  4672. self.typ = ::std::option::Option::None;
  4673. }
  4674. pub fn has_typ(&self) -> bool {
  4675. self.typ.is_some()
  4676. }
  4677. // Param is passed by value, moved
  4678. pub fn set_typ(&mut self, v: Copyright_Type) {
  4679. self.typ = ::std::option::Option::Some(v);
  4680. }
  4681. // optional string text = 2;
  4682. pub fn get_text(&self) -> &str {
  4683. match self.text.as_ref() {
  4684. Some(v) => &v,
  4685. None => "",
  4686. }
  4687. }
  4688. pub fn clear_text(&mut self) {
  4689. self.text.clear();
  4690. }
  4691. pub fn has_text(&self) -> bool {
  4692. self.text.is_some()
  4693. }
  4694. // Param is passed by value, moved
  4695. pub fn set_text(&mut self, v: ::std::string::String) {
  4696. self.text = ::protobuf::SingularField::some(v);
  4697. }
  4698. // Mutable pointer to the field.
  4699. // If field is not initialized, it is initialized with default value first.
  4700. pub fn mut_text(&mut self) -> &mut ::std::string::String {
  4701. if self.text.is_none() {
  4702. self.text.set_default();
  4703. }
  4704. self.text.as_mut().unwrap()
  4705. }
  4706. // Take field
  4707. pub fn take_text(&mut self) -> ::std::string::String {
  4708. self.text
  4709. .take()
  4710. .unwrap_or_else(|| ::std::string::String::new())
  4711. }
  4712. }
  4713. impl ::protobuf::Message for Copyright {
  4714. fn is_initialized(&self) -> bool {
  4715. true
  4716. }
  4717. fn merge_from(
  4718. &mut self,
  4719. is: &mut ::protobuf::CodedInputStream<'_>,
  4720. ) -> ::protobuf::ProtobufResult<()> {
  4721. while !is.eof()? {
  4722. let (field_number, wire_type) = is.read_tag_unpack()?;
  4723. match field_number {
  4724. 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  4725. wire_type,
  4726. is,
  4727. &mut self.typ,
  4728. 1,
  4729. &mut self.unknown_fields,
  4730. )?,
  4731. 2 => {
  4732. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.text)?;
  4733. }
  4734. _ => {
  4735. ::protobuf::rt::read_unknown_or_skip_group(
  4736. field_number,
  4737. wire_type,
  4738. is,
  4739. self.mut_unknown_fields(),
  4740. )?;
  4741. }
  4742. };
  4743. }
  4744. ::std::result::Result::Ok(())
  4745. }
  4746. // Compute sizes of nested messages
  4747. #[allow(unused_variables)]
  4748. fn compute_size(&self) -> u32 {
  4749. let mut my_size = 0;
  4750. if let Some(v) = self.typ {
  4751. my_size += ::protobuf::rt::enum_size(1, v);
  4752. }
  4753. if let Some(ref v) = self.text.as_ref() {
  4754. my_size += ::protobuf::rt::string_size(2, &v);
  4755. }
  4756. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4757. self.cached_size.set(my_size);
  4758. my_size
  4759. }
  4760. fn write_to_with_cached_sizes(
  4761. &self,
  4762. os: &mut ::protobuf::CodedOutputStream<'_>,
  4763. ) -> ::protobuf::ProtobufResult<()> {
  4764. if let Some(v) = self.typ {
  4765. os.write_enum(1, v.value())?;
  4766. }
  4767. if let Some(ref v) = self.text.as_ref() {
  4768. os.write_string(2, &v)?;
  4769. }
  4770. os.write_unknown_fields(self.get_unknown_fields())?;
  4771. ::std::result::Result::Ok(())
  4772. }
  4773. fn get_cached_size(&self) -> u32 {
  4774. self.cached_size.get()
  4775. }
  4776. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4777. &self.unknown_fields
  4778. }
  4779. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4780. &mut self.unknown_fields
  4781. }
  4782. fn as_any(&self) -> &dyn (::std::any::Any) {
  4783. self as &dyn (::std::any::Any)
  4784. }
  4785. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4786. self as &mut dyn (::std::any::Any)
  4787. }
  4788. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4789. self
  4790. }
  4791. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4792. Self::descriptor_static()
  4793. }
  4794. fn new() -> Copyright {
  4795. Copyright::new()
  4796. }
  4797. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4798. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  4799. ::protobuf::lazy::Lazy::INIT;
  4800. unsafe {
  4801. descriptor.get(|| {
  4802. let mut fields = ::std::vec::Vec::new();
  4803. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  4804. _,
  4805. ::protobuf::types::ProtobufTypeEnum<Copyright_Type>,
  4806. >(
  4807. "typ",
  4808. |m: &Copyright| &m.typ,
  4809. |m: &mut Copyright| &mut m.typ,
  4810. ));
  4811. fields.push(
  4812. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  4813. _,
  4814. ::protobuf::types::ProtobufTypeString,
  4815. >(
  4816. "text",
  4817. |m: &Copyright| &m.text,
  4818. |m: &mut Copyright| &mut m.text,
  4819. ),
  4820. );
  4821. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Copyright>(
  4822. "Copyright",
  4823. fields,
  4824. file_descriptor_proto(),
  4825. )
  4826. })
  4827. }
  4828. }
  4829. fn default_instance() -> &'static Copyright {
  4830. static mut instance: ::protobuf::lazy::Lazy<Copyright> = ::protobuf::lazy::Lazy::INIT;
  4831. unsafe { instance.get(Copyright::new) }
  4832. }
  4833. }
  4834. impl ::protobuf::Clear for Copyright {
  4835. fn clear(&mut self) {
  4836. self.typ = ::std::option::Option::None;
  4837. self.text.clear();
  4838. self.unknown_fields.clear();
  4839. }
  4840. }
  4841. impl ::std::fmt::Debug for Copyright {
  4842. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4843. ::protobuf::text_format::fmt(self, f)
  4844. }
  4845. }
  4846. impl ::protobuf::reflect::ProtobufValue for Copyright {
  4847. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4848. ::protobuf::reflect::ReflectValueRef::Message(self)
  4849. }
  4850. }
  4851. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  4852. pub enum Copyright_Type {
  4853. P = 0,
  4854. C = 1,
  4855. }
  4856. impl ::protobuf::ProtobufEnum for Copyright_Type {
  4857. fn value(&self) -> i32 {
  4858. *self as i32
  4859. }
  4860. fn from_i32(value: i32) -> ::std::option::Option<Copyright_Type> {
  4861. match value {
  4862. 0 => ::std::option::Option::Some(Copyright_Type::P),
  4863. 1 => ::std::option::Option::Some(Copyright_Type::C),
  4864. _ => ::std::option::Option::None,
  4865. }
  4866. }
  4867. fn values() -> &'static [Self] {
  4868. static values: &'static [Copyright_Type] = &[Copyright_Type::P, Copyright_Type::C];
  4869. values
  4870. }
  4871. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  4872. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  4873. ::protobuf::lazy::Lazy::INIT;
  4874. unsafe {
  4875. descriptor.get(|| {
  4876. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Copyright_Type>(
  4877. "Copyright.Type",
  4878. file_descriptor_proto(),
  4879. )
  4880. })
  4881. }
  4882. }
  4883. }
  4884. impl ::std::marker::Copy for Copyright_Type {}
  4885. impl ::std::default::Default for Copyright_Type {
  4886. fn default() -> Self {
  4887. Copyright_Type::P
  4888. }
  4889. }
  4890. impl ::protobuf::reflect::ProtobufValue for Copyright_Type {
  4891. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4892. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  4893. }
  4894. }
  4895. #[derive(PartialEq, Clone, Default)]
  4896. pub struct Restriction {
  4897. // message fields
  4898. catalogue: ::std::vec::Vec<Restriction_Catalogue>,
  4899. countries_allowed: ::protobuf::SingularField<::std::string::String>,
  4900. countries_forbidden: ::protobuf::SingularField<::std::string::String>,
  4901. typ: ::std::option::Option<Restriction_Type>,
  4902. catalogue_str: ::protobuf::RepeatedField<::std::string::String>,
  4903. // special fields
  4904. pub unknown_fields: ::protobuf::UnknownFields,
  4905. pub cached_size: ::protobuf::CachedSize,
  4906. }
  4907. impl<'a> ::std::default::Default for &'a Restriction {
  4908. fn default() -> &'a Restriction {
  4909. <Restriction as ::protobuf::Message>::default_instance()
  4910. }
  4911. }
  4912. impl Restriction {
  4913. pub fn new() -> Restriction {
  4914. ::std::default::Default::default()
  4915. }
  4916. // repeated .Restriction.Catalogue catalogue = 1;
  4917. pub fn get_catalogue(&self) -> &[Restriction_Catalogue] {
  4918. &self.catalogue
  4919. }
  4920. pub fn clear_catalogue(&mut self) {
  4921. self.catalogue.clear();
  4922. }
  4923. // Param is passed by value, moved
  4924. pub fn set_catalogue(&mut self, v: ::std::vec::Vec<Restriction_Catalogue>) {
  4925. self.catalogue = v;
  4926. }
  4927. // Mutable pointer to the field.
  4928. pub fn mut_catalogue(&mut self) -> &mut ::std::vec::Vec<Restriction_Catalogue> {
  4929. &mut self.catalogue
  4930. }
  4931. // Take field
  4932. pub fn take_catalogue(&mut self) -> ::std::vec::Vec<Restriction_Catalogue> {
  4933. ::std::mem::replace(&mut self.catalogue, ::std::vec::Vec::new())
  4934. }
  4935. // optional string countries_allowed = 2;
  4936. pub fn get_countries_allowed(&self) -> &str {
  4937. match self.countries_allowed.as_ref() {
  4938. Some(v) => &v,
  4939. None => "",
  4940. }
  4941. }
  4942. pub fn clear_countries_allowed(&mut self) {
  4943. self.countries_allowed.clear();
  4944. }
  4945. pub fn has_countries_allowed(&self) -> bool {
  4946. self.countries_allowed.is_some()
  4947. }
  4948. // Param is passed by value, moved
  4949. pub fn set_countries_allowed(&mut self, v: ::std::string::String) {
  4950. self.countries_allowed = ::protobuf::SingularField::some(v);
  4951. }
  4952. // Mutable pointer to the field.
  4953. // If field is not initialized, it is initialized with default value first.
  4954. pub fn mut_countries_allowed(&mut self) -> &mut ::std::string::String {
  4955. if self.countries_allowed.is_none() {
  4956. self.countries_allowed.set_default();
  4957. }
  4958. self.countries_allowed.as_mut().unwrap()
  4959. }
  4960. // Take field
  4961. pub fn take_countries_allowed(&mut self) -> ::std::string::String {
  4962. self.countries_allowed
  4963. .take()
  4964. .unwrap_or_else(|| ::std::string::String::new())
  4965. }
  4966. // optional string countries_forbidden = 3;
  4967. pub fn get_countries_forbidden(&self) -> &str {
  4968. match self.countries_forbidden.as_ref() {
  4969. Some(v) => &v,
  4970. None => "",
  4971. }
  4972. }
  4973. pub fn clear_countries_forbidden(&mut self) {
  4974. self.countries_forbidden.clear();
  4975. }
  4976. pub fn has_countries_forbidden(&self) -> bool {
  4977. self.countries_forbidden.is_some()
  4978. }
  4979. // Param is passed by value, moved
  4980. pub fn set_countries_forbidden(&mut self, v: ::std::string::String) {
  4981. self.countries_forbidden = ::protobuf::SingularField::some(v);
  4982. }
  4983. // Mutable pointer to the field.
  4984. // If field is not initialized, it is initialized with default value first.
  4985. pub fn mut_countries_forbidden(&mut self) -> &mut ::std::string::String {
  4986. if self.countries_forbidden.is_none() {
  4987. self.countries_forbidden.set_default();
  4988. }
  4989. self.countries_forbidden.as_mut().unwrap()
  4990. }
  4991. // Take field
  4992. pub fn take_countries_forbidden(&mut self) -> ::std::string::String {
  4993. self.countries_forbidden
  4994. .take()
  4995. .unwrap_or_else(|| ::std::string::String::new())
  4996. }
  4997. // optional .Restriction.Type typ = 4;
  4998. pub fn get_typ(&self) -> Restriction_Type {
  4999. self.typ.unwrap_or(Restriction_Type::STREAMING)
  5000. }
  5001. pub fn clear_typ(&mut self) {
  5002. self.typ = ::std::option::Option::None;
  5003. }
  5004. pub fn has_typ(&self) -> bool {
  5005. self.typ.is_some()
  5006. }
  5007. // Param is passed by value, moved
  5008. pub fn set_typ(&mut self, v: Restriction_Type) {
  5009. self.typ = ::std::option::Option::Some(v);
  5010. }
  5011. // repeated string catalogue_str = 5;
  5012. pub fn get_catalogue_str(&self) -> &[::std::string::String] {
  5013. &self.catalogue_str
  5014. }
  5015. pub fn clear_catalogue_str(&mut self) {
  5016. self.catalogue_str.clear();
  5017. }
  5018. // Param is passed by value, moved
  5019. pub fn set_catalogue_str(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  5020. self.catalogue_str = v;
  5021. }
  5022. // Mutable pointer to the field.
  5023. pub fn mut_catalogue_str(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  5024. &mut self.catalogue_str
  5025. }
  5026. // Take field
  5027. pub fn take_catalogue_str(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  5028. ::std::mem::replace(&mut self.catalogue_str, ::protobuf::RepeatedField::new())
  5029. }
  5030. }
  5031. impl ::protobuf::Message for Restriction {
  5032. fn is_initialized(&self) -> bool {
  5033. true
  5034. }
  5035. fn merge_from(
  5036. &mut self,
  5037. is: &mut ::protobuf::CodedInputStream<'_>,
  5038. ) -> ::protobuf::ProtobufResult<()> {
  5039. while !is.eof()? {
  5040. let (field_number, wire_type) = is.read_tag_unpack()?;
  5041. match field_number {
  5042. 1 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
  5043. wire_type,
  5044. is,
  5045. &mut self.catalogue,
  5046. 1,
  5047. &mut self.unknown_fields,
  5048. )?,
  5049. 2 => {
  5050. ::protobuf::rt::read_singular_string_into(
  5051. wire_type,
  5052. is,
  5053. &mut self.countries_allowed,
  5054. )?;
  5055. }
  5056. 3 => {
  5057. ::protobuf::rt::read_singular_string_into(
  5058. wire_type,
  5059. is,
  5060. &mut self.countries_forbidden,
  5061. )?;
  5062. }
  5063. 4 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  5064. wire_type,
  5065. is,
  5066. &mut self.typ,
  5067. 4,
  5068. &mut self.unknown_fields,
  5069. )?,
  5070. 5 => {
  5071. ::protobuf::rt::read_repeated_string_into(
  5072. wire_type,
  5073. is,
  5074. &mut self.catalogue_str,
  5075. )?;
  5076. }
  5077. _ => {
  5078. ::protobuf::rt::read_unknown_or_skip_group(
  5079. field_number,
  5080. wire_type,
  5081. is,
  5082. self.mut_unknown_fields(),
  5083. )?;
  5084. }
  5085. };
  5086. }
  5087. ::std::result::Result::Ok(())
  5088. }
  5089. // Compute sizes of nested messages
  5090. #[allow(unused_variables)]
  5091. fn compute_size(&self) -> u32 {
  5092. let mut my_size = 0;
  5093. for value in &self.catalogue {
  5094. my_size += ::protobuf::rt::enum_size(1, *value);
  5095. }
  5096. if let Some(ref v) = self.countries_allowed.as_ref() {
  5097. my_size += ::protobuf::rt::string_size(2, &v);
  5098. }
  5099. if let Some(ref v) = self.countries_forbidden.as_ref() {
  5100. my_size += ::protobuf::rt::string_size(3, &v);
  5101. }
  5102. if let Some(v) = self.typ {
  5103. my_size += ::protobuf::rt::enum_size(4, v);
  5104. }
  5105. for value in &self.catalogue_str {
  5106. my_size += ::protobuf::rt::string_size(5, &value);
  5107. }
  5108. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5109. self.cached_size.set(my_size);
  5110. my_size
  5111. }
  5112. fn write_to_with_cached_sizes(
  5113. &self,
  5114. os: &mut ::protobuf::CodedOutputStream<'_>,
  5115. ) -> ::protobuf::ProtobufResult<()> {
  5116. for v in &self.catalogue {
  5117. os.write_enum(1, v.value())?;
  5118. }
  5119. if let Some(ref v) = self.countries_allowed.as_ref() {
  5120. os.write_string(2, &v)?;
  5121. }
  5122. if let Some(ref v) = self.countries_forbidden.as_ref() {
  5123. os.write_string(3, &v)?;
  5124. }
  5125. if let Some(v) = self.typ {
  5126. os.write_enum(4, v.value())?;
  5127. }
  5128. for v in &self.catalogue_str {
  5129. os.write_string(5, &v)?;
  5130. }
  5131. os.write_unknown_fields(self.get_unknown_fields())?;
  5132. ::std::result::Result::Ok(())
  5133. }
  5134. fn get_cached_size(&self) -> u32 {
  5135. self.cached_size.get()
  5136. }
  5137. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5138. &self.unknown_fields
  5139. }
  5140. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5141. &mut self.unknown_fields
  5142. }
  5143. fn as_any(&self) -> &dyn (::std::any::Any) {
  5144. self as &dyn (::std::any::Any)
  5145. }
  5146. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5147. self as &mut dyn (::std::any::Any)
  5148. }
  5149. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5150. self
  5151. }
  5152. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5153. Self::descriptor_static()
  5154. }
  5155. fn new() -> Restriction {
  5156. Restriction::new()
  5157. }
  5158. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5159. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  5160. ::protobuf::lazy::Lazy::INIT;
  5161. unsafe {
  5162. descriptor.get(|| {
  5163. let mut fields = ::std::vec::Vec::new();
  5164. fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
  5165. _,
  5166. ::protobuf::types::ProtobufTypeEnum<Restriction_Catalogue>,
  5167. >(
  5168. "catalogue",
  5169. |m: &Restriction| &m.catalogue,
  5170. |m: &mut Restriction| &mut m.catalogue,
  5171. ));
  5172. fields.push(
  5173. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  5174. _,
  5175. ::protobuf::types::ProtobufTypeString,
  5176. >(
  5177. "countries_allowed",
  5178. |m: &Restriction| &m.countries_allowed,
  5179. |m: &mut Restriction| &mut m.countries_allowed,
  5180. ),
  5181. );
  5182. fields.push(
  5183. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  5184. _,
  5185. ::protobuf::types::ProtobufTypeString,
  5186. >(
  5187. "countries_forbidden",
  5188. |m: &Restriction| &m.countries_forbidden,
  5189. |m: &mut Restriction| &mut m.countries_forbidden,
  5190. ),
  5191. );
  5192. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  5193. _,
  5194. ::protobuf::types::ProtobufTypeEnum<Restriction_Type>,
  5195. >(
  5196. "typ",
  5197. |m: &Restriction| &m.typ,
  5198. |m: &mut Restriction| &mut m.typ,
  5199. ));
  5200. fields.push(
  5201. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  5202. _,
  5203. ::protobuf::types::ProtobufTypeString,
  5204. >(
  5205. "catalogue_str",
  5206. |m: &Restriction| &m.catalogue_str,
  5207. |m: &mut Restriction| &mut m.catalogue_str,
  5208. ),
  5209. );
  5210. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Restriction>(
  5211. "Restriction",
  5212. fields,
  5213. file_descriptor_proto(),
  5214. )
  5215. })
  5216. }
  5217. }
  5218. fn default_instance() -> &'static Restriction {
  5219. static mut instance: ::protobuf::lazy::Lazy<Restriction> = ::protobuf::lazy::Lazy::INIT;
  5220. unsafe { instance.get(Restriction::new) }
  5221. }
  5222. }
  5223. impl ::protobuf::Clear for Restriction {
  5224. fn clear(&mut self) {
  5225. self.catalogue.clear();
  5226. self.countries_allowed.clear();
  5227. self.countries_forbidden.clear();
  5228. self.typ = ::std::option::Option::None;
  5229. self.catalogue_str.clear();
  5230. self.unknown_fields.clear();
  5231. }
  5232. }
  5233. impl ::std::fmt::Debug for Restriction {
  5234. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5235. ::protobuf::text_format::fmt(self, f)
  5236. }
  5237. }
  5238. impl ::protobuf::reflect::ProtobufValue for Restriction {
  5239. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  5240. ::protobuf::reflect::ReflectValueRef::Message(self)
  5241. }
  5242. }
  5243. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  5244. pub enum Restriction_Catalogue {
  5245. AD = 0,
  5246. SUBSCRIPTION = 1,
  5247. CATALOGUE_ALL = 2,
  5248. SHUFFLE = 3,
  5249. COMMERCIAL = 4,
  5250. }
  5251. impl ::protobuf::ProtobufEnum for Restriction_Catalogue {
  5252. fn value(&self) -> i32 {
  5253. *self as i32
  5254. }
  5255. fn from_i32(value: i32) -> ::std::option::Option<Restriction_Catalogue> {
  5256. match value {
  5257. 0 => ::std::option::Option::Some(Restriction_Catalogue::AD),
  5258. 1 => ::std::option::Option::Some(Restriction_Catalogue::SUBSCRIPTION),
  5259. 2 => ::std::option::Option::Some(Restriction_Catalogue::CATALOGUE_ALL),
  5260. 3 => ::std::option::Option::Some(Restriction_Catalogue::SHUFFLE),
  5261. 4 => ::std::option::Option::Some(Restriction_Catalogue::COMMERCIAL),
  5262. _ => ::std::option::Option::None,
  5263. }
  5264. }
  5265. fn values() -> &'static [Self] {
  5266. static values: &'static [Restriction_Catalogue] = &[
  5267. Restriction_Catalogue::AD,
  5268. Restriction_Catalogue::SUBSCRIPTION,
  5269. Restriction_Catalogue::CATALOGUE_ALL,
  5270. Restriction_Catalogue::SHUFFLE,
  5271. Restriction_Catalogue::COMMERCIAL,
  5272. ];
  5273. values
  5274. }
  5275. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5276. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  5277. ::protobuf::lazy::Lazy::INIT;
  5278. unsafe {
  5279. descriptor.get(|| {
  5280. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Restriction_Catalogue>(
  5281. "Restriction.Catalogue",
  5282. file_descriptor_proto(),
  5283. )
  5284. })
  5285. }
  5286. }
  5287. }
  5288. impl ::std::marker::Copy for Restriction_Catalogue {}
  5289. impl ::std::default::Default for Restriction_Catalogue {
  5290. fn default() -> Self {
  5291. Restriction_Catalogue::AD
  5292. }
  5293. }
  5294. impl ::protobuf::reflect::ProtobufValue for Restriction_Catalogue {
  5295. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  5296. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  5297. }
  5298. }
  5299. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  5300. pub enum Restriction_Type {
  5301. STREAMING = 0,
  5302. }
  5303. impl ::protobuf::ProtobufEnum for Restriction_Type {
  5304. fn value(&self) -> i32 {
  5305. *self as i32
  5306. }
  5307. fn from_i32(value: i32) -> ::std::option::Option<Restriction_Type> {
  5308. match value {
  5309. 0 => ::std::option::Option::Some(Restriction_Type::STREAMING),
  5310. _ => ::std::option::Option::None,
  5311. }
  5312. }
  5313. fn values() -> &'static [Self] {
  5314. static values: &'static [Restriction_Type] = &[Restriction_Type::STREAMING];
  5315. values
  5316. }
  5317. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  5318. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  5319. ::protobuf::lazy::Lazy::INIT;
  5320. unsafe {
  5321. descriptor.get(|| {
  5322. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Restriction_Type>(
  5323. "Restriction.Type",
  5324. file_descriptor_proto(),
  5325. )
  5326. })
  5327. }
  5328. }
  5329. }
  5330. impl ::std::marker::Copy for Restriction_Type {}
  5331. impl ::std::default::Default for Restriction_Type {
  5332. fn default() -> Self {
  5333. Restriction_Type::STREAMING
  5334. }
  5335. }
  5336. impl ::protobuf::reflect::ProtobufValue for Restriction_Type {
  5337. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  5338. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  5339. }
  5340. }
  5341. #[derive(PartialEq, Clone, Default)]
  5342. pub struct Availability {
  5343. // message fields
  5344. catalogue_str: ::protobuf::RepeatedField<::std::string::String>,
  5345. start: ::protobuf::SingularPtrField<Date>,
  5346. // special fields
  5347. pub unknown_fields: ::protobuf::UnknownFields,
  5348. pub cached_size: ::protobuf::CachedSize,
  5349. }
  5350. impl<'a> ::std::default::Default for &'a Availability {
  5351. fn default() -> &'a Availability {
  5352. <Availability as ::protobuf::Message>::default_instance()
  5353. }
  5354. }
  5355. impl Availability {
  5356. pub fn new() -> Availability {
  5357. ::std::default::Default::default()
  5358. }
  5359. // repeated string catalogue_str = 1;
  5360. pub fn get_catalogue_str(&self) -> &[::std::string::String] {
  5361. &self.catalogue_str
  5362. }
  5363. pub fn clear_catalogue_str(&mut self) {
  5364. self.catalogue_str.clear();
  5365. }
  5366. // Param is passed by value, moved
  5367. pub fn set_catalogue_str(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  5368. self.catalogue_str = v;
  5369. }
  5370. // Mutable pointer to the field.
  5371. pub fn mut_catalogue_str(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  5372. &mut self.catalogue_str
  5373. }
  5374. // Take field
  5375. pub fn take_catalogue_str(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  5376. ::std::mem::replace(&mut self.catalogue_str, ::protobuf::RepeatedField::new())
  5377. }
  5378. // optional .Date start = 2;
  5379. pub fn get_start(&self) -> &Date {
  5380. self.start
  5381. .as_ref()
  5382. .unwrap_or_else(|| Date::default_instance())
  5383. }
  5384. pub fn clear_start(&mut self) {
  5385. self.start.clear();
  5386. }
  5387. pub fn has_start(&self) -> bool {
  5388. self.start.is_some()
  5389. }
  5390. // Param is passed by value, moved
  5391. pub fn set_start(&mut self, v: Date) {
  5392. self.start = ::protobuf::SingularPtrField::some(v);
  5393. }
  5394. // Mutable pointer to the field.
  5395. // If field is not initialized, it is initialized with default value first.
  5396. pub fn mut_start(&mut self) -> &mut Date {
  5397. if self.start.is_none() {
  5398. self.start.set_default();
  5399. }
  5400. self.start.as_mut().unwrap()
  5401. }
  5402. // Take field
  5403. pub fn take_start(&mut self) -> Date {
  5404. self.start.take().unwrap_or_else(|| Date::new())
  5405. }
  5406. }
  5407. impl ::protobuf::Message for Availability {
  5408. fn is_initialized(&self) -> bool {
  5409. for v in &self.start {
  5410. if !v.is_initialized() {
  5411. return false;
  5412. }
  5413. }
  5414. true
  5415. }
  5416. fn merge_from(
  5417. &mut self,
  5418. is: &mut ::protobuf::CodedInputStream<'_>,
  5419. ) -> ::protobuf::ProtobufResult<()> {
  5420. while !is.eof()? {
  5421. let (field_number, wire_type) = is.read_tag_unpack()?;
  5422. match field_number {
  5423. 1 => {
  5424. ::protobuf::rt::read_repeated_string_into(
  5425. wire_type,
  5426. is,
  5427. &mut self.catalogue_str,
  5428. )?;
  5429. }
  5430. 2 => {
  5431. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.start)?;
  5432. }
  5433. _ => {
  5434. ::protobuf::rt::read_unknown_or_skip_group(
  5435. field_number,
  5436. wire_type,
  5437. is,
  5438. self.mut_unknown_fields(),
  5439. )?;
  5440. }
  5441. };
  5442. }
  5443. ::std::result::Result::Ok(())
  5444. }
  5445. // Compute sizes of nested messages
  5446. #[allow(unused_variables)]
  5447. fn compute_size(&self) -> u32 {
  5448. let mut my_size = 0;
  5449. for value in &self.catalogue_str {
  5450. my_size += ::protobuf::rt::string_size(1, &value);
  5451. }
  5452. if let Some(ref v) = self.start.as_ref() {
  5453. let len = v.compute_size();
  5454. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  5455. }
  5456. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5457. self.cached_size.set(my_size);
  5458. my_size
  5459. }
  5460. fn write_to_with_cached_sizes(
  5461. &self,
  5462. os: &mut ::protobuf::CodedOutputStream<'_>,
  5463. ) -> ::protobuf::ProtobufResult<()> {
  5464. for v in &self.catalogue_str {
  5465. os.write_string(1, &v)?;
  5466. }
  5467. if let Some(ref v) = self.start.as_ref() {
  5468. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  5469. os.write_raw_varint32(v.get_cached_size())?;
  5470. v.write_to_with_cached_sizes(os)?;
  5471. }
  5472. os.write_unknown_fields(self.get_unknown_fields())?;
  5473. ::std::result::Result::Ok(())
  5474. }
  5475. fn get_cached_size(&self) -> u32 {
  5476. self.cached_size.get()
  5477. }
  5478. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5479. &self.unknown_fields
  5480. }
  5481. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5482. &mut self.unknown_fields
  5483. }
  5484. fn as_any(&self) -> &dyn (::std::any::Any) {
  5485. self as &dyn (::std::any::Any)
  5486. }
  5487. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5488. self as &mut dyn (::std::any::Any)
  5489. }
  5490. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5491. self
  5492. }
  5493. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5494. Self::descriptor_static()
  5495. }
  5496. fn new() -> Availability {
  5497. Availability::new()
  5498. }
  5499. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5500. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  5501. ::protobuf::lazy::Lazy::INIT;
  5502. unsafe {
  5503. descriptor.get(|| {
  5504. let mut fields = ::std::vec::Vec::new();
  5505. fields.push(
  5506. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  5507. _,
  5508. ::protobuf::types::ProtobufTypeString,
  5509. >(
  5510. "catalogue_str",
  5511. |m: &Availability| &m.catalogue_str,
  5512. |m: &mut Availability| &mut m.catalogue_str,
  5513. ),
  5514. );
  5515. fields.push(
  5516. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  5517. _,
  5518. ::protobuf::types::ProtobufTypeMessage<Date>,
  5519. >(
  5520. "start",
  5521. |m: &Availability| &m.start,
  5522. |m: &mut Availability| &mut m.start,
  5523. ),
  5524. );
  5525. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Availability>(
  5526. "Availability",
  5527. fields,
  5528. file_descriptor_proto(),
  5529. )
  5530. })
  5531. }
  5532. }
  5533. fn default_instance() -> &'static Availability {
  5534. static mut instance: ::protobuf::lazy::Lazy<Availability> = ::protobuf::lazy::Lazy::INIT;
  5535. unsafe { instance.get(Availability::new) }
  5536. }
  5537. }
  5538. impl ::protobuf::Clear for Availability {
  5539. fn clear(&mut self) {
  5540. self.catalogue_str.clear();
  5541. self.start.clear();
  5542. self.unknown_fields.clear();
  5543. }
  5544. }
  5545. impl ::std::fmt::Debug for Availability {
  5546. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5547. ::protobuf::text_format::fmt(self, f)
  5548. }
  5549. }
  5550. impl ::protobuf::reflect::ProtobufValue for Availability {
  5551. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  5552. ::protobuf::reflect::ReflectValueRef::Message(self)
  5553. }
  5554. }
  5555. #[derive(PartialEq, Clone, Default)]
  5556. pub struct SalePeriod {
  5557. // message fields
  5558. restriction: ::protobuf::RepeatedField<Restriction>,
  5559. start: ::protobuf::SingularPtrField<Date>,
  5560. end: ::protobuf::SingularPtrField<Date>,
  5561. // special fields
  5562. pub unknown_fields: ::protobuf::UnknownFields,
  5563. pub cached_size: ::protobuf::CachedSize,
  5564. }
  5565. impl<'a> ::std::default::Default for &'a SalePeriod {
  5566. fn default() -> &'a SalePeriod {
  5567. <SalePeriod as ::protobuf::Message>::default_instance()
  5568. }
  5569. }
  5570. impl SalePeriod {
  5571. pub fn new() -> SalePeriod {
  5572. ::std::default::Default::default()
  5573. }
  5574. // repeated .Restriction restriction = 1;
  5575. pub fn get_restriction(&self) -> &[Restriction] {
  5576. &self.restriction
  5577. }
  5578. pub fn clear_restriction(&mut self) {
  5579. self.restriction.clear();
  5580. }
  5581. // Param is passed by value, moved
  5582. pub fn set_restriction(&mut self, v: ::protobuf::RepeatedField<Restriction>) {
  5583. self.restriction = v;
  5584. }
  5585. // Mutable pointer to the field.
  5586. pub fn mut_restriction(&mut self) -> &mut ::protobuf::RepeatedField<Restriction> {
  5587. &mut self.restriction
  5588. }
  5589. // Take field
  5590. pub fn take_restriction(&mut self) -> ::protobuf::RepeatedField<Restriction> {
  5591. ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new())
  5592. }
  5593. // optional .Date start = 2;
  5594. pub fn get_start(&self) -> &Date {
  5595. self.start
  5596. .as_ref()
  5597. .unwrap_or_else(|| Date::default_instance())
  5598. }
  5599. pub fn clear_start(&mut self) {
  5600. self.start.clear();
  5601. }
  5602. pub fn has_start(&self) -> bool {
  5603. self.start.is_some()
  5604. }
  5605. // Param is passed by value, moved
  5606. pub fn set_start(&mut self, v: Date) {
  5607. self.start = ::protobuf::SingularPtrField::some(v);
  5608. }
  5609. // Mutable pointer to the field.
  5610. // If field is not initialized, it is initialized with default value first.
  5611. pub fn mut_start(&mut self) -> &mut Date {
  5612. if self.start.is_none() {
  5613. self.start.set_default();
  5614. }
  5615. self.start.as_mut().unwrap()
  5616. }
  5617. // Take field
  5618. pub fn take_start(&mut self) -> Date {
  5619. self.start.take().unwrap_or_else(|| Date::new())
  5620. }
  5621. // optional .Date end = 3;
  5622. pub fn get_end(&self) -> &Date {
  5623. self.end
  5624. .as_ref()
  5625. .unwrap_or_else(|| Date::default_instance())
  5626. }
  5627. pub fn clear_end(&mut self) {
  5628. self.end.clear();
  5629. }
  5630. pub fn has_end(&self) -> bool {
  5631. self.end.is_some()
  5632. }
  5633. // Param is passed by value, moved
  5634. pub fn set_end(&mut self, v: Date) {
  5635. self.end = ::protobuf::SingularPtrField::some(v);
  5636. }
  5637. // Mutable pointer to the field.
  5638. // If field is not initialized, it is initialized with default value first.
  5639. pub fn mut_end(&mut self) -> &mut Date {
  5640. if self.end.is_none() {
  5641. self.end.set_default();
  5642. }
  5643. self.end.as_mut().unwrap()
  5644. }
  5645. // Take field
  5646. pub fn take_end(&mut self) -> Date {
  5647. self.end.take().unwrap_or_else(|| Date::new())
  5648. }
  5649. }
  5650. impl ::protobuf::Message for SalePeriod {
  5651. fn is_initialized(&self) -> bool {
  5652. for v in &self.restriction {
  5653. if !v.is_initialized() {
  5654. return false;
  5655. }
  5656. }
  5657. for v in &self.start {
  5658. if !v.is_initialized() {
  5659. return false;
  5660. }
  5661. }
  5662. for v in &self.end {
  5663. if !v.is_initialized() {
  5664. return false;
  5665. }
  5666. }
  5667. true
  5668. }
  5669. fn merge_from(
  5670. &mut self,
  5671. is: &mut ::protobuf::CodedInputStream<'_>,
  5672. ) -> ::protobuf::ProtobufResult<()> {
  5673. while !is.eof()? {
  5674. let (field_number, wire_type) = is.read_tag_unpack()?;
  5675. match field_number {
  5676. 1 => {
  5677. ::protobuf::rt::read_repeated_message_into(
  5678. wire_type,
  5679. is,
  5680. &mut self.restriction,
  5681. )?;
  5682. }
  5683. 2 => {
  5684. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.start)?;
  5685. }
  5686. 3 => {
  5687. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.end)?;
  5688. }
  5689. _ => {
  5690. ::protobuf::rt::read_unknown_or_skip_group(
  5691. field_number,
  5692. wire_type,
  5693. is,
  5694. self.mut_unknown_fields(),
  5695. )?;
  5696. }
  5697. };
  5698. }
  5699. ::std::result::Result::Ok(())
  5700. }
  5701. // Compute sizes of nested messages
  5702. #[allow(unused_variables)]
  5703. fn compute_size(&self) -> u32 {
  5704. let mut my_size = 0;
  5705. for value in &self.restriction {
  5706. let len = value.compute_size();
  5707. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  5708. }
  5709. if let Some(ref v) = self.start.as_ref() {
  5710. let len = v.compute_size();
  5711. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  5712. }
  5713. if let Some(ref v) = self.end.as_ref() {
  5714. let len = v.compute_size();
  5715. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  5716. }
  5717. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5718. self.cached_size.set(my_size);
  5719. my_size
  5720. }
  5721. fn write_to_with_cached_sizes(
  5722. &self,
  5723. os: &mut ::protobuf::CodedOutputStream<'_>,
  5724. ) -> ::protobuf::ProtobufResult<()> {
  5725. for v in &self.restriction {
  5726. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  5727. os.write_raw_varint32(v.get_cached_size())?;
  5728. v.write_to_with_cached_sizes(os)?;
  5729. }
  5730. if let Some(ref v) = self.start.as_ref() {
  5731. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  5732. os.write_raw_varint32(v.get_cached_size())?;
  5733. v.write_to_with_cached_sizes(os)?;
  5734. }
  5735. if let Some(ref v) = self.end.as_ref() {
  5736. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  5737. os.write_raw_varint32(v.get_cached_size())?;
  5738. v.write_to_with_cached_sizes(os)?;
  5739. }
  5740. os.write_unknown_fields(self.get_unknown_fields())?;
  5741. ::std::result::Result::Ok(())
  5742. }
  5743. fn get_cached_size(&self) -> u32 {
  5744. self.cached_size.get()
  5745. }
  5746. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5747. &self.unknown_fields
  5748. }
  5749. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5750. &mut self.unknown_fields
  5751. }
  5752. fn as_any(&self) -> &dyn (::std::any::Any) {
  5753. self as &dyn (::std::any::Any)
  5754. }
  5755. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5756. self as &mut dyn (::std::any::Any)
  5757. }
  5758. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5759. self
  5760. }
  5761. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5762. Self::descriptor_static()
  5763. }
  5764. fn new() -> SalePeriod {
  5765. SalePeriod::new()
  5766. }
  5767. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5768. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  5769. ::protobuf::lazy::Lazy::INIT;
  5770. unsafe {
  5771. descriptor.get(|| {
  5772. let mut fields = ::std::vec::Vec::new();
  5773. fields.push(
  5774. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  5775. _,
  5776. ::protobuf::types::ProtobufTypeMessage<Restriction>,
  5777. >(
  5778. "restriction",
  5779. |m: &SalePeriod| &m.restriction,
  5780. |m: &mut SalePeriod| &mut m.restriction,
  5781. ),
  5782. );
  5783. fields.push(
  5784. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  5785. _,
  5786. ::protobuf::types::ProtobufTypeMessage<Date>,
  5787. >(
  5788. "start",
  5789. |m: &SalePeriod| &m.start,
  5790. |m: &mut SalePeriod| &mut m.start,
  5791. ),
  5792. );
  5793. fields.push(
  5794. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  5795. _,
  5796. ::protobuf::types::ProtobufTypeMessage<Date>,
  5797. >(
  5798. "end",
  5799. |m: &SalePeriod| &m.end,
  5800. |m: &mut SalePeriod| &mut m.end,
  5801. ),
  5802. );
  5803. ::protobuf::reflect::MessageDescriptor::new_pb_name::<SalePeriod>(
  5804. "SalePeriod",
  5805. fields,
  5806. file_descriptor_proto(),
  5807. )
  5808. })
  5809. }
  5810. }
  5811. fn default_instance() -> &'static SalePeriod {
  5812. static mut instance: ::protobuf::lazy::Lazy<SalePeriod> = ::protobuf::lazy::Lazy::INIT;
  5813. unsafe { instance.get(SalePeriod::new) }
  5814. }
  5815. }
  5816. impl ::protobuf::Clear for SalePeriod {
  5817. fn clear(&mut self) {
  5818. self.restriction.clear();
  5819. self.start.clear();
  5820. self.end.clear();
  5821. self.unknown_fields.clear();
  5822. }
  5823. }
  5824. impl ::std::fmt::Debug for SalePeriod {
  5825. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  5826. ::protobuf::text_format::fmt(self, f)
  5827. }
  5828. }
  5829. impl ::protobuf::reflect::ProtobufValue for SalePeriod {
  5830. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  5831. ::protobuf::reflect::ReflectValueRef::Message(self)
  5832. }
  5833. }
  5834. #[derive(PartialEq, Clone, Default)]
  5835. pub struct ExternalId {
  5836. // message fields
  5837. typ: ::protobuf::SingularField<::std::string::String>,
  5838. id: ::protobuf::SingularField<::std::string::String>,
  5839. // special fields
  5840. pub unknown_fields: ::protobuf::UnknownFields,
  5841. pub cached_size: ::protobuf::CachedSize,
  5842. }
  5843. impl<'a> ::std::default::Default for &'a ExternalId {
  5844. fn default() -> &'a ExternalId {
  5845. <ExternalId as ::protobuf::Message>::default_instance()
  5846. }
  5847. }
  5848. impl ExternalId {
  5849. pub fn new() -> ExternalId {
  5850. ::std::default::Default::default()
  5851. }
  5852. // optional string typ = 1;
  5853. pub fn get_typ(&self) -> &str {
  5854. match self.typ.as_ref() {
  5855. Some(v) => &v,
  5856. None => "",
  5857. }
  5858. }
  5859. pub fn clear_typ(&mut self) {
  5860. self.typ.clear();
  5861. }
  5862. pub fn has_typ(&self) -> bool {
  5863. self.typ.is_some()
  5864. }
  5865. // Param is passed by value, moved
  5866. pub fn set_typ(&mut self, v: ::std::string::String) {
  5867. self.typ = ::protobuf::SingularField::some(v);
  5868. }
  5869. // Mutable pointer to the field.
  5870. // If field is not initialized, it is initialized with default value first.
  5871. pub fn mut_typ(&mut self) -> &mut ::std::string::String {
  5872. if self.typ.is_none() {
  5873. self.typ.set_default();
  5874. }
  5875. self.typ.as_mut().unwrap()
  5876. }
  5877. // Take field
  5878. pub fn take_typ(&mut self) -> ::std::string::String {
  5879. self.typ
  5880. .take()
  5881. .unwrap_or_else(|| ::std::string::String::new())
  5882. }
  5883. // optional string id = 2;
  5884. pub fn get_id(&self) -> &str {
  5885. match self.id.as_ref() {
  5886. Some(v) => &v,
  5887. None => "",
  5888. }
  5889. }
  5890. pub fn clear_id(&mut self) {
  5891. self.id.clear();
  5892. }
  5893. pub fn has_id(&self) -> bool {
  5894. self.id.is_some()
  5895. }
  5896. // Param is passed by value, moved
  5897. pub fn set_id(&mut self, v: ::std::string::String) {
  5898. self.id = ::protobuf::SingularField::some(v);
  5899. }
  5900. // Mutable pointer to the field.
  5901. // If field is not initialized, it is initialized with default value first.
  5902. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  5903. if self.id.is_none() {
  5904. self.id.set_default();
  5905. }
  5906. self.id.as_mut().unwrap()
  5907. }
  5908. // Take field
  5909. pub fn take_id(&mut self) -> ::std::string::String {
  5910. self.id
  5911. .take()
  5912. .unwrap_or_else(|| ::std::string::String::new())
  5913. }
  5914. }
  5915. impl ::protobuf::Message for ExternalId {
  5916. fn is_initialized(&self) -> bool {
  5917. true
  5918. }
  5919. fn merge_from(
  5920. &mut self,
  5921. is: &mut ::protobuf::CodedInputStream<'_>,
  5922. ) -> ::protobuf::ProtobufResult<()> {
  5923. while !is.eof()? {
  5924. let (field_number, wire_type) = is.read_tag_unpack()?;
  5925. match field_number {
  5926. 1 => {
  5927. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.typ)?;
  5928. }
  5929. 2 => {
  5930. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.id)?;
  5931. }
  5932. _ => {
  5933. ::protobuf::rt::read_unknown_or_skip_group(
  5934. field_number,
  5935. wire_type,
  5936. is,
  5937. self.mut_unknown_fields(),
  5938. )?;
  5939. }
  5940. };
  5941. }
  5942. ::std::result::Result::Ok(())
  5943. }
  5944. // Compute sizes of nested messages
  5945. #[allow(unused_variables)]
  5946. fn compute_size(&self) -> u32 {
  5947. let mut my_size = 0;
  5948. if let Some(ref v) = self.typ.as_ref() {
  5949. my_size += ::protobuf::rt::string_size(1, &v);
  5950. }
  5951. if let Some(ref v) = self.id.as_ref() {
  5952. my_size += ::protobuf::rt::string_size(2, &v);
  5953. }
  5954. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  5955. self.cached_size.set(my_size);
  5956. my_size
  5957. }
  5958. fn write_to_with_cached_sizes(
  5959. &self,
  5960. os: &mut ::protobuf::CodedOutputStream<'_>,
  5961. ) -> ::protobuf::ProtobufResult<()> {
  5962. if let Some(ref v) = self.typ.as_ref() {
  5963. os.write_string(1, &v)?;
  5964. }
  5965. if let Some(ref v) = self.id.as_ref() {
  5966. os.write_string(2, &v)?;
  5967. }
  5968. os.write_unknown_fields(self.get_unknown_fields())?;
  5969. ::std::result::Result::Ok(())
  5970. }
  5971. fn get_cached_size(&self) -> u32 {
  5972. self.cached_size.get()
  5973. }
  5974. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  5975. &self.unknown_fields
  5976. }
  5977. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  5978. &mut self.unknown_fields
  5979. }
  5980. fn as_any(&self) -> &dyn (::std::any::Any) {
  5981. self as &dyn (::std::any::Any)
  5982. }
  5983. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  5984. self as &mut dyn (::std::any::Any)
  5985. }
  5986. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  5987. self
  5988. }
  5989. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  5990. Self::descriptor_static()
  5991. }
  5992. fn new() -> ExternalId {
  5993. ExternalId::new()
  5994. }
  5995. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  5996. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  5997. ::protobuf::lazy::Lazy::INIT;
  5998. unsafe {
  5999. descriptor.get(|| {
  6000. let mut fields = ::std::vec::Vec::new();
  6001. fields.push(
  6002. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  6003. _,
  6004. ::protobuf::types::ProtobufTypeString,
  6005. >(
  6006. "typ",
  6007. |m: &ExternalId| &m.typ,
  6008. |m: &mut ExternalId| &mut m.typ,
  6009. ),
  6010. );
  6011. fields.push(
  6012. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  6013. _,
  6014. ::protobuf::types::ProtobufTypeString,
  6015. >(
  6016. "id", |m: &ExternalId| &m.id, |m: &mut ExternalId| &mut m.id
  6017. ),
  6018. );
  6019. ::protobuf::reflect::MessageDescriptor::new_pb_name::<ExternalId>(
  6020. "ExternalId",
  6021. fields,
  6022. file_descriptor_proto(),
  6023. )
  6024. })
  6025. }
  6026. }
  6027. fn default_instance() -> &'static ExternalId {
  6028. static mut instance: ::protobuf::lazy::Lazy<ExternalId> = ::protobuf::lazy::Lazy::INIT;
  6029. unsafe { instance.get(ExternalId::new) }
  6030. }
  6031. }
  6032. impl ::protobuf::Clear for ExternalId {
  6033. fn clear(&mut self) {
  6034. self.typ.clear();
  6035. self.id.clear();
  6036. self.unknown_fields.clear();
  6037. }
  6038. }
  6039. impl ::std::fmt::Debug for ExternalId {
  6040. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  6041. ::protobuf::text_format::fmt(self, f)
  6042. }
  6043. }
  6044. impl ::protobuf::reflect::ProtobufValue for ExternalId {
  6045. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  6046. ::protobuf::reflect::ReflectValueRef::Message(self)
  6047. }
  6048. }
  6049. #[derive(PartialEq, Clone, Default)]
  6050. pub struct AudioFile {
  6051. // message fields
  6052. file_id: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  6053. format: ::std::option::Option<AudioFile_Format>,
  6054. // special fields
  6055. pub unknown_fields: ::protobuf::UnknownFields,
  6056. pub cached_size: ::protobuf::CachedSize,
  6057. }
  6058. impl<'a> ::std::default::Default for &'a AudioFile {
  6059. fn default() -> &'a AudioFile {
  6060. <AudioFile as ::protobuf::Message>::default_instance()
  6061. }
  6062. }
  6063. impl AudioFile {
  6064. pub fn new() -> AudioFile {
  6065. ::std::default::Default::default()
  6066. }
  6067. // optional bytes file_id = 1;
  6068. pub fn get_file_id(&self) -> &[u8] {
  6069. match self.file_id.as_ref() {
  6070. Some(v) => &v,
  6071. None => &[],
  6072. }
  6073. }
  6074. pub fn clear_file_id(&mut self) {
  6075. self.file_id.clear();
  6076. }
  6077. pub fn has_file_id(&self) -> bool {
  6078. self.file_id.is_some()
  6079. }
  6080. // Param is passed by value, moved
  6081. pub fn set_file_id(&mut self, v: ::std::vec::Vec<u8>) {
  6082. self.file_id = ::protobuf::SingularField::some(v);
  6083. }
  6084. // Mutable pointer to the field.
  6085. // If field is not initialized, it is initialized with default value first.
  6086. pub fn mut_file_id(&mut self) -> &mut ::std::vec::Vec<u8> {
  6087. if self.file_id.is_none() {
  6088. self.file_id.set_default();
  6089. }
  6090. self.file_id.as_mut().unwrap()
  6091. }
  6092. // Take field
  6093. pub fn take_file_id(&mut self) -> ::std::vec::Vec<u8> {
  6094. self.file_id
  6095. .take()
  6096. .unwrap_or_else(|| ::std::vec::Vec::new())
  6097. }
  6098. // optional .AudioFile.Format format = 2;
  6099. pub fn get_format(&self) -> AudioFile_Format {
  6100. self.format.unwrap_or(AudioFile_Format::OGG_VORBIS_96)
  6101. }
  6102. pub fn clear_format(&mut self) {
  6103. self.format = ::std::option::Option::None;
  6104. }
  6105. pub fn has_format(&self) -> bool {
  6106. self.format.is_some()
  6107. }
  6108. // Param is passed by value, moved
  6109. pub fn set_format(&mut self, v: AudioFile_Format) {
  6110. self.format = ::std::option::Option::Some(v);
  6111. }
  6112. }
  6113. impl ::protobuf::Message for AudioFile {
  6114. fn is_initialized(&self) -> bool {
  6115. true
  6116. }
  6117. fn merge_from(
  6118. &mut self,
  6119. is: &mut ::protobuf::CodedInputStream<'_>,
  6120. ) -> ::protobuf::ProtobufResult<()> {
  6121. while !is.eof()? {
  6122. let (field_number, wire_type) = is.read_tag_unpack()?;
  6123. match field_number {
  6124. 1 => {
  6125. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.file_id)?;
  6126. }
  6127. 2 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  6128. wire_type,
  6129. is,
  6130. &mut self.format,
  6131. 2,
  6132. &mut self.unknown_fields,
  6133. )?,
  6134. _ => {
  6135. ::protobuf::rt::read_unknown_or_skip_group(
  6136. field_number,
  6137. wire_type,
  6138. is,
  6139. self.mut_unknown_fields(),
  6140. )?;
  6141. }
  6142. };
  6143. }
  6144. ::std::result::Result::Ok(())
  6145. }
  6146. // Compute sizes of nested messages
  6147. #[allow(unused_variables)]
  6148. fn compute_size(&self) -> u32 {
  6149. let mut my_size = 0;
  6150. if let Some(ref v) = self.file_id.as_ref() {
  6151. my_size += ::protobuf::rt::bytes_size(1, &v);
  6152. }
  6153. if let Some(v) = self.format {
  6154. my_size += ::protobuf::rt::enum_size(2, v);
  6155. }
  6156. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  6157. self.cached_size.set(my_size);
  6158. my_size
  6159. }
  6160. fn write_to_with_cached_sizes(
  6161. &self,
  6162. os: &mut ::protobuf::CodedOutputStream<'_>,
  6163. ) -> ::protobuf::ProtobufResult<()> {
  6164. if let Some(ref v) = self.file_id.as_ref() {
  6165. os.write_bytes(1, &v)?;
  6166. }
  6167. if let Some(v) = self.format {
  6168. os.write_enum(2, v.value())?;
  6169. }
  6170. os.write_unknown_fields(self.get_unknown_fields())?;
  6171. ::std::result::Result::Ok(())
  6172. }
  6173. fn get_cached_size(&self) -> u32 {
  6174. self.cached_size.get()
  6175. }
  6176. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  6177. &self.unknown_fields
  6178. }
  6179. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  6180. &mut self.unknown_fields
  6181. }
  6182. fn as_any(&self) -> &dyn (::std::any::Any) {
  6183. self as &dyn (::std::any::Any)
  6184. }
  6185. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  6186. self as &mut dyn (::std::any::Any)
  6187. }
  6188. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  6189. self
  6190. }
  6191. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  6192. Self::descriptor_static()
  6193. }
  6194. fn new() -> AudioFile {
  6195. AudioFile::new()
  6196. }
  6197. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  6198. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  6199. ::protobuf::lazy::Lazy::INIT;
  6200. unsafe {
  6201. descriptor.get(|| {
  6202. let mut fields = ::std::vec::Vec::new();
  6203. fields.push(
  6204. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  6205. _,
  6206. ::protobuf::types::ProtobufTypeBytes,
  6207. >(
  6208. "file_id",
  6209. |m: &AudioFile| &m.file_id,
  6210. |m: &mut AudioFile| &mut m.file_id,
  6211. ),
  6212. );
  6213. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  6214. _,
  6215. ::protobuf::types::ProtobufTypeEnum<AudioFile_Format>,
  6216. >(
  6217. "format",
  6218. |m: &AudioFile| &m.format,
  6219. |m: &mut AudioFile| &mut m.format,
  6220. ));
  6221. ::protobuf::reflect::MessageDescriptor::new_pb_name::<AudioFile>(
  6222. "AudioFile",
  6223. fields,
  6224. file_descriptor_proto(),
  6225. )
  6226. })
  6227. }
  6228. }
  6229. fn default_instance() -> &'static AudioFile {
  6230. static mut instance: ::protobuf::lazy::Lazy<AudioFile> = ::protobuf::lazy::Lazy::INIT;
  6231. unsafe { instance.get(AudioFile::new) }
  6232. }
  6233. }
  6234. impl ::protobuf::Clear for AudioFile {
  6235. fn clear(&mut self) {
  6236. self.file_id.clear();
  6237. self.format = ::std::option::Option::None;
  6238. self.unknown_fields.clear();
  6239. }
  6240. }
  6241. impl ::std::fmt::Debug for AudioFile {
  6242. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  6243. ::protobuf::text_format::fmt(self, f)
  6244. }
  6245. }
  6246. impl ::protobuf::reflect::ProtobufValue for AudioFile {
  6247. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  6248. ::protobuf::reflect::ReflectValueRef::Message(self)
  6249. }
  6250. }
  6251. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  6252. pub enum AudioFile_Format {
  6253. OGG_VORBIS_96 = 0,
  6254. OGG_VORBIS_160 = 1,
  6255. OGG_VORBIS_320 = 2,
  6256. MP3_256 = 3,
  6257. MP3_320 = 4,
  6258. MP3_160 = 5,
  6259. MP3_96 = 6,
  6260. MP3_160_ENC = 7,
  6261. MP4_128_DUAL = 8,
  6262. OTHER3 = 9,
  6263. AAC_160 = 10,
  6264. AAC_320 = 11,
  6265. MP4_128 = 12,
  6266. OTHER5 = 13,
  6267. }
  6268. impl ::protobuf::ProtobufEnum for AudioFile_Format {
  6269. fn value(&self) -> i32 {
  6270. *self as i32
  6271. }
  6272. fn from_i32(value: i32) -> ::std::option::Option<AudioFile_Format> {
  6273. match value {
  6274. 0 => ::std::option::Option::Some(AudioFile_Format::OGG_VORBIS_96),
  6275. 1 => ::std::option::Option::Some(AudioFile_Format::OGG_VORBIS_160),
  6276. 2 => ::std::option::Option::Some(AudioFile_Format::OGG_VORBIS_320),
  6277. 3 => ::std::option::Option::Some(AudioFile_Format::MP3_256),
  6278. 4 => ::std::option::Option::Some(AudioFile_Format::MP3_320),
  6279. 5 => ::std::option::Option::Some(AudioFile_Format::MP3_160),
  6280. 6 => ::std::option::Option::Some(AudioFile_Format::MP3_96),
  6281. 7 => ::std::option::Option::Some(AudioFile_Format::MP3_160_ENC),
  6282. 8 => ::std::option::Option::Some(AudioFile_Format::MP4_128_DUAL),
  6283. 9 => ::std::option::Option::Some(AudioFile_Format::OTHER3),
  6284. 10 => ::std::option::Option::Some(AudioFile_Format::AAC_160),
  6285. 11 => ::std::option::Option::Some(AudioFile_Format::AAC_320),
  6286. 12 => ::std::option::Option::Some(AudioFile_Format::MP4_128),
  6287. 13 => ::std::option::Option::Some(AudioFile_Format::OTHER5),
  6288. _ => ::std::option::Option::None,
  6289. }
  6290. }
  6291. fn values() -> &'static [Self] {
  6292. static values: &'static [AudioFile_Format] = &[
  6293. AudioFile_Format::OGG_VORBIS_96,
  6294. AudioFile_Format::OGG_VORBIS_160,
  6295. AudioFile_Format::OGG_VORBIS_320,
  6296. AudioFile_Format::MP3_256,
  6297. AudioFile_Format::MP3_320,
  6298. AudioFile_Format::MP3_160,
  6299. AudioFile_Format::MP3_96,
  6300. AudioFile_Format::MP3_160_ENC,
  6301. AudioFile_Format::MP4_128_DUAL,
  6302. AudioFile_Format::OTHER3,
  6303. AudioFile_Format::AAC_160,
  6304. AudioFile_Format::AAC_320,
  6305. AudioFile_Format::MP4_128,
  6306. AudioFile_Format::OTHER5,
  6307. ];
  6308. values
  6309. }
  6310. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  6311. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  6312. ::protobuf::lazy::Lazy::INIT;
  6313. unsafe {
  6314. descriptor.get(|| {
  6315. ::protobuf::reflect::EnumDescriptor::new_pb_name::<AudioFile_Format>(
  6316. "AudioFile.Format",
  6317. file_descriptor_proto(),
  6318. )
  6319. })
  6320. }
  6321. }
  6322. }
  6323. impl ::std::marker::Copy for AudioFile_Format {}
  6324. impl ::std::default::Default for AudioFile_Format {
  6325. fn default() -> Self {
  6326. AudioFile_Format::OGG_VORBIS_96
  6327. }
  6328. }
  6329. impl ::protobuf::reflect::ProtobufValue for AudioFile_Format {
  6330. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  6331. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  6332. }
  6333. }
  6334. #[derive(PartialEq, Clone, Default)]
  6335. pub struct VideoFile {
  6336. // message fields
  6337. file_id: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  6338. // special fields
  6339. pub unknown_fields: ::protobuf::UnknownFields,
  6340. pub cached_size: ::protobuf::CachedSize,
  6341. }
  6342. impl<'a> ::std::default::Default for &'a VideoFile {
  6343. fn default() -> &'a VideoFile {
  6344. <VideoFile as ::protobuf::Message>::default_instance()
  6345. }
  6346. }
  6347. impl VideoFile {
  6348. pub fn new() -> VideoFile {
  6349. ::std::default::Default::default()
  6350. }
  6351. // optional bytes file_id = 1;
  6352. pub fn get_file_id(&self) -> &[u8] {
  6353. match self.file_id.as_ref() {
  6354. Some(v) => &v,
  6355. None => &[],
  6356. }
  6357. }
  6358. pub fn clear_file_id(&mut self) {
  6359. self.file_id.clear();
  6360. }
  6361. pub fn has_file_id(&self) -> bool {
  6362. self.file_id.is_some()
  6363. }
  6364. // Param is passed by value, moved
  6365. pub fn set_file_id(&mut self, v: ::std::vec::Vec<u8>) {
  6366. self.file_id = ::protobuf::SingularField::some(v);
  6367. }
  6368. // Mutable pointer to the field.
  6369. // If field is not initialized, it is initialized with default value first.
  6370. pub fn mut_file_id(&mut self) -> &mut ::std::vec::Vec<u8> {
  6371. if self.file_id.is_none() {
  6372. self.file_id.set_default();
  6373. }
  6374. self.file_id.as_mut().unwrap()
  6375. }
  6376. // Take field
  6377. pub fn take_file_id(&mut self) -> ::std::vec::Vec<u8> {
  6378. self.file_id
  6379. .take()
  6380. .unwrap_or_else(|| ::std::vec::Vec::new())
  6381. }
  6382. }
  6383. impl ::protobuf::Message for VideoFile {
  6384. fn is_initialized(&self) -> bool {
  6385. true
  6386. }
  6387. fn merge_from(
  6388. &mut self,
  6389. is: &mut ::protobuf::CodedInputStream<'_>,
  6390. ) -> ::protobuf::ProtobufResult<()> {
  6391. while !is.eof()? {
  6392. let (field_number, wire_type) = is.read_tag_unpack()?;
  6393. match field_number {
  6394. 1 => {
  6395. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.file_id)?;
  6396. }
  6397. _ => {
  6398. ::protobuf::rt::read_unknown_or_skip_group(
  6399. field_number,
  6400. wire_type,
  6401. is,
  6402. self.mut_unknown_fields(),
  6403. )?;
  6404. }
  6405. };
  6406. }
  6407. ::std::result::Result::Ok(())
  6408. }
  6409. // Compute sizes of nested messages
  6410. #[allow(unused_variables)]
  6411. fn compute_size(&self) -> u32 {
  6412. let mut my_size = 0;
  6413. if let Some(ref v) = self.file_id.as_ref() {
  6414. my_size += ::protobuf::rt::bytes_size(1, &v);
  6415. }
  6416. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  6417. self.cached_size.set(my_size);
  6418. my_size
  6419. }
  6420. fn write_to_with_cached_sizes(
  6421. &self,
  6422. os: &mut ::protobuf::CodedOutputStream<'_>,
  6423. ) -> ::protobuf::ProtobufResult<()> {
  6424. if let Some(ref v) = self.file_id.as_ref() {
  6425. os.write_bytes(1, &v)?;
  6426. }
  6427. os.write_unknown_fields(self.get_unknown_fields())?;
  6428. ::std::result::Result::Ok(())
  6429. }
  6430. fn get_cached_size(&self) -> u32 {
  6431. self.cached_size.get()
  6432. }
  6433. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  6434. &self.unknown_fields
  6435. }
  6436. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  6437. &mut self.unknown_fields
  6438. }
  6439. fn as_any(&self) -> &dyn (::std::any::Any) {
  6440. self as &dyn (::std::any::Any)
  6441. }
  6442. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  6443. self as &mut dyn (::std::any::Any)
  6444. }
  6445. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  6446. self
  6447. }
  6448. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  6449. Self::descriptor_static()
  6450. }
  6451. fn new() -> VideoFile {
  6452. VideoFile::new()
  6453. }
  6454. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  6455. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  6456. ::protobuf::lazy::Lazy::INIT;
  6457. unsafe {
  6458. descriptor.get(|| {
  6459. let mut fields = ::std::vec::Vec::new();
  6460. fields.push(
  6461. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  6462. _,
  6463. ::protobuf::types::ProtobufTypeBytes,
  6464. >(
  6465. "file_id",
  6466. |m: &VideoFile| &m.file_id,
  6467. |m: &mut VideoFile| &mut m.file_id,
  6468. ),
  6469. );
  6470. ::protobuf::reflect::MessageDescriptor::new_pb_name::<VideoFile>(
  6471. "VideoFile",
  6472. fields,
  6473. file_descriptor_proto(),
  6474. )
  6475. })
  6476. }
  6477. }
  6478. fn default_instance() -> &'static VideoFile {
  6479. static mut instance: ::protobuf::lazy::Lazy<VideoFile> = ::protobuf::lazy::Lazy::INIT;
  6480. unsafe { instance.get(VideoFile::new) }
  6481. }
  6482. }
  6483. impl ::protobuf::Clear for VideoFile {
  6484. fn clear(&mut self) {
  6485. self.file_id.clear();
  6486. self.unknown_fields.clear();
  6487. }
  6488. }
  6489. impl ::std::fmt::Debug for VideoFile {
  6490. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  6491. ::protobuf::text_format::fmt(self, f)
  6492. }
  6493. }
  6494. impl ::protobuf::reflect::ProtobufValue for VideoFile {
  6495. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  6496. ::protobuf::reflect::ReflectValueRef::Message(self)
  6497. }
  6498. }
  6499. #[derive(PartialEq, Clone, Default)]
  6500. pub struct Show {
  6501. // message fields
  6502. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  6503. name: ::protobuf::SingularField<::std::string::String>,
  6504. description: ::protobuf::SingularField<::std::string::String>,
  6505. deprecated_popularity: ::std::option::Option<i32>,
  6506. publisher: ::protobuf::SingularField<::std::string::String>,
  6507. language: ::protobuf::SingularField<::std::string::String>,
  6508. explicit: ::std::option::Option<bool>,
  6509. covers: ::protobuf::SingularPtrField<ImageGroup>,
  6510. episode: ::protobuf::RepeatedField<Episode>,
  6511. copyright: ::protobuf::RepeatedField<Copyright>,
  6512. restriction: ::protobuf::RepeatedField<Restriction>,
  6513. keyword: ::protobuf::RepeatedField<::std::string::String>,
  6514. media_type: ::std::option::Option<Show_MediaType>,
  6515. consumption_order: ::std::option::Option<Show_ConsumptionOrder>,
  6516. interpret_restriction_using_geoip: ::std::option::Option<bool>,
  6517. availability: ::protobuf::RepeatedField<Availability>,
  6518. country_of_origin: ::protobuf::SingularField<::std::string::String>,
  6519. categories: ::protobuf::RepeatedField<Category>,
  6520. passthrough: ::std::option::Option<Show_PassthroughEnum>,
  6521. // special fields
  6522. pub unknown_fields: ::protobuf::UnknownFields,
  6523. pub cached_size: ::protobuf::CachedSize,
  6524. }
  6525. impl<'a> ::std::default::Default for &'a Show {
  6526. fn default() -> &'a Show {
  6527. <Show as ::protobuf::Message>::default_instance()
  6528. }
  6529. }
  6530. impl Show {
  6531. pub fn new() -> Show {
  6532. ::std::default::Default::default()
  6533. }
  6534. // optional bytes gid = 1;
  6535. pub fn get_gid(&self) -> &[u8] {
  6536. match self.gid.as_ref() {
  6537. Some(v) => &v,
  6538. None => &[],
  6539. }
  6540. }
  6541. pub fn clear_gid(&mut self) {
  6542. self.gid.clear();
  6543. }
  6544. pub fn has_gid(&self) -> bool {
  6545. self.gid.is_some()
  6546. }
  6547. // Param is passed by value, moved
  6548. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  6549. self.gid = ::protobuf::SingularField::some(v);
  6550. }
  6551. // Mutable pointer to the field.
  6552. // If field is not initialized, it is initialized with default value first.
  6553. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  6554. if self.gid.is_none() {
  6555. self.gid.set_default();
  6556. }
  6557. self.gid.as_mut().unwrap()
  6558. }
  6559. // Take field
  6560. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  6561. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  6562. }
  6563. // optional string name = 2;
  6564. pub fn get_name(&self) -> &str {
  6565. match self.name.as_ref() {
  6566. Some(v) => &v,
  6567. None => "",
  6568. }
  6569. }
  6570. pub fn clear_name(&mut self) {
  6571. self.name.clear();
  6572. }
  6573. pub fn has_name(&self) -> bool {
  6574. self.name.is_some()
  6575. }
  6576. // Param is passed by value, moved
  6577. pub fn set_name(&mut self, v: ::std::string::String) {
  6578. self.name = ::protobuf::SingularField::some(v);
  6579. }
  6580. // Mutable pointer to the field.
  6581. // If field is not initialized, it is initialized with default value first.
  6582. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  6583. if self.name.is_none() {
  6584. self.name.set_default();
  6585. }
  6586. self.name.as_mut().unwrap()
  6587. }
  6588. // Take field
  6589. pub fn take_name(&mut self) -> ::std::string::String {
  6590. self.name
  6591. .take()
  6592. .unwrap_or_else(|| ::std::string::String::new())
  6593. }
  6594. // optional string description = 64;
  6595. pub fn get_description(&self) -> &str {
  6596. match self.description.as_ref() {
  6597. Some(v) => &v,
  6598. None => "",
  6599. }
  6600. }
  6601. pub fn clear_description(&mut self) {
  6602. self.description.clear();
  6603. }
  6604. pub fn has_description(&self) -> bool {
  6605. self.description.is_some()
  6606. }
  6607. // Param is passed by value, moved
  6608. pub fn set_description(&mut self, v: ::std::string::String) {
  6609. self.description = ::protobuf::SingularField::some(v);
  6610. }
  6611. // Mutable pointer to the field.
  6612. // If field is not initialized, it is initialized with default value first.
  6613. pub fn mut_description(&mut self) -> &mut ::std::string::String {
  6614. if self.description.is_none() {
  6615. self.description.set_default();
  6616. }
  6617. self.description.as_mut().unwrap()
  6618. }
  6619. // Take field
  6620. pub fn take_description(&mut self) -> ::std::string::String {
  6621. self.description
  6622. .take()
  6623. .unwrap_or_else(|| ::std::string::String::new())
  6624. }
  6625. // optional sint32 deprecated_popularity = 65;
  6626. pub fn get_deprecated_popularity(&self) -> i32 {
  6627. self.deprecated_popularity.unwrap_or(0)
  6628. }
  6629. pub fn clear_deprecated_popularity(&mut self) {
  6630. self.deprecated_popularity = ::std::option::Option::None;
  6631. }
  6632. pub fn has_deprecated_popularity(&self) -> bool {
  6633. self.deprecated_popularity.is_some()
  6634. }
  6635. // Param is passed by value, moved
  6636. pub fn set_deprecated_popularity(&mut self, v: i32) {
  6637. self.deprecated_popularity = ::std::option::Option::Some(v);
  6638. }
  6639. // optional string publisher = 66;
  6640. pub fn get_publisher(&self) -> &str {
  6641. match self.publisher.as_ref() {
  6642. Some(v) => &v,
  6643. None => "",
  6644. }
  6645. }
  6646. pub fn clear_publisher(&mut self) {
  6647. self.publisher.clear();
  6648. }
  6649. pub fn has_publisher(&self) -> bool {
  6650. self.publisher.is_some()
  6651. }
  6652. // Param is passed by value, moved
  6653. pub fn set_publisher(&mut self, v: ::std::string::String) {
  6654. self.publisher = ::protobuf::SingularField::some(v);
  6655. }
  6656. // Mutable pointer to the field.
  6657. // If field is not initialized, it is initialized with default value first.
  6658. pub fn mut_publisher(&mut self) -> &mut ::std::string::String {
  6659. if self.publisher.is_none() {
  6660. self.publisher.set_default();
  6661. }
  6662. self.publisher.as_mut().unwrap()
  6663. }
  6664. // Take field
  6665. pub fn take_publisher(&mut self) -> ::std::string::String {
  6666. self.publisher
  6667. .take()
  6668. .unwrap_or_else(|| ::std::string::String::new())
  6669. }
  6670. // optional string language = 67;
  6671. pub fn get_language(&self) -> &str {
  6672. match self.language.as_ref() {
  6673. Some(v) => &v,
  6674. None => "",
  6675. }
  6676. }
  6677. pub fn clear_language(&mut self) {
  6678. self.language.clear();
  6679. }
  6680. pub fn has_language(&self) -> bool {
  6681. self.language.is_some()
  6682. }
  6683. // Param is passed by value, moved
  6684. pub fn set_language(&mut self, v: ::std::string::String) {
  6685. self.language = ::protobuf::SingularField::some(v);
  6686. }
  6687. // Mutable pointer to the field.
  6688. // If field is not initialized, it is initialized with default value first.
  6689. pub fn mut_language(&mut self) -> &mut ::std::string::String {
  6690. if self.language.is_none() {
  6691. self.language.set_default();
  6692. }
  6693. self.language.as_mut().unwrap()
  6694. }
  6695. // Take field
  6696. pub fn take_language(&mut self) -> ::std::string::String {
  6697. self.language
  6698. .take()
  6699. .unwrap_or_else(|| ::std::string::String::new())
  6700. }
  6701. // optional bool explicit = 68;
  6702. pub fn get_explicit(&self) -> bool {
  6703. self.explicit.unwrap_or(false)
  6704. }
  6705. pub fn clear_explicit(&mut self) {
  6706. self.explicit = ::std::option::Option::None;
  6707. }
  6708. pub fn has_explicit(&self) -> bool {
  6709. self.explicit.is_some()
  6710. }
  6711. // Param is passed by value, moved
  6712. pub fn set_explicit(&mut self, v: bool) {
  6713. self.explicit = ::std::option::Option::Some(v);
  6714. }
  6715. // optional .ImageGroup covers = 69;
  6716. pub fn get_covers(&self) -> &ImageGroup {
  6717. self.covers
  6718. .as_ref()
  6719. .unwrap_or_else(|| ImageGroup::default_instance())
  6720. }
  6721. pub fn clear_covers(&mut self) {
  6722. self.covers.clear();
  6723. }
  6724. pub fn has_covers(&self) -> bool {
  6725. self.covers.is_some()
  6726. }
  6727. // Param is passed by value, moved
  6728. pub fn set_covers(&mut self, v: ImageGroup) {
  6729. self.covers = ::protobuf::SingularPtrField::some(v);
  6730. }
  6731. // Mutable pointer to the field.
  6732. // If field is not initialized, it is initialized with default value first.
  6733. pub fn mut_covers(&mut self) -> &mut ImageGroup {
  6734. if self.covers.is_none() {
  6735. self.covers.set_default();
  6736. }
  6737. self.covers.as_mut().unwrap()
  6738. }
  6739. // Take field
  6740. pub fn take_covers(&mut self) -> ImageGroup {
  6741. self.covers.take().unwrap_or_else(|| ImageGroup::new())
  6742. }
  6743. // repeated .Episode episode = 70;
  6744. pub fn get_episode(&self) -> &[Episode] {
  6745. &self.episode
  6746. }
  6747. pub fn clear_episode(&mut self) {
  6748. self.episode.clear();
  6749. }
  6750. // Param is passed by value, moved
  6751. pub fn set_episode(&mut self, v: ::protobuf::RepeatedField<Episode>) {
  6752. self.episode = v;
  6753. }
  6754. // Mutable pointer to the field.
  6755. pub fn mut_episode(&mut self) -> &mut ::protobuf::RepeatedField<Episode> {
  6756. &mut self.episode
  6757. }
  6758. // Take field
  6759. pub fn take_episode(&mut self) -> ::protobuf::RepeatedField<Episode> {
  6760. ::std::mem::replace(&mut self.episode, ::protobuf::RepeatedField::new())
  6761. }
  6762. // repeated .Copyright copyright = 71;
  6763. pub fn get_copyright(&self) -> &[Copyright] {
  6764. &self.copyright
  6765. }
  6766. pub fn clear_copyright(&mut self) {
  6767. self.copyright.clear();
  6768. }
  6769. // Param is passed by value, moved
  6770. pub fn set_copyright(&mut self, v: ::protobuf::RepeatedField<Copyright>) {
  6771. self.copyright = v;
  6772. }
  6773. // Mutable pointer to the field.
  6774. pub fn mut_copyright(&mut self) -> &mut ::protobuf::RepeatedField<Copyright> {
  6775. &mut self.copyright
  6776. }
  6777. // Take field
  6778. pub fn take_copyright(&mut self) -> ::protobuf::RepeatedField<Copyright> {
  6779. ::std::mem::replace(&mut self.copyright, ::protobuf::RepeatedField::new())
  6780. }
  6781. // repeated .Restriction restriction = 72;
  6782. pub fn get_restriction(&self) -> &[Restriction] {
  6783. &self.restriction
  6784. }
  6785. pub fn clear_restriction(&mut self) {
  6786. self.restriction.clear();
  6787. }
  6788. // Param is passed by value, moved
  6789. pub fn set_restriction(&mut self, v: ::protobuf::RepeatedField<Restriction>) {
  6790. self.restriction = v;
  6791. }
  6792. // Mutable pointer to the field.
  6793. pub fn mut_restriction(&mut self) -> &mut ::protobuf::RepeatedField<Restriction> {
  6794. &mut self.restriction
  6795. }
  6796. // Take field
  6797. pub fn take_restriction(&mut self) -> ::protobuf::RepeatedField<Restriction> {
  6798. ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new())
  6799. }
  6800. // repeated string keyword = 73;
  6801. pub fn get_keyword(&self) -> &[::std::string::String] {
  6802. &self.keyword
  6803. }
  6804. pub fn clear_keyword(&mut self) {
  6805. self.keyword.clear();
  6806. }
  6807. // Param is passed by value, moved
  6808. pub fn set_keyword(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  6809. self.keyword = v;
  6810. }
  6811. // Mutable pointer to the field.
  6812. pub fn mut_keyword(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  6813. &mut self.keyword
  6814. }
  6815. // Take field
  6816. pub fn take_keyword(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  6817. ::std::mem::replace(&mut self.keyword, ::protobuf::RepeatedField::new())
  6818. }
  6819. // optional .Show.MediaType media_type = 74;
  6820. pub fn get_media_type(&self) -> Show_MediaType {
  6821. self.media_type.unwrap_or(Show_MediaType::MIXED)
  6822. }
  6823. pub fn clear_media_type(&mut self) {
  6824. self.media_type = ::std::option::Option::None;
  6825. }
  6826. pub fn has_media_type(&self) -> bool {
  6827. self.media_type.is_some()
  6828. }
  6829. // Param is passed by value, moved
  6830. pub fn set_media_type(&mut self, v: Show_MediaType) {
  6831. self.media_type = ::std::option::Option::Some(v);
  6832. }
  6833. // optional .Show.ConsumptionOrder consumption_order = 75;
  6834. pub fn get_consumption_order(&self) -> Show_ConsumptionOrder {
  6835. self.consumption_order
  6836. .unwrap_or(Show_ConsumptionOrder::SEQUENTIAL)
  6837. }
  6838. pub fn clear_consumption_order(&mut self) {
  6839. self.consumption_order = ::std::option::Option::None;
  6840. }
  6841. pub fn has_consumption_order(&self) -> bool {
  6842. self.consumption_order.is_some()
  6843. }
  6844. // Param is passed by value, moved
  6845. pub fn set_consumption_order(&mut self, v: Show_ConsumptionOrder) {
  6846. self.consumption_order = ::std::option::Option::Some(v);
  6847. }
  6848. // optional bool interpret_restriction_using_geoip = 76;
  6849. pub fn get_interpret_restriction_using_geoip(&self) -> bool {
  6850. self.interpret_restriction_using_geoip.unwrap_or(false)
  6851. }
  6852. pub fn clear_interpret_restriction_using_geoip(&mut self) {
  6853. self.interpret_restriction_using_geoip = ::std::option::Option::None;
  6854. }
  6855. pub fn has_interpret_restriction_using_geoip(&self) -> bool {
  6856. self.interpret_restriction_using_geoip.is_some()
  6857. }
  6858. // Param is passed by value, moved
  6859. pub fn set_interpret_restriction_using_geoip(&mut self, v: bool) {
  6860. self.interpret_restriction_using_geoip = ::std::option::Option::Some(v);
  6861. }
  6862. // repeated .Availability availability = 78;
  6863. pub fn get_availability(&self) -> &[Availability] {
  6864. &self.availability
  6865. }
  6866. pub fn clear_availability(&mut self) {
  6867. self.availability.clear();
  6868. }
  6869. // Param is passed by value, moved
  6870. pub fn set_availability(&mut self, v: ::protobuf::RepeatedField<Availability>) {
  6871. self.availability = v;
  6872. }
  6873. // Mutable pointer to the field.
  6874. pub fn mut_availability(&mut self) -> &mut ::protobuf::RepeatedField<Availability> {
  6875. &mut self.availability
  6876. }
  6877. // Take field
  6878. pub fn take_availability(&mut self) -> ::protobuf::RepeatedField<Availability> {
  6879. ::std::mem::replace(&mut self.availability, ::protobuf::RepeatedField::new())
  6880. }
  6881. // optional string country_of_origin = 79;
  6882. pub fn get_country_of_origin(&self) -> &str {
  6883. match self.country_of_origin.as_ref() {
  6884. Some(v) => &v,
  6885. None => "",
  6886. }
  6887. }
  6888. pub fn clear_country_of_origin(&mut self) {
  6889. self.country_of_origin.clear();
  6890. }
  6891. pub fn has_country_of_origin(&self) -> bool {
  6892. self.country_of_origin.is_some()
  6893. }
  6894. // Param is passed by value, moved
  6895. pub fn set_country_of_origin(&mut self, v: ::std::string::String) {
  6896. self.country_of_origin = ::protobuf::SingularField::some(v);
  6897. }
  6898. // Mutable pointer to the field.
  6899. // If field is not initialized, it is initialized with default value first.
  6900. pub fn mut_country_of_origin(&mut self) -> &mut ::std::string::String {
  6901. if self.country_of_origin.is_none() {
  6902. self.country_of_origin.set_default();
  6903. }
  6904. self.country_of_origin.as_mut().unwrap()
  6905. }
  6906. // Take field
  6907. pub fn take_country_of_origin(&mut self) -> ::std::string::String {
  6908. self.country_of_origin
  6909. .take()
  6910. .unwrap_or_else(|| ::std::string::String::new())
  6911. }
  6912. // repeated .Category categories = 80;
  6913. pub fn get_categories(&self) -> &[Category] {
  6914. &self.categories
  6915. }
  6916. pub fn clear_categories(&mut self) {
  6917. self.categories.clear();
  6918. }
  6919. // Param is passed by value, moved
  6920. pub fn set_categories(&mut self, v: ::protobuf::RepeatedField<Category>) {
  6921. self.categories = v;
  6922. }
  6923. // Mutable pointer to the field.
  6924. pub fn mut_categories(&mut self) -> &mut ::protobuf::RepeatedField<Category> {
  6925. &mut self.categories
  6926. }
  6927. // Take field
  6928. pub fn take_categories(&mut self) -> ::protobuf::RepeatedField<Category> {
  6929. ::std::mem::replace(&mut self.categories, ::protobuf::RepeatedField::new())
  6930. }
  6931. // optional .Show.PassthroughEnum passthrough = 81;
  6932. pub fn get_passthrough(&self) -> Show_PassthroughEnum {
  6933. self.passthrough.unwrap_or(Show_PassthroughEnum::UNKNOWN)
  6934. }
  6935. pub fn clear_passthrough(&mut self) {
  6936. self.passthrough = ::std::option::Option::None;
  6937. }
  6938. pub fn has_passthrough(&self) -> bool {
  6939. self.passthrough.is_some()
  6940. }
  6941. // Param is passed by value, moved
  6942. pub fn set_passthrough(&mut self, v: Show_PassthroughEnum) {
  6943. self.passthrough = ::std::option::Option::Some(v);
  6944. }
  6945. }
  6946. impl ::protobuf::Message for Show {
  6947. fn is_initialized(&self) -> bool {
  6948. for v in &self.covers {
  6949. if !v.is_initialized() {
  6950. return false;
  6951. }
  6952. }
  6953. for v in &self.episode {
  6954. if !v.is_initialized() {
  6955. return false;
  6956. }
  6957. }
  6958. for v in &self.copyright {
  6959. if !v.is_initialized() {
  6960. return false;
  6961. }
  6962. }
  6963. for v in &self.restriction {
  6964. if !v.is_initialized() {
  6965. return false;
  6966. }
  6967. }
  6968. for v in &self.availability {
  6969. if !v.is_initialized() {
  6970. return false;
  6971. }
  6972. }
  6973. for v in &self.categories {
  6974. if !v.is_initialized() {
  6975. return false;
  6976. }
  6977. }
  6978. true
  6979. }
  6980. fn merge_from(
  6981. &mut self,
  6982. is: &mut ::protobuf::CodedInputStream<'_>,
  6983. ) -> ::protobuf::ProtobufResult<()> {
  6984. while !is.eof()? {
  6985. let (field_number, wire_type) = is.read_tag_unpack()?;
  6986. match field_number {
  6987. 1 => {
  6988. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  6989. }
  6990. 2 => {
  6991. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  6992. }
  6993. 64 => {
  6994. ::protobuf::rt::read_singular_string_into(
  6995. wire_type,
  6996. is,
  6997. &mut self.description,
  6998. )?;
  6999. }
  7000. 65 => {
  7001. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  7002. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  7003. wire_type,
  7004. ));
  7005. }
  7006. let tmp = is.read_sint32()?;
  7007. self.deprecated_popularity = ::std::option::Option::Some(tmp);
  7008. }
  7009. 66 => {
  7010. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.publisher)?;
  7011. }
  7012. 67 => {
  7013. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.language)?;
  7014. }
  7015. 68 => {
  7016. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  7017. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  7018. wire_type,
  7019. ));
  7020. }
  7021. let tmp = is.read_bool()?;
  7022. self.explicit = ::std::option::Option::Some(tmp);
  7023. }
  7024. 69 => {
  7025. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.covers)?;
  7026. }
  7027. 70 => {
  7028. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.episode)?;
  7029. }
  7030. 71 => {
  7031. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.copyright)?;
  7032. }
  7033. 72 => {
  7034. ::protobuf::rt::read_repeated_message_into(
  7035. wire_type,
  7036. is,
  7037. &mut self.restriction,
  7038. )?;
  7039. }
  7040. 73 => {
  7041. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.keyword)?;
  7042. }
  7043. 74 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  7044. wire_type,
  7045. is,
  7046. &mut self.media_type,
  7047. 74,
  7048. &mut self.unknown_fields,
  7049. )?,
  7050. 75 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  7051. wire_type,
  7052. is,
  7053. &mut self.consumption_order,
  7054. 75,
  7055. &mut self.unknown_fields,
  7056. )?,
  7057. 76 => {
  7058. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  7059. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  7060. wire_type,
  7061. ));
  7062. }
  7063. let tmp = is.read_bool()?;
  7064. self.interpret_restriction_using_geoip = ::std::option::Option::Some(tmp);
  7065. }
  7066. 78 => {
  7067. ::protobuf::rt::read_repeated_message_into(
  7068. wire_type,
  7069. is,
  7070. &mut self.availability,
  7071. )?;
  7072. }
  7073. 79 => {
  7074. ::protobuf::rt::read_singular_string_into(
  7075. wire_type,
  7076. is,
  7077. &mut self.country_of_origin,
  7078. )?;
  7079. }
  7080. 80 => {
  7081. ::protobuf::rt::read_repeated_message_into(
  7082. wire_type,
  7083. is,
  7084. &mut self.categories,
  7085. )?;
  7086. }
  7087. 81 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
  7088. wire_type,
  7089. is,
  7090. &mut self.passthrough,
  7091. 81,
  7092. &mut self.unknown_fields,
  7093. )?,
  7094. _ => {
  7095. ::protobuf::rt::read_unknown_or_skip_group(
  7096. field_number,
  7097. wire_type,
  7098. is,
  7099. self.mut_unknown_fields(),
  7100. )?;
  7101. }
  7102. };
  7103. }
  7104. ::std::result::Result::Ok(())
  7105. }
  7106. // Compute sizes of nested messages
  7107. #[allow(unused_variables)]
  7108. fn compute_size(&self) -> u32 {
  7109. let mut my_size = 0;
  7110. if let Some(ref v) = self.gid.as_ref() {
  7111. my_size += ::protobuf::rt::bytes_size(1, &v);
  7112. }
  7113. if let Some(ref v) = self.name.as_ref() {
  7114. my_size += ::protobuf::rt::string_size(2, &v);
  7115. }
  7116. if let Some(ref v) = self.description.as_ref() {
  7117. my_size += ::protobuf::rt::string_size(64, &v);
  7118. }
  7119. if let Some(v) = self.deprecated_popularity {
  7120. my_size += ::protobuf::rt::value_varint_zigzag_size(65, v);
  7121. }
  7122. if let Some(ref v) = self.publisher.as_ref() {
  7123. my_size += ::protobuf::rt::string_size(66, &v);
  7124. }
  7125. if let Some(ref v) = self.language.as_ref() {
  7126. my_size += ::protobuf::rt::string_size(67, &v);
  7127. }
  7128. if let Some(v) = self.explicit {
  7129. my_size += 3;
  7130. }
  7131. if let Some(ref v) = self.covers.as_ref() {
  7132. let len = v.compute_size();
  7133. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  7134. }
  7135. for value in &self.episode {
  7136. let len = value.compute_size();
  7137. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  7138. }
  7139. for value in &self.copyright {
  7140. let len = value.compute_size();
  7141. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  7142. }
  7143. for value in &self.restriction {
  7144. let len = value.compute_size();
  7145. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  7146. }
  7147. for value in &self.keyword {
  7148. my_size += ::protobuf::rt::string_size(73, &value);
  7149. }
  7150. if let Some(v) = self.media_type {
  7151. my_size += ::protobuf::rt::enum_size(74, v);
  7152. }
  7153. if let Some(v) = self.consumption_order {
  7154. my_size += ::protobuf::rt::enum_size(75, v);
  7155. }
  7156. if let Some(v) = self.interpret_restriction_using_geoip {
  7157. my_size += 3;
  7158. }
  7159. for value in &self.availability {
  7160. let len = value.compute_size();
  7161. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  7162. }
  7163. if let Some(ref v) = self.country_of_origin.as_ref() {
  7164. my_size += ::protobuf::rt::string_size(79, &v);
  7165. }
  7166. for value in &self.categories {
  7167. let len = value.compute_size();
  7168. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  7169. }
  7170. if let Some(v) = self.passthrough {
  7171. my_size += ::protobuf::rt::enum_size(81, v);
  7172. }
  7173. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  7174. self.cached_size.set(my_size);
  7175. my_size
  7176. }
  7177. fn write_to_with_cached_sizes(
  7178. &self,
  7179. os: &mut ::protobuf::CodedOutputStream<'_>,
  7180. ) -> ::protobuf::ProtobufResult<()> {
  7181. if let Some(ref v) = self.gid.as_ref() {
  7182. os.write_bytes(1, &v)?;
  7183. }
  7184. if let Some(ref v) = self.name.as_ref() {
  7185. os.write_string(2, &v)?;
  7186. }
  7187. if let Some(ref v) = self.description.as_ref() {
  7188. os.write_string(64, &v)?;
  7189. }
  7190. if let Some(v) = self.deprecated_popularity {
  7191. os.write_sint32(65, v)?;
  7192. }
  7193. if let Some(ref v) = self.publisher.as_ref() {
  7194. os.write_string(66, &v)?;
  7195. }
  7196. if let Some(ref v) = self.language.as_ref() {
  7197. os.write_string(67, &v)?;
  7198. }
  7199. if let Some(v) = self.explicit {
  7200. os.write_bool(68, v)?;
  7201. }
  7202. if let Some(ref v) = self.covers.as_ref() {
  7203. os.write_tag(69, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  7204. os.write_raw_varint32(v.get_cached_size())?;
  7205. v.write_to_with_cached_sizes(os)?;
  7206. }
  7207. for v in &self.episode {
  7208. os.write_tag(70, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  7209. os.write_raw_varint32(v.get_cached_size())?;
  7210. v.write_to_with_cached_sizes(os)?;
  7211. }
  7212. for v in &self.copyright {
  7213. os.write_tag(71, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  7214. os.write_raw_varint32(v.get_cached_size())?;
  7215. v.write_to_with_cached_sizes(os)?;
  7216. }
  7217. for v in &self.restriction {
  7218. os.write_tag(72, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  7219. os.write_raw_varint32(v.get_cached_size())?;
  7220. v.write_to_with_cached_sizes(os)?;
  7221. }
  7222. for v in &self.keyword {
  7223. os.write_string(73, &v)?;
  7224. }
  7225. if let Some(v) = self.media_type {
  7226. os.write_enum(74, v.value())?;
  7227. }
  7228. if let Some(v) = self.consumption_order {
  7229. os.write_enum(75, v.value())?;
  7230. }
  7231. if let Some(v) = self.interpret_restriction_using_geoip {
  7232. os.write_bool(76, v)?;
  7233. }
  7234. for v in &self.availability {
  7235. os.write_tag(78, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  7236. os.write_raw_varint32(v.get_cached_size())?;
  7237. v.write_to_with_cached_sizes(os)?;
  7238. }
  7239. if let Some(ref v) = self.country_of_origin.as_ref() {
  7240. os.write_string(79, &v)?;
  7241. }
  7242. for v in &self.categories {
  7243. os.write_tag(80, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  7244. os.write_raw_varint32(v.get_cached_size())?;
  7245. v.write_to_with_cached_sizes(os)?;
  7246. }
  7247. if let Some(v) = self.passthrough {
  7248. os.write_enum(81, v.value())?;
  7249. }
  7250. os.write_unknown_fields(self.get_unknown_fields())?;
  7251. ::std::result::Result::Ok(())
  7252. }
  7253. fn get_cached_size(&self) -> u32 {
  7254. self.cached_size.get()
  7255. }
  7256. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  7257. &self.unknown_fields
  7258. }
  7259. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  7260. &mut self.unknown_fields
  7261. }
  7262. fn as_any(&self) -> &dyn (::std::any::Any) {
  7263. self as &dyn (::std::any::Any)
  7264. }
  7265. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  7266. self as &mut dyn (::std::any::Any)
  7267. }
  7268. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  7269. self
  7270. }
  7271. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  7272. Self::descriptor_static()
  7273. }
  7274. fn new() -> Show {
  7275. Show::new()
  7276. }
  7277. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  7278. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  7279. ::protobuf::lazy::Lazy::INIT;
  7280. unsafe {
  7281. descriptor.get(|| {
  7282. let mut fields = ::std::vec::Vec::new();
  7283. fields.push(
  7284. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  7285. _,
  7286. ::protobuf::types::ProtobufTypeBytes,
  7287. >("gid", |m: &Show| &m.gid, |m: &mut Show| &mut m.gid),
  7288. );
  7289. fields.push(
  7290. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  7291. _,
  7292. ::protobuf::types::ProtobufTypeString,
  7293. >("name", |m: &Show| &m.name, |m: &mut Show| &mut m.name),
  7294. );
  7295. fields.push(
  7296. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  7297. _,
  7298. ::protobuf::types::ProtobufTypeString,
  7299. >(
  7300. "description",
  7301. |m: &Show| &m.description,
  7302. |m: &mut Show| &mut m.description,
  7303. ),
  7304. );
  7305. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  7306. _,
  7307. ::protobuf::types::ProtobufTypeSint32,
  7308. >(
  7309. "deprecated_popularity",
  7310. |m: &Show| &m.deprecated_popularity,
  7311. |m: &mut Show| &mut m.deprecated_popularity,
  7312. ));
  7313. fields.push(
  7314. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  7315. _,
  7316. ::protobuf::types::ProtobufTypeString,
  7317. >(
  7318. "publisher",
  7319. |m: &Show| &m.publisher,
  7320. |m: &mut Show| &mut m.publisher,
  7321. ),
  7322. );
  7323. fields.push(
  7324. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  7325. _,
  7326. ::protobuf::types::ProtobufTypeString,
  7327. >(
  7328. "language",
  7329. |m: &Show| &m.language,
  7330. |m: &mut Show| &mut m.language,
  7331. ),
  7332. );
  7333. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  7334. _,
  7335. ::protobuf::types::ProtobufTypeBool,
  7336. >(
  7337. "explicit",
  7338. |m: &Show| &m.explicit,
  7339. |m: &mut Show| &mut m.explicit,
  7340. ));
  7341. fields.push(
  7342. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  7343. _,
  7344. ::protobuf::types::ProtobufTypeMessage<ImageGroup>,
  7345. >(
  7346. "covers", |m: &Show| &m.covers, |m: &mut Show| &mut m.covers
  7347. ),
  7348. );
  7349. fields.push(
  7350. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  7351. _,
  7352. ::protobuf::types::ProtobufTypeMessage<Episode>,
  7353. >(
  7354. "episode",
  7355. |m: &Show| &m.episode,
  7356. |m: &mut Show| &mut m.episode,
  7357. ),
  7358. );
  7359. fields.push(
  7360. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  7361. _,
  7362. ::protobuf::types::ProtobufTypeMessage<Copyright>,
  7363. >(
  7364. "copyright",
  7365. |m: &Show| &m.copyright,
  7366. |m: &mut Show| &mut m.copyright,
  7367. ),
  7368. );
  7369. fields.push(
  7370. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  7371. _,
  7372. ::protobuf::types::ProtobufTypeMessage<Restriction>,
  7373. >(
  7374. "restriction",
  7375. |m: &Show| &m.restriction,
  7376. |m: &mut Show| &mut m.restriction,
  7377. ),
  7378. );
  7379. fields.push(
  7380. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  7381. _,
  7382. ::protobuf::types::ProtobufTypeString,
  7383. >(
  7384. "keyword",
  7385. |m: &Show| &m.keyword,
  7386. |m: &mut Show| &mut m.keyword,
  7387. ),
  7388. );
  7389. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  7390. _,
  7391. ::protobuf::types::ProtobufTypeEnum<Show_MediaType>,
  7392. >(
  7393. "media_type",
  7394. |m: &Show| &m.media_type,
  7395. |m: &mut Show| &mut m.media_type,
  7396. ));
  7397. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  7398. _,
  7399. ::protobuf::types::ProtobufTypeEnum<Show_ConsumptionOrder>,
  7400. >(
  7401. "consumption_order",
  7402. |m: &Show| &m.consumption_order,
  7403. |m: &mut Show| &mut m.consumption_order,
  7404. ));
  7405. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  7406. _,
  7407. ::protobuf::types::ProtobufTypeBool,
  7408. >(
  7409. "interpret_restriction_using_geoip",
  7410. |m: &Show| &m.interpret_restriction_using_geoip,
  7411. |m: &mut Show| &mut m.interpret_restriction_using_geoip,
  7412. ));
  7413. fields.push(
  7414. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  7415. _,
  7416. ::protobuf::types::ProtobufTypeMessage<Availability>,
  7417. >(
  7418. "availability",
  7419. |m: &Show| &m.availability,
  7420. |m: &mut Show| &mut m.availability,
  7421. ),
  7422. );
  7423. fields.push(
  7424. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  7425. _,
  7426. ::protobuf::types::ProtobufTypeString,
  7427. >(
  7428. "country_of_origin",
  7429. |m: &Show| &m.country_of_origin,
  7430. |m: &mut Show| &mut m.country_of_origin,
  7431. ),
  7432. );
  7433. fields.push(
  7434. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  7435. _,
  7436. ::protobuf::types::ProtobufTypeMessage<Category>,
  7437. >(
  7438. "categories",
  7439. |m: &Show| &m.categories,
  7440. |m: &mut Show| &mut m.categories,
  7441. ),
  7442. );
  7443. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  7444. _,
  7445. ::protobuf::types::ProtobufTypeEnum<Show_PassthroughEnum>,
  7446. >(
  7447. "passthrough",
  7448. |m: &Show| &m.passthrough,
  7449. |m: &mut Show| &mut m.passthrough,
  7450. ));
  7451. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Show>(
  7452. "Show",
  7453. fields,
  7454. file_descriptor_proto(),
  7455. )
  7456. })
  7457. }
  7458. }
  7459. fn default_instance() -> &'static Show {
  7460. static mut instance: ::protobuf::lazy::Lazy<Show> = ::protobuf::lazy::Lazy::INIT;
  7461. unsafe { instance.get(Show::new) }
  7462. }
  7463. }
  7464. impl ::protobuf::Clear for Show {
  7465. fn clear(&mut self) {
  7466. self.gid.clear();
  7467. self.name.clear();
  7468. self.description.clear();
  7469. self.deprecated_popularity = ::std::option::Option::None;
  7470. self.publisher.clear();
  7471. self.language.clear();
  7472. self.explicit = ::std::option::Option::None;
  7473. self.covers.clear();
  7474. self.episode.clear();
  7475. self.copyright.clear();
  7476. self.restriction.clear();
  7477. self.keyword.clear();
  7478. self.media_type = ::std::option::Option::None;
  7479. self.consumption_order = ::std::option::Option::None;
  7480. self.interpret_restriction_using_geoip = ::std::option::Option::None;
  7481. self.availability.clear();
  7482. self.country_of_origin.clear();
  7483. self.categories.clear();
  7484. self.passthrough = ::std::option::Option::None;
  7485. self.unknown_fields.clear();
  7486. }
  7487. }
  7488. impl ::std::fmt::Debug for Show {
  7489. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  7490. ::protobuf::text_format::fmt(self, f)
  7491. }
  7492. }
  7493. impl ::protobuf::reflect::ProtobufValue for Show {
  7494. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  7495. ::protobuf::reflect::ReflectValueRef::Message(self)
  7496. }
  7497. }
  7498. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  7499. pub enum Show_MediaType {
  7500. MIXED = 0,
  7501. AUDIO = 1,
  7502. VIDEO = 2,
  7503. }
  7504. impl ::protobuf::ProtobufEnum for Show_MediaType {
  7505. fn value(&self) -> i32 {
  7506. *self as i32
  7507. }
  7508. fn from_i32(value: i32) -> ::std::option::Option<Show_MediaType> {
  7509. match value {
  7510. 0 => ::std::option::Option::Some(Show_MediaType::MIXED),
  7511. 1 => ::std::option::Option::Some(Show_MediaType::AUDIO),
  7512. 2 => ::std::option::Option::Some(Show_MediaType::VIDEO),
  7513. _ => ::std::option::Option::None,
  7514. }
  7515. }
  7516. fn values() -> &'static [Self] {
  7517. static values: &'static [Show_MediaType] = &[
  7518. Show_MediaType::MIXED,
  7519. Show_MediaType::AUDIO,
  7520. Show_MediaType::VIDEO,
  7521. ];
  7522. values
  7523. }
  7524. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  7525. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  7526. ::protobuf::lazy::Lazy::INIT;
  7527. unsafe {
  7528. descriptor.get(|| {
  7529. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Show_MediaType>(
  7530. "Show.MediaType",
  7531. file_descriptor_proto(),
  7532. )
  7533. })
  7534. }
  7535. }
  7536. }
  7537. impl ::std::marker::Copy for Show_MediaType {}
  7538. impl ::std::default::Default for Show_MediaType {
  7539. fn default() -> Self {
  7540. Show_MediaType::MIXED
  7541. }
  7542. }
  7543. impl ::protobuf::reflect::ProtobufValue for Show_MediaType {
  7544. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  7545. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  7546. }
  7547. }
  7548. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  7549. pub enum Show_ConsumptionOrder {
  7550. SEQUENTIAL = 1,
  7551. EPISODIC = 2,
  7552. RECENT = 3,
  7553. }
  7554. impl ::protobuf::ProtobufEnum for Show_ConsumptionOrder {
  7555. fn value(&self) -> i32 {
  7556. *self as i32
  7557. }
  7558. fn from_i32(value: i32) -> ::std::option::Option<Show_ConsumptionOrder> {
  7559. match value {
  7560. 1 => ::std::option::Option::Some(Show_ConsumptionOrder::SEQUENTIAL),
  7561. 2 => ::std::option::Option::Some(Show_ConsumptionOrder::EPISODIC),
  7562. 3 => ::std::option::Option::Some(Show_ConsumptionOrder::RECENT),
  7563. _ => ::std::option::Option::None,
  7564. }
  7565. }
  7566. fn values() -> &'static [Self] {
  7567. static values: &'static [Show_ConsumptionOrder] = &[
  7568. Show_ConsumptionOrder::SEQUENTIAL,
  7569. Show_ConsumptionOrder::EPISODIC,
  7570. Show_ConsumptionOrder::RECENT,
  7571. ];
  7572. values
  7573. }
  7574. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  7575. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  7576. ::protobuf::lazy::Lazy::INIT;
  7577. unsafe {
  7578. descriptor.get(|| {
  7579. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Show_ConsumptionOrder>(
  7580. "Show.ConsumptionOrder",
  7581. file_descriptor_proto(),
  7582. )
  7583. })
  7584. }
  7585. }
  7586. }
  7587. impl ::std::marker::Copy for Show_ConsumptionOrder {}
  7588. // Note, `Default` is implemented although default value is not 0
  7589. impl ::std::default::Default for Show_ConsumptionOrder {
  7590. fn default() -> Self {
  7591. Show_ConsumptionOrder::SEQUENTIAL
  7592. }
  7593. }
  7594. impl ::protobuf::reflect::ProtobufValue for Show_ConsumptionOrder {
  7595. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  7596. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  7597. }
  7598. }
  7599. #[derive(Clone, PartialEq, Eq, Debug, Hash)]
  7600. pub enum Show_PassthroughEnum {
  7601. UNKNOWN = 0,
  7602. NONE = 1,
  7603. ALLOWED = 2,
  7604. }
  7605. impl ::protobuf::ProtobufEnum for Show_PassthroughEnum {
  7606. fn value(&self) -> i32 {
  7607. *self as i32
  7608. }
  7609. fn from_i32(value: i32) -> ::std::option::Option<Show_PassthroughEnum> {
  7610. match value {
  7611. 0 => ::std::option::Option::Some(Show_PassthroughEnum::UNKNOWN),
  7612. 1 => ::std::option::Option::Some(Show_PassthroughEnum::NONE),
  7613. 2 => ::std::option::Option::Some(Show_PassthroughEnum::ALLOWED),
  7614. _ => ::std::option::Option::None,
  7615. }
  7616. }
  7617. fn values() -> &'static [Self] {
  7618. static values: &'static [Show_PassthroughEnum] = &[
  7619. Show_PassthroughEnum::UNKNOWN,
  7620. Show_PassthroughEnum::NONE,
  7621. Show_PassthroughEnum::ALLOWED,
  7622. ];
  7623. values
  7624. }
  7625. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  7626. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
  7627. ::protobuf::lazy::Lazy::INIT;
  7628. unsafe {
  7629. descriptor.get(|| {
  7630. ::protobuf::reflect::EnumDescriptor::new_pb_name::<Show_PassthroughEnum>(
  7631. "Show.PassthroughEnum",
  7632. file_descriptor_proto(),
  7633. )
  7634. })
  7635. }
  7636. }
  7637. }
  7638. impl ::std::marker::Copy for Show_PassthroughEnum {}
  7639. impl ::std::default::Default for Show_PassthroughEnum {
  7640. fn default() -> Self {
  7641. Show_PassthroughEnum::UNKNOWN
  7642. }
  7643. }
  7644. impl ::protobuf::reflect::ProtobufValue for Show_PassthroughEnum {
  7645. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  7646. ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
  7647. }
  7648. }
  7649. #[derive(PartialEq, Clone, Default)]
  7650. pub struct Episode {
  7651. // message fields
  7652. gid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  7653. name: ::protobuf::SingularField<::std::string::String>,
  7654. duration: ::std::option::Option<i32>,
  7655. popularity: ::std::option::Option<i32>,
  7656. file: ::protobuf::RepeatedField<AudioFile>,
  7657. description: ::protobuf::SingularField<::std::string::String>,
  7658. number: ::std::option::Option<i32>,
  7659. publish_time: ::protobuf::SingularPtrField<Date>,
  7660. deprecated_popularity: ::std::option::Option<i32>,
  7661. covers: ::protobuf::SingularPtrField<ImageGroup>,
  7662. language: ::protobuf::SingularField<::std::string::String>,
  7663. explicit: ::std::option::Option<bool>,
  7664. show: ::protobuf::SingularPtrField<Show>,
  7665. video: ::protobuf::RepeatedField<VideoFile>,
  7666. video_preview: ::protobuf::RepeatedField<VideoFile>,
  7667. audio_preview: ::protobuf::RepeatedField<AudioFile>,
  7668. restriction: ::protobuf::RepeatedField<Restriction>,
  7669. freeze_frame: ::protobuf::SingularPtrField<ImageGroup>,
  7670. keyword: ::protobuf::RepeatedField<::std::string::String>,
  7671. suppress_monetization: ::std::option::Option<bool>,
  7672. interpret_restriction_using_geoip: ::std::option::Option<bool>,
  7673. allow_background_playback: ::std::option::Option<bool>,
  7674. availability: ::protobuf::RepeatedField<Availability>,
  7675. external_url: ::protobuf::SingularField<::std::string::String>,
  7676. original_audio: ::protobuf::SingularPtrField<OriginalAudio>,
  7677. // special fields
  7678. pub unknown_fields: ::protobuf::UnknownFields,
  7679. pub cached_size: ::protobuf::CachedSize,
  7680. }
  7681. impl<'a> ::std::default::Default for &'a Episode {
  7682. fn default() -> &'a Episode {
  7683. <Episode as ::protobuf::Message>::default_instance()
  7684. }
  7685. }
  7686. impl Episode {
  7687. pub fn new() -> Episode {
  7688. ::std::default::Default::default()
  7689. }
  7690. // optional bytes gid = 1;
  7691. pub fn get_gid(&self) -> &[u8] {
  7692. match self.gid.as_ref() {
  7693. Some(v) => &v,
  7694. None => &[],
  7695. }
  7696. }
  7697. pub fn clear_gid(&mut self) {
  7698. self.gid.clear();
  7699. }
  7700. pub fn has_gid(&self) -> bool {
  7701. self.gid.is_some()
  7702. }
  7703. // Param is passed by value, moved
  7704. pub fn set_gid(&mut self, v: ::std::vec::Vec<u8>) {
  7705. self.gid = ::protobuf::SingularField::some(v);
  7706. }
  7707. // Mutable pointer to the field.
  7708. // If field is not initialized, it is initialized with default value first.
  7709. pub fn mut_gid(&mut self) -> &mut ::std::vec::Vec<u8> {
  7710. if self.gid.is_none() {
  7711. self.gid.set_default();
  7712. }
  7713. self.gid.as_mut().unwrap()
  7714. }
  7715. // Take field
  7716. pub fn take_gid(&mut self) -> ::std::vec::Vec<u8> {
  7717. self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  7718. }
  7719. // optional string name = 2;
  7720. pub fn get_name(&self) -> &str {
  7721. match self.name.as_ref() {
  7722. Some(v) => &v,
  7723. None => "",
  7724. }
  7725. }
  7726. pub fn clear_name(&mut self) {
  7727. self.name.clear();
  7728. }
  7729. pub fn has_name(&self) -> bool {
  7730. self.name.is_some()
  7731. }
  7732. // Param is passed by value, moved
  7733. pub fn set_name(&mut self, v: ::std::string::String) {
  7734. self.name = ::protobuf::SingularField::some(v);
  7735. }
  7736. // Mutable pointer to the field.
  7737. // If field is not initialized, it is initialized with default value first.
  7738. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  7739. if self.name.is_none() {
  7740. self.name.set_default();
  7741. }
  7742. self.name.as_mut().unwrap()
  7743. }
  7744. // Take field
  7745. pub fn take_name(&mut self) -> ::std::string::String {
  7746. self.name
  7747. .take()
  7748. .unwrap_or_else(|| ::std::string::String::new())
  7749. }
  7750. // optional sint32 duration = 7;
  7751. pub fn get_duration(&self) -> i32 {
  7752. self.duration.unwrap_or(0)
  7753. }
  7754. pub fn clear_duration(&mut self) {
  7755. self.duration = ::std::option::Option::None;
  7756. }
  7757. pub fn has_duration(&self) -> bool {
  7758. self.duration.is_some()
  7759. }
  7760. // Param is passed by value, moved
  7761. pub fn set_duration(&mut self, v: i32) {
  7762. self.duration = ::std::option::Option::Some(v);
  7763. }
  7764. // optional sint32 popularity = 8;
  7765. pub fn get_popularity(&self) -> i32 {
  7766. self.popularity.unwrap_or(0)
  7767. }
  7768. pub fn clear_popularity(&mut self) {
  7769. self.popularity = ::std::option::Option::None;
  7770. }
  7771. pub fn has_popularity(&self) -> bool {
  7772. self.popularity.is_some()
  7773. }
  7774. // Param is passed by value, moved
  7775. pub fn set_popularity(&mut self, v: i32) {
  7776. self.popularity = ::std::option::Option::Some(v);
  7777. }
  7778. // repeated .AudioFile file = 12;
  7779. pub fn get_file(&self) -> &[AudioFile] {
  7780. &self.file
  7781. }
  7782. pub fn clear_file(&mut self) {
  7783. self.file.clear();
  7784. }
  7785. // Param is passed by value, moved
  7786. pub fn set_file(&mut self, v: ::protobuf::RepeatedField<AudioFile>) {
  7787. self.file = v;
  7788. }
  7789. // Mutable pointer to the field.
  7790. pub fn mut_file(&mut self) -> &mut ::protobuf::RepeatedField<AudioFile> {
  7791. &mut self.file
  7792. }
  7793. // Take field
  7794. pub fn take_file(&mut self) -> ::protobuf::RepeatedField<AudioFile> {
  7795. ::std::mem::replace(&mut self.file, ::protobuf::RepeatedField::new())
  7796. }
  7797. // optional string description = 64;
  7798. pub fn get_description(&self) -> &str {
  7799. match self.description.as_ref() {
  7800. Some(v) => &v,
  7801. None => "",
  7802. }
  7803. }
  7804. pub fn clear_description(&mut self) {
  7805. self.description.clear();
  7806. }
  7807. pub fn has_description(&self) -> bool {
  7808. self.description.is_some()
  7809. }
  7810. // Param is passed by value, moved
  7811. pub fn set_description(&mut self, v: ::std::string::String) {
  7812. self.description = ::protobuf::SingularField::some(v);
  7813. }
  7814. // Mutable pointer to the field.
  7815. // If field is not initialized, it is initialized with default value first.
  7816. pub fn mut_description(&mut self) -> &mut ::std::string::String {
  7817. if self.description.is_none() {
  7818. self.description.set_default();
  7819. }
  7820. self.description.as_mut().unwrap()
  7821. }
  7822. // Take field
  7823. pub fn take_description(&mut self) -> ::std::string::String {
  7824. self.description
  7825. .take()
  7826. .unwrap_or_else(|| ::std::string::String::new())
  7827. }
  7828. // optional sint32 number = 65;
  7829. pub fn get_number(&self) -> i32 {
  7830. self.number.unwrap_or(0)
  7831. }
  7832. pub fn clear_number(&mut self) {
  7833. self.number = ::std::option::Option::None;
  7834. }
  7835. pub fn has_number(&self) -> bool {
  7836. self.number.is_some()
  7837. }
  7838. // Param is passed by value, moved
  7839. pub fn set_number(&mut self, v: i32) {
  7840. self.number = ::std::option::Option::Some(v);
  7841. }
  7842. // optional .Date publish_time = 66;
  7843. pub fn get_publish_time(&self) -> &Date {
  7844. self.publish_time
  7845. .as_ref()
  7846. .unwrap_or_else(|| Date::default_instance())
  7847. }
  7848. pub fn clear_publish_time(&mut self) {
  7849. self.publish_time.clear();
  7850. }
  7851. pub fn has_publish_time(&self) -> bool {
  7852. self.publish_time.is_some()
  7853. }
  7854. // Param is passed by value, moved
  7855. pub fn set_publish_time(&mut self, v: Date) {
  7856. self.publish_time = ::protobuf::SingularPtrField::some(v);
  7857. }
  7858. // Mutable pointer to the field.
  7859. // If field is not initialized, it is initialized with default value first.
  7860. pub fn mut_publish_time(&mut self) -> &mut Date {
  7861. if self.publish_time.is_none() {
  7862. self.publish_time.set_default();
  7863. }
  7864. self.publish_time.as_mut().unwrap()
  7865. }
  7866. // Take field
  7867. pub fn take_publish_time(&mut self) -> Date {
  7868. self.publish_time.take().unwrap_or_else(|| Date::new())
  7869. }
  7870. // optional sint32 deprecated_popularity = 67;
  7871. pub fn get_deprecated_popularity(&self) -> i32 {
  7872. self.deprecated_popularity.unwrap_or(0)
  7873. }
  7874. pub fn clear_deprecated_popularity(&mut self) {
  7875. self.deprecated_popularity = ::std::option::Option::None;
  7876. }
  7877. pub fn has_deprecated_popularity(&self) -> bool {
  7878. self.deprecated_popularity.is_some()
  7879. }
  7880. // Param is passed by value, moved
  7881. pub fn set_deprecated_popularity(&mut self, v: i32) {
  7882. self.deprecated_popularity = ::std::option::Option::Some(v);
  7883. }
  7884. // optional .ImageGroup covers = 68;
  7885. pub fn get_covers(&self) -> &ImageGroup {
  7886. self.covers
  7887. .as_ref()
  7888. .unwrap_or_else(|| ImageGroup::default_instance())
  7889. }
  7890. pub fn clear_covers(&mut self) {
  7891. self.covers.clear();
  7892. }
  7893. pub fn has_covers(&self) -> bool {
  7894. self.covers.is_some()
  7895. }
  7896. // Param is passed by value, moved
  7897. pub fn set_covers(&mut self, v: ImageGroup) {
  7898. self.covers = ::protobuf::SingularPtrField::some(v);
  7899. }
  7900. // Mutable pointer to the field.
  7901. // If field is not initialized, it is initialized with default value first.
  7902. pub fn mut_covers(&mut self) -> &mut ImageGroup {
  7903. if self.covers.is_none() {
  7904. self.covers.set_default();
  7905. }
  7906. self.covers.as_mut().unwrap()
  7907. }
  7908. // Take field
  7909. pub fn take_covers(&mut self) -> ImageGroup {
  7910. self.covers.take().unwrap_or_else(|| ImageGroup::new())
  7911. }
  7912. // optional string language = 69;
  7913. pub fn get_language(&self) -> &str {
  7914. match self.language.as_ref() {
  7915. Some(v) => &v,
  7916. None => "",
  7917. }
  7918. }
  7919. pub fn clear_language(&mut self) {
  7920. self.language.clear();
  7921. }
  7922. pub fn has_language(&self) -> bool {
  7923. self.language.is_some()
  7924. }
  7925. // Param is passed by value, moved
  7926. pub fn set_language(&mut self, v: ::std::string::String) {
  7927. self.language = ::protobuf::SingularField::some(v);
  7928. }
  7929. // Mutable pointer to the field.
  7930. // If field is not initialized, it is initialized with default value first.
  7931. pub fn mut_language(&mut self) -> &mut ::std::string::String {
  7932. if self.language.is_none() {
  7933. self.language.set_default();
  7934. }
  7935. self.language.as_mut().unwrap()
  7936. }
  7937. // Take field
  7938. pub fn take_language(&mut self) -> ::std::string::String {
  7939. self.language
  7940. .take()
  7941. .unwrap_or_else(|| ::std::string::String::new())
  7942. }
  7943. // optional bool explicit = 70;
  7944. pub fn get_explicit(&self) -> bool {
  7945. self.explicit.unwrap_or(false)
  7946. }
  7947. pub fn clear_explicit(&mut self) {
  7948. self.explicit = ::std::option::Option::None;
  7949. }
  7950. pub fn has_explicit(&self) -> bool {
  7951. self.explicit.is_some()
  7952. }
  7953. // Param is passed by value, moved
  7954. pub fn set_explicit(&mut self, v: bool) {
  7955. self.explicit = ::std::option::Option::Some(v);
  7956. }
  7957. // optional .Show show = 71;
  7958. pub fn get_show(&self) -> &Show {
  7959. self.show
  7960. .as_ref()
  7961. .unwrap_or_else(|| Show::default_instance())
  7962. }
  7963. pub fn clear_show(&mut self) {
  7964. self.show.clear();
  7965. }
  7966. pub fn has_show(&self) -> bool {
  7967. self.show.is_some()
  7968. }
  7969. // Param is passed by value, moved
  7970. pub fn set_show(&mut self, v: Show) {
  7971. self.show = ::protobuf::SingularPtrField::some(v);
  7972. }
  7973. // Mutable pointer to the field.
  7974. // If field is not initialized, it is initialized with default value first.
  7975. pub fn mut_show(&mut self) -> &mut Show {
  7976. if self.show.is_none() {
  7977. self.show.set_default();
  7978. }
  7979. self.show.as_mut().unwrap()
  7980. }
  7981. // Take field
  7982. pub fn take_show(&mut self) -> Show {
  7983. self.show.take().unwrap_or_else(|| Show::new())
  7984. }
  7985. // repeated .VideoFile video = 72;
  7986. pub fn get_video(&self) -> &[VideoFile] {
  7987. &self.video
  7988. }
  7989. pub fn clear_video(&mut self) {
  7990. self.video.clear();
  7991. }
  7992. // Param is passed by value, moved
  7993. pub fn set_video(&mut self, v: ::protobuf::RepeatedField<VideoFile>) {
  7994. self.video = v;
  7995. }
  7996. // Mutable pointer to the field.
  7997. pub fn mut_video(&mut self) -> &mut ::protobuf::RepeatedField<VideoFile> {
  7998. &mut self.video
  7999. }
  8000. // Take field
  8001. pub fn take_video(&mut self) -> ::protobuf::RepeatedField<VideoFile> {
  8002. ::std::mem::replace(&mut self.video, ::protobuf::RepeatedField::new())
  8003. }
  8004. // repeated .VideoFile video_preview = 73;
  8005. pub fn get_video_preview(&self) -> &[VideoFile] {
  8006. &self.video_preview
  8007. }
  8008. pub fn clear_video_preview(&mut self) {
  8009. self.video_preview.clear();
  8010. }
  8011. // Param is passed by value, moved
  8012. pub fn set_video_preview(&mut self, v: ::protobuf::RepeatedField<VideoFile>) {
  8013. self.video_preview = v;
  8014. }
  8015. // Mutable pointer to the field.
  8016. pub fn mut_video_preview(&mut self) -> &mut ::protobuf::RepeatedField<VideoFile> {
  8017. &mut self.video_preview
  8018. }
  8019. // Take field
  8020. pub fn take_video_preview(&mut self) -> ::protobuf::RepeatedField<VideoFile> {
  8021. ::std::mem::replace(&mut self.video_preview, ::protobuf::RepeatedField::new())
  8022. }
  8023. // repeated .AudioFile audio_preview = 74;
  8024. pub fn get_audio_preview(&self) -> &[AudioFile] {
  8025. &self.audio_preview
  8026. }
  8027. pub fn clear_audio_preview(&mut self) {
  8028. self.audio_preview.clear();
  8029. }
  8030. // Param is passed by value, moved
  8031. pub fn set_audio_preview(&mut self, v: ::protobuf::RepeatedField<AudioFile>) {
  8032. self.audio_preview = v;
  8033. }
  8034. // Mutable pointer to the field.
  8035. pub fn mut_audio_preview(&mut self) -> &mut ::protobuf::RepeatedField<AudioFile> {
  8036. &mut self.audio_preview
  8037. }
  8038. // Take field
  8039. pub fn take_audio_preview(&mut self) -> ::protobuf::RepeatedField<AudioFile> {
  8040. ::std::mem::replace(&mut self.audio_preview, ::protobuf::RepeatedField::new())
  8041. }
  8042. // repeated .Restriction restriction = 75;
  8043. pub fn get_restriction(&self) -> &[Restriction] {
  8044. &self.restriction
  8045. }
  8046. pub fn clear_restriction(&mut self) {
  8047. self.restriction.clear();
  8048. }
  8049. // Param is passed by value, moved
  8050. pub fn set_restriction(&mut self, v: ::protobuf::RepeatedField<Restriction>) {
  8051. self.restriction = v;
  8052. }
  8053. // Mutable pointer to the field.
  8054. pub fn mut_restriction(&mut self) -> &mut ::protobuf::RepeatedField<Restriction> {
  8055. &mut self.restriction
  8056. }
  8057. // Take field
  8058. pub fn take_restriction(&mut self) -> ::protobuf::RepeatedField<Restriction> {
  8059. ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new())
  8060. }
  8061. // optional .ImageGroup freeze_frame = 76;
  8062. pub fn get_freeze_frame(&self) -> &ImageGroup {
  8063. self.freeze_frame
  8064. .as_ref()
  8065. .unwrap_or_else(|| ImageGroup::default_instance())
  8066. }
  8067. pub fn clear_freeze_frame(&mut self) {
  8068. self.freeze_frame.clear();
  8069. }
  8070. pub fn has_freeze_frame(&self) -> bool {
  8071. self.freeze_frame.is_some()
  8072. }
  8073. // Param is passed by value, moved
  8074. pub fn set_freeze_frame(&mut self, v: ImageGroup) {
  8075. self.freeze_frame = ::protobuf::SingularPtrField::some(v);
  8076. }
  8077. // Mutable pointer to the field.
  8078. // If field is not initialized, it is initialized with default value first.
  8079. pub fn mut_freeze_frame(&mut self) -> &mut ImageGroup {
  8080. if self.freeze_frame.is_none() {
  8081. self.freeze_frame.set_default();
  8082. }
  8083. self.freeze_frame.as_mut().unwrap()
  8084. }
  8085. // Take field
  8086. pub fn take_freeze_frame(&mut self) -> ImageGroup {
  8087. self.freeze_frame
  8088. .take()
  8089. .unwrap_or_else(|| ImageGroup::new())
  8090. }
  8091. // repeated string keyword = 77;
  8092. pub fn get_keyword(&self) -> &[::std::string::String] {
  8093. &self.keyword
  8094. }
  8095. pub fn clear_keyword(&mut self) {
  8096. self.keyword.clear();
  8097. }
  8098. // Param is passed by value, moved
  8099. pub fn set_keyword(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
  8100. self.keyword = v;
  8101. }
  8102. // Mutable pointer to the field.
  8103. pub fn mut_keyword(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
  8104. &mut self.keyword
  8105. }
  8106. // Take field
  8107. pub fn take_keyword(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
  8108. ::std::mem::replace(&mut self.keyword, ::protobuf::RepeatedField::new())
  8109. }
  8110. // optional bool suppress_monetization = 78;
  8111. pub fn get_suppress_monetization(&self) -> bool {
  8112. self.suppress_monetization.unwrap_or(false)
  8113. }
  8114. pub fn clear_suppress_monetization(&mut self) {
  8115. self.suppress_monetization = ::std::option::Option::None;
  8116. }
  8117. pub fn has_suppress_monetization(&self) -> bool {
  8118. self.suppress_monetization.is_some()
  8119. }
  8120. // Param is passed by value, moved
  8121. pub fn set_suppress_monetization(&mut self, v: bool) {
  8122. self.suppress_monetization = ::std::option::Option::Some(v);
  8123. }
  8124. // optional bool interpret_restriction_using_geoip = 79;
  8125. pub fn get_interpret_restriction_using_geoip(&self) -> bool {
  8126. self.interpret_restriction_using_geoip.unwrap_or(false)
  8127. }
  8128. pub fn clear_interpret_restriction_using_geoip(&mut self) {
  8129. self.interpret_restriction_using_geoip = ::std::option::Option::None;
  8130. }
  8131. pub fn has_interpret_restriction_using_geoip(&self) -> bool {
  8132. self.interpret_restriction_using_geoip.is_some()
  8133. }
  8134. // Param is passed by value, moved
  8135. pub fn set_interpret_restriction_using_geoip(&mut self, v: bool) {
  8136. self.interpret_restriction_using_geoip = ::std::option::Option::Some(v);
  8137. }
  8138. // optional bool allow_background_playback = 81;
  8139. pub fn get_allow_background_playback(&self) -> bool {
  8140. self.allow_background_playback.unwrap_or(false)
  8141. }
  8142. pub fn clear_allow_background_playback(&mut self) {
  8143. self.allow_background_playback = ::std::option::Option::None;
  8144. }
  8145. pub fn has_allow_background_playback(&self) -> bool {
  8146. self.allow_background_playback.is_some()
  8147. }
  8148. // Param is passed by value, moved
  8149. pub fn set_allow_background_playback(&mut self, v: bool) {
  8150. self.allow_background_playback = ::std::option::Option::Some(v);
  8151. }
  8152. // repeated .Availability availability = 82;
  8153. pub fn get_availability(&self) -> &[Availability] {
  8154. &self.availability
  8155. }
  8156. pub fn clear_availability(&mut self) {
  8157. self.availability.clear();
  8158. }
  8159. // Param is passed by value, moved
  8160. pub fn set_availability(&mut self, v: ::protobuf::RepeatedField<Availability>) {
  8161. self.availability = v;
  8162. }
  8163. // Mutable pointer to the field.
  8164. pub fn mut_availability(&mut self) -> &mut ::protobuf::RepeatedField<Availability> {
  8165. &mut self.availability
  8166. }
  8167. // Take field
  8168. pub fn take_availability(&mut self) -> ::protobuf::RepeatedField<Availability> {
  8169. ::std::mem::replace(&mut self.availability, ::protobuf::RepeatedField::new())
  8170. }
  8171. // optional string external_url = 83;
  8172. pub fn get_external_url(&self) -> &str {
  8173. match self.external_url.as_ref() {
  8174. Some(v) => &v,
  8175. None => "",
  8176. }
  8177. }
  8178. pub fn clear_external_url(&mut self) {
  8179. self.external_url.clear();
  8180. }
  8181. pub fn has_external_url(&self) -> bool {
  8182. self.external_url.is_some()
  8183. }
  8184. // Param is passed by value, moved
  8185. pub fn set_external_url(&mut self, v: ::std::string::String) {
  8186. self.external_url = ::protobuf::SingularField::some(v);
  8187. }
  8188. // Mutable pointer to the field.
  8189. // If field is not initialized, it is initialized with default value first.
  8190. pub fn mut_external_url(&mut self) -> &mut ::std::string::String {
  8191. if self.external_url.is_none() {
  8192. self.external_url.set_default();
  8193. }
  8194. self.external_url.as_mut().unwrap()
  8195. }
  8196. // Take field
  8197. pub fn take_external_url(&mut self) -> ::std::string::String {
  8198. self.external_url
  8199. .take()
  8200. .unwrap_or_else(|| ::std::string::String::new())
  8201. }
  8202. // optional .OriginalAudio original_audio = 84;
  8203. pub fn get_original_audio(&self) -> &OriginalAudio {
  8204. self.original_audio
  8205. .as_ref()
  8206. .unwrap_or_else(|| OriginalAudio::default_instance())
  8207. }
  8208. pub fn clear_original_audio(&mut self) {
  8209. self.original_audio.clear();
  8210. }
  8211. pub fn has_original_audio(&self) -> bool {
  8212. self.original_audio.is_some()
  8213. }
  8214. // Param is passed by value, moved
  8215. pub fn set_original_audio(&mut self, v: OriginalAudio) {
  8216. self.original_audio = ::protobuf::SingularPtrField::some(v);
  8217. }
  8218. // Mutable pointer to the field.
  8219. // If field is not initialized, it is initialized with default value first.
  8220. pub fn mut_original_audio(&mut self) -> &mut OriginalAudio {
  8221. if self.original_audio.is_none() {
  8222. self.original_audio.set_default();
  8223. }
  8224. self.original_audio.as_mut().unwrap()
  8225. }
  8226. // Take field
  8227. pub fn take_original_audio(&mut self) -> OriginalAudio {
  8228. self.original_audio
  8229. .take()
  8230. .unwrap_or_else(|| OriginalAudio::new())
  8231. }
  8232. }
  8233. impl ::protobuf::Message for Episode {
  8234. fn is_initialized(&self) -> bool {
  8235. for v in &self.file {
  8236. if !v.is_initialized() {
  8237. return false;
  8238. }
  8239. }
  8240. for v in &self.publish_time {
  8241. if !v.is_initialized() {
  8242. return false;
  8243. }
  8244. }
  8245. for v in &self.covers {
  8246. if !v.is_initialized() {
  8247. return false;
  8248. }
  8249. }
  8250. for v in &self.show {
  8251. if !v.is_initialized() {
  8252. return false;
  8253. }
  8254. }
  8255. for v in &self.video {
  8256. if !v.is_initialized() {
  8257. return false;
  8258. }
  8259. }
  8260. for v in &self.video_preview {
  8261. if !v.is_initialized() {
  8262. return false;
  8263. }
  8264. }
  8265. for v in &self.audio_preview {
  8266. if !v.is_initialized() {
  8267. return false;
  8268. }
  8269. }
  8270. for v in &self.restriction {
  8271. if !v.is_initialized() {
  8272. return false;
  8273. }
  8274. }
  8275. for v in &self.freeze_frame {
  8276. if !v.is_initialized() {
  8277. return false;
  8278. }
  8279. }
  8280. for v in &self.availability {
  8281. if !v.is_initialized() {
  8282. return false;
  8283. }
  8284. }
  8285. for v in &self.original_audio {
  8286. if !v.is_initialized() {
  8287. return false;
  8288. }
  8289. }
  8290. true
  8291. }
  8292. fn merge_from(
  8293. &mut self,
  8294. is: &mut ::protobuf::CodedInputStream<'_>,
  8295. ) -> ::protobuf::ProtobufResult<()> {
  8296. while !is.eof()? {
  8297. let (field_number, wire_type) = is.read_tag_unpack()?;
  8298. match field_number {
  8299. 1 => {
  8300. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gid)?;
  8301. }
  8302. 2 => {
  8303. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  8304. }
  8305. 7 => {
  8306. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8307. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8308. wire_type,
  8309. ));
  8310. }
  8311. let tmp = is.read_sint32()?;
  8312. self.duration = ::std::option::Option::Some(tmp);
  8313. }
  8314. 8 => {
  8315. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8316. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8317. wire_type,
  8318. ));
  8319. }
  8320. let tmp = is.read_sint32()?;
  8321. self.popularity = ::std::option::Option::Some(tmp);
  8322. }
  8323. 12 => {
  8324. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.file)?;
  8325. }
  8326. 64 => {
  8327. ::protobuf::rt::read_singular_string_into(
  8328. wire_type,
  8329. is,
  8330. &mut self.description,
  8331. )?;
  8332. }
  8333. 65 => {
  8334. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8335. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8336. wire_type,
  8337. ));
  8338. }
  8339. let tmp = is.read_sint32()?;
  8340. self.number = ::std::option::Option::Some(tmp);
  8341. }
  8342. 66 => {
  8343. ::protobuf::rt::read_singular_message_into(
  8344. wire_type,
  8345. is,
  8346. &mut self.publish_time,
  8347. )?;
  8348. }
  8349. 67 => {
  8350. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8351. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8352. wire_type,
  8353. ));
  8354. }
  8355. let tmp = is.read_sint32()?;
  8356. self.deprecated_popularity = ::std::option::Option::Some(tmp);
  8357. }
  8358. 68 => {
  8359. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.covers)?;
  8360. }
  8361. 69 => {
  8362. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.language)?;
  8363. }
  8364. 70 => {
  8365. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8366. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8367. wire_type,
  8368. ));
  8369. }
  8370. let tmp = is.read_bool()?;
  8371. self.explicit = ::std::option::Option::Some(tmp);
  8372. }
  8373. 71 => {
  8374. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.show)?;
  8375. }
  8376. 72 => {
  8377. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.video)?;
  8378. }
  8379. 73 => {
  8380. ::protobuf::rt::read_repeated_message_into(
  8381. wire_type,
  8382. is,
  8383. &mut self.video_preview,
  8384. )?;
  8385. }
  8386. 74 => {
  8387. ::protobuf::rt::read_repeated_message_into(
  8388. wire_type,
  8389. is,
  8390. &mut self.audio_preview,
  8391. )?;
  8392. }
  8393. 75 => {
  8394. ::protobuf::rt::read_repeated_message_into(
  8395. wire_type,
  8396. is,
  8397. &mut self.restriction,
  8398. )?;
  8399. }
  8400. 76 => {
  8401. ::protobuf::rt::read_singular_message_into(
  8402. wire_type,
  8403. is,
  8404. &mut self.freeze_frame,
  8405. )?;
  8406. }
  8407. 77 => {
  8408. ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.keyword)?;
  8409. }
  8410. 78 => {
  8411. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8412. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8413. wire_type,
  8414. ));
  8415. }
  8416. let tmp = is.read_bool()?;
  8417. self.suppress_monetization = ::std::option::Option::Some(tmp);
  8418. }
  8419. 79 => {
  8420. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8421. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8422. wire_type,
  8423. ));
  8424. }
  8425. let tmp = is.read_bool()?;
  8426. self.interpret_restriction_using_geoip = ::std::option::Option::Some(tmp);
  8427. }
  8428. 81 => {
  8429. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  8430. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
  8431. wire_type,
  8432. ));
  8433. }
  8434. let tmp = is.read_bool()?;
  8435. self.allow_background_playback = ::std::option::Option::Some(tmp);
  8436. }
  8437. 82 => {
  8438. ::protobuf::rt::read_repeated_message_into(
  8439. wire_type,
  8440. is,
  8441. &mut self.availability,
  8442. )?;
  8443. }
  8444. 83 => {
  8445. ::protobuf::rt::read_singular_string_into(
  8446. wire_type,
  8447. is,
  8448. &mut self.external_url,
  8449. )?;
  8450. }
  8451. 84 => {
  8452. ::protobuf::rt::read_singular_message_into(
  8453. wire_type,
  8454. is,
  8455. &mut self.original_audio,
  8456. )?;
  8457. }
  8458. _ => {
  8459. ::protobuf::rt::read_unknown_or_skip_group(
  8460. field_number,
  8461. wire_type,
  8462. is,
  8463. self.mut_unknown_fields(),
  8464. )?;
  8465. }
  8466. };
  8467. }
  8468. ::std::result::Result::Ok(())
  8469. }
  8470. // Compute sizes of nested messages
  8471. #[allow(unused_variables)]
  8472. fn compute_size(&self) -> u32 {
  8473. let mut my_size = 0;
  8474. if let Some(ref v) = self.gid.as_ref() {
  8475. my_size += ::protobuf::rt::bytes_size(1, &v);
  8476. }
  8477. if let Some(ref v) = self.name.as_ref() {
  8478. my_size += ::protobuf::rt::string_size(2, &v);
  8479. }
  8480. if let Some(v) = self.duration {
  8481. my_size += ::protobuf::rt::value_varint_zigzag_size(7, v);
  8482. }
  8483. if let Some(v) = self.popularity {
  8484. my_size += ::protobuf::rt::value_varint_zigzag_size(8, v);
  8485. }
  8486. for value in &self.file {
  8487. let len = value.compute_size();
  8488. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8489. }
  8490. if let Some(ref v) = self.description.as_ref() {
  8491. my_size += ::protobuf::rt::string_size(64, &v);
  8492. }
  8493. if let Some(v) = self.number {
  8494. my_size += ::protobuf::rt::value_varint_zigzag_size(65, v);
  8495. }
  8496. if let Some(ref v) = self.publish_time.as_ref() {
  8497. let len = v.compute_size();
  8498. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8499. }
  8500. if let Some(v) = self.deprecated_popularity {
  8501. my_size += ::protobuf::rt::value_varint_zigzag_size(67, v);
  8502. }
  8503. if let Some(ref v) = self.covers.as_ref() {
  8504. let len = v.compute_size();
  8505. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8506. }
  8507. if let Some(ref v) = self.language.as_ref() {
  8508. my_size += ::protobuf::rt::string_size(69, &v);
  8509. }
  8510. if let Some(v) = self.explicit {
  8511. my_size += 3;
  8512. }
  8513. if let Some(ref v) = self.show.as_ref() {
  8514. let len = v.compute_size();
  8515. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8516. }
  8517. for value in &self.video {
  8518. let len = value.compute_size();
  8519. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8520. }
  8521. for value in &self.video_preview {
  8522. let len = value.compute_size();
  8523. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8524. }
  8525. for value in &self.audio_preview {
  8526. let len = value.compute_size();
  8527. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8528. }
  8529. for value in &self.restriction {
  8530. let len = value.compute_size();
  8531. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8532. }
  8533. if let Some(ref v) = self.freeze_frame.as_ref() {
  8534. let len = v.compute_size();
  8535. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8536. }
  8537. for value in &self.keyword {
  8538. my_size += ::protobuf::rt::string_size(77, &value);
  8539. }
  8540. if let Some(v) = self.suppress_monetization {
  8541. my_size += 3;
  8542. }
  8543. if let Some(v) = self.interpret_restriction_using_geoip {
  8544. my_size += 3;
  8545. }
  8546. if let Some(v) = self.allow_background_playback {
  8547. my_size += 3;
  8548. }
  8549. for value in &self.availability {
  8550. let len = value.compute_size();
  8551. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8552. }
  8553. if let Some(ref v) = self.external_url.as_ref() {
  8554. my_size += ::protobuf::rt::string_size(83, &v);
  8555. }
  8556. if let Some(ref v) = self.original_audio.as_ref() {
  8557. let len = v.compute_size();
  8558. my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  8559. }
  8560. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  8561. self.cached_size.set(my_size);
  8562. my_size
  8563. }
  8564. fn write_to_with_cached_sizes(
  8565. &self,
  8566. os: &mut ::protobuf::CodedOutputStream<'_>,
  8567. ) -> ::protobuf::ProtobufResult<()> {
  8568. if let Some(ref v) = self.gid.as_ref() {
  8569. os.write_bytes(1, &v)?;
  8570. }
  8571. if let Some(ref v) = self.name.as_ref() {
  8572. os.write_string(2, &v)?;
  8573. }
  8574. if let Some(v) = self.duration {
  8575. os.write_sint32(7, v)?;
  8576. }
  8577. if let Some(v) = self.popularity {
  8578. os.write_sint32(8, v)?;
  8579. }
  8580. for v in &self.file {
  8581. os.write_tag(12, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8582. os.write_raw_varint32(v.get_cached_size())?;
  8583. v.write_to_with_cached_sizes(os)?;
  8584. }
  8585. if let Some(ref v) = self.description.as_ref() {
  8586. os.write_string(64, &v)?;
  8587. }
  8588. if let Some(v) = self.number {
  8589. os.write_sint32(65, v)?;
  8590. }
  8591. if let Some(ref v) = self.publish_time.as_ref() {
  8592. os.write_tag(66, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8593. os.write_raw_varint32(v.get_cached_size())?;
  8594. v.write_to_with_cached_sizes(os)?;
  8595. }
  8596. if let Some(v) = self.deprecated_popularity {
  8597. os.write_sint32(67, v)?;
  8598. }
  8599. if let Some(ref v) = self.covers.as_ref() {
  8600. os.write_tag(68, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8601. os.write_raw_varint32(v.get_cached_size())?;
  8602. v.write_to_with_cached_sizes(os)?;
  8603. }
  8604. if let Some(ref v) = self.language.as_ref() {
  8605. os.write_string(69, &v)?;
  8606. }
  8607. if let Some(v) = self.explicit {
  8608. os.write_bool(70, v)?;
  8609. }
  8610. if let Some(ref v) = self.show.as_ref() {
  8611. os.write_tag(71, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8612. os.write_raw_varint32(v.get_cached_size())?;
  8613. v.write_to_with_cached_sizes(os)?;
  8614. }
  8615. for v in &self.video {
  8616. os.write_tag(72, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8617. os.write_raw_varint32(v.get_cached_size())?;
  8618. v.write_to_with_cached_sizes(os)?;
  8619. }
  8620. for v in &self.video_preview {
  8621. os.write_tag(73, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8622. os.write_raw_varint32(v.get_cached_size())?;
  8623. v.write_to_with_cached_sizes(os)?;
  8624. }
  8625. for v in &self.audio_preview {
  8626. os.write_tag(74, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8627. os.write_raw_varint32(v.get_cached_size())?;
  8628. v.write_to_with_cached_sizes(os)?;
  8629. }
  8630. for v in &self.restriction {
  8631. os.write_tag(75, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8632. os.write_raw_varint32(v.get_cached_size())?;
  8633. v.write_to_with_cached_sizes(os)?;
  8634. }
  8635. if let Some(ref v) = self.freeze_frame.as_ref() {
  8636. os.write_tag(76, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8637. os.write_raw_varint32(v.get_cached_size())?;
  8638. v.write_to_with_cached_sizes(os)?;
  8639. }
  8640. for v in &self.keyword {
  8641. os.write_string(77, &v)?;
  8642. }
  8643. if let Some(v) = self.suppress_monetization {
  8644. os.write_bool(78, v)?;
  8645. }
  8646. if let Some(v) = self.interpret_restriction_using_geoip {
  8647. os.write_bool(79, v)?;
  8648. }
  8649. if let Some(v) = self.allow_background_playback {
  8650. os.write_bool(81, v)?;
  8651. }
  8652. for v in &self.availability {
  8653. os.write_tag(82, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8654. os.write_raw_varint32(v.get_cached_size())?;
  8655. v.write_to_with_cached_sizes(os)?;
  8656. }
  8657. if let Some(ref v) = self.external_url.as_ref() {
  8658. os.write_string(83, &v)?;
  8659. }
  8660. if let Some(ref v) = self.original_audio.as_ref() {
  8661. os.write_tag(84, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  8662. os.write_raw_varint32(v.get_cached_size())?;
  8663. v.write_to_with_cached_sizes(os)?;
  8664. }
  8665. os.write_unknown_fields(self.get_unknown_fields())?;
  8666. ::std::result::Result::Ok(())
  8667. }
  8668. fn get_cached_size(&self) -> u32 {
  8669. self.cached_size.get()
  8670. }
  8671. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  8672. &self.unknown_fields
  8673. }
  8674. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  8675. &mut self.unknown_fields
  8676. }
  8677. fn as_any(&self) -> &dyn (::std::any::Any) {
  8678. self as &dyn (::std::any::Any)
  8679. }
  8680. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  8681. self as &mut dyn (::std::any::Any)
  8682. }
  8683. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  8684. self
  8685. }
  8686. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  8687. Self::descriptor_static()
  8688. }
  8689. fn new() -> Episode {
  8690. Episode::new()
  8691. }
  8692. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  8693. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  8694. ::protobuf::lazy::Lazy::INIT;
  8695. unsafe {
  8696. descriptor.get(|| {
  8697. let mut fields = ::std::vec::Vec::new();
  8698. fields.push(
  8699. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  8700. _,
  8701. ::protobuf::types::ProtobufTypeBytes,
  8702. >("gid", |m: &Episode| &m.gid, |m: &mut Episode| &mut m.gid),
  8703. );
  8704. fields.push(
  8705. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  8706. _,
  8707. ::protobuf::types::ProtobufTypeString,
  8708. >(
  8709. "name", |m: &Episode| &m.name, |m: &mut Episode| &mut m.name
  8710. ),
  8711. );
  8712. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8713. _,
  8714. ::protobuf::types::ProtobufTypeSint32,
  8715. >(
  8716. "duration",
  8717. |m: &Episode| &m.duration,
  8718. |m: &mut Episode| &mut m.duration,
  8719. ));
  8720. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8721. _,
  8722. ::protobuf::types::ProtobufTypeSint32,
  8723. >(
  8724. "popularity",
  8725. |m: &Episode| &m.popularity,
  8726. |m: &mut Episode| &mut m.popularity,
  8727. ));
  8728. fields.push(
  8729. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8730. _,
  8731. ::protobuf::types::ProtobufTypeMessage<AudioFile>,
  8732. >(
  8733. "file", |m: &Episode| &m.file, |m: &mut Episode| &mut m.file
  8734. ),
  8735. );
  8736. fields.push(
  8737. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  8738. _,
  8739. ::protobuf::types::ProtobufTypeString,
  8740. >(
  8741. "description",
  8742. |m: &Episode| &m.description,
  8743. |m: &mut Episode| &mut m.description,
  8744. ),
  8745. );
  8746. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8747. _,
  8748. ::protobuf::types::ProtobufTypeSint32,
  8749. >(
  8750. "number",
  8751. |m: &Episode| &m.number,
  8752. |m: &mut Episode| &mut m.number,
  8753. ));
  8754. fields.push(
  8755. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  8756. _,
  8757. ::protobuf::types::ProtobufTypeMessage<Date>,
  8758. >(
  8759. "publish_time",
  8760. |m: &Episode| &m.publish_time,
  8761. |m: &mut Episode| &mut m.publish_time,
  8762. ),
  8763. );
  8764. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8765. _,
  8766. ::protobuf::types::ProtobufTypeSint32,
  8767. >(
  8768. "deprecated_popularity",
  8769. |m: &Episode| &m.deprecated_popularity,
  8770. |m: &mut Episode| &mut m.deprecated_popularity,
  8771. ));
  8772. fields.push(
  8773. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  8774. _,
  8775. ::protobuf::types::ProtobufTypeMessage<ImageGroup>,
  8776. >(
  8777. "covers",
  8778. |m: &Episode| &m.covers,
  8779. |m: &mut Episode| &mut m.covers,
  8780. ),
  8781. );
  8782. fields.push(
  8783. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  8784. _,
  8785. ::protobuf::types::ProtobufTypeString,
  8786. >(
  8787. "language",
  8788. |m: &Episode| &m.language,
  8789. |m: &mut Episode| &mut m.language,
  8790. ),
  8791. );
  8792. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8793. _,
  8794. ::protobuf::types::ProtobufTypeBool,
  8795. >(
  8796. "explicit",
  8797. |m: &Episode| &m.explicit,
  8798. |m: &mut Episode| &mut m.explicit,
  8799. ));
  8800. fields.push(
  8801. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  8802. _,
  8803. ::protobuf::types::ProtobufTypeMessage<Show>,
  8804. >(
  8805. "show", |m: &Episode| &m.show, |m: &mut Episode| &mut m.show
  8806. ),
  8807. );
  8808. fields.push(
  8809. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8810. _,
  8811. ::protobuf::types::ProtobufTypeMessage<VideoFile>,
  8812. >(
  8813. "video",
  8814. |m: &Episode| &m.video,
  8815. |m: &mut Episode| &mut m.video,
  8816. ),
  8817. );
  8818. fields.push(
  8819. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8820. _,
  8821. ::protobuf::types::ProtobufTypeMessage<VideoFile>,
  8822. >(
  8823. "video_preview",
  8824. |m: &Episode| &m.video_preview,
  8825. |m: &mut Episode| &mut m.video_preview,
  8826. ),
  8827. );
  8828. fields.push(
  8829. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8830. _,
  8831. ::protobuf::types::ProtobufTypeMessage<AudioFile>,
  8832. >(
  8833. "audio_preview",
  8834. |m: &Episode| &m.audio_preview,
  8835. |m: &mut Episode| &mut m.audio_preview,
  8836. ),
  8837. );
  8838. fields.push(
  8839. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8840. _,
  8841. ::protobuf::types::ProtobufTypeMessage<Restriction>,
  8842. >(
  8843. "restriction",
  8844. |m: &Episode| &m.restriction,
  8845. |m: &mut Episode| &mut m.restriction,
  8846. ),
  8847. );
  8848. fields.push(
  8849. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  8850. _,
  8851. ::protobuf::types::ProtobufTypeMessage<ImageGroup>,
  8852. >(
  8853. "freeze_frame",
  8854. |m: &Episode| &m.freeze_frame,
  8855. |m: &mut Episode| &mut m.freeze_frame,
  8856. ),
  8857. );
  8858. fields.push(
  8859. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8860. _,
  8861. ::protobuf::types::ProtobufTypeString,
  8862. >(
  8863. "keyword",
  8864. |m: &Episode| &m.keyword,
  8865. |m: &mut Episode| &mut m.keyword,
  8866. ),
  8867. );
  8868. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8869. _,
  8870. ::protobuf::types::ProtobufTypeBool,
  8871. >(
  8872. "suppress_monetization",
  8873. |m: &Episode| &m.suppress_monetization,
  8874. |m: &mut Episode| &mut m.suppress_monetization,
  8875. ));
  8876. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8877. _,
  8878. ::protobuf::types::ProtobufTypeBool,
  8879. >(
  8880. "interpret_restriction_using_geoip",
  8881. |m: &Episode| &m.interpret_restriction_using_geoip,
  8882. |m: &mut Episode| &mut m.interpret_restriction_using_geoip,
  8883. ));
  8884. fields.push(::protobuf::reflect::accessor::make_option_accessor::<
  8885. _,
  8886. ::protobuf::types::ProtobufTypeBool,
  8887. >(
  8888. "allow_background_playback",
  8889. |m: &Episode| &m.allow_background_playback,
  8890. |m: &mut Episode| &mut m.allow_background_playback,
  8891. ));
  8892. fields.push(
  8893. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  8894. _,
  8895. ::protobuf::types::ProtobufTypeMessage<Availability>,
  8896. >(
  8897. "availability",
  8898. |m: &Episode| &m.availability,
  8899. |m: &mut Episode| &mut m.availability,
  8900. ),
  8901. );
  8902. fields.push(
  8903. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  8904. _,
  8905. ::protobuf::types::ProtobufTypeString,
  8906. >(
  8907. "external_url",
  8908. |m: &Episode| &m.external_url,
  8909. |m: &mut Episode| &mut m.external_url,
  8910. ),
  8911. );
  8912. fields.push(
  8913. ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
  8914. _,
  8915. ::protobuf::types::ProtobufTypeMessage<OriginalAudio>,
  8916. >(
  8917. "original_audio",
  8918. |m: &Episode| &m.original_audio,
  8919. |m: &mut Episode| &mut m.original_audio,
  8920. ),
  8921. );
  8922. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Episode>(
  8923. "Episode",
  8924. fields,
  8925. file_descriptor_proto(),
  8926. )
  8927. })
  8928. }
  8929. }
  8930. fn default_instance() -> &'static Episode {
  8931. static mut instance: ::protobuf::lazy::Lazy<Episode> = ::protobuf::lazy::Lazy::INIT;
  8932. unsafe { instance.get(Episode::new) }
  8933. }
  8934. }
  8935. impl ::protobuf::Clear for Episode {
  8936. fn clear(&mut self) {
  8937. self.gid.clear();
  8938. self.name.clear();
  8939. self.duration = ::std::option::Option::None;
  8940. self.popularity = ::std::option::Option::None;
  8941. self.file.clear();
  8942. self.description.clear();
  8943. self.number = ::std::option::Option::None;
  8944. self.publish_time.clear();
  8945. self.deprecated_popularity = ::std::option::Option::None;
  8946. self.covers.clear();
  8947. self.language.clear();
  8948. self.explicit = ::std::option::Option::None;
  8949. self.show.clear();
  8950. self.video.clear();
  8951. self.video_preview.clear();
  8952. self.audio_preview.clear();
  8953. self.restriction.clear();
  8954. self.freeze_frame.clear();
  8955. self.keyword.clear();
  8956. self.suppress_monetization = ::std::option::Option::None;
  8957. self.interpret_restriction_using_geoip = ::std::option::Option::None;
  8958. self.allow_background_playback = ::std::option::Option::None;
  8959. self.availability.clear();
  8960. self.external_url.clear();
  8961. self.original_audio.clear();
  8962. self.unknown_fields.clear();
  8963. }
  8964. }
  8965. impl ::std::fmt::Debug for Episode {
  8966. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  8967. ::protobuf::text_format::fmt(self, f)
  8968. }
  8969. }
  8970. impl ::protobuf::reflect::ProtobufValue for Episode {
  8971. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  8972. ::protobuf::reflect::ReflectValueRef::Message(self)
  8973. }
  8974. }
  8975. #[derive(PartialEq, Clone, Default)]
  8976. pub struct Category {
  8977. // message fields
  8978. name: ::protobuf::SingularField<::std::string::String>,
  8979. subcategories: ::protobuf::RepeatedField<Category>,
  8980. // special fields
  8981. pub unknown_fields: ::protobuf::UnknownFields,
  8982. pub cached_size: ::protobuf::CachedSize,
  8983. }
  8984. impl<'a> ::std::default::Default for &'a Category {
  8985. fn default() -> &'a Category {
  8986. <Category as ::protobuf::Message>::default_instance()
  8987. }
  8988. }
  8989. impl Category {
  8990. pub fn new() -> Category {
  8991. ::std::default::Default::default()
  8992. }
  8993. // optional string name = 1;
  8994. pub fn get_name(&self) -> &str {
  8995. match self.name.as_ref() {
  8996. Some(v) => &v,
  8997. None => "",
  8998. }
  8999. }
  9000. pub fn clear_name(&mut self) {
  9001. self.name.clear();
  9002. }
  9003. pub fn has_name(&self) -> bool {
  9004. self.name.is_some()
  9005. }
  9006. // Param is passed by value, moved
  9007. pub fn set_name(&mut self, v: ::std::string::String) {
  9008. self.name = ::protobuf::SingularField::some(v);
  9009. }
  9010. // Mutable pointer to the field.
  9011. // If field is not initialized, it is initialized with default value first.
  9012. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  9013. if self.name.is_none() {
  9014. self.name.set_default();
  9015. }
  9016. self.name.as_mut().unwrap()
  9017. }
  9018. // Take field
  9019. pub fn take_name(&mut self) -> ::std::string::String {
  9020. self.name
  9021. .take()
  9022. .unwrap_or_else(|| ::std::string::String::new())
  9023. }
  9024. // repeated .Category subcategories = 2;
  9025. pub fn get_subcategories(&self) -> &[Category] {
  9026. &self.subcategories
  9027. }
  9028. pub fn clear_subcategories(&mut self) {
  9029. self.subcategories.clear();
  9030. }
  9031. // Param is passed by value, moved
  9032. pub fn set_subcategories(&mut self, v: ::protobuf::RepeatedField<Category>) {
  9033. self.subcategories = v;
  9034. }
  9035. // Mutable pointer to the field.
  9036. pub fn mut_subcategories(&mut self) -> &mut ::protobuf::RepeatedField<Category> {
  9037. &mut self.subcategories
  9038. }
  9039. // Take field
  9040. pub fn take_subcategories(&mut self) -> ::protobuf::RepeatedField<Category> {
  9041. ::std::mem::replace(&mut self.subcategories, ::protobuf::RepeatedField::new())
  9042. }
  9043. }
  9044. impl ::protobuf::Message for Category {
  9045. fn is_initialized(&self) -> bool {
  9046. for v in &self.subcategories {
  9047. if !v.is_initialized() {
  9048. return false;
  9049. }
  9050. }
  9051. true
  9052. }
  9053. fn merge_from(
  9054. &mut self,
  9055. is: &mut ::protobuf::CodedInputStream<'_>,
  9056. ) -> ::protobuf::ProtobufResult<()> {
  9057. while !is.eof()? {
  9058. let (field_number, wire_type) = is.read_tag_unpack()?;
  9059. match field_number {
  9060. 1 => {
  9061. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  9062. }
  9063. 2 => {
  9064. ::protobuf::rt::read_repeated_message_into(
  9065. wire_type,
  9066. is,
  9067. &mut self.subcategories,
  9068. )?;
  9069. }
  9070. _ => {
  9071. ::protobuf::rt::read_unknown_or_skip_group(
  9072. field_number,
  9073. wire_type,
  9074. is,
  9075. self.mut_unknown_fields(),
  9076. )?;
  9077. }
  9078. };
  9079. }
  9080. ::std::result::Result::Ok(())
  9081. }
  9082. // Compute sizes of nested messages
  9083. #[allow(unused_variables)]
  9084. fn compute_size(&self) -> u32 {
  9085. let mut my_size = 0;
  9086. if let Some(ref v) = self.name.as_ref() {
  9087. my_size += ::protobuf::rt::string_size(1, &v);
  9088. }
  9089. for value in &self.subcategories {
  9090. let len = value.compute_size();
  9091. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  9092. }
  9093. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  9094. self.cached_size.set(my_size);
  9095. my_size
  9096. }
  9097. fn write_to_with_cached_sizes(
  9098. &self,
  9099. os: &mut ::protobuf::CodedOutputStream<'_>,
  9100. ) -> ::protobuf::ProtobufResult<()> {
  9101. if let Some(ref v) = self.name.as_ref() {
  9102. os.write_string(1, &v)?;
  9103. }
  9104. for v in &self.subcategories {
  9105. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  9106. os.write_raw_varint32(v.get_cached_size())?;
  9107. v.write_to_with_cached_sizes(os)?;
  9108. }
  9109. os.write_unknown_fields(self.get_unknown_fields())?;
  9110. ::std::result::Result::Ok(())
  9111. }
  9112. fn get_cached_size(&self) -> u32 {
  9113. self.cached_size.get()
  9114. }
  9115. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  9116. &self.unknown_fields
  9117. }
  9118. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  9119. &mut self.unknown_fields
  9120. }
  9121. fn as_any(&self) -> &dyn (::std::any::Any) {
  9122. self as &dyn (::std::any::Any)
  9123. }
  9124. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  9125. self as &mut dyn (::std::any::Any)
  9126. }
  9127. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  9128. self
  9129. }
  9130. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  9131. Self::descriptor_static()
  9132. }
  9133. fn new() -> Category {
  9134. Category::new()
  9135. }
  9136. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  9137. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  9138. ::protobuf::lazy::Lazy::INIT;
  9139. unsafe {
  9140. descriptor.get(|| {
  9141. let mut fields = ::std::vec::Vec::new();
  9142. fields.push(
  9143. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  9144. _,
  9145. ::protobuf::types::ProtobufTypeString,
  9146. >(
  9147. "name",
  9148. |m: &Category| &m.name,
  9149. |m: &mut Category| &mut m.name,
  9150. ),
  9151. );
  9152. fields.push(
  9153. ::protobuf::reflect::accessor::make_repeated_field_accessor::<
  9154. _,
  9155. ::protobuf::types::ProtobufTypeMessage<Category>,
  9156. >(
  9157. "subcategories",
  9158. |m: &Category| &m.subcategories,
  9159. |m: &mut Category| &mut m.subcategories,
  9160. ),
  9161. );
  9162. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Category>(
  9163. "Category",
  9164. fields,
  9165. file_descriptor_proto(),
  9166. )
  9167. })
  9168. }
  9169. }
  9170. fn default_instance() -> &'static Category {
  9171. static mut instance: ::protobuf::lazy::Lazy<Category> = ::protobuf::lazy::Lazy::INIT;
  9172. unsafe { instance.get(Category::new) }
  9173. }
  9174. }
  9175. impl ::protobuf::Clear for Category {
  9176. fn clear(&mut self) {
  9177. self.name.clear();
  9178. self.subcategories.clear();
  9179. self.unknown_fields.clear();
  9180. }
  9181. }
  9182. impl ::std::fmt::Debug for Category {
  9183. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  9184. ::protobuf::text_format::fmt(self, f)
  9185. }
  9186. }
  9187. impl ::protobuf::reflect::ProtobufValue for Category {
  9188. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  9189. ::protobuf::reflect::ReflectValueRef::Message(self)
  9190. }
  9191. }
  9192. #[derive(PartialEq, Clone, Default)]
  9193. pub struct OriginalAudio {
  9194. // message fields
  9195. uuid: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  9196. // special fields
  9197. pub unknown_fields: ::protobuf::UnknownFields,
  9198. pub cached_size: ::protobuf::CachedSize,
  9199. }
  9200. impl<'a> ::std::default::Default for &'a OriginalAudio {
  9201. fn default() -> &'a OriginalAudio {
  9202. <OriginalAudio as ::protobuf::Message>::default_instance()
  9203. }
  9204. }
  9205. impl OriginalAudio {
  9206. pub fn new() -> OriginalAudio {
  9207. ::std::default::Default::default()
  9208. }
  9209. // optional bytes uuid = 1;
  9210. pub fn get_uuid(&self) -> &[u8] {
  9211. match self.uuid.as_ref() {
  9212. Some(v) => &v,
  9213. None => &[],
  9214. }
  9215. }
  9216. pub fn clear_uuid(&mut self) {
  9217. self.uuid.clear();
  9218. }
  9219. pub fn has_uuid(&self) -> bool {
  9220. self.uuid.is_some()
  9221. }
  9222. // Param is passed by value, moved
  9223. pub fn set_uuid(&mut self, v: ::std::vec::Vec<u8>) {
  9224. self.uuid = ::protobuf::SingularField::some(v);
  9225. }
  9226. // Mutable pointer to the field.
  9227. // If field is not initialized, it is initialized with default value first.
  9228. pub fn mut_uuid(&mut self) -> &mut ::std::vec::Vec<u8> {
  9229. if self.uuid.is_none() {
  9230. self.uuid.set_default();
  9231. }
  9232. self.uuid.as_mut().unwrap()
  9233. }
  9234. // Take field
  9235. pub fn take_uuid(&mut self) -> ::std::vec::Vec<u8> {
  9236. self.uuid.take().unwrap_or_else(|| ::std::vec::Vec::new())
  9237. }
  9238. }
  9239. impl ::protobuf::Message for OriginalAudio {
  9240. fn is_initialized(&self) -> bool {
  9241. true
  9242. }
  9243. fn merge_from(
  9244. &mut self,
  9245. is: &mut ::protobuf::CodedInputStream<'_>,
  9246. ) -> ::protobuf::ProtobufResult<()> {
  9247. while !is.eof()? {
  9248. let (field_number, wire_type) = is.read_tag_unpack()?;
  9249. match field_number {
  9250. 1 => {
  9251. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.uuid)?;
  9252. }
  9253. _ => {
  9254. ::protobuf::rt::read_unknown_or_skip_group(
  9255. field_number,
  9256. wire_type,
  9257. is,
  9258. self.mut_unknown_fields(),
  9259. )?;
  9260. }
  9261. };
  9262. }
  9263. ::std::result::Result::Ok(())
  9264. }
  9265. // Compute sizes of nested messages
  9266. #[allow(unused_variables)]
  9267. fn compute_size(&self) -> u32 {
  9268. let mut my_size = 0;
  9269. if let Some(ref v) = self.uuid.as_ref() {
  9270. my_size += ::protobuf::rt::bytes_size(1, &v);
  9271. }
  9272. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  9273. self.cached_size.set(my_size);
  9274. my_size
  9275. }
  9276. fn write_to_with_cached_sizes(
  9277. &self,
  9278. os: &mut ::protobuf::CodedOutputStream<'_>,
  9279. ) -> ::protobuf::ProtobufResult<()> {
  9280. if let Some(ref v) = self.uuid.as_ref() {
  9281. os.write_bytes(1, &v)?;
  9282. }
  9283. os.write_unknown_fields(self.get_unknown_fields())?;
  9284. ::std::result::Result::Ok(())
  9285. }
  9286. fn get_cached_size(&self) -> u32 {
  9287. self.cached_size.get()
  9288. }
  9289. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  9290. &self.unknown_fields
  9291. }
  9292. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  9293. &mut self.unknown_fields
  9294. }
  9295. fn as_any(&self) -> &dyn (::std::any::Any) {
  9296. self as &dyn (::std::any::Any)
  9297. }
  9298. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  9299. self as &mut dyn (::std::any::Any)
  9300. }
  9301. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  9302. self
  9303. }
  9304. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  9305. Self::descriptor_static()
  9306. }
  9307. fn new() -> OriginalAudio {
  9308. OriginalAudio::new()
  9309. }
  9310. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  9311. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
  9312. ::protobuf::lazy::Lazy::INIT;
  9313. unsafe {
  9314. descriptor.get(|| {
  9315. let mut fields = ::std::vec::Vec::new();
  9316. fields.push(
  9317. ::protobuf::reflect::accessor::make_singular_field_accessor::<
  9318. _,
  9319. ::protobuf::types::ProtobufTypeBytes,
  9320. >(
  9321. "uuid",
  9322. |m: &OriginalAudio| &m.uuid,
  9323. |m: &mut OriginalAudio| &mut m.uuid,
  9324. ),
  9325. );
  9326. ::protobuf::reflect::MessageDescriptor::new_pb_name::<OriginalAudio>(
  9327. "OriginalAudio",
  9328. fields,
  9329. file_descriptor_proto(),
  9330. )
  9331. })
  9332. }
  9333. }
  9334. fn default_instance() -> &'static OriginalAudio {
  9335. static mut instance: ::protobuf::lazy::Lazy<OriginalAudio> = ::protobuf::lazy::Lazy::INIT;
  9336. unsafe { instance.get(OriginalAudio::new) }
  9337. }
  9338. }
  9339. impl ::protobuf::Clear for OriginalAudio {
  9340. fn clear(&mut self) {
  9341. self.uuid.clear();
  9342. self.unknown_fields.clear();
  9343. }
  9344. }
  9345. impl ::std::fmt::Debug for OriginalAudio {
  9346. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  9347. ::protobuf::text_format::fmt(self, f)
  9348. }
  9349. }
  9350. impl ::protobuf::reflect::ProtobufValue for OriginalAudio {
  9351. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  9352. ::protobuf::reflect::ReflectValueRef::Message(self)
  9353. }
  9354. }
  9355. static file_descriptor_proto_data: &'static [u8] = b"\
  9356. \n\x0emetadata.proto\x12\0\"9\n\tTopTracks\x12\x11\n\x07country\x18\x01\
  9357. \x20\x01(\tB\0\x12\x17\n\x05track\x18\x02\x20\x03(\x0b2\x06.TrackB\0:\0\
  9358. \"N\n\x0eActivityPeriod\x12\x14\n\nstart_year\x18\x01\x20\x01(\x11B\0\
  9359. \x12\x12\n\x08end_year\x18\x02\x20\x01(\x11B\0\x12\x10\n\x06decade\x18\
  9360. \x03\x20\x01(\x11B\0:\0\"\xa5\x04\n\x06Artist\x12\r\n\x03gid\x18\x01\x20\
  9361. \x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x14\n\npopulari\
  9362. ty\x18\x03\x20\x01(\x11B\0\x12\x1f\n\ttop_track\x18\x04\x20\x03(\x0b2\n.\
  9363. TopTracksB\0\x12\"\n\x0balbum_group\x18\x05\x20\x03(\x0b2\x0b.AlbumGroup\
  9364. B\0\x12#\n\x0csingle_group\x18\x06\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12(\
  9365. \n\x11compilation_group\x18\x07\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12'\n\
  9366. \x10appears_on_group\x18\x08\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12\x0f\n\
  9367. \x05genre\x18\t\x20\x03(\tB\0\x12\"\n\x0bexternal_id\x18\n\x20\x03(\x0b2\
  9368. \x0b.ExternalIdB\0\x12\x1a\n\x08portrait\x18\x0b\x20\x03(\x0b2\x06.Image\
  9369. B\0\x12\x1f\n\tbiography\x18\x0c\x20\x03(\x0b2\n.BiographyB\0\x12*\n\x0f\
  9370. activity_period\x18\r\x20\x03(\x0b2\x0f.ActivityPeriodB\0\x12#\n\x0brest\
  9371. riction\x18\x0e\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x1a\n\x07related\
  9372. \x18\x0f\x20\x03(\x0b2\x07.ArtistB\0\x12!\n\x17is_portrait_album_cover\
  9373. \x18\x10\x20\x01(\x08B\0\x12%\n\x0eportrait_group\x18\x11\x20\x01(\x0b2\
  9374. \x0b.ImageGroupB\0:\0\"'\n\nAlbumGroup\x12\x17\n\x05album\x18\x01\x20\
  9375. \x03(\x0b2\x06.AlbumB\0:\0\"Z\n\x04Date\x12\x0e\n\x04year\x18\x01\x20\
  9376. \x01(\x11B\0\x12\x0f\n\x05month\x18\x02\x20\x01(\x11B\0\x12\r\n\x03day\
  9377. \x18\x03\x20\x01(\x11B\0\x12\x0e\n\x04hour\x18\x04\x20\x01(\x11B\0\x12\
  9378. \x10\n\x06minute\x18\x05\x20\x01(\x11B\0:\0\"\xf7\x03\n\x05Album\x12\r\n\
  9379. \x03gid\x18\x01\x20\x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\
  9380. \x12\x19\n\x06artist\x18\x03\x20\x03(\x0b2\x07.ArtistB\0\x12\x1a\n\x03ty\
  9381. p\x18\x04\x20\x01(\x0e2\x0b.Album.TypeB\0\x12\x0f\n\x05label\x18\x05\x20\
  9382. \x01(\tB\0\x12\x15\n\x04date\x18\x06\x20\x01(\x0b2\x05.DateB\0\x12\x14\n\
  9383. \npopularity\x18\x07\x20\x01(\x11B\0\x12\x0f\n\x05genre\x18\x08\x20\x03(\
  9384. \tB\0\x12\x17\n\x05cover\x18\t\x20\x03(\x0b2\x06.ImageB\0\x12\"\n\x0bext\
  9385. ernal_id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\0\x12\x15\n\x04disc\x18\x0b\
  9386. \x20\x03(\x0b2\x05.DiscB\0\x12\x10\n\x06review\x18\x0c\x20\x03(\tB\0\x12\
  9387. \x1f\n\tcopyright\x18\r\x20\x03(\x0b2\n.CopyrightB\0\x12#\n\x0brestricti\
  9388. on\x18\x0e\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x19\n\x07related\x18\x0f\
  9389. \x20\x03(\x0b2\x06.AlbumB\0\x12\"\n\x0bsale_period\x18\x10\x20\x03(\x0b2\
  9390. \x0b.SalePeriodB\0\x12\"\n\x0bcover_group\x18\x11\x20\x01(\x0b2\x0b.Imag\
  9391. eGroupB\0\"8\n\x04Type\x12\t\n\x05ALBUM\x10\x01\x12\n\n\x06SINGLE\x10\
  9392. \x02\x12\x0f\n\x0bCOMPILATION\x10\x03\x12\x06\n\x02EP\x10\x04\x1a\0:\0\"\
  9393. \x8a\x03\n\x05Track\x12\r\n\x03gid\x18\x01\x20\x01(\x0cB\0\x12\x0e\n\x04\
  9394. name\x18\x02\x20\x01(\tB\0\x12\x17\n\x05album\x18\x03\x20\x01(\x0b2\x06.\
  9395. AlbumB\0\x12\x19\n\x06artist\x18\x04\x20\x03(\x0b2\x07.ArtistB\0\x12\x10\
  9396. \n\x06number\x18\x05\x20\x01(\x11B\0\x12\x15\n\x0bdisc_number\x18\x06\
  9397. \x20\x01(\x11B\0\x12\x12\n\x08duration\x18\x07\x20\x01(\x11B\0\x12\x14\n\
  9398. \npopularity\x18\x08\x20\x01(\x11B\0\x12\x12\n\x08explicit\x18\t\x20\x01\
  9399. (\x08B\0\x12\"\n\x0bexternal_id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\0\
  9400. \x12#\n\x0brestriction\x18\x0b\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x1a\
  9401. \n\x04file\x18\x0c\x20\x03(\x0b2\n.AudioFileB\0\x12\x1d\n\x0balternative\
  9402. \x18\r\x20\x03(\x0b2\x06.TrackB\0\x12\"\n\x0bsale_period\x18\x0e\x20\x03\
  9403. (\x0b2\x0b.SalePeriodB\0\x12\x1d\n\x07preview\x18\x0f\x20\x03(\x0b2\n.Au\
  9404. dioFileB\0:\0\"\x95\x01\n\x05Image\x12\x11\n\x07file_id\x18\x01\x20\x01(\
  9405. \x0cB\0\x12\x1b\n\x04size\x18\x02\x20\x01(\x0e2\x0b.Image.SizeB\0\x12\
  9406. \x0f\n\x05width\x18\x03\x20\x01(\x11B\0\x12\x10\n\x06height\x18\x04\x20\
  9407. \x01(\x11B\0\"7\n\x04Size\x12\x0b\n\x07DEFAULT\x10\0\x12\t\n\x05SMALL\
  9408. \x10\x01\x12\t\n\x05LARGE\x10\x02\x12\n\n\x06XLARGE\x10\x03\x1a\0:\0\"'\
  9409. \n\nImageGroup\x12\x17\n\x05image\x18\x01\x20\x03(\x0b2\x06.ImageB\0:\0\
  9410. \"`\n\tBiography\x12\x0e\n\x04text\x18\x01\x20\x01(\tB\0\x12\x1a\n\x08po\
  9411. rtrait\x18\x02\x20\x03(\x0b2\x06.ImageB\0\x12%\n\x0eportrait_group\x18\
  9412. \x03\x20\x03(\x0b2\x0b.ImageGroupB\0:\0\"C\n\x04Disc\x12\x10\n\x06number\
  9413. \x18\x01\x20\x01(\x11B\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x17\
  9414. \n\x05track\x18\x03\x20\x03(\x0b2\x06.TrackB\0:\0\"U\n\tCopyright\x12\
  9415. \x1e\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Copyright.TypeB\0\x12\x0e\n\x04t\
  9416. ext\x18\x02\x20\x01(\tB\0\"\x16\n\x04Type\x12\x05\n\x01P\x10\0\x12\x05\n\
  9417. \x01C\x10\x01\x1a\0:\0\"\xa5\x02\n\x0bRestriction\x12+\n\tcatalogue\x18\
  9418. \x01\x20\x03(\x0e2\x16.Restriction.CatalogueB\0\x12\x1b\n\x11countries_a\
  9419. llowed\x18\x02\x20\x01(\tB\0\x12\x1d\n\x13countries_forbidden\x18\x03\
  9420. \x20\x01(\tB\0\x12\x20\n\x03typ\x18\x04\x20\x01(\x0e2\x11.Restriction.Ty\
  9421. peB\0\x12\x17\n\rcatalogue_str\x18\x05\x20\x03(\tB\0\"W\n\tCatalogue\x12\
  9422. \x06\n\x02AD\x10\0\x12\x10\n\x0cSUBSCRIPTION\x10\x01\x12\x11\n\rCATALOGU\
  9423. E_ALL\x10\x02\x12\x0b\n\x07SHUFFLE\x10\x03\x12\x0e\n\nCOMMERCIAL\x10\x04\
  9424. \x1a\0\"\x17\n\x04Type\x12\r\n\tSTREAMING\x10\0\x1a\0:\0\"A\n\x0cAvailab\
  9425. ility\x12\x17\n\rcatalogue_str\x18\x01\x20\x03(\tB\0\x12\x16\n\x05start\
  9426. \x18\x02\x20\x01(\x0b2\x05.DateB\0:\0\"a\n\nSalePeriod\x12#\n\x0brestric\
  9427. tion\x18\x01\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x16\n\x05start\x18\x02\
  9428. \x20\x01(\x0b2\x05.DateB\0\x12\x14\n\x03end\x18\x03\x20\x01(\x0b2\x05.Da\
  9429. teB\0:\0\"+\n\nExternalId\x12\r\n\x03typ\x18\x01\x20\x01(\tB\0\x12\x0c\n\
  9430. \x02id\x18\x02\x20\x01(\tB\0:\0\"\xa2\x02\n\tAudioFile\x12\x11\n\x07file\
  9431. _id\x18\x01\x20\x01(\x0cB\0\x12#\n\x06format\x18\x02\x20\x01(\x0e2\x11.A\
  9432. udioFile.FormatB\0\"\xda\x01\n\x06Format\x12\x11\n\rOGG_VORBIS_96\x10\0\
  9433. \x12\x12\n\x0eOGG_VORBIS_160\x10\x01\x12\x12\n\x0eOGG_VORBIS_320\x10\x02\
  9434. \x12\x0b\n\x07MP3_256\x10\x03\x12\x0b\n\x07MP3_320\x10\x04\x12\x0b\n\x07\
  9435. MP3_160\x10\x05\x12\n\n\x06MP3_96\x10\x06\x12\x0f\n\x0bMP3_160_ENC\x10\
  9436. \x07\x12\x10\n\x0cMP4_128_DUAL\x10\x08\x12\n\n\x06OTHER3\x10\t\x12\x0b\n\
  9437. \x07AAC_160\x10\n\x12\x0b\n\x07AAC_320\x10\x0b\x12\x0b\n\x07MP4_128\x10\
  9438. \x0c\x12\n\n\x06OTHER5\x10\r\x1a\0:\0\"\x20\n\tVideoFile\x12\x11\n\x07fi\
  9439. le_id\x18\x01\x20\x01(\x0cB\0:\0\"\xf6\x05\n\x04Show\x12\r\n\x03gid\x18\
  9440. \x01\x20\x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x15\n\
  9441. \x0bdescription\x18@\x20\x01(\tB\0\x12\x1f\n\x15deprecated_popularity\
  9442. \x18A\x20\x01(\x11B\0\x12\x13\n\tpublisher\x18B\x20\x01(\tB\0\x12\x12\n\
  9443. \x08language\x18C\x20\x01(\tB\0\x12\x12\n\x08explicit\x18D\x20\x01(\x08B\
  9444. \0\x12\x1d\n\x06covers\x18E\x20\x01(\x0b2\x0b.ImageGroupB\0\x12\x1b\n\
  9445. \x07episode\x18F\x20\x03(\x0b2\x08.EpisodeB\0\x12\x1f\n\tcopyright\x18G\
  9446. \x20\x03(\x0b2\n.CopyrightB\0\x12#\n\x0brestriction\x18H\x20\x03(\x0b2\
  9447. \x0c.RestrictionB\0\x12\x11\n\x07keyword\x18I\x20\x03(\tB\0\x12%\n\nmedi\
  9448. a_type\x18J\x20\x01(\x0e2\x0f.Show.MediaTypeB\0\x123\n\x11consumption_or\
  9449. der\x18K\x20\x01(\x0e2\x16.Show.ConsumptionOrderB\0\x12+\n!interpret_res\
  9450. triction_using_geoip\x18L\x20\x01(\x08B\0\x12%\n\x0cavailability\x18N\
  9451. \x20\x03(\x0b2\r.AvailabilityB\0\x12\x1b\n\x11country_of_origin\x18O\x20\
  9452. \x01(\tB\0\x12\x1f\n\ncategories\x18P\x20\x03(\x0b2\t.CategoryB\0\x12,\n\
  9453. \x0bpassthrough\x18Q\x20\x01(\x0e2\x15.Show.PassthroughEnumB\0\".\n\tMed\
  9454. iaType\x12\t\n\x05MIXED\x10\0\x12\t\n\x05AUDIO\x10\x01\x12\t\n\x05VIDEO\
  9455. \x10\x02\x1a\0\">\n\x10ConsumptionOrder\x12\x0e\n\nSEQUENTIAL\x10\x01\
  9456. \x12\x0c\n\x08EPISODIC\x10\x02\x12\n\n\x06RECENT\x10\x03\x1a\0\"7\n\x0fP\
  9457. assthroughEnum\x12\x0b\n\x07UNKNOWN\x10\0\x12\x08\n\x04NONE\x10\x01\x12\
  9458. \x0b\n\x07ALLOWED\x10\x02\x1a\0:\0\"\xd7\x05\n\x07Episode\x12\r\n\x03gid\
  9459. \x18\x01\x20\x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x12\
  9460. \n\x08duration\x18\x07\x20\x01(\x11B\0\x12\x14\n\npopularity\x18\x08\x20\
  9461. \x01(\x11B\0\x12\x1a\n\x04file\x18\x0c\x20\x03(\x0b2\n.AudioFileB\0\x12\
  9462. \x15\n\x0bdescription\x18@\x20\x01(\tB\0\x12\x10\n\x06number\x18A\x20\
  9463. \x01(\x11B\0\x12\x1d\n\x0cpublish_time\x18B\x20\x01(\x0b2\x05.DateB\0\
  9464. \x12\x1f\n\x15deprecated_popularity\x18C\x20\x01(\x11B\0\x12\x1d\n\x06co\
  9465. vers\x18D\x20\x01(\x0b2\x0b.ImageGroupB\0\x12\x12\n\x08language\x18E\x20\
  9466. \x01(\tB\0\x12\x12\n\x08explicit\x18F\x20\x01(\x08B\0\x12\x15\n\x04show\
  9467. \x18G\x20\x01(\x0b2\x05.ShowB\0\x12\x1b\n\x05video\x18H\x20\x03(\x0b2\n.\
  9468. VideoFileB\0\x12#\n\rvideo_preview\x18I\x20\x03(\x0b2\n.VideoFileB\0\x12\
  9469. #\n\raudio_preview\x18J\x20\x03(\x0b2\n.AudioFileB\0\x12#\n\x0brestricti\
  9470. on\x18K\x20\x03(\x0b2\x0c.RestrictionB\0\x12#\n\x0cfreeze_frame\x18L\x20\
  9471. \x01(\x0b2\x0b.ImageGroupB\0\x12\x11\n\x07keyword\x18M\x20\x03(\tB\0\x12\
  9472. \x1f\n\x15suppress_monetization\x18N\x20\x01(\x08B\0\x12+\n!interpret_re\
  9473. striction_using_geoip\x18O\x20\x01(\x08B\0\x12#\n\x19allow_background_pl\
  9474. ayback\x18Q\x20\x01(\x08B\0\x12%\n\x0cavailability\x18R\x20\x03(\x0b2\r.\
  9475. AvailabilityB\0\x12\x16\n\x0cexternal_url\x18S\x20\x01(\tB\0\x12(\n\x0eo\
  9476. riginal_audio\x18T\x20\x01(\x0b2\x0e.OriginalAudioB\0:\0\"@\n\x08Categor\
  9477. y\x12\x0e\n\x04name\x18\x01\x20\x01(\tB\0\x12\"\n\rsubcategories\x18\x02\
  9478. \x20\x03(\x0b2\t.CategoryB\0:\0\"!\n\rOriginalAudio\x12\x0e\n\x04uuid\
  9479. \x18\x01\x20\x01(\x0cB\0:\0B\0b\x06proto2\
  9480. ";
  9481. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<
  9482. ::protobuf::descriptor::FileDescriptorProto,
  9483. > = ::protobuf::lazy::Lazy::INIT;
  9484. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  9485. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  9486. }
  9487. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  9488. unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) }
  9489. }