grid.rs 257 KB

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