grid.rs 179 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571
  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: super::meta::FieldType,
  249. pub frozen: bool,
  250. pub visibility: bool,
  251. pub width: i32,
  252. // special fields
  253. pub unknown_fields: ::protobuf::UnknownFields,
  254. pub cached_size: ::protobuf::CachedSize,
  255. }
  256. impl<'a> ::std::default::Default for &'a Field {
  257. fn default() -> &'a Field {
  258. <Field as ::protobuf::Message>::default_instance()
  259. }
  260. }
  261. impl Field {
  262. pub fn new() -> Field {
  263. ::std::default::Default::default()
  264. }
  265. // string id = 1;
  266. pub fn get_id(&self) -> &str {
  267. &self.id
  268. }
  269. pub fn clear_id(&mut self) {
  270. self.id.clear();
  271. }
  272. // Param is passed by value, moved
  273. pub fn set_id(&mut self, v: ::std::string::String) {
  274. self.id = v;
  275. }
  276. // Mutable pointer to the field.
  277. // If field is not initialized, it is initialized with default value first.
  278. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  279. &mut self.id
  280. }
  281. // Take field
  282. pub fn take_id(&mut self) -> ::std::string::String {
  283. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  284. }
  285. // string name = 2;
  286. pub fn get_name(&self) -> &str {
  287. &self.name
  288. }
  289. pub fn clear_name(&mut self) {
  290. self.name.clear();
  291. }
  292. // Param is passed by value, moved
  293. pub fn set_name(&mut self, v: ::std::string::String) {
  294. self.name = v;
  295. }
  296. // Mutable pointer to the field.
  297. // If field is not initialized, it is initialized with default value first.
  298. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  299. &mut self.name
  300. }
  301. // Take field
  302. pub fn take_name(&mut self) -> ::std::string::String {
  303. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  304. }
  305. // string desc = 3;
  306. pub fn get_desc(&self) -> &str {
  307. &self.desc
  308. }
  309. pub fn clear_desc(&mut self) {
  310. self.desc.clear();
  311. }
  312. // Param is passed by value, moved
  313. pub fn set_desc(&mut self, v: ::std::string::String) {
  314. self.desc = v;
  315. }
  316. // Mutable pointer to the field.
  317. // If field is not initialized, it is initialized with default value first.
  318. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  319. &mut self.desc
  320. }
  321. // Take field
  322. pub fn take_desc(&mut self) -> ::std::string::String {
  323. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  324. }
  325. // .FieldType field_type = 4;
  326. pub fn get_field_type(&self) -> super::meta::FieldType {
  327. self.field_type
  328. }
  329. pub fn clear_field_type(&mut self) {
  330. self.field_type = super::meta::FieldType::RichText;
  331. }
  332. // Param is passed by value, moved
  333. pub fn set_field_type(&mut self, v: super::meta::FieldType) {
  334. self.field_type = v;
  335. }
  336. // bool frozen = 5;
  337. pub fn get_frozen(&self) -> bool {
  338. self.frozen
  339. }
  340. pub fn clear_frozen(&mut self) {
  341. self.frozen = false;
  342. }
  343. // Param is passed by value, moved
  344. pub fn set_frozen(&mut self, v: bool) {
  345. self.frozen = v;
  346. }
  347. // bool visibility = 6;
  348. pub fn get_visibility(&self) -> bool {
  349. self.visibility
  350. }
  351. pub fn clear_visibility(&mut self) {
  352. self.visibility = false;
  353. }
  354. // Param is passed by value, moved
  355. pub fn set_visibility(&mut self, v: bool) {
  356. self.visibility = v;
  357. }
  358. // int32 width = 7;
  359. pub fn get_width(&self) -> i32 {
  360. self.width
  361. }
  362. pub fn clear_width(&mut self) {
  363. self.width = 0;
  364. }
  365. // Param is passed by value, moved
  366. pub fn set_width(&mut self, v: i32) {
  367. self.width = v;
  368. }
  369. }
  370. impl ::protobuf::Message for Field {
  371. fn is_initialized(&self) -> bool {
  372. true
  373. }
  374. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  375. while !is.eof()? {
  376. let (field_number, wire_type) = is.read_tag_unpack()?;
  377. match field_number {
  378. 1 => {
  379. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  380. },
  381. 2 => {
  382. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  383. },
  384. 3 => {
  385. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  386. },
  387. 4 => {
  388. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 4, &mut self.unknown_fields)?
  389. },
  390. 5 => {
  391. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  392. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  393. }
  394. let tmp = is.read_bool()?;
  395. self.frozen = tmp;
  396. },
  397. 6 => {
  398. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  399. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  400. }
  401. let tmp = is.read_bool()?;
  402. self.visibility = tmp;
  403. },
  404. 7 => {
  405. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  406. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  407. }
  408. let tmp = is.read_int32()?;
  409. self.width = tmp;
  410. },
  411. _ => {
  412. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  413. },
  414. };
  415. }
  416. ::std::result::Result::Ok(())
  417. }
  418. // Compute sizes of nested messages
  419. #[allow(unused_variables)]
  420. fn compute_size(&self) -> u32 {
  421. let mut my_size = 0;
  422. if !self.id.is_empty() {
  423. my_size += ::protobuf::rt::string_size(1, &self.id);
  424. }
  425. if !self.name.is_empty() {
  426. my_size += ::protobuf::rt::string_size(2, &self.name);
  427. }
  428. if !self.desc.is_empty() {
  429. my_size += ::protobuf::rt::string_size(3, &self.desc);
  430. }
  431. if self.field_type != super::meta::FieldType::RichText {
  432. my_size += ::protobuf::rt::enum_size(4, self.field_type);
  433. }
  434. if self.frozen != false {
  435. my_size += 2;
  436. }
  437. if self.visibility != false {
  438. my_size += 2;
  439. }
  440. if self.width != 0 {
  441. my_size += ::protobuf::rt::value_size(7, self.width, ::protobuf::wire_format::WireTypeVarint);
  442. }
  443. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  444. self.cached_size.set(my_size);
  445. my_size
  446. }
  447. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  448. if !self.id.is_empty() {
  449. os.write_string(1, &self.id)?;
  450. }
  451. if !self.name.is_empty() {
  452. os.write_string(2, &self.name)?;
  453. }
  454. if !self.desc.is_empty() {
  455. os.write_string(3, &self.desc)?;
  456. }
  457. if self.field_type != super::meta::FieldType::RichText {
  458. os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  459. }
  460. if self.frozen != false {
  461. os.write_bool(5, self.frozen)?;
  462. }
  463. if self.visibility != false {
  464. os.write_bool(6, self.visibility)?;
  465. }
  466. if self.width != 0 {
  467. os.write_int32(7, self.width)?;
  468. }
  469. os.write_unknown_fields(self.get_unknown_fields())?;
  470. ::std::result::Result::Ok(())
  471. }
  472. fn get_cached_size(&self) -> u32 {
  473. self.cached_size.get()
  474. }
  475. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  476. &self.unknown_fields
  477. }
  478. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  479. &mut self.unknown_fields
  480. }
  481. fn as_any(&self) -> &dyn (::std::any::Any) {
  482. self as &dyn (::std::any::Any)
  483. }
  484. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  485. self as &mut dyn (::std::any::Any)
  486. }
  487. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  488. self
  489. }
  490. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  491. Self::descriptor_static()
  492. }
  493. fn new() -> Field {
  494. Field::new()
  495. }
  496. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  497. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  498. descriptor.get(|| {
  499. let mut fields = ::std::vec::Vec::new();
  500. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  501. "id",
  502. |m: &Field| { &m.id },
  503. |m: &mut Field| { &mut m.id },
  504. ));
  505. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  506. "name",
  507. |m: &Field| { &m.name },
  508. |m: &mut Field| { &mut m.name },
  509. ));
  510. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  511. "desc",
  512. |m: &Field| { &m.desc },
  513. |m: &mut Field| { &mut m.desc },
  514. ));
  515. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::meta::FieldType>>(
  516. "field_type",
  517. |m: &Field| { &m.field_type },
  518. |m: &mut Field| { &mut m.field_type },
  519. ));
  520. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  521. "frozen",
  522. |m: &Field| { &m.frozen },
  523. |m: &mut Field| { &mut m.frozen },
  524. ));
  525. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  526. "visibility",
  527. |m: &Field| { &m.visibility },
  528. |m: &mut Field| { &mut m.visibility },
  529. ));
  530. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  531. "width",
  532. |m: &Field| { &m.width },
  533. |m: &mut Field| { &mut m.width },
  534. ));
  535. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Field>(
  536. "Field",
  537. fields,
  538. file_descriptor_proto()
  539. )
  540. })
  541. }
  542. fn default_instance() -> &'static Field {
  543. static instance: ::protobuf::rt::LazyV2<Field> = ::protobuf::rt::LazyV2::INIT;
  544. instance.get(Field::new)
  545. }
  546. }
  547. impl ::protobuf::Clear for Field {
  548. fn clear(&mut self) {
  549. self.id.clear();
  550. self.name.clear();
  551. self.desc.clear();
  552. self.field_type = super::meta::FieldType::RichText;
  553. self.frozen = false;
  554. self.visibility = false;
  555. self.width = 0;
  556. self.unknown_fields.clear();
  557. }
  558. }
  559. impl ::std::fmt::Debug for Field {
  560. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  561. ::protobuf::text_format::fmt(self, f)
  562. }
  563. }
  564. impl ::protobuf::reflect::ProtobufValue for Field {
  565. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  566. ::protobuf::reflect::ReflectValueRef::Message(self)
  567. }
  568. }
  569. #[derive(PartialEq,Clone,Default)]
  570. pub struct FieldIdentifierPayload {
  571. // message fields
  572. pub field_id: ::std::string::String,
  573. pub grid_id: ::std::string::String,
  574. // special fields
  575. pub unknown_fields: ::protobuf::UnknownFields,
  576. pub cached_size: ::protobuf::CachedSize,
  577. }
  578. impl<'a> ::std::default::Default for &'a FieldIdentifierPayload {
  579. fn default() -> &'a FieldIdentifierPayload {
  580. <FieldIdentifierPayload as ::protobuf::Message>::default_instance()
  581. }
  582. }
  583. impl FieldIdentifierPayload {
  584. pub fn new() -> FieldIdentifierPayload {
  585. ::std::default::Default::default()
  586. }
  587. // string field_id = 1;
  588. pub fn get_field_id(&self) -> &str {
  589. &self.field_id
  590. }
  591. pub fn clear_field_id(&mut self) {
  592. self.field_id.clear();
  593. }
  594. // Param is passed by value, moved
  595. pub fn set_field_id(&mut self, v: ::std::string::String) {
  596. self.field_id = v;
  597. }
  598. // Mutable pointer to the field.
  599. // If field is not initialized, it is initialized with default value first.
  600. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  601. &mut self.field_id
  602. }
  603. // Take field
  604. pub fn take_field_id(&mut self) -> ::std::string::String {
  605. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  606. }
  607. // string grid_id = 2;
  608. pub fn get_grid_id(&self) -> &str {
  609. &self.grid_id
  610. }
  611. pub fn clear_grid_id(&mut self) {
  612. self.grid_id.clear();
  613. }
  614. // Param is passed by value, moved
  615. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  616. self.grid_id = v;
  617. }
  618. // Mutable pointer to the field.
  619. // If field is not initialized, it is initialized with default value first.
  620. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  621. &mut self.grid_id
  622. }
  623. // Take field
  624. pub fn take_grid_id(&mut self) -> ::std::string::String {
  625. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  626. }
  627. }
  628. impl ::protobuf::Message for FieldIdentifierPayload {
  629. fn is_initialized(&self) -> bool {
  630. true
  631. }
  632. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  633. while !is.eof()? {
  634. let (field_number, wire_type) = is.read_tag_unpack()?;
  635. match field_number {
  636. 1 => {
  637. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  638. },
  639. 2 => {
  640. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  641. },
  642. _ => {
  643. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  644. },
  645. };
  646. }
  647. ::std::result::Result::Ok(())
  648. }
  649. // Compute sizes of nested messages
  650. #[allow(unused_variables)]
  651. fn compute_size(&self) -> u32 {
  652. let mut my_size = 0;
  653. if !self.field_id.is_empty() {
  654. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  655. }
  656. if !self.grid_id.is_empty() {
  657. my_size += ::protobuf::rt::string_size(2, &self.grid_id);
  658. }
  659. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  660. self.cached_size.set(my_size);
  661. my_size
  662. }
  663. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  664. if !self.field_id.is_empty() {
  665. os.write_string(1, &self.field_id)?;
  666. }
  667. if !self.grid_id.is_empty() {
  668. os.write_string(2, &self.grid_id)?;
  669. }
  670. os.write_unknown_fields(self.get_unknown_fields())?;
  671. ::std::result::Result::Ok(())
  672. }
  673. fn get_cached_size(&self) -> u32 {
  674. self.cached_size.get()
  675. }
  676. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  677. &self.unknown_fields
  678. }
  679. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  680. &mut self.unknown_fields
  681. }
  682. fn as_any(&self) -> &dyn (::std::any::Any) {
  683. self as &dyn (::std::any::Any)
  684. }
  685. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  686. self as &mut dyn (::std::any::Any)
  687. }
  688. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  689. self
  690. }
  691. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  692. Self::descriptor_static()
  693. }
  694. fn new() -> FieldIdentifierPayload {
  695. FieldIdentifierPayload::new()
  696. }
  697. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  698. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  699. descriptor.get(|| {
  700. let mut fields = ::std::vec::Vec::new();
  701. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  702. "field_id",
  703. |m: &FieldIdentifierPayload| { &m.field_id },
  704. |m: &mut FieldIdentifierPayload| { &mut m.field_id },
  705. ));
  706. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  707. "grid_id",
  708. |m: &FieldIdentifierPayload| { &m.grid_id },
  709. |m: &mut FieldIdentifierPayload| { &mut m.grid_id },
  710. ));
  711. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldIdentifierPayload>(
  712. "FieldIdentifierPayload",
  713. fields,
  714. file_descriptor_proto()
  715. )
  716. })
  717. }
  718. fn default_instance() -> &'static FieldIdentifierPayload {
  719. static instance: ::protobuf::rt::LazyV2<FieldIdentifierPayload> = ::protobuf::rt::LazyV2::INIT;
  720. instance.get(FieldIdentifierPayload::new)
  721. }
  722. }
  723. impl ::protobuf::Clear for FieldIdentifierPayload {
  724. fn clear(&mut self) {
  725. self.field_id.clear();
  726. self.grid_id.clear();
  727. self.unknown_fields.clear();
  728. }
  729. }
  730. impl ::std::fmt::Debug for FieldIdentifierPayload {
  731. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  732. ::protobuf::text_format::fmt(self, f)
  733. }
  734. }
  735. impl ::protobuf::reflect::ProtobufValue for FieldIdentifierPayload {
  736. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  737. ::protobuf::reflect::ReflectValueRef::Message(self)
  738. }
  739. }
  740. #[derive(PartialEq,Clone,Default)]
  741. pub struct FieldIdentifierParams {
  742. // message fields
  743. pub field_id: ::std::string::String,
  744. pub grid_id: ::std::string::String,
  745. // special fields
  746. pub unknown_fields: ::protobuf::UnknownFields,
  747. pub cached_size: ::protobuf::CachedSize,
  748. }
  749. impl<'a> ::std::default::Default for &'a FieldIdentifierParams {
  750. fn default() -> &'a FieldIdentifierParams {
  751. <FieldIdentifierParams as ::protobuf::Message>::default_instance()
  752. }
  753. }
  754. impl FieldIdentifierParams {
  755. pub fn new() -> FieldIdentifierParams {
  756. ::std::default::Default::default()
  757. }
  758. // string field_id = 1;
  759. pub fn get_field_id(&self) -> &str {
  760. &self.field_id
  761. }
  762. pub fn clear_field_id(&mut self) {
  763. self.field_id.clear();
  764. }
  765. // Param is passed by value, moved
  766. pub fn set_field_id(&mut self, v: ::std::string::String) {
  767. self.field_id = v;
  768. }
  769. // Mutable pointer to the field.
  770. // If field is not initialized, it is initialized with default value first.
  771. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  772. &mut self.field_id
  773. }
  774. // Take field
  775. pub fn take_field_id(&mut self) -> ::std::string::String {
  776. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  777. }
  778. // string grid_id = 2;
  779. pub fn get_grid_id(&self) -> &str {
  780. &self.grid_id
  781. }
  782. pub fn clear_grid_id(&mut self) {
  783. self.grid_id.clear();
  784. }
  785. // Param is passed by value, moved
  786. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  787. self.grid_id = v;
  788. }
  789. // Mutable pointer to the field.
  790. // If field is not initialized, it is initialized with default value first.
  791. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  792. &mut self.grid_id
  793. }
  794. // Take field
  795. pub fn take_grid_id(&mut self) -> ::std::string::String {
  796. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  797. }
  798. }
  799. impl ::protobuf::Message for FieldIdentifierParams {
  800. fn is_initialized(&self) -> bool {
  801. true
  802. }
  803. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  804. while !is.eof()? {
  805. let (field_number, wire_type) = is.read_tag_unpack()?;
  806. match field_number {
  807. 1 => {
  808. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  809. },
  810. 2 => {
  811. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  812. },
  813. _ => {
  814. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  815. },
  816. };
  817. }
  818. ::std::result::Result::Ok(())
  819. }
  820. // Compute sizes of nested messages
  821. #[allow(unused_variables)]
  822. fn compute_size(&self) -> u32 {
  823. let mut my_size = 0;
  824. if !self.field_id.is_empty() {
  825. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  826. }
  827. if !self.grid_id.is_empty() {
  828. my_size += ::protobuf::rt::string_size(2, &self.grid_id);
  829. }
  830. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  831. self.cached_size.set(my_size);
  832. my_size
  833. }
  834. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  835. if !self.field_id.is_empty() {
  836. os.write_string(1, &self.field_id)?;
  837. }
  838. if !self.grid_id.is_empty() {
  839. os.write_string(2, &self.grid_id)?;
  840. }
  841. os.write_unknown_fields(self.get_unknown_fields())?;
  842. ::std::result::Result::Ok(())
  843. }
  844. fn get_cached_size(&self) -> u32 {
  845. self.cached_size.get()
  846. }
  847. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  848. &self.unknown_fields
  849. }
  850. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  851. &mut self.unknown_fields
  852. }
  853. fn as_any(&self) -> &dyn (::std::any::Any) {
  854. self as &dyn (::std::any::Any)
  855. }
  856. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  857. self as &mut dyn (::std::any::Any)
  858. }
  859. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  860. self
  861. }
  862. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  863. Self::descriptor_static()
  864. }
  865. fn new() -> FieldIdentifierParams {
  866. FieldIdentifierParams::new()
  867. }
  868. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  869. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  870. descriptor.get(|| {
  871. let mut fields = ::std::vec::Vec::new();
  872. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  873. "field_id",
  874. |m: &FieldIdentifierParams| { &m.field_id },
  875. |m: &mut FieldIdentifierParams| { &mut m.field_id },
  876. ));
  877. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  878. "grid_id",
  879. |m: &FieldIdentifierParams| { &m.grid_id },
  880. |m: &mut FieldIdentifierParams| { &mut m.grid_id },
  881. ));
  882. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldIdentifierParams>(
  883. "FieldIdentifierParams",
  884. fields,
  885. file_descriptor_proto()
  886. )
  887. })
  888. }
  889. fn default_instance() -> &'static FieldIdentifierParams {
  890. static instance: ::protobuf::rt::LazyV2<FieldIdentifierParams> = ::protobuf::rt::LazyV2::INIT;
  891. instance.get(FieldIdentifierParams::new)
  892. }
  893. }
  894. impl ::protobuf::Clear for FieldIdentifierParams {
  895. fn clear(&mut self) {
  896. self.field_id.clear();
  897. self.grid_id.clear();
  898. self.unknown_fields.clear();
  899. }
  900. }
  901. impl ::std::fmt::Debug for FieldIdentifierParams {
  902. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  903. ::protobuf::text_format::fmt(self, f)
  904. }
  905. }
  906. impl ::protobuf::reflect::ProtobufValue for FieldIdentifierParams {
  907. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  908. ::protobuf::reflect::ReflectValueRef::Message(self)
  909. }
  910. }
  911. #[derive(PartialEq,Clone,Default)]
  912. pub struct FieldOrder {
  913. // message fields
  914. pub field_id: ::std::string::String,
  915. // special fields
  916. pub unknown_fields: ::protobuf::UnknownFields,
  917. pub cached_size: ::protobuf::CachedSize,
  918. }
  919. impl<'a> ::std::default::Default for &'a FieldOrder {
  920. fn default() -> &'a FieldOrder {
  921. <FieldOrder as ::protobuf::Message>::default_instance()
  922. }
  923. }
  924. impl FieldOrder {
  925. pub fn new() -> FieldOrder {
  926. ::std::default::Default::default()
  927. }
  928. // string field_id = 1;
  929. pub fn get_field_id(&self) -> &str {
  930. &self.field_id
  931. }
  932. pub fn clear_field_id(&mut self) {
  933. self.field_id.clear();
  934. }
  935. // Param is passed by value, moved
  936. pub fn set_field_id(&mut self, v: ::std::string::String) {
  937. self.field_id = v;
  938. }
  939. // Mutable pointer to the field.
  940. // If field is not initialized, it is initialized with default value first.
  941. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  942. &mut self.field_id
  943. }
  944. // Take field
  945. pub fn take_field_id(&mut self) -> ::std::string::String {
  946. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  947. }
  948. }
  949. impl ::protobuf::Message for FieldOrder {
  950. fn is_initialized(&self) -> bool {
  951. true
  952. }
  953. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  954. while !is.eof()? {
  955. let (field_number, wire_type) = is.read_tag_unpack()?;
  956. match field_number {
  957. 1 => {
  958. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  959. },
  960. _ => {
  961. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  962. },
  963. };
  964. }
  965. ::std::result::Result::Ok(())
  966. }
  967. // Compute sizes of nested messages
  968. #[allow(unused_variables)]
  969. fn compute_size(&self) -> u32 {
  970. let mut my_size = 0;
  971. if !self.field_id.is_empty() {
  972. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  973. }
  974. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  975. self.cached_size.set(my_size);
  976. my_size
  977. }
  978. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  979. if !self.field_id.is_empty() {
  980. os.write_string(1, &self.field_id)?;
  981. }
  982. os.write_unknown_fields(self.get_unknown_fields())?;
  983. ::std::result::Result::Ok(())
  984. }
  985. fn get_cached_size(&self) -> u32 {
  986. self.cached_size.get()
  987. }
  988. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  989. &self.unknown_fields
  990. }
  991. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  992. &mut self.unknown_fields
  993. }
  994. fn as_any(&self) -> &dyn (::std::any::Any) {
  995. self as &dyn (::std::any::Any)
  996. }
  997. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  998. self as &mut dyn (::std::any::Any)
  999. }
  1000. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1001. self
  1002. }
  1003. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1004. Self::descriptor_static()
  1005. }
  1006. fn new() -> FieldOrder {
  1007. FieldOrder::new()
  1008. }
  1009. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1010. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1011. descriptor.get(|| {
  1012. let mut fields = ::std::vec::Vec::new();
  1013. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1014. "field_id",
  1015. |m: &FieldOrder| { &m.field_id },
  1016. |m: &mut FieldOrder| { &mut m.field_id },
  1017. ));
  1018. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldOrder>(
  1019. "FieldOrder",
  1020. fields,
  1021. file_descriptor_proto()
  1022. )
  1023. })
  1024. }
  1025. fn default_instance() -> &'static FieldOrder {
  1026. static instance: ::protobuf::rt::LazyV2<FieldOrder> = ::protobuf::rt::LazyV2::INIT;
  1027. instance.get(FieldOrder::new)
  1028. }
  1029. }
  1030. impl ::protobuf::Clear for FieldOrder {
  1031. fn clear(&mut self) {
  1032. self.field_id.clear();
  1033. self.unknown_fields.clear();
  1034. }
  1035. }
  1036. impl ::std::fmt::Debug for FieldOrder {
  1037. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1038. ::protobuf::text_format::fmt(self, f)
  1039. }
  1040. }
  1041. impl ::protobuf::reflect::ProtobufValue for FieldOrder {
  1042. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1043. ::protobuf::reflect::ReflectValueRef::Message(self)
  1044. }
  1045. }
  1046. #[derive(PartialEq,Clone,Default)]
  1047. pub struct GetEditFieldContextParams {
  1048. // message fields
  1049. pub grid_id: ::std::string::String,
  1050. pub field_type: super::meta::FieldType,
  1051. // message oneof groups
  1052. pub one_of_field_id: ::std::option::Option<GetEditFieldContextParams_oneof_one_of_field_id>,
  1053. // special fields
  1054. pub unknown_fields: ::protobuf::UnknownFields,
  1055. pub cached_size: ::protobuf::CachedSize,
  1056. }
  1057. impl<'a> ::std::default::Default for &'a GetEditFieldContextParams {
  1058. fn default() -> &'a GetEditFieldContextParams {
  1059. <GetEditFieldContextParams as ::protobuf::Message>::default_instance()
  1060. }
  1061. }
  1062. #[derive(Clone,PartialEq,Debug)]
  1063. pub enum GetEditFieldContextParams_oneof_one_of_field_id {
  1064. field_id(::std::string::String),
  1065. }
  1066. impl GetEditFieldContextParams {
  1067. pub fn new() -> GetEditFieldContextParams {
  1068. ::std::default::Default::default()
  1069. }
  1070. // string grid_id = 1;
  1071. pub fn get_grid_id(&self) -> &str {
  1072. &self.grid_id
  1073. }
  1074. pub fn clear_grid_id(&mut self) {
  1075. self.grid_id.clear();
  1076. }
  1077. // Param is passed by value, moved
  1078. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1079. self.grid_id = v;
  1080. }
  1081. // Mutable pointer to the field.
  1082. // If field is not initialized, it is initialized with default value first.
  1083. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1084. &mut self.grid_id
  1085. }
  1086. // Take field
  1087. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1088. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1089. }
  1090. // string field_id = 2;
  1091. pub fn get_field_id(&self) -> &str {
  1092. match self.one_of_field_id {
  1093. ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(ref v)) => v,
  1094. _ => "",
  1095. }
  1096. }
  1097. pub fn clear_field_id(&mut self) {
  1098. self.one_of_field_id = ::std::option::Option::None;
  1099. }
  1100. pub fn has_field_id(&self) -> bool {
  1101. match self.one_of_field_id {
  1102. ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(..)) => true,
  1103. _ => false,
  1104. }
  1105. }
  1106. // Param is passed by value, moved
  1107. pub fn set_field_id(&mut self, v: ::std::string::String) {
  1108. self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(v))
  1109. }
  1110. // Mutable pointer to the field.
  1111. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  1112. if let ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(_)) = self.one_of_field_id {
  1113. } else {
  1114. self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(::std::string::String::new()));
  1115. }
  1116. match self.one_of_field_id {
  1117. ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(ref mut v)) => v,
  1118. _ => panic!(),
  1119. }
  1120. }
  1121. // Take field
  1122. pub fn take_field_id(&mut self) -> ::std::string::String {
  1123. if self.has_field_id() {
  1124. match self.one_of_field_id.take() {
  1125. ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(v)) => v,
  1126. _ => panic!(),
  1127. }
  1128. } else {
  1129. ::std::string::String::new()
  1130. }
  1131. }
  1132. // .FieldType field_type = 3;
  1133. pub fn get_field_type(&self) -> super::meta::FieldType {
  1134. self.field_type
  1135. }
  1136. pub fn clear_field_type(&mut self) {
  1137. self.field_type = super::meta::FieldType::RichText;
  1138. }
  1139. // Param is passed by value, moved
  1140. pub fn set_field_type(&mut self, v: super::meta::FieldType) {
  1141. self.field_type = v;
  1142. }
  1143. }
  1144. impl ::protobuf::Message for GetEditFieldContextParams {
  1145. fn is_initialized(&self) -> bool {
  1146. true
  1147. }
  1148. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1149. while !is.eof()? {
  1150. let (field_number, wire_type) = is.read_tag_unpack()?;
  1151. match field_number {
  1152. 1 => {
  1153. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1154. },
  1155. 2 => {
  1156. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  1157. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1158. }
  1159. self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextParams_oneof_one_of_field_id::field_id(is.read_string()?));
  1160. },
  1161. 3 => {
  1162. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
  1163. },
  1164. _ => {
  1165. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1166. },
  1167. };
  1168. }
  1169. ::std::result::Result::Ok(())
  1170. }
  1171. // Compute sizes of nested messages
  1172. #[allow(unused_variables)]
  1173. fn compute_size(&self) -> u32 {
  1174. let mut my_size = 0;
  1175. if !self.grid_id.is_empty() {
  1176. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1177. }
  1178. if self.field_type != super::meta::FieldType::RichText {
  1179. my_size += ::protobuf::rt::enum_size(3, self.field_type);
  1180. }
  1181. if let ::std::option::Option::Some(ref v) = self.one_of_field_id {
  1182. match v {
  1183. &GetEditFieldContextParams_oneof_one_of_field_id::field_id(ref v) => {
  1184. my_size += ::protobuf::rt::string_size(2, &v);
  1185. },
  1186. };
  1187. }
  1188. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1189. self.cached_size.set(my_size);
  1190. my_size
  1191. }
  1192. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1193. if !self.grid_id.is_empty() {
  1194. os.write_string(1, &self.grid_id)?;
  1195. }
  1196. if self.field_type != super::meta::FieldType::RichText {
  1197. os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  1198. }
  1199. if let ::std::option::Option::Some(ref v) = self.one_of_field_id {
  1200. match v {
  1201. &GetEditFieldContextParams_oneof_one_of_field_id::field_id(ref v) => {
  1202. os.write_string(2, v)?;
  1203. },
  1204. };
  1205. }
  1206. os.write_unknown_fields(self.get_unknown_fields())?;
  1207. ::std::result::Result::Ok(())
  1208. }
  1209. fn get_cached_size(&self) -> u32 {
  1210. self.cached_size.get()
  1211. }
  1212. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1213. &self.unknown_fields
  1214. }
  1215. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1216. &mut self.unknown_fields
  1217. }
  1218. fn as_any(&self) -> &dyn (::std::any::Any) {
  1219. self as &dyn (::std::any::Any)
  1220. }
  1221. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1222. self as &mut dyn (::std::any::Any)
  1223. }
  1224. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1225. self
  1226. }
  1227. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1228. Self::descriptor_static()
  1229. }
  1230. fn new() -> GetEditFieldContextParams {
  1231. GetEditFieldContextParams::new()
  1232. }
  1233. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1234. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1235. descriptor.get(|| {
  1236. let mut fields = ::std::vec::Vec::new();
  1237. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1238. "grid_id",
  1239. |m: &GetEditFieldContextParams| { &m.grid_id },
  1240. |m: &mut GetEditFieldContextParams| { &mut m.grid_id },
  1241. ));
  1242. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1243. "field_id",
  1244. GetEditFieldContextParams::has_field_id,
  1245. GetEditFieldContextParams::get_field_id,
  1246. ));
  1247. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::meta::FieldType>>(
  1248. "field_type",
  1249. |m: &GetEditFieldContextParams| { &m.field_type },
  1250. |m: &mut GetEditFieldContextParams| { &mut m.field_type },
  1251. ));
  1252. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GetEditFieldContextParams>(
  1253. "GetEditFieldContextParams",
  1254. fields,
  1255. file_descriptor_proto()
  1256. )
  1257. })
  1258. }
  1259. fn default_instance() -> &'static GetEditFieldContextParams {
  1260. static instance: ::protobuf::rt::LazyV2<GetEditFieldContextParams> = ::protobuf::rt::LazyV2::INIT;
  1261. instance.get(GetEditFieldContextParams::new)
  1262. }
  1263. }
  1264. impl ::protobuf::Clear for GetEditFieldContextParams {
  1265. fn clear(&mut self) {
  1266. self.grid_id.clear();
  1267. self.one_of_field_id = ::std::option::Option::None;
  1268. self.field_type = super::meta::FieldType::RichText;
  1269. self.unknown_fields.clear();
  1270. }
  1271. }
  1272. impl ::std::fmt::Debug for GetEditFieldContextParams {
  1273. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1274. ::protobuf::text_format::fmt(self, f)
  1275. }
  1276. }
  1277. impl ::protobuf::reflect::ProtobufValue for GetEditFieldContextParams {
  1278. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1279. ::protobuf::reflect::ReflectValueRef::Message(self)
  1280. }
  1281. }
  1282. #[derive(PartialEq,Clone,Default)]
  1283. pub struct EditFieldContext {
  1284. // message fields
  1285. pub grid_id: ::std::string::String,
  1286. pub grid_field: ::protobuf::SingularPtrField<Field>,
  1287. pub type_option_data: ::std::vec::Vec<u8>,
  1288. // special fields
  1289. pub unknown_fields: ::protobuf::UnknownFields,
  1290. pub cached_size: ::protobuf::CachedSize,
  1291. }
  1292. impl<'a> ::std::default::Default for &'a EditFieldContext {
  1293. fn default() -> &'a EditFieldContext {
  1294. <EditFieldContext as ::protobuf::Message>::default_instance()
  1295. }
  1296. }
  1297. impl EditFieldContext {
  1298. pub fn new() -> EditFieldContext {
  1299. ::std::default::Default::default()
  1300. }
  1301. // string grid_id = 1;
  1302. pub fn get_grid_id(&self) -> &str {
  1303. &self.grid_id
  1304. }
  1305. pub fn clear_grid_id(&mut self) {
  1306. self.grid_id.clear();
  1307. }
  1308. // Param is passed by value, moved
  1309. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1310. self.grid_id = v;
  1311. }
  1312. // Mutable pointer to the field.
  1313. // If field is not initialized, it is initialized with default value first.
  1314. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1315. &mut self.grid_id
  1316. }
  1317. // Take field
  1318. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1319. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1320. }
  1321. // .Field grid_field = 2;
  1322. pub fn get_grid_field(&self) -> &Field {
  1323. self.grid_field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
  1324. }
  1325. pub fn clear_grid_field(&mut self) {
  1326. self.grid_field.clear();
  1327. }
  1328. pub fn has_grid_field(&self) -> bool {
  1329. self.grid_field.is_some()
  1330. }
  1331. // Param is passed by value, moved
  1332. pub fn set_grid_field(&mut self, v: Field) {
  1333. self.grid_field = ::protobuf::SingularPtrField::some(v);
  1334. }
  1335. // Mutable pointer to the field.
  1336. // If field is not initialized, it is initialized with default value first.
  1337. pub fn mut_grid_field(&mut self) -> &mut Field {
  1338. if self.grid_field.is_none() {
  1339. self.grid_field.set_default();
  1340. }
  1341. self.grid_field.as_mut().unwrap()
  1342. }
  1343. // Take field
  1344. pub fn take_grid_field(&mut self) -> Field {
  1345. self.grid_field.take().unwrap_or_else(|| Field::new())
  1346. }
  1347. // bytes type_option_data = 3;
  1348. pub fn get_type_option_data(&self) -> &[u8] {
  1349. &self.type_option_data
  1350. }
  1351. pub fn clear_type_option_data(&mut self) {
  1352. self.type_option_data.clear();
  1353. }
  1354. // Param is passed by value, moved
  1355. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  1356. self.type_option_data = v;
  1357. }
  1358. // Mutable pointer to the field.
  1359. // If field is not initialized, it is initialized with default value first.
  1360. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  1361. &mut self.type_option_data
  1362. }
  1363. // Take field
  1364. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  1365. ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
  1366. }
  1367. }
  1368. impl ::protobuf::Message for EditFieldContext {
  1369. fn is_initialized(&self) -> bool {
  1370. for v in &self.grid_field {
  1371. if !v.is_initialized() {
  1372. return false;
  1373. }
  1374. };
  1375. true
  1376. }
  1377. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1378. while !is.eof()? {
  1379. let (field_number, wire_type) = is.read_tag_unpack()?;
  1380. match field_number {
  1381. 1 => {
  1382. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1383. },
  1384. 2 => {
  1385. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grid_field)?;
  1386. },
  1387. 3 => {
  1388. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
  1389. },
  1390. _ => {
  1391. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1392. },
  1393. };
  1394. }
  1395. ::std::result::Result::Ok(())
  1396. }
  1397. // Compute sizes of nested messages
  1398. #[allow(unused_variables)]
  1399. fn compute_size(&self) -> u32 {
  1400. let mut my_size = 0;
  1401. if !self.grid_id.is_empty() {
  1402. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1403. }
  1404. if let Some(ref v) = self.grid_field.as_ref() {
  1405. let len = v.compute_size();
  1406. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1407. }
  1408. if !self.type_option_data.is_empty() {
  1409. my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
  1410. }
  1411. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1412. self.cached_size.set(my_size);
  1413. my_size
  1414. }
  1415. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1416. if !self.grid_id.is_empty() {
  1417. os.write_string(1, &self.grid_id)?;
  1418. }
  1419. if let Some(ref v) = self.grid_field.as_ref() {
  1420. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1421. os.write_raw_varint32(v.get_cached_size())?;
  1422. v.write_to_with_cached_sizes(os)?;
  1423. }
  1424. if !self.type_option_data.is_empty() {
  1425. os.write_bytes(3, &self.type_option_data)?;
  1426. }
  1427. os.write_unknown_fields(self.get_unknown_fields())?;
  1428. ::std::result::Result::Ok(())
  1429. }
  1430. fn get_cached_size(&self) -> u32 {
  1431. self.cached_size.get()
  1432. }
  1433. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1434. &self.unknown_fields
  1435. }
  1436. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1437. &mut self.unknown_fields
  1438. }
  1439. fn as_any(&self) -> &dyn (::std::any::Any) {
  1440. self as &dyn (::std::any::Any)
  1441. }
  1442. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1443. self as &mut dyn (::std::any::Any)
  1444. }
  1445. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1446. self
  1447. }
  1448. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1449. Self::descriptor_static()
  1450. }
  1451. fn new() -> EditFieldContext {
  1452. EditFieldContext::new()
  1453. }
  1454. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1455. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1456. descriptor.get(|| {
  1457. let mut fields = ::std::vec::Vec::new();
  1458. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1459. "grid_id",
  1460. |m: &EditFieldContext| { &m.grid_id },
  1461. |m: &mut EditFieldContext| { &mut m.grid_id },
  1462. ));
  1463. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  1464. "grid_field",
  1465. |m: &EditFieldContext| { &m.grid_field },
  1466. |m: &mut EditFieldContext| { &mut m.grid_field },
  1467. ));
  1468. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1469. "type_option_data",
  1470. |m: &EditFieldContext| { &m.type_option_data },
  1471. |m: &mut EditFieldContext| { &mut m.type_option_data },
  1472. ));
  1473. ::protobuf::reflect::MessageDescriptor::new_pb_name::<EditFieldContext>(
  1474. "EditFieldContext",
  1475. fields,
  1476. file_descriptor_proto()
  1477. )
  1478. })
  1479. }
  1480. fn default_instance() -> &'static EditFieldContext {
  1481. static instance: ::protobuf::rt::LazyV2<EditFieldContext> = ::protobuf::rt::LazyV2::INIT;
  1482. instance.get(EditFieldContext::new)
  1483. }
  1484. }
  1485. impl ::protobuf::Clear for EditFieldContext {
  1486. fn clear(&mut self) {
  1487. self.grid_id.clear();
  1488. self.grid_field.clear();
  1489. self.type_option_data.clear();
  1490. self.unknown_fields.clear();
  1491. }
  1492. }
  1493. impl ::std::fmt::Debug for EditFieldContext {
  1494. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1495. ::protobuf::text_format::fmt(self, f)
  1496. }
  1497. }
  1498. impl ::protobuf::reflect::ProtobufValue for EditFieldContext {
  1499. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1500. ::protobuf::reflect::ReflectValueRef::Message(self)
  1501. }
  1502. }
  1503. #[derive(PartialEq,Clone,Default)]
  1504. pub struct RepeatedField {
  1505. // message fields
  1506. pub items: ::protobuf::RepeatedField<Field>,
  1507. // special fields
  1508. pub unknown_fields: ::protobuf::UnknownFields,
  1509. pub cached_size: ::protobuf::CachedSize,
  1510. }
  1511. impl<'a> ::std::default::Default for &'a RepeatedField {
  1512. fn default() -> &'a RepeatedField {
  1513. <RepeatedField as ::protobuf::Message>::default_instance()
  1514. }
  1515. }
  1516. impl RepeatedField {
  1517. pub fn new() -> RepeatedField {
  1518. ::std::default::Default::default()
  1519. }
  1520. // repeated .Field items = 1;
  1521. pub fn get_items(&self) -> &[Field] {
  1522. &self.items
  1523. }
  1524. pub fn clear_items(&mut self) {
  1525. self.items.clear();
  1526. }
  1527. // Param is passed by value, moved
  1528. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Field>) {
  1529. self.items = v;
  1530. }
  1531. // Mutable pointer to the field.
  1532. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Field> {
  1533. &mut self.items
  1534. }
  1535. // Take field
  1536. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Field> {
  1537. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  1538. }
  1539. }
  1540. impl ::protobuf::Message for RepeatedField {
  1541. fn is_initialized(&self) -> bool {
  1542. for v in &self.items {
  1543. if !v.is_initialized() {
  1544. return false;
  1545. }
  1546. };
  1547. true
  1548. }
  1549. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1550. while !is.eof()? {
  1551. let (field_number, wire_type) = is.read_tag_unpack()?;
  1552. match field_number {
  1553. 1 => {
  1554. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  1555. },
  1556. _ => {
  1557. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1558. },
  1559. };
  1560. }
  1561. ::std::result::Result::Ok(())
  1562. }
  1563. // Compute sizes of nested messages
  1564. #[allow(unused_variables)]
  1565. fn compute_size(&self) -> u32 {
  1566. let mut my_size = 0;
  1567. for value in &self.items {
  1568. let len = value.compute_size();
  1569. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1570. };
  1571. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1572. self.cached_size.set(my_size);
  1573. my_size
  1574. }
  1575. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1576. for v in &self.items {
  1577. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1578. os.write_raw_varint32(v.get_cached_size())?;
  1579. v.write_to_with_cached_sizes(os)?;
  1580. };
  1581. os.write_unknown_fields(self.get_unknown_fields())?;
  1582. ::std::result::Result::Ok(())
  1583. }
  1584. fn get_cached_size(&self) -> u32 {
  1585. self.cached_size.get()
  1586. }
  1587. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1588. &self.unknown_fields
  1589. }
  1590. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1591. &mut self.unknown_fields
  1592. }
  1593. fn as_any(&self) -> &dyn (::std::any::Any) {
  1594. self as &dyn (::std::any::Any)
  1595. }
  1596. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1597. self as &mut dyn (::std::any::Any)
  1598. }
  1599. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1600. self
  1601. }
  1602. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1603. Self::descriptor_static()
  1604. }
  1605. fn new() -> RepeatedField {
  1606. RepeatedField::new()
  1607. }
  1608. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1609. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1610. descriptor.get(|| {
  1611. let mut fields = ::std::vec::Vec::new();
  1612. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  1613. "items",
  1614. |m: &RepeatedField| { &m.items },
  1615. |m: &mut RepeatedField| { &mut m.items },
  1616. ));
  1617. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedField>(
  1618. "RepeatedField",
  1619. fields,
  1620. file_descriptor_proto()
  1621. )
  1622. })
  1623. }
  1624. fn default_instance() -> &'static RepeatedField {
  1625. static instance: ::protobuf::rt::LazyV2<RepeatedField> = ::protobuf::rt::LazyV2::INIT;
  1626. instance.get(RepeatedField::new)
  1627. }
  1628. }
  1629. impl ::protobuf::Clear for RepeatedField {
  1630. fn clear(&mut self) {
  1631. self.items.clear();
  1632. self.unknown_fields.clear();
  1633. }
  1634. }
  1635. impl ::std::fmt::Debug for RepeatedField {
  1636. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1637. ::protobuf::text_format::fmt(self, f)
  1638. }
  1639. }
  1640. impl ::protobuf::reflect::ProtobufValue for RepeatedField {
  1641. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1642. ::protobuf::reflect::ReflectValueRef::Message(self)
  1643. }
  1644. }
  1645. #[derive(PartialEq,Clone,Default)]
  1646. pub struct RepeatedFieldOrder {
  1647. // message fields
  1648. pub items: ::protobuf::RepeatedField<FieldOrder>,
  1649. // special fields
  1650. pub unknown_fields: ::protobuf::UnknownFields,
  1651. pub cached_size: ::protobuf::CachedSize,
  1652. }
  1653. impl<'a> ::std::default::Default for &'a RepeatedFieldOrder {
  1654. fn default() -> &'a RepeatedFieldOrder {
  1655. <RepeatedFieldOrder as ::protobuf::Message>::default_instance()
  1656. }
  1657. }
  1658. impl RepeatedFieldOrder {
  1659. pub fn new() -> RepeatedFieldOrder {
  1660. ::std::default::Default::default()
  1661. }
  1662. // repeated .FieldOrder items = 1;
  1663. pub fn get_items(&self) -> &[FieldOrder] {
  1664. &self.items
  1665. }
  1666. pub fn clear_items(&mut self) {
  1667. self.items.clear();
  1668. }
  1669. // Param is passed by value, moved
  1670. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
  1671. self.items = v;
  1672. }
  1673. // Mutable pointer to the field.
  1674. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
  1675. &mut self.items
  1676. }
  1677. // Take field
  1678. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
  1679. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  1680. }
  1681. }
  1682. impl ::protobuf::Message for RepeatedFieldOrder {
  1683. fn is_initialized(&self) -> bool {
  1684. for v in &self.items {
  1685. if !v.is_initialized() {
  1686. return false;
  1687. }
  1688. };
  1689. true
  1690. }
  1691. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1692. while !is.eof()? {
  1693. let (field_number, wire_type) = is.read_tag_unpack()?;
  1694. match field_number {
  1695. 1 => {
  1696. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  1697. },
  1698. _ => {
  1699. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1700. },
  1701. };
  1702. }
  1703. ::std::result::Result::Ok(())
  1704. }
  1705. // Compute sizes of nested messages
  1706. #[allow(unused_variables)]
  1707. fn compute_size(&self) -> u32 {
  1708. let mut my_size = 0;
  1709. for value in &self.items {
  1710. let len = value.compute_size();
  1711. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1712. };
  1713. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1714. self.cached_size.set(my_size);
  1715. my_size
  1716. }
  1717. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1718. for v in &self.items {
  1719. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1720. os.write_raw_varint32(v.get_cached_size())?;
  1721. v.write_to_with_cached_sizes(os)?;
  1722. };
  1723. os.write_unknown_fields(self.get_unknown_fields())?;
  1724. ::std::result::Result::Ok(())
  1725. }
  1726. fn get_cached_size(&self) -> u32 {
  1727. self.cached_size.get()
  1728. }
  1729. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1730. &self.unknown_fields
  1731. }
  1732. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1733. &mut self.unknown_fields
  1734. }
  1735. fn as_any(&self) -> &dyn (::std::any::Any) {
  1736. self as &dyn (::std::any::Any)
  1737. }
  1738. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1739. self as &mut dyn (::std::any::Any)
  1740. }
  1741. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1742. self
  1743. }
  1744. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1745. Self::descriptor_static()
  1746. }
  1747. fn new() -> RepeatedFieldOrder {
  1748. RepeatedFieldOrder::new()
  1749. }
  1750. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1751. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1752. descriptor.get(|| {
  1753. let mut fields = ::std::vec::Vec::new();
  1754. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
  1755. "items",
  1756. |m: &RepeatedFieldOrder| { &m.items },
  1757. |m: &mut RepeatedFieldOrder| { &mut m.items },
  1758. ));
  1759. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedFieldOrder>(
  1760. "RepeatedFieldOrder",
  1761. fields,
  1762. file_descriptor_proto()
  1763. )
  1764. })
  1765. }
  1766. fn default_instance() -> &'static RepeatedFieldOrder {
  1767. static instance: ::protobuf::rt::LazyV2<RepeatedFieldOrder> = ::protobuf::rt::LazyV2::INIT;
  1768. instance.get(RepeatedFieldOrder::new)
  1769. }
  1770. }
  1771. impl ::protobuf::Clear for RepeatedFieldOrder {
  1772. fn clear(&mut self) {
  1773. self.items.clear();
  1774. self.unknown_fields.clear();
  1775. }
  1776. }
  1777. impl ::std::fmt::Debug for RepeatedFieldOrder {
  1778. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1779. ::protobuf::text_format::fmt(self, f)
  1780. }
  1781. }
  1782. impl ::protobuf::reflect::ProtobufValue for RepeatedFieldOrder {
  1783. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1784. ::protobuf::reflect::ReflectValueRef::Message(self)
  1785. }
  1786. }
  1787. #[derive(PartialEq,Clone,Default)]
  1788. pub struct RowOrder {
  1789. // message fields
  1790. pub row_id: ::std::string::String,
  1791. pub block_id: ::std::string::String,
  1792. pub height: i32,
  1793. // special fields
  1794. pub unknown_fields: ::protobuf::UnknownFields,
  1795. pub cached_size: ::protobuf::CachedSize,
  1796. }
  1797. impl<'a> ::std::default::Default for &'a RowOrder {
  1798. fn default() -> &'a RowOrder {
  1799. <RowOrder as ::protobuf::Message>::default_instance()
  1800. }
  1801. }
  1802. impl RowOrder {
  1803. pub fn new() -> RowOrder {
  1804. ::std::default::Default::default()
  1805. }
  1806. // string row_id = 1;
  1807. pub fn get_row_id(&self) -> &str {
  1808. &self.row_id
  1809. }
  1810. pub fn clear_row_id(&mut self) {
  1811. self.row_id.clear();
  1812. }
  1813. // Param is passed by value, moved
  1814. pub fn set_row_id(&mut self, v: ::std::string::String) {
  1815. self.row_id = v;
  1816. }
  1817. // Mutable pointer to the field.
  1818. // If field is not initialized, it is initialized with default value first.
  1819. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  1820. &mut self.row_id
  1821. }
  1822. // Take field
  1823. pub fn take_row_id(&mut self) -> ::std::string::String {
  1824. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  1825. }
  1826. // string block_id = 2;
  1827. pub fn get_block_id(&self) -> &str {
  1828. &self.block_id
  1829. }
  1830. pub fn clear_block_id(&mut self) {
  1831. self.block_id.clear();
  1832. }
  1833. // Param is passed by value, moved
  1834. pub fn set_block_id(&mut self, v: ::std::string::String) {
  1835. self.block_id = v;
  1836. }
  1837. // Mutable pointer to the field.
  1838. // If field is not initialized, it is initialized with default value first.
  1839. pub fn mut_block_id(&mut self) -> &mut ::std::string::String {
  1840. &mut self.block_id
  1841. }
  1842. // Take field
  1843. pub fn take_block_id(&mut self) -> ::std::string::String {
  1844. ::std::mem::replace(&mut self.block_id, ::std::string::String::new())
  1845. }
  1846. // int32 height = 3;
  1847. pub fn get_height(&self) -> i32 {
  1848. self.height
  1849. }
  1850. pub fn clear_height(&mut self) {
  1851. self.height = 0;
  1852. }
  1853. // Param is passed by value, moved
  1854. pub fn set_height(&mut self, v: i32) {
  1855. self.height = v;
  1856. }
  1857. }
  1858. impl ::protobuf::Message for RowOrder {
  1859. fn is_initialized(&self) -> bool {
  1860. true
  1861. }
  1862. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1863. while !is.eof()? {
  1864. let (field_number, wire_type) = is.read_tag_unpack()?;
  1865. match field_number {
  1866. 1 => {
  1867. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  1868. },
  1869. 2 => {
  1870. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
  1871. },
  1872. 3 => {
  1873. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1874. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1875. }
  1876. let tmp = is.read_int32()?;
  1877. self.height = tmp;
  1878. },
  1879. _ => {
  1880. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1881. },
  1882. };
  1883. }
  1884. ::std::result::Result::Ok(())
  1885. }
  1886. // Compute sizes of nested messages
  1887. #[allow(unused_variables)]
  1888. fn compute_size(&self) -> u32 {
  1889. let mut my_size = 0;
  1890. if !self.row_id.is_empty() {
  1891. my_size += ::protobuf::rt::string_size(1, &self.row_id);
  1892. }
  1893. if !self.block_id.is_empty() {
  1894. my_size += ::protobuf::rt::string_size(2, &self.block_id);
  1895. }
  1896. if self.height != 0 {
  1897. my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
  1898. }
  1899. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1900. self.cached_size.set(my_size);
  1901. my_size
  1902. }
  1903. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1904. if !self.row_id.is_empty() {
  1905. os.write_string(1, &self.row_id)?;
  1906. }
  1907. if !self.block_id.is_empty() {
  1908. os.write_string(2, &self.block_id)?;
  1909. }
  1910. if self.height != 0 {
  1911. os.write_int32(3, self.height)?;
  1912. }
  1913. os.write_unknown_fields(self.get_unknown_fields())?;
  1914. ::std::result::Result::Ok(())
  1915. }
  1916. fn get_cached_size(&self) -> u32 {
  1917. self.cached_size.get()
  1918. }
  1919. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1920. &self.unknown_fields
  1921. }
  1922. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1923. &mut self.unknown_fields
  1924. }
  1925. fn as_any(&self) -> &dyn (::std::any::Any) {
  1926. self as &dyn (::std::any::Any)
  1927. }
  1928. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1929. self as &mut dyn (::std::any::Any)
  1930. }
  1931. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1932. self
  1933. }
  1934. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1935. Self::descriptor_static()
  1936. }
  1937. fn new() -> RowOrder {
  1938. RowOrder::new()
  1939. }
  1940. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1941. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1942. descriptor.get(|| {
  1943. let mut fields = ::std::vec::Vec::new();
  1944. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1945. "row_id",
  1946. |m: &RowOrder| { &m.row_id },
  1947. |m: &mut RowOrder| { &mut m.row_id },
  1948. ));
  1949. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1950. "block_id",
  1951. |m: &RowOrder| { &m.block_id },
  1952. |m: &mut RowOrder| { &mut m.block_id },
  1953. ));
  1954. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  1955. "height",
  1956. |m: &RowOrder| { &m.height },
  1957. |m: &mut RowOrder| { &mut m.height },
  1958. ));
  1959. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RowOrder>(
  1960. "RowOrder",
  1961. fields,
  1962. file_descriptor_proto()
  1963. )
  1964. })
  1965. }
  1966. fn default_instance() -> &'static RowOrder {
  1967. static instance: ::protobuf::rt::LazyV2<RowOrder> = ::protobuf::rt::LazyV2::INIT;
  1968. instance.get(RowOrder::new)
  1969. }
  1970. }
  1971. impl ::protobuf::Clear for RowOrder {
  1972. fn clear(&mut self) {
  1973. self.row_id.clear();
  1974. self.block_id.clear();
  1975. self.height = 0;
  1976. self.unknown_fields.clear();
  1977. }
  1978. }
  1979. impl ::std::fmt::Debug for RowOrder {
  1980. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1981. ::protobuf::text_format::fmt(self, f)
  1982. }
  1983. }
  1984. impl ::protobuf::reflect::ProtobufValue for RowOrder {
  1985. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1986. ::protobuf::reflect::ReflectValueRef::Message(self)
  1987. }
  1988. }
  1989. #[derive(PartialEq,Clone,Default)]
  1990. pub struct Row {
  1991. // message fields
  1992. pub id: ::std::string::String,
  1993. pub cell_by_field_id: ::std::collections::HashMap<::std::string::String, Cell>,
  1994. pub height: i32,
  1995. // special fields
  1996. pub unknown_fields: ::protobuf::UnknownFields,
  1997. pub cached_size: ::protobuf::CachedSize,
  1998. }
  1999. impl<'a> ::std::default::Default for &'a Row {
  2000. fn default() -> &'a Row {
  2001. <Row as ::protobuf::Message>::default_instance()
  2002. }
  2003. }
  2004. impl Row {
  2005. pub fn new() -> Row {
  2006. ::std::default::Default::default()
  2007. }
  2008. // string id = 1;
  2009. pub fn get_id(&self) -> &str {
  2010. &self.id
  2011. }
  2012. pub fn clear_id(&mut self) {
  2013. self.id.clear();
  2014. }
  2015. // Param is passed by value, moved
  2016. pub fn set_id(&mut self, v: ::std::string::String) {
  2017. self.id = v;
  2018. }
  2019. // Mutable pointer to the field.
  2020. // If field is not initialized, it is initialized with default value first.
  2021. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  2022. &mut self.id
  2023. }
  2024. // Take field
  2025. pub fn take_id(&mut self) -> ::std::string::String {
  2026. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  2027. }
  2028. // repeated .Row.CellByFieldIdEntry cell_by_field_id = 2;
  2029. pub fn get_cell_by_field_id(&self) -> &::std::collections::HashMap<::std::string::String, Cell> {
  2030. &self.cell_by_field_id
  2031. }
  2032. pub fn clear_cell_by_field_id(&mut self) {
  2033. self.cell_by_field_id.clear();
  2034. }
  2035. // Param is passed by value, moved
  2036. pub fn set_cell_by_field_id(&mut self, v: ::std::collections::HashMap<::std::string::String, Cell>) {
  2037. self.cell_by_field_id = v;
  2038. }
  2039. // Mutable pointer to the field.
  2040. pub fn mut_cell_by_field_id(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, Cell> {
  2041. &mut self.cell_by_field_id
  2042. }
  2043. // Take field
  2044. pub fn take_cell_by_field_id(&mut self) -> ::std::collections::HashMap<::std::string::String, Cell> {
  2045. ::std::mem::replace(&mut self.cell_by_field_id, ::std::collections::HashMap::new())
  2046. }
  2047. // int32 height = 3;
  2048. pub fn get_height(&self) -> i32 {
  2049. self.height
  2050. }
  2051. pub fn clear_height(&mut self) {
  2052. self.height = 0;
  2053. }
  2054. // Param is passed by value, moved
  2055. pub fn set_height(&mut self, v: i32) {
  2056. self.height = v;
  2057. }
  2058. }
  2059. impl ::protobuf::Message for Row {
  2060. fn is_initialized(&self) -> bool {
  2061. true
  2062. }
  2063. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2064. while !is.eof()? {
  2065. let (field_number, wire_type) = is.read_tag_unpack()?;
  2066. match field_number {
  2067. 1 => {
  2068. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  2069. },
  2070. 2 => {
  2071. ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(wire_type, is, &mut self.cell_by_field_id)?;
  2072. },
  2073. 3 => {
  2074. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2075. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2076. }
  2077. let tmp = is.read_int32()?;
  2078. self.height = tmp;
  2079. },
  2080. _ => {
  2081. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2082. },
  2083. };
  2084. }
  2085. ::std::result::Result::Ok(())
  2086. }
  2087. // Compute sizes of nested messages
  2088. #[allow(unused_variables)]
  2089. fn compute_size(&self) -> u32 {
  2090. let mut my_size = 0;
  2091. if !self.id.is_empty() {
  2092. my_size += ::protobuf::rt::string_size(1, &self.id);
  2093. }
  2094. my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(2, &self.cell_by_field_id);
  2095. if self.height != 0 {
  2096. my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
  2097. }
  2098. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2099. self.cached_size.set(my_size);
  2100. my_size
  2101. }
  2102. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2103. if !self.id.is_empty() {
  2104. os.write_string(1, &self.id)?;
  2105. }
  2106. ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(2, &self.cell_by_field_id, os)?;
  2107. if self.height != 0 {
  2108. os.write_int32(3, self.height)?;
  2109. }
  2110. os.write_unknown_fields(self.get_unknown_fields())?;
  2111. ::std::result::Result::Ok(())
  2112. }
  2113. fn get_cached_size(&self) -> u32 {
  2114. self.cached_size.get()
  2115. }
  2116. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2117. &self.unknown_fields
  2118. }
  2119. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2120. &mut self.unknown_fields
  2121. }
  2122. fn as_any(&self) -> &dyn (::std::any::Any) {
  2123. self as &dyn (::std::any::Any)
  2124. }
  2125. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2126. self as &mut dyn (::std::any::Any)
  2127. }
  2128. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2129. self
  2130. }
  2131. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2132. Self::descriptor_static()
  2133. }
  2134. fn new() -> Row {
  2135. Row::new()
  2136. }
  2137. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2138. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2139. descriptor.get(|| {
  2140. let mut fields = ::std::vec::Vec::new();
  2141. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2142. "id",
  2143. |m: &Row| { &m.id },
  2144. |m: &mut Row| { &mut m.id },
  2145. ));
  2146. fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(
  2147. "cell_by_field_id",
  2148. |m: &Row| { &m.cell_by_field_id },
  2149. |m: &mut Row| { &mut m.cell_by_field_id },
  2150. ));
  2151. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  2152. "height",
  2153. |m: &Row| { &m.height },
  2154. |m: &mut Row| { &mut m.height },
  2155. ));
  2156. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Row>(
  2157. "Row",
  2158. fields,
  2159. file_descriptor_proto()
  2160. )
  2161. })
  2162. }
  2163. fn default_instance() -> &'static Row {
  2164. static instance: ::protobuf::rt::LazyV2<Row> = ::protobuf::rt::LazyV2::INIT;
  2165. instance.get(Row::new)
  2166. }
  2167. }
  2168. impl ::protobuf::Clear for Row {
  2169. fn clear(&mut self) {
  2170. self.id.clear();
  2171. self.cell_by_field_id.clear();
  2172. self.height = 0;
  2173. self.unknown_fields.clear();
  2174. }
  2175. }
  2176. impl ::std::fmt::Debug for Row {
  2177. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2178. ::protobuf::text_format::fmt(self, f)
  2179. }
  2180. }
  2181. impl ::protobuf::reflect::ProtobufValue for Row {
  2182. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2183. ::protobuf::reflect::ReflectValueRef::Message(self)
  2184. }
  2185. }
  2186. #[derive(PartialEq,Clone,Default)]
  2187. pub struct RepeatedRow {
  2188. // message fields
  2189. pub items: ::protobuf::RepeatedField<Row>,
  2190. // special fields
  2191. pub unknown_fields: ::protobuf::UnknownFields,
  2192. pub cached_size: ::protobuf::CachedSize,
  2193. }
  2194. impl<'a> ::std::default::Default for &'a RepeatedRow {
  2195. fn default() -> &'a RepeatedRow {
  2196. <RepeatedRow as ::protobuf::Message>::default_instance()
  2197. }
  2198. }
  2199. impl RepeatedRow {
  2200. pub fn new() -> RepeatedRow {
  2201. ::std::default::Default::default()
  2202. }
  2203. // repeated .Row items = 1;
  2204. pub fn get_items(&self) -> &[Row] {
  2205. &self.items
  2206. }
  2207. pub fn clear_items(&mut self) {
  2208. self.items.clear();
  2209. }
  2210. // Param is passed by value, moved
  2211. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Row>) {
  2212. self.items = v;
  2213. }
  2214. // Mutable pointer to the field.
  2215. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Row> {
  2216. &mut self.items
  2217. }
  2218. // Take field
  2219. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Row> {
  2220. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  2221. }
  2222. }
  2223. impl ::protobuf::Message for RepeatedRow {
  2224. fn is_initialized(&self) -> bool {
  2225. for v in &self.items {
  2226. if !v.is_initialized() {
  2227. return false;
  2228. }
  2229. };
  2230. true
  2231. }
  2232. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2233. while !is.eof()? {
  2234. let (field_number, wire_type) = is.read_tag_unpack()?;
  2235. match field_number {
  2236. 1 => {
  2237. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  2238. },
  2239. _ => {
  2240. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2241. },
  2242. };
  2243. }
  2244. ::std::result::Result::Ok(())
  2245. }
  2246. // Compute sizes of nested messages
  2247. #[allow(unused_variables)]
  2248. fn compute_size(&self) -> u32 {
  2249. let mut my_size = 0;
  2250. for value in &self.items {
  2251. let len = value.compute_size();
  2252. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2253. };
  2254. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2255. self.cached_size.set(my_size);
  2256. my_size
  2257. }
  2258. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2259. for v in &self.items {
  2260. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2261. os.write_raw_varint32(v.get_cached_size())?;
  2262. v.write_to_with_cached_sizes(os)?;
  2263. };
  2264. os.write_unknown_fields(self.get_unknown_fields())?;
  2265. ::std::result::Result::Ok(())
  2266. }
  2267. fn get_cached_size(&self) -> u32 {
  2268. self.cached_size.get()
  2269. }
  2270. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2271. &self.unknown_fields
  2272. }
  2273. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2274. &mut self.unknown_fields
  2275. }
  2276. fn as_any(&self) -> &dyn (::std::any::Any) {
  2277. self as &dyn (::std::any::Any)
  2278. }
  2279. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2280. self as &mut dyn (::std::any::Any)
  2281. }
  2282. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2283. self
  2284. }
  2285. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2286. Self::descriptor_static()
  2287. }
  2288. fn new() -> RepeatedRow {
  2289. RepeatedRow::new()
  2290. }
  2291. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2292. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2293. descriptor.get(|| {
  2294. let mut fields = ::std::vec::Vec::new();
  2295. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Row>>(
  2296. "items",
  2297. |m: &RepeatedRow| { &m.items },
  2298. |m: &mut RepeatedRow| { &mut m.items },
  2299. ));
  2300. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedRow>(
  2301. "RepeatedRow",
  2302. fields,
  2303. file_descriptor_proto()
  2304. )
  2305. })
  2306. }
  2307. fn default_instance() -> &'static RepeatedRow {
  2308. static instance: ::protobuf::rt::LazyV2<RepeatedRow> = ::protobuf::rt::LazyV2::INIT;
  2309. instance.get(RepeatedRow::new)
  2310. }
  2311. }
  2312. impl ::protobuf::Clear for RepeatedRow {
  2313. fn clear(&mut self) {
  2314. self.items.clear();
  2315. self.unknown_fields.clear();
  2316. }
  2317. }
  2318. impl ::std::fmt::Debug for RepeatedRow {
  2319. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2320. ::protobuf::text_format::fmt(self, f)
  2321. }
  2322. }
  2323. impl ::protobuf::reflect::ProtobufValue for RepeatedRow {
  2324. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2325. ::protobuf::reflect::ReflectValueRef::Message(self)
  2326. }
  2327. }
  2328. #[derive(PartialEq,Clone,Default)]
  2329. pub struct RepeatedGridBlock {
  2330. // message fields
  2331. pub items: ::protobuf::RepeatedField<GridBlock>,
  2332. // special fields
  2333. pub unknown_fields: ::protobuf::UnknownFields,
  2334. pub cached_size: ::protobuf::CachedSize,
  2335. }
  2336. impl<'a> ::std::default::Default for &'a RepeatedGridBlock {
  2337. fn default() -> &'a RepeatedGridBlock {
  2338. <RepeatedGridBlock as ::protobuf::Message>::default_instance()
  2339. }
  2340. }
  2341. impl RepeatedGridBlock {
  2342. pub fn new() -> RepeatedGridBlock {
  2343. ::std::default::Default::default()
  2344. }
  2345. // repeated .GridBlock items = 1;
  2346. pub fn get_items(&self) -> &[GridBlock] {
  2347. &self.items
  2348. }
  2349. pub fn clear_items(&mut self) {
  2350. self.items.clear();
  2351. }
  2352. // Param is passed by value, moved
  2353. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<GridBlock>) {
  2354. self.items = v;
  2355. }
  2356. // Mutable pointer to the field.
  2357. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<GridBlock> {
  2358. &mut self.items
  2359. }
  2360. // Take field
  2361. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<GridBlock> {
  2362. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  2363. }
  2364. }
  2365. impl ::protobuf::Message for RepeatedGridBlock {
  2366. fn is_initialized(&self) -> bool {
  2367. for v in &self.items {
  2368. if !v.is_initialized() {
  2369. return false;
  2370. }
  2371. };
  2372. true
  2373. }
  2374. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2375. while !is.eof()? {
  2376. let (field_number, wire_type) = is.read_tag_unpack()?;
  2377. match field_number {
  2378. 1 => {
  2379. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  2380. },
  2381. _ => {
  2382. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2383. },
  2384. };
  2385. }
  2386. ::std::result::Result::Ok(())
  2387. }
  2388. // Compute sizes of nested messages
  2389. #[allow(unused_variables)]
  2390. fn compute_size(&self) -> u32 {
  2391. let mut my_size = 0;
  2392. for value in &self.items {
  2393. let len = value.compute_size();
  2394. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2395. };
  2396. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2397. self.cached_size.set(my_size);
  2398. my_size
  2399. }
  2400. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2401. for v in &self.items {
  2402. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2403. os.write_raw_varint32(v.get_cached_size())?;
  2404. v.write_to_with_cached_sizes(os)?;
  2405. };
  2406. os.write_unknown_fields(self.get_unknown_fields())?;
  2407. ::std::result::Result::Ok(())
  2408. }
  2409. fn get_cached_size(&self) -> u32 {
  2410. self.cached_size.get()
  2411. }
  2412. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2413. &self.unknown_fields
  2414. }
  2415. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2416. &mut self.unknown_fields
  2417. }
  2418. fn as_any(&self) -> &dyn (::std::any::Any) {
  2419. self as &dyn (::std::any::Any)
  2420. }
  2421. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2422. self as &mut dyn (::std::any::Any)
  2423. }
  2424. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2425. self
  2426. }
  2427. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2428. Self::descriptor_static()
  2429. }
  2430. fn new() -> RepeatedGridBlock {
  2431. RepeatedGridBlock::new()
  2432. }
  2433. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2434. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2435. descriptor.get(|| {
  2436. let mut fields = ::std::vec::Vec::new();
  2437. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlock>>(
  2438. "items",
  2439. |m: &RepeatedGridBlock| { &m.items },
  2440. |m: &mut RepeatedGridBlock| { &mut m.items },
  2441. ));
  2442. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedGridBlock>(
  2443. "RepeatedGridBlock",
  2444. fields,
  2445. file_descriptor_proto()
  2446. )
  2447. })
  2448. }
  2449. fn default_instance() -> &'static RepeatedGridBlock {
  2450. static instance: ::protobuf::rt::LazyV2<RepeatedGridBlock> = ::protobuf::rt::LazyV2::INIT;
  2451. instance.get(RepeatedGridBlock::new)
  2452. }
  2453. }
  2454. impl ::protobuf::Clear for RepeatedGridBlock {
  2455. fn clear(&mut self) {
  2456. self.items.clear();
  2457. self.unknown_fields.clear();
  2458. }
  2459. }
  2460. impl ::std::fmt::Debug for RepeatedGridBlock {
  2461. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2462. ::protobuf::text_format::fmt(self, f)
  2463. }
  2464. }
  2465. impl ::protobuf::reflect::ProtobufValue for RepeatedGridBlock {
  2466. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2467. ::protobuf::reflect::ReflectValueRef::Message(self)
  2468. }
  2469. }
  2470. #[derive(PartialEq,Clone,Default)]
  2471. pub struct GridBlockOrder {
  2472. // message fields
  2473. pub block_id: ::std::string::String,
  2474. // special fields
  2475. pub unknown_fields: ::protobuf::UnknownFields,
  2476. pub cached_size: ::protobuf::CachedSize,
  2477. }
  2478. impl<'a> ::std::default::Default for &'a GridBlockOrder {
  2479. fn default() -> &'a GridBlockOrder {
  2480. <GridBlockOrder as ::protobuf::Message>::default_instance()
  2481. }
  2482. }
  2483. impl GridBlockOrder {
  2484. pub fn new() -> GridBlockOrder {
  2485. ::std::default::Default::default()
  2486. }
  2487. // string block_id = 1;
  2488. pub fn get_block_id(&self) -> &str {
  2489. &self.block_id
  2490. }
  2491. pub fn clear_block_id(&mut self) {
  2492. self.block_id.clear();
  2493. }
  2494. // Param is passed by value, moved
  2495. pub fn set_block_id(&mut self, v: ::std::string::String) {
  2496. self.block_id = v;
  2497. }
  2498. // Mutable pointer to the field.
  2499. // If field is not initialized, it is initialized with default value first.
  2500. pub fn mut_block_id(&mut self) -> &mut ::std::string::String {
  2501. &mut self.block_id
  2502. }
  2503. // Take field
  2504. pub fn take_block_id(&mut self) -> ::std::string::String {
  2505. ::std::mem::replace(&mut self.block_id, ::std::string::String::new())
  2506. }
  2507. }
  2508. impl ::protobuf::Message for GridBlockOrder {
  2509. fn is_initialized(&self) -> bool {
  2510. true
  2511. }
  2512. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2513. while !is.eof()? {
  2514. let (field_number, wire_type) = is.read_tag_unpack()?;
  2515. match field_number {
  2516. 1 => {
  2517. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
  2518. },
  2519. _ => {
  2520. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2521. },
  2522. };
  2523. }
  2524. ::std::result::Result::Ok(())
  2525. }
  2526. // Compute sizes of nested messages
  2527. #[allow(unused_variables)]
  2528. fn compute_size(&self) -> u32 {
  2529. let mut my_size = 0;
  2530. if !self.block_id.is_empty() {
  2531. my_size += ::protobuf::rt::string_size(1, &self.block_id);
  2532. }
  2533. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2534. self.cached_size.set(my_size);
  2535. my_size
  2536. }
  2537. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2538. if !self.block_id.is_empty() {
  2539. os.write_string(1, &self.block_id)?;
  2540. }
  2541. os.write_unknown_fields(self.get_unknown_fields())?;
  2542. ::std::result::Result::Ok(())
  2543. }
  2544. fn get_cached_size(&self) -> u32 {
  2545. self.cached_size.get()
  2546. }
  2547. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2548. &self.unknown_fields
  2549. }
  2550. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2551. &mut self.unknown_fields
  2552. }
  2553. fn as_any(&self) -> &dyn (::std::any::Any) {
  2554. self as &dyn (::std::any::Any)
  2555. }
  2556. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2557. self as &mut dyn (::std::any::Any)
  2558. }
  2559. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2560. self
  2561. }
  2562. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2563. Self::descriptor_static()
  2564. }
  2565. fn new() -> GridBlockOrder {
  2566. GridBlockOrder::new()
  2567. }
  2568. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2569. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2570. descriptor.get(|| {
  2571. let mut fields = ::std::vec::Vec::new();
  2572. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2573. "block_id",
  2574. |m: &GridBlockOrder| { &m.block_id },
  2575. |m: &mut GridBlockOrder| { &mut m.block_id },
  2576. ));
  2577. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlockOrder>(
  2578. "GridBlockOrder",
  2579. fields,
  2580. file_descriptor_proto()
  2581. )
  2582. })
  2583. }
  2584. fn default_instance() -> &'static GridBlockOrder {
  2585. static instance: ::protobuf::rt::LazyV2<GridBlockOrder> = ::protobuf::rt::LazyV2::INIT;
  2586. instance.get(GridBlockOrder::new)
  2587. }
  2588. }
  2589. impl ::protobuf::Clear for GridBlockOrder {
  2590. fn clear(&mut self) {
  2591. self.block_id.clear();
  2592. self.unknown_fields.clear();
  2593. }
  2594. }
  2595. impl ::std::fmt::Debug for GridBlockOrder {
  2596. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2597. ::protobuf::text_format::fmt(self, f)
  2598. }
  2599. }
  2600. impl ::protobuf::reflect::ProtobufValue for GridBlockOrder {
  2601. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2602. ::protobuf::reflect::ReflectValueRef::Message(self)
  2603. }
  2604. }
  2605. #[derive(PartialEq,Clone,Default)]
  2606. pub struct GridBlock {
  2607. // message fields
  2608. pub id: ::std::string::String,
  2609. pub row_orders: ::protobuf::RepeatedField<RowOrder>,
  2610. // special fields
  2611. pub unknown_fields: ::protobuf::UnknownFields,
  2612. pub cached_size: ::protobuf::CachedSize,
  2613. }
  2614. impl<'a> ::std::default::Default for &'a GridBlock {
  2615. fn default() -> &'a GridBlock {
  2616. <GridBlock as ::protobuf::Message>::default_instance()
  2617. }
  2618. }
  2619. impl GridBlock {
  2620. pub fn new() -> GridBlock {
  2621. ::std::default::Default::default()
  2622. }
  2623. // string id = 1;
  2624. pub fn get_id(&self) -> &str {
  2625. &self.id
  2626. }
  2627. pub fn clear_id(&mut self) {
  2628. self.id.clear();
  2629. }
  2630. // Param is passed by value, moved
  2631. pub fn set_id(&mut self, v: ::std::string::String) {
  2632. self.id = v;
  2633. }
  2634. // Mutable pointer to the field.
  2635. // If field is not initialized, it is initialized with default value first.
  2636. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  2637. &mut self.id
  2638. }
  2639. // Take field
  2640. pub fn take_id(&mut self) -> ::std::string::String {
  2641. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  2642. }
  2643. // repeated .RowOrder row_orders = 2;
  2644. pub fn get_row_orders(&self) -> &[RowOrder] {
  2645. &self.row_orders
  2646. }
  2647. pub fn clear_row_orders(&mut self) {
  2648. self.row_orders.clear();
  2649. }
  2650. // Param is passed by value, moved
  2651. pub fn set_row_orders(&mut self, v: ::protobuf::RepeatedField<RowOrder>) {
  2652. self.row_orders = v;
  2653. }
  2654. // Mutable pointer to the field.
  2655. pub fn mut_row_orders(&mut self) -> &mut ::protobuf::RepeatedField<RowOrder> {
  2656. &mut self.row_orders
  2657. }
  2658. // Take field
  2659. pub fn take_row_orders(&mut self) -> ::protobuf::RepeatedField<RowOrder> {
  2660. ::std::mem::replace(&mut self.row_orders, ::protobuf::RepeatedField::new())
  2661. }
  2662. }
  2663. impl ::protobuf::Message for GridBlock {
  2664. fn is_initialized(&self) -> bool {
  2665. for v in &self.row_orders {
  2666. if !v.is_initialized() {
  2667. return false;
  2668. }
  2669. };
  2670. true
  2671. }
  2672. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2673. while !is.eof()? {
  2674. let (field_number, wire_type) = is.read_tag_unpack()?;
  2675. match field_number {
  2676. 1 => {
  2677. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  2678. },
  2679. 2 => {
  2680. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.row_orders)?;
  2681. },
  2682. _ => {
  2683. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2684. },
  2685. };
  2686. }
  2687. ::std::result::Result::Ok(())
  2688. }
  2689. // Compute sizes of nested messages
  2690. #[allow(unused_variables)]
  2691. fn compute_size(&self) -> u32 {
  2692. let mut my_size = 0;
  2693. if !self.id.is_empty() {
  2694. my_size += ::protobuf::rt::string_size(1, &self.id);
  2695. }
  2696. for value in &self.row_orders {
  2697. let len = value.compute_size();
  2698. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2699. };
  2700. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2701. self.cached_size.set(my_size);
  2702. my_size
  2703. }
  2704. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2705. if !self.id.is_empty() {
  2706. os.write_string(1, &self.id)?;
  2707. }
  2708. for v in &self.row_orders {
  2709. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2710. os.write_raw_varint32(v.get_cached_size())?;
  2711. v.write_to_with_cached_sizes(os)?;
  2712. };
  2713. os.write_unknown_fields(self.get_unknown_fields())?;
  2714. ::std::result::Result::Ok(())
  2715. }
  2716. fn get_cached_size(&self) -> u32 {
  2717. self.cached_size.get()
  2718. }
  2719. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2720. &self.unknown_fields
  2721. }
  2722. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2723. &mut self.unknown_fields
  2724. }
  2725. fn as_any(&self) -> &dyn (::std::any::Any) {
  2726. self as &dyn (::std::any::Any)
  2727. }
  2728. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2729. self as &mut dyn (::std::any::Any)
  2730. }
  2731. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2732. self
  2733. }
  2734. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2735. Self::descriptor_static()
  2736. }
  2737. fn new() -> GridBlock {
  2738. GridBlock::new()
  2739. }
  2740. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2741. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2742. descriptor.get(|| {
  2743. let mut fields = ::std::vec::Vec::new();
  2744. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2745. "id",
  2746. |m: &GridBlock| { &m.id },
  2747. |m: &mut GridBlock| { &mut m.id },
  2748. ));
  2749. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
  2750. "row_orders",
  2751. |m: &GridBlock| { &m.row_orders },
  2752. |m: &mut GridBlock| { &mut m.row_orders },
  2753. ));
  2754. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlock>(
  2755. "GridBlock",
  2756. fields,
  2757. file_descriptor_proto()
  2758. )
  2759. })
  2760. }
  2761. fn default_instance() -> &'static GridBlock {
  2762. static instance: ::protobuf::rt::LazyV2<GridBlock> = ::protobuf::rt::LazyV2::INIT;
  2763. instance.get(GridBlock::new)
  2764. }
  2765. }
  2766. impl ::protobuf::Clear for GridBlock {
  2767. fn clear(&mut self) {
  2768. self.id.clear();
  2769. self.row_orders.clear();
  2770. self.unknown_fields.clear();
  2771. }
  2772. }
  2773. impl ::std::fmt::Debug for GridBlock {
  2774. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2775. ::protobuf::text_format::fmt(self, f)
  2776. }
  2777. }
  2778. impl ::protobuf::reflect::ProtobufValue for GridBlock {
  2779. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2780. ::protobuf::reflect::ReflectValueRef::Message(self)
  2781. }
  2782. }
  2783. #[derive(PartialEq,Clone,Default)]
  2784. pub struct Cell {
  2785. // message fields
  2786. pub field_id: ::std::string::String,
  2787. pub content: ::std::string::String,
  2788. // special fields
  2789. pub unknown_fields: ::protobuf::UnknownFields,
  2790. pub cached_size: ::protobuf::CachedSize,
  2791. }
  2792. impl<'a> ::std::default::Default for &'a Cell {
  2793. fn default() -> &'a Cell {
  2794. <Cell as ::protobuf::Message>::default_instance()
  2795. }
  2796. }
  2797. impl Cell {
  2798. pub fn new() -> Cell {
  2799. ::std::default::Default::default()
  2800. }
  2801. // string field_id = 1;
  2802. pub fn get_field_id(&self) -> &str {
  2803. &self.field_id
  2804. }
  2805. pub fn clear_field_id(&mut self) {
  2806. self.field_id.clear();
  2807. }
  2808. // Param is passed by value, moved
  2809. pub fn set_field_id(&mut self, v: ::std::string::String) {
  2810. self.field_id = v;
  2811. }
  2812. // Mutable pointer to the field.
  2813. // If field is not initialized, it is initialized with default value first.
  2814. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  2815. &mut self.field_id
  2816. }
  2817. // Take field
  2818. pub fn take_field_id(&mut self) -> ::std::string::String {
  2819. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  2820. }
  2821. // string content = 2;
  2822. pub fn get_content(&self) -> &str {
  2823. &self.content
  2824. }
  2825. pub fn clear_content(&mut self) {
  2826. self.content.clear();
  2827. }
  2828. // Param is passed by value, moved
  2829. pub fn set_content(&mut self, v: ::std::string::String) {
  2830. self.content = v;
  2831. }
  2832. // Mutable pointer to the field.
  2833. // If field is not initialized, it is initialized with default value first.
  2834. pub fn mut_content(&mut self) -> &mut ::std::string::String {
  2835. &mut self.content
  2836. }
  2837. // Take field
  2838. pub fn take_content(&mut self) -> ::std::string::String {
  2839. ::std::mem::replace(&mut self.content, ::std::string::String::new())
  2840. }
  2841. }
  2842. impl ::protobuf::Message for Cell {
  2843. fn is_initialized(&self) -> bool {
  2844. true
  2845. }
  2846. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2847. while !is.eof()? {
  2848. let (field_number, wire_type) = is.read_tag_unpack()?;
  2849. match field_number {
  2850. 1 => {
  2851. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  2852. },
  2853. 2 => {
  2854. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.content)?;
  2855. },
  2856. _ => {
  2857. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2858. },
  2859. };
  2860. }
  2861. ::std::result::Result::Ok(())
  2862. }
  2863. // Compute sizes of nested messages
  2864. #[allow(unused_variables)]
  2865. fn compute_size(&self) -> u32 {
  2866. let mut my_size = 0;
  2867. if !self.field_id.is_empty() {
  2868. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  2869. }
  2870. if !self.content.is_empty() {
  2871. my_size += ::protobuf::rt::string_size(2, &self.content);
  2872. }
  2873. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2874. self.cached_size.set(my_size);
  2875. my_size
  2876. }
  2877. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2878. if !self.field_id.is_empty() {
  2879. os.write_string(1, &self.field_id)?;
  2880. }
  2881. if !self.content.is_empty() {
  2882. os.write_string(2, &self.content)?;
  2883. }
  2884. os.write_unknown_fields(self.get_unknown_fields())?;
  2885. ::std::result::Result::Ok(())
  2886. }
  2887. fn get_cached_size(&self) -> u32 {
  2888. self.cached_size.get()
  2889. }
  2890. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2891. &self.unknown_fields
  2892. }
  2893. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2894. &mut self.unknown_fields
  2895. }
  2896. fn as_any(&self) -> &dyn (::std::any::Any) {
  2897. self as &dyn (::std::any::Any)
  2898. }
  2899. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2900. self as &mut dyn (::std::any::Any)
  2901. }
  2902. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2903. self
  2904. }
  2905. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2906. Self::descriptor_static()
  2907. }
  2908. fn new() -> Cell {
  2909. Cell::new()
  2910. }
  2911. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2912. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2913. descriptor.get(|| {
  2914. let mut fields = ::std::vec::Vec::new();
  2915. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2916. "field_id",
  2917. |m: &Cell| { &m.field_id },
  2918. |m: &mut Cell| { &mut m.field_id },
  2919. ));
  2920. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2921. "content",
  2922. |m: &Cell| { &m.content },
  2923. |m: &mut Cell| { &mut m.content },
  2924. ));
  2925. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Cell>(
  2926. "Cell",
  2927. fields,
  2928. file_descriptor_proto()
  2929. )
  2930. })
  2931. }
  2932. fn default_instance() -> &'static Cell {
  2933. static instance: ::protobuf::rt::LazyV2<Cell> = ::protobuf::rt::LazyV2::INIT;
  2934. instance.get(Cell::new)
  2935. }
  2936. }
  2937. impl ::protobuf::Clear for Cell {
  2938. fn clear(&mut self) {
  2939. self.field_id.clear();
  2940. self.content.clear();
  2941. self.unknown_fields.clear();
  2942. }
  2943. }
  2944. impl ::std::fmt::Debug for Cell {
  2945. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2946. ::protobuf::text_format::fmt(self, f)
  2947. }
  2948. }
  2949. impl ::protobuf::reflect::ProtobufValue for Cell {
  2950. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2951. ::protobuf::reflect::ReflectValueRef::Message(self)
  2952. }
  2953. }
  2954. #[derive(PartialEq,Clone,Default)]
  2955. pub struct RepeatedCell {
  2956. // message fields
  2957. pub items: ::protobuf::RepeatedField<Cell>,
  2958. // special fields
  2959. pub unknown_fields: ::protobuf::UnknownFields,
  2960. pub cached_size: ::protobuf::CachedSize,
  2961. }
  2962. impl<'a> ::std::default::Default for &'a RepeatedCell {
  2963. fn default() -> &'a RepeatedCell {
  2964. <RepeatedCell as ::protobuf::Message>::default_instance()
  2965. }
  2966. }
  2967. impl RepeatedCell {
  2968. pub fn new() -> RepeatedCell {
  2969. ::std::default::Default::default()
  2970. }
  2971. // repeated .Cell items = 1;
  2972. pub fn get_items(&self) -> &[Cell] {
  2973. &self.items
  2974. }
  2975. pub fn clear_items(&mut self) {
  2976. self.items.clear();
  2977. }
  2978. // Param is passed by value, moved
  2979. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Cell>) {
  2980. self.items = v;
  2981. }
  2982. // Mutable pointer to the field.
  2983. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Cell> {
  2984. &mut self.items
  2985. }
  2986. // Take field
  2987. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Cell> {
  2988. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  2989. }
  2990. }
  2991. impl ::protobuf::Message for RepeatedCell {
  2992. fn is_initialized(&self) -> bool {
  2993. for v in &self.items {
  2994. if !v.is_initialized() {
  2995. return false;
  2996. }
  2997. };
  2998. true
  2999. }
  3000. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3001. while !is.eof()? {
  3002. let (field_number, wire_type) = is.read_tag_unpack()?;
  3003. match field_number {
  3004. 1 => {
  3005. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  3006. },
  3007. _ => {
  3008. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3009. },
  3010. };
  3011. }
  3012. ::std::result::Result::Ok(())
  3013. }
  3014. // Compute sizes of nested messages
  3015. #[allow(unused_variables)]
  3016. fn compute_size(&self) -> u32 {
  3017. let mut my_size = 0;
  3018. for value in &self.items {
  3019. let len = value.compute_size();
  3020. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3021. };
  3022. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3023. self.cached_size.set(my_size);
  3024. my_size
  3025. }
  3026. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3027. for v in &self.items {
  3028. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3029. os.write_raw_varint32(v.get_cached_size())?;
  3030. v.write_to_with_cached_sizes(os)?;
  3031. };
  3032. os.write_unknown_fields(self.get_unknown_fields())?;
  3033. ::std::result::Result::Ok(())
  3034. }
  3035. fn get_cached_size(&self) -> u32 {
  3036. self.cached_size.get()
  3037. }
  3038. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3039. &self.unknown_fields
  3040. }
  3041. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3042. &mut self.unknown_fields
  3043. }
  3044. fn as_any(&self) -> &dyn (::std::any::Any) {
  3045. self as &dyn (::std::any::Any)
  3046. }
  3047. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3048. self as &mut dyn (::std::any::Any)
  3049. }
  3050. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3051. self
  3052. }
  3053. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3054. Self::descriptor_static()
  3055. }
  3056. fn new() -> RepeatedCell {
  3057. RepeatedCell::new()
  3058. }
  3059. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3060. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3061. descriptor.get(|| {
  3062. let mut fields = ::std::vec::Vec::new();
  3063. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Cell>>(
  3064. "items",
  3065. |m: &RepeatedCell| { &m.items },
  3066. |m: &mut RepeatedCell| { &mut m.items },
  3067. ));
  3068. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedCell>(
  3069. "RepeatedCell",
  3070. fields,
  3071. file_descriptor_proto()
  3072. )
  3073. })
  3074. }
  3075. fn default_instance() -> &'static RepeatedCell {
  3076. static instance: ::protobuf::rt::LazyV2<RepeatedCell> = ::protobuf::rt::LazyV2::INIT;
  3077. instance.get(RepeatedCell::new)
  3078. }
  3079. }
  3080. impl ::protobuf::Clear for RepeatedCell {
  3081. fn clear(&mut self) {
  3082. self.items.clear();
  3083. self.unknown_fields.clear();
  3084. }
  3085. }
  3086. impl ::std::fmt::Debug for RepeatedCell {
  3087. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3088. ::protobuf::text_format::fmt(self, f)
  3089. }
  3090. }
  3091. impl ::protobuf::reflect::ProtobufValue for RepeatedCell {
  3092. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3093. ::protobuf::reflect::ReflectValueRef::Message(self)
  3094. }
  3095. }
  3096. #[derive(PartialEq,Clone,Default)]
  3097. pub struct CreateGridPayload {
  3098. // message fields
  3099. pub name: ::std::string::String,
  3100. // special fields
  3101. pub unknown_fields: ::protobuf::UnknownFields,
  3102. pub cached_size: ::protobuf::CachedSize,
  3103. }
  3104. impl<'a> ::std::default::Default for &'a CreateGridPayload {
  3105. fn default() -> &'a CreateGridPayload {
  3106. <CreateGridPayload as ::protobuf::Message>::default_instance()
  3107. }
  3108. }
  3109. impl CreateGridPayload {
  3110. pub fn new() -> CreateGridPayload {
  3111. ::std::default::Default::default()
  3112. }
  3113. // string name = 1;
  3114. pub fn get_name(&self) -> &str {
  3115. &self.name
  3116. }
  3117. pub fn clear_name(&mut self) {
  3118. self.name.clear();
  3119. }
  3120. // Param is passed by value, moved
  3121. pub fn set_name(&mut self, v: ::std::string::String) {
  3122. self.name = v;
  3123. }
  3124. // Mutable pointer to the field.
  3125. // If field is not initialized, it is initialized with default value first.
  3126. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  3127. &mut self.name
  3128. }
  3129. // Take field
  3130. pub fn take_name(&mut self) -> ::std::string::String {
  3131. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  3132. }
  3133. }
  3134. impl ::protobuf::Message for CreateGridPayload {
  3135. fn is_initialized(&self) -> bool {
  3136. true
  3137. }
  3138. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3139. while !is.eof()? {
  3140. let (field_number, wire_type) = is.read_tag_unpack()?;
  3141. match field_number {
  3142. 1 => {
  3143. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  3144. },
  3145. _ => {
  3146. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3147. },
  3148. };
  3149. }
  3150. ::std::result::Result::Ok(())
  3151. }
  3152. // Compute sizes of nested messages
  3153. #[allow(unused_variables)]
  3154. fn compute_size(&self) -> u32 {
  3155. let mut my_size = 0;
  3156. if !self.name.is_empty() {
  3157. my_size += ::protobuf::rt::string_size(1, &self.name);
  3158. }
  3159. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3160. self.cached_size.set(my_size);
  3161. my_size
  3162. }
  3163. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3164. if !self.name.is_empty() {
  3165. os.write_string(1, &self.name)?;
  3166. }
  3167. os.write_unknown_fields(self.get_unknown_fields())?;
  3168. ::std::result::Result::Ok(())
  3169. }
  3170. fn get_cached_size(&self) -> u32 {
  3171. self.cached_size.get()
  3172. }
  3173. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3174. &self.unknown_fields
  3175. }
  3176. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3177. &mut self.unknown_fields
  3178. }
  3179. fn as_any(&self) -> &dyn (::std::any::Any) {
  3180. self as &dyn (::std::any::Any)
  3181. }
  3182. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3183. self as &mut dyn (::std::any::Any)
  3184. }
  3185. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3186. self
  3187. }
  3188. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3189. Self::descriptor_static()
  3190. }
  3191. fn new() -> CreateGridPayload {
  3192. CreateGridPayload::new()
  3193. }
  3194. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3195. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3196. descriptor.get(|| {
  3197. let mut fields = ::std::vec::Vec::new();
  3198. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3199. "name",
  3200. |m: &CreateGridPayload| { &m.name },
  3201. |m: &mut CreateGridPayload| { &mut m.name },
  3202. ));
  3203. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateGridPayload>(
  3204. "CreateGridPayload",
  3205. fields,
  3206. file_descriptor_proto()
  3207. )
  3208. })
  3209. }
  3210. fn default_instance() -> &'static CreateGridPayload {
  3211. static instance: ::protobuf::rt::LazyV2<CreateGridPayload> = ::protobuf::rt::LazyV2::INIT;
  3212. instance.get(CreateGridPayload::new)
  3213. }
  3214. }
  3215. impl ::protobuf::Clear for CreateGridPayload {
  3216. fn clear(&mut self) {
  3217. self.name.clear();
  3218. self.unknown_fields.clear();
  3219. }
  3220. }
  3221. impl ::std::fmt::Debug for CreateGridPayload {
  3222. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3223. ::protobuf::text_format::fmt(self, f)
  3224. }
  3225. }
  3226. impl ::protobuf::reflect::ProtobufValue for CreateGridPayload {
  3227. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3228. ::protobuf::reflect::ReflectValueRef::Message(self)
  3229. }
  3230. }
  3231. #[derive(PartialEq,Clone,Default)]
  3232. pub struct GridId {
  3233. // message fields
  3234. pub value: ::std::string::String,
  3235. // special fields
  3236. pub unknown_fields: ::protobuf::UnknownFields,
  3237. pub cached_size: ::protobuf::CachedSize,
  3238. }
  3239. impl<'a> ::std::default::Default for &'a GridId {
  3240. fn default() -> &'a GridId {
  3241. <GridId as ::protobuf::Message>::default_instance()
  3242. }
  3243. }
  3244. impl GridId {
  3245. pub fn new() -> GridId {
  3246. ::std::default::Default::default()
  3247. }
  3248. // string value = 1;
  3249. pub fn get_value(&self) -> &str {
  3250. &self.value
  3251. }
  3252. pub fn clear_value(&mut self) {
  3253. self.value.clear();
  3254. }
  3255. // Param is passed by value, moved
  3256. pub fn set_value(&mut self, v: ::std::string::String) {
  3257. self.value = v;
  3258. }
  3259. // Mutable pointer to the field.
  3260. // If field is not initialized, it is initialized with default value first.
  3261. pub fn mut_value(&mut self) -> &mut ::std::string::String {
  3262. &mut self.value
  3263. }
  3264. // Take field
  3265. pub fn take_value(&mut self) -> ::std::string::String {
  3266. ::std::mem::replace(&mut self.value, ::std::string::String::new())
  3267. }
  3268. }
  3269. impl ::protobuf::Message for GridId {
  3270. fn is_initialized(&self) -> bool {
  3271. true
  3272. }
  3273. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3274. while !is.eof()? {
  3275. let (field_number, wire_type) = is.read_tag_unpack()?;
  3276. match field_number {
  3277. 1 => {
  3278. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
  3279. },
  3280. _ => {
  3281. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3282. },
  3283. };
  3284. }
  3285. ::std::result::Result::Ok(())
  3286. }
  3287. // Compute sizes of nested messages
  3288. #[allow(unused_variables)]
  3289. fn compute_size(&self) -> u32 {
  3290. let mut my_size = 0;
  3291. if !self.value.is_empty() {
  3292. my_size += ::protobuf::rt::string_size(1, &self.value);
  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 !self.value.is_empty() {
  3300. os.write_string(1, &self.value)?;
  3301. }
  3302. os.write_unknown_fields(self.get_unknown_fields())?;
  3303. ::std::result::Result::Ok(())
  3304. }
  3305. fn get_cached_size(&self) -> u32 {
  3306. self.cached_size.get()
  3307. }
  3308. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3309. &self.unknown_fields
  3310. }
  3311. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3312. &mut self.unknown_fields
  3313. }
  3314. fn as_any(&self) -> &dyn (::std::any::Any) {
  3315. self as &dyn (::std::any::Any)
  3316. }
  3317. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3318. self as &mut dyn (::std::any::Any)
  3319. }
  3320. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3321. self
  3322. }
  3323. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3324. Self::descriptor_static()
  3325. }
  3326. fn new() -> GridId {
  3327. GridId::new()
  3328. }
  3329. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3330. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3331. descriptor.get(|| {
  3332. let mut fields = ::std::vec::Vec::new();
  3333. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3334. "value",
  3335. |m: &GridId| { &m.value },
  3336. |m: &mut GridId| { &mut m.value },
  3337. ));
  3338. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridId>(
  3339. "GridId",
  3340. fields,
  3341. file_descriptor_proto()
  3342. )
  3343. })
  3344. }
  3345. fn default_instance() -> &'static GridId {
  3346. static instance: ::protobuf::rt::LazyV2<GridId> = ::protobuf::rt::LazyV2::INIT;
  3347. instance.get(GridId::new)
  3348. }
  3349. }
  3350. impl ::protobuf::Clear for GridId {
  3351. fn clear(&mut self) {
  3352. self.value.clear();
  3353. self.unknown_fields.clear();
  3354. }
  3355. }
  3356. impl ::std::fmt::Debug for GridId {
  3357. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3358. ::protobuf::text_format::fmt(self, f)
  3359. }
  3360. }
  3361. impl ::protobuf::reflect::ProtobufValue for GridId {
  3362. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3363. ::protobuf::reflect::ReflectValueRef::Message(self)
  3364. }
  3365. }
  3366. #[derive(PartialEq,Clone,Default)]
  3367. pub struct GridBlockId {
  3368. // message fields
  3369. pub value: ::std::string::String,
  3370. // special fields
  3371. pub unknown_fields: ::protobuf::UnknownFields,
  3372. pub cached_size: ::protobuf::CachedSize,
  3373. }
  3374. impl<'a> ::std::default::Default for &'a GridBlockId {
  3375. fn default() -> &'a GridBlockId {
  3376. <GridBlockId as ::protobuf::Message>::default_instance()
  3377. }
  3378. }
  3379. impl GridBlockId {
  3380. pub fn new() -> GridBlockId {
  3381. ::std::default::Default::default()
  3382. }
  3383. // string value = 1;
  3384. pub fn get_value(&self) -> &str {
  3385. &self.value
  3386. }
  3387. pub fn clear_value(&mut self) {
  3388. self.value.clear();
  3389. }
  3390. // Param is passed by value, moved
  3391. pub fn set_value(&mut self, v: ::std::string::String) {
  3392. self.value = v;
  3393. }
  3394. // Mutable pointer to the field.
  3395. // If field is not initialized, it is initialized with default value first.
  3396. pub fn mut_value(&mut self) -> &mut ::std::string::String {
  3397. &mut self.value
  3398. }
  3399. // Take field
  3400. pub fn take_value(&mut self) -> ::std::string::String {
  3401. ::std::mem::replace(&mut self.value, ::std::string::String::new())
  3402. }
  3403. }
  3404. impl ::protobuf::Message for GridBlockId {
  3405. fn is_initialized(&self) -> bool {
  3406. true
  3407. }
  3408. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3409. while !is.eof()? {
  3410. let (field_number, wire_type) = is.read_tag_unpack()?;
  3411. match field_number {
  3412. 1 => {
  3413. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
  3414. },
  3415. _ => {
  3416. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3417. },
  3418. };
  3419. }
  3420. ::std::result::Result::Ok(())
  3421. }
  3422. // Compute sizes of nested messages
  3423. #[allow(unused_variables)]
  3424. fn compute_size(&self) -> u32 {
  3425. let mut my_size = 0;
  3426. if !self.value.is_empty() {
  3427. my_size += ::protobuf::rt::string_size(1, &self.value);
  3428. }
  3429. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3430. self.cached_size.set(my_size);
  3431. my_size
  3432. }
  3433. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3434. if !self.value.is_empty() {
  3435. os.write_string(1, &self.value)?;
  3436. }
  3437. os.write_unknown_fields(self.get_unknown_fields())?;
  3438. ::std::result::Result::Ok(())
  3439. }
  3440. fn get_cached_size(&self) -> u32 {
  3441. self.cached_size.get()
  3442. }
  3443. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3444. &self.unknown_fields
  3445. }
  3446. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3447. &mut self.unknown_fields
  3448. }
  3449. fn as_any(&self) -> &dyn (::std::any::Any) {
  3450. self as &dyn (::std::any::Any)
  3451. }
  3452. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3453. self as &mut dyn (::std::any::Any)
  3454. }
  3455. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3456. self
  3457. }
  3458. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3459. Self::descriptor_static()
  3460. }
  3461. fn new() -> GridBlockId {
  3462. GridBlockId::new()
  3463. }
  3464. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3465. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3466. descriptor.get(|| {
  3467. let mut fields = ::std::vec::Vec::new();
  3468. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3469. "value",
  3470. |m: &GridBlockId| { &m.value },
  3471. |m: &mut GridBlockId| { &mut m.value },
  3472. ));
  3473. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlockId>(
  3474. "GridBlockId",
  3475. fields,
  3476. file_descriptor_proto()
  3477. )
  3478. })
  3479. }
  3480. fn default_instance() -> &'static GridBlockId {
  3481. static instance: ::protobuf::rt::LazyV2<GridBlockId> = ::protobuf::rt::LazyV2::INIT;
  3482. instance.get(GridBlockId::new)
  3483. }
  3484. }
  3485. impl ::protobuf::Clear for GridBlockId {
  3486. fn clear(&mut self) {
  3487. self.value.clear();
  3488. self.unknown_fields.clear();
  3489. }
  3490. }
  3491. impl ::std::fmt::Debug for GridBlockId {
  3492. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3493. ::protobuf::text_format::fmt(self, f)
  3494. }
  3495. }
  3496. impl ::protobuf::reflect::ProtobufValue for GridBlockId {
  3497. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3498. ::protobuf::reflect::ReflectValueRef::Message(self)
  3499. }
  3500. }
  3501. #[derive(PartialEq,Clone,Default)]
  3502. pub struct CreateRowPayload {
  3503. // message fields
  3504. pub grid_id: ::std::string::String,
  3505. // message oneof groups
  3506. pub one_of_start_row_id: ::std::option::Option<CreateRowPayload_oneof_one_of_start_row_id>,
  3507. // special fields
  3508. pub unknown_fields: ::protobuf::UnknownFields,
  3509. pub cached_size: ::protobuf::CachedSize,
  3510. }
  3511. impl<'a> ::std::default::Default for &'a CreateRowPayload {
  3512. fn default() -> &'a CreateRowPayload {
  3513. <CreateRowPayload as ::protobuf::Message>::default_instance()
  3514. }
  3515. }
  3516. #[derive(Clone,PartialEq,Debug)]
  3517. pub enum CreateRowPayload_oneof_one_of_start_row_id {
  3518. start_row_id(::std::string::String),
  3519. }
  3520. impl CreateRowPayload {
  3521. pub fn new() -> CreateRowPayload {
  3522. ::std::default::Default::default()
  3523. }
  3524. // string grid_id = 1;
  3525. pub fn get_grid_id(&self) -> &str {
  3526. &self.grid_id
  3527. }
  3528. pub fn clear_grid_id(&mut self) {
  3529. self.grid_id.clear();
  3530. }
  3531. // Param is passed by value, moved
  3532. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  3533. self.grid_id = v;
  3534. }
  3535. // Mutable pointer to the field.
  3536. // If field is not initialized, it is initialized with default value first.
  3537. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  3538. &mut self.grid_id
  3539. }
  3540. // Take field
  3541. pub fn take_grid_id(&mut self) -> ::std::string::String {
  3542. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  3543. }
  3544. // string start_row_id = 2;
  3545. pub fn get_start_row_id(&self) -> &str {
  3546. match self.one_of_start_row_id {
  3547. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref v)) => v,
  3548. _ => "",
  3549. }
  3550. }
  3551. pub fn clear_start_row_id(&mut self) {
  3552. self.one_of_start_row_id = ::std::option::Option::None;
  3553. }
  3554. pub fn has_start_row_id(&self) -> bool {
  3555. match self.one_of_start_row_id {
  3556. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(..)) => true,
  3557. _ => false,
  3558. }
  3559. }
  3560. // Param is passed by value, moved
  3561. pub fn set_start_row_id(&mut self, v: ::std::string::String) {
  3562. self.one_of_start_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(v))
  3563. }
  3564. // Mutable pointer to the field.
  3565. pub fn mut_start_row_id(&mut self) -> &mut ::std::string::String {
  3566. if let ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(_)) = self.one_of_start_row_id {
  3567. } else {
  3568. self.one_of_start_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(::std::string::String::new()));
  3569. }
  3570. match self.one_of_start_row_id {
  3571. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref mut v)) => v,
  3572. _ => panic!(),
  3573. }
  3574. }
  3575. // Take field
  3576. pub fn take_start_row_id(&mut self) -> ::std::string::String {
  3577. if self.has_start_row_id() {
  3578. match self.one_of_start_row_id.take() {
  3579. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(v)) => v,
  3580. _ => panic!(),
  3581. }
  3582. } else {
  3583. ::std::string::String::new()
  3584. }
  3585. }
  3586. }
  3587. impl ::protobuf::Message for CreateRowPayload {
  3588. fn is_initialized(&self) -> bool {
  3589. true
  3590. }
  3591. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3592. while !is.eof()? {
  3593. let (field_number, wire_type) = is.read_tag_unpack()?;
  3594. match field_number {
  3595. 1 => {
  3596. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  3597. },
  3598. 2 => {
  3599. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  3600. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3601. }
  3602. self.one_of_start_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_start_row_id::start_row_id(is.read_string()?));
  3603. },
  3604. _ => {
  3605. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3606. },
  3607. };
  3608. }
  3609. ::std::result::Result::Ok(())
  3610. }
  3611. // Compute sizes of nested messages
  3612. #[allow(unused_variables)]
  3613. fn compute_size(&self) -> u32 {
  3614. let mut my_size = 0;
  3615. if !self.grid_id.is_empty() {
  3616. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  3617. }
  3618. if let ::std::option::Option::Some(ref v) = self.one_of_start_row_id {
  3619. match v {
  3620. &CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref v) => {
  3621. my_size += ::protobuf::rt::string_size(2, &v);
  3622. },
  3623. };
  3624. }
  3625. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3626. self.cached_size.set(my_size);
  3627. my_size
  3628. }
  3629. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3630. if !self.grid_id.is_empty() {
  3631. os.write_string(1, &self.grid_id)?;
  3632. }
  3633. if let ::std::option::Option::Some(ref v) = self.one_of_start_row_id {
  3634. match v {
  3635. &CreateRowPayload_oneof_one_of_start_row_id::start_row_id(ref v) => {
  3636. os.write_string(2, v)?;
  3637. },
  3638. };
  3639. }
  3640. os.write_unknown_fields(self.get_unknown_fields())?;
  3641. ::std::result::Result::Ok(())
  3642. }
  3643. fn get_cached_size(&self) -> u32 {
  3644. self.cached_size.get()
  3645. }
  3646. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3647. &self.unknown_fields
  3648. }
  3649. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3650. &mut self.unknown_fields
  3651. }
  3652. fn as_any(&self) -> &dyn (::std::any::Any) {
  3653. self as &dyn (::std::any::Any)
  3654. }
  3655. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3656. self as &mut dyn (::std::any::Any)
  3657. }
  3658. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3659. self
  3660. }
  3661. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3662. Self::descriptor_static()
  3663. }
  3664. fn new() -> CreateRowPayload {
  3665. CreateRowPayload::new()
  3666. }
  3667. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3668. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3669. descriptor.get(|| {
  3670. let mut fields = ::std::vec::Vec::new();
  3671. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3672. "grid_id",
  3673. |m: &CreateRowPayload| { &m.grid_id },
  3674. |m: &mut CreateRowPayload| { &mut m.grid_id },
  3675. ));
  3676. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  3677. "start_row_id",
  3678. CreateRowPayload::has_start_row_id,
  3679. CreateRowPayload::get_start_row_id,
  3680. ));
  3681. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateRowPayload>(
  3682. "CreateRowPayload",
  3683. fields,
  3684. file_descriptor_proto()
  3685. )
  3686. })
  3687. }
  3688. fn default_instance() -> &'static CreateRowPayload {
  3689. static instance: ::protobuf::rt::LazyV2<CreateRowPayload> = ::protobuf::rt::LazyV2::INIT;
  3690. instance.get(CreateRowPayload::new)
  3691. }
  3692. }
  3693. impl ::protobuf::Clear for CreateRowPayload {
  3694. fn clear(&mut self) {
  3695. self.grid_id.clear();
  3696. self.one_of_start_row_id = ::std::option::Option::None;
  3697. self.unknown_fields.clear();
  3698. }
  3699. }
  3700. impl ::std::fmt::Debug for CreateRowPayload {
  3701. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3702. ::protobuf::text_format::fmt(self, f)
  3703. }
  3704. }
  3705. impl ::protobuf::reflect::ProtobufValue for CreateRowPayload {
  3706. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3707. ::protobuf::reflect::ReflectValueRef::Message(self)
  3708. }
  3709. }
  3710. #[derive(PartialEq,Clone,Default)]
  3711. pub struct CreateFieldPayload {
  3712. // message fields
  3713. pub grid_id: ::std::string::String,
  3714. pub field: ::protobuf::SingularPtrField<Field>,
  3715. pub type_option_data: ::std::vec::Vec<u8>,
  3716. // message oneof groups
  3717. pub one_of_start_field_id: ::std::option::Option<CreateFieldPayload_oneof_one_of_start_field_id>,
  3718. // special fields
  3719. pub unknown_fields: ::protobuf::UnknownFields,
  3720. pub cached_size: ::protobuf::CachedSize,
  3721. }
  3722. impl<'a> ::std::default::Default for &'a CreateFieldPayload {
  3723. fn default() -> &'a CreateFieldPayload {
  3724. <CreateFieldPayload as ::protobuf::Message>::default_instance()
  3725. }
  3726. }
  3727. #[derive(Clone,PartialEq,Debug)]
  3728. pub enum CreateFieldPayload_oneof_one_of_start_field_id {
  3729. start_field_id(::std::string::String),
  3730. }
  3731. impl CreateFieldPayload {
  3732. pub fn new() -> CreateFieldPayload {
  3733. ::std::default::Default::default()
  3734. }
  3735. // string grid_id = 1;
  3736. pub fn get_grid_id(&self) -> &str {
  3737. &self.grid_id
  3738. }
  3739. pub fn clear_grid_id(&mut self) {
  3740. self.grid_id.clear();
  3741. }
  3742. // Param is passed by value, moved
  3743. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  3744. self.grid_id = v;
  3745. }
  3746. // Mutable pointer to the field.
  3747. // If field is not initialized, it is initialized with default value first.
  3748. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  3749. &mut self.grid_id
  3750. }
  3751. // Take field
  3752. pub fn take_grid_id(&mut self) -> ::std::string::String {
  3753. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  3754. }
  3755. // .Field field = 2;
  3756. pub fn get_field(&self) -> &Field {
  3757. self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
  3758. }
  3759. pub fn clear_field(&mut self) {
  3760. self.field.clear();
  3761. }
  3762. pub fn has_field(&self) -> bool {
  3763. self.field.is_some()
  3764. }
  3765. // Param is passed by value, moved
  3766. pub fn set_field(&mut self, v: Field) {
  3767. self.field = ::protobuf::SingularPtrField::some(v);
  3768. }
  3769. // Mutable pointer to the field.
  3770. // If field is not initialized, it is initialized with default value first.
  3771. pub fn mut_field(&mut self) -> &mut Field {
  3772. if self.field.is_none() {
  3773. self.field.set_default();
  3774. }
  3775. self.field.as_mut().unwrap()
  3776. }
  3777. // Take field
  3778. pub fn take_field(&mut self) -> Field {
  3779. self.field.take().unwrap_or_else(|| Field::new())
  3780. }
  3781. // bytes type_option_data = 3;
  3782. pub fn get_type_option_data(&self) -> &[u8] {
  3783. &self.type_option_data
  3784. }
  3785. pub fn clear_type_option_data(&mut self) {
  3786. self.type_option_data.clear();
  3787. }
  3788. // Param is passed by value, moved
  3789. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  3790. self.type_option_data = v;
  3791. }
  3792. // Mutable pointer to the field.
  3793. // If field is not initialized, it is initialized with default value first.
  3794. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  3795. &mut self.type_option_data
  3796. }
  3797. // Take field
  3798. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  3799. ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
  3800. }
  3801. // string start_field_id = 4;
  3802. pub fn get_start_field_id(&self) -> &str {
  3803. match self.one_of_start_field_id {
  3804. ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v)) => v,
  3805. _ => "",
  3806. }
  3807. }
  3808. pub fn clear_start_field_id(&mut self) {
  3809. self.one_of_start_field_id = ::std::option::Option::None;
  3810. }
  3811. pub fn has_start_field_id(&self) -> bool {
  3812. match self.one_of_start_field_id {
  3813. ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(..)) => true,
  3814. _ => false,
  3815. }
  3816. }
  3817. // Param is passed by value, moved
  3818. pub fn set_start_field_id(&mut self, v: ::std::string::String) {
  3819. self.one_of_start_field_id = ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(v))
  3820. }
  3821. // Mutable pointer to the field.
  3822. pub fn mut_start_field_id(&mut self) -> &mut ::std::string::String {
  3823. if let ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(_)) = self.one_of_start_field_id {
  3824. } else {
  3825. self.one_of_start_field_id = ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(::std::string::String::new()));
  3826. }
  3827. match self.one_of_start_field_id {
  3828. ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(ref mut v)) => v,
  3829. _ => panic!(),
  3830. }
  3831. }
  3832. // Take field
  3833. pub fn take_start_field_id(&mut self) -> ::std::string::String {
  3834. if self.has_start_field_id() {
  3835. match self.one_of_start_field_id.take() {
  3836. ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(v)) => v,
  3837. _ => panic!(),
  3838. }
  3839. } else {
  3840. ::std::string::String::new()
  3841. }
  3842. }
  3843. }
  3844. impl ::protobuf::Message for CreateFieldPayload {
  3845. fn is_initialized(&self) -> bool {
  3846. for v in &self.field {
  3847. if !v.is_initialized() {
  3848. return false;
  3849. }
  3850. };
  3851. true
  3852. }
  3853. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3854. while !is.eof()? {
  3855. let (field_number, wire_type) = is.read_tag_unpack()?;
  3856. match field_number {
  3857. 1 => {
  3858. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  3859. },
  3860. 2 => {
  3861. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field)?;
  3862. },
  3863. 3 => {
  3864. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
  3865. },
  3866. 4 => {
  3867. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  3868. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3869. }
  3870. self.one_of_start_field_id = ::std::option::Option::Some(CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(is.read_string()?));
  3871. },
  3872. _ => {
  3873. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3874. },
  3875. };
  3876. }
  3877. ::std::result::Result::Ok(())
  3878. }
  3879. // Compute sizes of nested messages
  3880. #[allow(unused_variables)]
  3881. fn compute_size(&self) -> u32 {
  3882. let mut my_size = 0;
  3883. if !self.grid_id.is_empty() {
  3884. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  3885. }
  3886. if let Some(ref v) = self.field.as_ref() {
  3887. let len = v.compute_size();
  3888. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3889. }
  3890. if !self.type_option_data.is_empty() {
  3891. my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
  3892. }
  3893. if let ::std::option::Option::Some(ref v) = self.one_of_start_field_id {
  3894. match v {
  3895. &CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v) => {
  3896. my_size += ::protobuf::rt::string_size(4, &v);
  3897. },
  3898. };
  3899. }
  3900. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3901. self.cached_size.set(my_size);
  3902. my_size
  3903. }
  3904. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3905. if !self.grid_id.is_empty() {
  3906. os.write_string(1, &self.grid_id)?;
  3907. }
  3908. if let Some(ref v) = self.field.as_ref() {
  3909. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3910. os.write_raw_varint32(v.get_cached_size())?;
  3911. v.write_to_with_cached_sizes(os)?;
  3912. }
  3913. if !self.type_option_data.is_empty() {
  3914. os.write_bytes(3, &self.type_option_data)?;
  3915. }
  3916. if let ::std::option::Option::Some(ref v) = self.one_of_start_field_id {
  3917. match v {
  3918. &CreateFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v) => {
  3919. os.write_string(4, v)?;
  3920. },
  3921. };
  3922. }
  3923. os.write_unknown_fields(self.get_unknown_fields())?;
  3924. ::std::result::Result::Ok(())
  3925. }
  3926. fn get_cached_size(&self) -> u32 {
  3927. self.cached_size.get()
  3928. }
  3929. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3930. &self.unknown_fields
  3931. }
  3932. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3933. &mut self.unknown_fields
  3934. }
  3935. fn as_any(&self) -> &dyn (::std::any::Any) {
  3936. self as &dyn (::std::any::Any)
  3937. }
  3938. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3939. self as &mut dyn (::std::any::Any)
  3940. }
  3941. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3942. self
  3943. }
  3944. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3945. Self::descriptor_static()
  3946. }
  3947. fn new() -> CreateFieldPayload {
  3948. CreateFieldPayload::new()
  3949. }
  3950. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3951. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3952. descriptor.get(|| {
  3953. let mut fields = ::std::vec::Vec::new();
  3954. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3955. "grid_id",
  3956. |m: &CreateFieldPayload| { &m.grid_id },
  3957. |m: &mut CreateFieldPayload| { &mut m.grid_id },
  3958. ));
  3959. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  3960. "field",
  3961. |m: &CreateFieldPayload| { &m.field },
  3962. |m: &mut CreateFieldPayload| { &mut m.field },
  3963. ));
  3964. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  3965. "type_option_data",
  3966. |m: &CreateFieldPayload| { &m.type_option_data },
  3967. |m: &mut CreateFieldPayload| { &mut m.type_option_data },
  3968. ));
  3969. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  3970. "start_field_id",
  3971. CreateFieldPayload::has_start_field_id,
  3972. CreateFieldPayload::get_start_field_id,
  3973. ));
  3974. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateFieldPayload>(
  3975. "CreateFieldPayload",
  3976. fields,
  3977. file_descriptor_proto()
  3978. )
  3979. })
  3980. }
  3981. fn default_instance() -> &'static CreateFieldPayload {
  3982. static instance: ::protobuf::rt::LazyV2<CreateFieldPayload> = ::protobuf::rt::LazyV2::INIT;
  3983. instance.get(CreateFieldPayload::new)
  3984. }
  3985. }
  3986. impl ::protobuf::Clear for CreateFieldPayload {
  3987. fn clear(&mut self) {
  3988. self.grid_id.clear();
  3989. self.field.clear();
  3990. self.type_option_data.clear();
  3991. self.one_of_start_field_id = ::std::option::Option::None;
  3992. self.unknown_fields.clear();
  3993. }
  3994. }
  3995. impl ::std::fmt::Debug for CreateFieldPayload {
  3996. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3997. ::protobuf::text_format::fmt(self, f)
  3998. }
  3999. }
  4000. impl ::protobuf::reflect::ProtobufValue for CreateFieldPayload {
  4001. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4002. ::protobuf::reflect::ReflectValueRef::Message(self)
  4003. }
  4004. }
  4005. #[derive(PartialEq,Clone,Default)]
  4006. pub struct QueryFieldPayload {
  4007. // message fields
  4008. pub grid_id: ::std::string::String,
  4009. pub field_orders: ::protobuf::SingularPtrField<RepeatedFieldOrder>,
  4010. // special fields
  4011. pub unknown_fields: ::protobuf::UnknownFields,
  4012. pub cached_size: ::protobuf::CachedSize,
  4013. }
  4014. impl<'a> ::std::default::Default for &'a QueryFieldPayload {
  4015. fn default() -> &'a QueryFieldPayload {
  4016. <QueryFieldPayload as ::protobuf::Message>::default_instance()
  4017. }
  4018. }
  4019. impl QueryFieldPayload {
  4020. pub fn new() -> QueryFieldPayload {
  4021. ::std::default::Default::default()
  4022. }
  4023. // string grid_id = 1;
  4024. pub fn get_grid_id(&self) -> &str {
  4025. &self.grid_id
  4026. }
  4027. pub fn clear_grid_id(&mut self) {
  4028. self.grid_id.clear();
  4029. }
  4030. // Param is passed by value, moved
  4031. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  4032. self.grid_id = v;
  4033. }
  4034. // Mutable pointer to the field.
  4035. // If field is not initialized, it is initialized with default value first.
  4036. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  4037. &mut self.grid_id
  4038. }
  4039. // Take field
  4040. pub fn take_grid_id(&mut self) -> ::std::string::String {
  4041. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  4042. }
  4043. // .RepeatedFieldOrder field_orders = 2;
  4044. pub fn get_field_orders(&self) -> &RepeatedFieldOrder {
  4045. self.field_orders.as_ref().unwrap_or_else(|| <RepeatedFieldOrder as ::protobuf::Message>::default_instance())
  4046. }
  4047. pub fn clear_field_orders(&mut self) {
  4048. self.field_orders.clear();
  4049. }
  4050. pub fn has_field_orders(&self) -> bool {
  4051. self.field_orders.is_some()
  4052. }
  4053. // Param is passed by value, moved
  4054. pub fn set_field_orders(&mut self, v: RepeatedFieldOrder) {
  4055. self.field_orders = ::protobuf::SingularPtrField::some(v);
  4056. }
  4057. // Mutable pointer to the field.
  4058. // If field is not initialized, it is initialized with default value first.
  4059. pub fn mut_field_orders(&mut self) -> &mut RepeatedFieldOrder {
  4060. if self.field_orders.is_none() {
  4061. self.field_orders.set_default();
  4062. }
  4063. self.field_orders.as_mut().unwrap()
  4064. }
  4065. // Take field
  4066. pub fn take_field_orders(&mut self) -> RepeatedFieldOrder {
  4067. self.field_orders.take().unwrap_or_else(|| RepeatedFieldOrder::new())
  4068. }
  4069. }
  4070. impl ::protobuf::Message for QueryFieldPayload {
  4071. fn is_initialized(&self) -> bool {
  4072. for v in &self.field_orders {
  4073. if !v.is_initialized() {
  4074. return false;
  4075. }
  4076. };
  4077. true
  4078. }
  4079. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4080. while !is.eof()? {
  4081. let (field_number, wire_type) = is.read_tag_unpack()?;
  4082. match field_number {
  4083. 1 => {
  4084. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  4085. },
  4086. 2 => {
  4087. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_orders)?;
  4088. },
  4089. _ => {
  4090. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4091. },
  4092. };
  4093. }
  4094. ::std::result::Result::Ok(())
  4095. }
  4096. // Compute sizes of nested messages
  4097. #[allow(unused_variables)]
  4098. fn compute_size(&self) -> u32 {
  4099. let mut my_size = 0;
  4100. if !self.grid_id.is_empty() {
  4101. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  4102. }
  4103. if let Some(ref v) = self.field_orders.as_ref() {
  4104. let len = v.compute_size();
  4105. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4106. }
  4107. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4108. self.cached_size.set(my_size);
  4109. my_size
  4110. }
  4111. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4112. if !self.grid_id.is_empty() {
  4113. os.write_string(1, &self.grid_id)?;
  4114. }
  4115. if let Some(ref v) = self.field_orders.as_ref() {
  4116. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4117. os.write_raw_varint32(v.get_cached_size())?;
  4118. v.write_to_with_cached_sizes(os)?;
  4119. }
  4120. os.write_unknown_fields(self.get_unknown_fields())?;
  4121. ::std::result::Result::Ok(())
  4122. }
  4123. fn get_cached_size(&self) -> u32 {
  4124. self.cached_size.get()
  4125. }
  4126. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4127. &self.unknown_fields
  4128. }
  4129. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4130. &mut self.unknown_fields
  4131. }
  4132. fn as_any(&self) -> &dyn (::std::any::Any) {
  4133. self as &dyn (::std::any::Any)
  4134. }
  4135. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4136. self as &mut dyn (::std::any::Any)
  4137. }
  4138. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4139. self
  4140. }
  4141. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4142. Self::descriptor_static()
  4143. }
  4144. fn new() -> QueryFieldPayload {
  4145. QueryFieldPayload::new()
  4146. }
  4147. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4148. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  4149. descriptor.get(|| {
  4150. let mut fields = ::std::vec::Vec::new();
  4151. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4152. "grid_id",
  4153. |m: &QueryFieldPayload| { &m.grid_id },
  4154. |m: &mut QueryFieldPayload| { &mut m.grid_id },
  4155. ));
  4156. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedFieldOrder>>(
  4157. "field_orders",
  4158. |m: &QueryFieldPayload| { &m.field_orders },
  4159. |m: &mut QueryFieldPayload| { &mut m.field_orders },
  4160. ));
  4161. ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryFieldPayload>(
  4162. "QueryFieldPayload",
  4163. fields,
  4164. file_descriptor_proto()
  4165. )
  4166. })
  4167. }
  4168. fn default_instance() -> &'static QueryFieldPayload {
  4169. static instance: ::protobuf::rt::LazyV2<QueryFieldPayload> = ::protobuf::rt::LazyV2::INIT;
  4170. instance.get(QueryFieldPayload::new)
  4171. }
  4172. }
  4173. impl ::protobuf::Clear for QueryFieldPayload {
  4174. fn clear(&mut self) {
  4175. self.grid_id.clear();
  4176. self.field_orders.clear();
  4177. self.unknown_fields.clear();
  4178. }
  4179. }
  4180. impl ::std::fmt::Debug for QueryFieldPayload {
  4181. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4182. ::protobuf::text_format::fmt(self, f)
  4183. }
  4184. }
  4185. impl ::protobuf::reflect::ProtobufValue for QueryFieldPayload {
  4186. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4187. ::protobuf::reflect::ReflectValueRef::Message(self)
  4188. }
  4189. }
  4190. #[derive(PartialEq,Clone,Default)]
  4191. pub struct QueryGridBlocksPayload {
  4192. // message fields
  4193. pub grid_id: ::std::string::String,
  4194. pub block_orders: ::protobuf::RepeatedField<GridBlockOrder>,
  4195. // special fields
  4196. pub unknown_fields: ::protobuf::UnknownFields,
  4197. pub cached_size: ::protobuf::CachedSize,
  4198. }
  4199. impl<'a> ::std::default::Default for &'a QueryGridBlocksPayload {
  4200. fn default() -> &'a QueryGridBlocksPayload {
  4201. <QueryGridBlocksPayload as ::protobuf::Message>::default_instance()
  4202. }
  4203. }
  4204. impl QueryGridBlocksPayload {
  4205. pub fn new() -> QueryGridBlocksPayload {
  4206. ::std::default::Default::default()
  4207. }
  4208. // string grid_id = 1;
  4209. pub fn get_grid_id(&self) -> &str {
  4210. &self.grid_id
  4211. }
  4212. pub fn clear_grid_id(&mut self) {
  4213. self.grid_id.clear();
  4214. }
  4215. // Param is passed by value, moved
  4216. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  4217. self.grid_id = v;
  4218. }
  4219. // Mutable pointer to the field.
  4220. // If field is not initialized, it is initialized with default value first.
  4221. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  4222. &mut self.grid_id
  4223. }
  4224. // Take field
  4225. pub fn take_grid_id(&mut self) -> ::std::string::String {
  4226. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  4227. }
  4228. // repeated .GridBlockOrder block_orders = 2;
  4229. pub fn get_block_orders(&self) -> &[GridBlockOrder] {
  4230. &self.block_orders
  4231. }
  4232. pub fn clear_block_orders(&mut self) {
  4233. self.block_orders.clear();
  4234. }
  4235. // Param is passed by value, moved
  4236. pub fn set_block_orders(&mut self, v: ::protobuf::RepeatedField<GridBlockOrder>) {
  4237. self.block_orders = v;
  4238. }
  4239. // Mutable pointer to the field.
  4240. pub fn mut_block_orders(&mut self) -> &mut ::protobuf::RepeatedField<GridBlockOrder> {
  4241. &mut self.block_orders
  4242. }
  4243. // Take field
  4244. pub fn take_block_orders(&mut self) -> ::protobuf::RepeatedField<GridBlockOrder> {
  4245. ::std::mem::replace(&mut self.block_orders, ::protobuf::RepeatedField::new())
  4246. }
  4247. }
  4248. impl ::protobuf::Message for QueryGridBlocksPayload {
  4249. fn is_initialized(&self) -> bool {
  4250. for v in &self.block_orders {
  4251. if !v.is_initialized() {
  4252. return false;
  4253. }
  4254. };
  4255. true
  4256. }
  4257. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4258. while !is.eof()? {
  4259. let (field_number, wire_type) = is.read_tag_unpack()?;
  4260. match field_number {
  4261. 1 => {
  4262. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  4263. },
  4264. 2 => {
  4265. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.block_orders)?;
  4266. },
  4267. _ => {
  4268. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4269. },
  4270. };
  4271. }
  4272. ::std::result::Result::Ok(())
  4273. }
  4274. // Compute sizes of nested messages
  4275. #[allow(unused_variables)]
  4276. fn compute_size(&self) -> u32 {
  4277. let mut my_size = 0;
  4278. if !self.grid_id.is_empty() {
  4279. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  4280. }
  4281. for value in &self.block_orders {
  4282. let len = value.compute_size();
  4283. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  4284. };
  4285. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4286. self.cached_size.set(my_size);
  4287. my_size
  4288. }
  4289. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4290. if !self.grid_id.is_empty() {
  4291. os.write_string(1, &self.grid_id)?;
  4292. }
  4293. for v in &self.block_orders {
  4294. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  4295. os.write_raw_varint32(v.get_cached_size())?;
  4296. v.write_to_with_cached_sizes(os)?;
  4297. };
  4298. os.write_unknown_fields(self.get_unknown_fields())?;
  4299. ::std::result::Result::Ok(())
  4300. }
  4301. fn get_cached_size(&self) -> u32 {
  4302. self.cached_size.get()
  4303. }
  4304. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4305. &self.unknown_fields
  4306. }
  4307. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4308. &mut self.unknown_fields
  4309. }
  4310. fn as_any(&self) -> &dyn (::std::any::Any) {
  4311. self as &dyn (::std::any::Any)
  4312. }
  4313. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4314. self as &mut dyn (::std::any::Any)
  4315. }
  4316. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4317. self
  4318. }
  4319. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4320. Self::descriptor_static()
  4321. }
  4322. fn new() -> QueryGridBlocksPayload {
  4323. QueryGridBlocksPayload::new()
  4324. }
  4325. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4326. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  4327. descriptor.get(|| {
  4328. let mut fields = ::std::vec::Vec::new();
  4329. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4330. "grid_id",
  4331. |m: &QueryGridBlocksPayload| { &m.grid_id },
  4332. |m: &mut QueryGridBlocksPayload| { &mut m.grid_id },
  4333. ));
  4334. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlockOrder>>(
  4335. "block_orders",
  4336. |m: &QueryGridBlocksPayload| { &m.block_orders },
  4337. |m: &mut QueryGridBlocksPayload| { &mut m.block_orders },
  4338. ));
  4339. ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryGridBlocksPayload>(
  4340. "QueryGridBlocksPayload",
  4341. fields,
  4342. file_descriptor_proto()
  4343. )
  4344. })
  4345. }
  4346. fn default_instance() -> &'static QueryGridBlocksPayload {
  4347. static instance: ::protobuf::rt::LazyV2<QueryGridBlocksPayload> = ::protobuf::rt::LazyV2::INIT;
  4348. instance.get(QueryGridBlocksPayload::new)
  4349. }
  4350. }
  4351. impl ::protobuf::Clear for QueryGridBlocksPayload {
  4352. fn clear(&mut self) {
  4353. self.grid_id.clear();
  4354. self.block_orders.clear();
  4355. self.unknown_fields.clear();
  4356. }
  4357. }
  4358. impl ::std::fmt::Debug for QueryGridBlocksPayload {
  4359. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4360. ::protobuf::text_format::fmt(self, f)
  4361. }
  4362. }
  4363. impl ::protobuf::reflect::ProtobufValue for QueryGridBlocksPayload {
  4364. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4365. ::protobuf::reflect::ReflectValueRef::Message(self)
  4366. }
  4367. }
  4368. #[derive(PartialEq,Clone,Default)]
  4369. pub struct QueryRowPayload {
  4370. // message fields
  4371. pub grid_id: ::std::string::String,
  4372. pub block_id: ::std::string::String,
  4373. pub row_id: ::std::string::String,
  4374. // special fields
  4375. pub unknown_fields: ::protobuf::UnknownFields,
  4376. pub cached_size: ::protobuf::CachedSize,
  4377. }
  4378. impl<'a> ::std::default::Default for &'a QueryRowPayload {
  4379. fn default() -> &'a QueryRowPayload {
  4380. <QueryRowPayload as ::protobuf::Message>::default_instance()
  4381. }
  4382. }
  4383. impl QueryRowPayload {
  4384. pub fn new() -> QueryRowPayload {
  4385. ::std::default::Default::default()
  4386. }
  4387. // string grid_id = 1;
  4388. pub fn get_grid_id(&self) -> &str {
  4389. &self.grid_id
  4390. }
  4391. pub fn clear_grid_id(&mut self) {
  4392. self.grid_id.clear();
  4393. }
  4394. // Param is passed by value, moved
  4395. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  4396. self.grid_id = v;
  4397. }
  4398. // Mutable pointer to the field.
  4399. // If field is not initialized, it is initialized with default value first.
  4400. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  4401. &mut self.grid_id
  4402. }
  4403. // Take field
  4404. pub fn take_grid_id(&mut self) -> ::std::string::String {
  4405. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  4406. }
  4407. // string block_id = 2;
  4408. pub fn get_block_id(&self) -> &str {
  4409. &self.block_id
  4410. }
  4411. pub fn clear_block_id(&mut self) {
  4412. self.block_id.clear();
  4413. }
  4414. // Param is passed by value, moved
  4415. pub fn set_block_id(&mut self, v: ::std::string::String) {
  4416. self.block_id = v;
  4417. }
  4418. // Mutable pointer to the field.
  4419. // If field is not initialized, it is initialized with default value first.
  4420. pub fn mut_block_id(&mut self) -> &mut ::std::string::String {
  4421. &mut self.block_id
  4422. }
  4423. // Take field
  4424. pub fn take_block_id(&mut self) -> ::std::string::String {
  4425. ::std::mem::replace(&mut self.block_id, ::std::string::String::new())
  4426. }
  4427. // string row_id = 3;
  4428. pub fn get_row_id(&self) -> &str {
  4429. &self.row_id
  4430. }
  4431. pub fn clear_row_id(&mut self) {
  4432. self.row_id.clear();
  4433. }
  4434. // Param is passed by value, moved
  4435. pub fn set_row_id(&mut self, v: ::std::string::String) {
  4436. self.row_id = v;
  4437. }
  4438. // Mutable pointer to the field.
  4439. // If field is not initialized, it is initialized with default value first.
  4440. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  4441. &mut self.row_id
  4442. }
  4443. // Take field
  4444. pub fn take_row_id(&mut self) -> ::std::string::String {
  4445. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  4446. }
  4447. }
  4448. impl ::protobuf::Message for QueryRowPayload {
  4449. fn is_initialized(&self) -> bool {
  4450. true
  4451. }
  4452. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4453. while !is.eof()? {
  4454. let (field_number, wire_type) = is.read_tag_unpack()?;
  4455. match field_number {
  4456. 1 => {
  4457. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  4458. },
  4459. 2 => {
  4460. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
  4461. },
  4462. 3 => {
  4463. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  4464. },
  4465. _ => {
  4466. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4467. },
  4468. };
  4469. }
  4470. ::std::result::Result::Ok(())
  4471. }
  4472. // Compute sizes of nested messages
  4473. #[allow(unused_variables)]
  4474. fn compute_size(&self) -> u32 {
  4475. let mut my_size = 0;
  4476. if !self.grid_id.is_empty() {
  4477. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  4478. }
  4479. if !self.block_id.is_empty() {
  4480. my_size += ::protobuf::rt::string_size(2, &self.block_id);
  4481. }
  4482. if !self.row_id.is_empty() {
  4483. my_size += ::protobuf::rt::string_size(3, &self.row_id);
  4484. }
  4485. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4486. self.cached_size.set(my_size);
  4487. my_size
  4488. }
  4489. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4490. if !self.grid_id.is_empty() {
  4491. os.write_string(1, &self.grid_id)?;
  4492. }
  4493. if !self.block_id.is_empty() {
  4494. os.write_string(2, &self.block_id)?;
  4495. }
  4496. if !self.row_id.is_empty() {
  4497. os.write_string(3, &self.row_id)?;
  4498. }
  4499. os.write_unknown_fields(self.get_unknown_fields())?;
  4500. ::std::result::Result::Ok(())
  4501. }
  4502. fn get_cached_size(&self) -> u32 {
  4503. self.cached_size.get()
  4504. }
  4505. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4506. &self.unknown_fields
  4507. }
  4508. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4509. &mut self.unknown_fields
  4510. }
  4511. fn as_any(&self) -> &dyn (::std::any::Any) {
  4512. self as &dyn (::std::any::Any)
  4513. }
  4514. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4515. self as &mut dyn (::std::any::Any)
  4516. }
  4517. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4518. self
  4519. }
  4520. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4521. Self::descriptor_static()
  4522. }
  4523. fn new() -> QueryRowPayload {
  4524. QueryRowPayload::new()
  4525. }
  4526. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4527. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  4528. descriptor.get(|| {
  4529. let mut fields = ::std::vec::Vec::new();
  4530. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4531. "grid_id",
  4532. |m: &QueryRowPayload| { &m.grid_id },
  4533. |m: &mut QueryRowPayload| { &mut m.grid_id },
  4534. ));
  4535. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4536. "block_id",
  4537. |m: &QueryRowPayload| { &m.block_id },
  4538. |m: &mut QueryRowPayload| { &mut m.block_id },
  4539. ));
  4540. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4541. "row_id",
  4542. |m: &QueryRowPayload| { &m.row_id },
  4543. |m: &mut QueryRowPayload| { &mut m.row_id },
  4544. ));
  4545. ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryRowPayload>(
  4546. "QueryRowPayload",
  4547. fields,
  4548. file_descriptor_proto()
  4549. )
  4550. })
  4551. }
  4552. fn default_instance() -> &'static QueryRowPayload {
  4553. static instance: ::protobuf::rt::LazyV2<QueryRowPayload> = ::protobuf::rt::LazyV2::INIT;
  4554. instance.get(QueryRowPayload::new)
  4555. }
  4556. }
  4557. impl ::protobuf::Clear for QueryRowPayload {
  4558. fn clear(&mut self) {
  4559. self.grid_id.clear();
  4560. self.block_id.clear();
  4561. self.row_id.clear();
  4562. self.unknown_fields.clear();
  4563. }
  4564. }
  4565. impl ::std::fmt::Debug for QueryRowPayload {
  4566. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4567. ::protobuf::text_format::fmt(self, f)
  4568. }
  4569. }
  4570. impl ::protobuf::reflect::ProtobufValue for QueryRowPayload {
  4571. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4572. ::protobuf::reflect::ReflectValueRef::Message(self)
  4573. }
  4574. }
  4575. #[derive(PartialEq,Clone,Default)]
  4576. pub struct CreateSelectOptionPayload {
  4577. // message fields
  4578. pub option_name: ::std::string::String,
  4579. // special fields
  4580. pub unknown_fields: ::protobuf::UnknownFields,
  4581. pub cached_size: ::protobuf::CachedSize,
  4582. }
  4583. impl<'a> ::std::default::Default for &'a CreateSelectOptionPayload {
  4584. fn default() -> &'a CreateSelectOptionPayload {
  4585. <CreateSelectOptionPayload as ::protobuf::Message>::default_instance()
  4586. }
  4587. }
  4588. impl CreateSelectOptionPayload {
  4589. pub fn new() -> CreateSelectOptionPayload {
  4590. ::std::default::Default::default()
  4591. }
  4592. // string option_name = 1;
  4593. pub fn get_option_name(&self) -> &str {
  4594. &self.option_name
  4595. }
  4596. pub fn clear_option_name(&mut self) {
  4597. self.option_name.clear();
  4598. }
  4599. // Param is passed by value, moved
  4600. pub fn set_option_name(&mut self, v: ::std::string::String) {
  4601. self.option_name = v;
  4602. }
  4603. // Mutable pointer to the field.
  4604. // If field is not initialized, it is initialized with default value first.
  4605. pub fn mut_option_name(&mut self) -> &mut ::std::string::String {
  4606. &mut self.option_name
  4607. }
  4608. // Take field
  4609. pub fn take_option_name(&mut self) -> ::std::string::String {
  4610. ::std::mem::replace(&mut self.option_name, ::std::string::String::new())
  4611. }
  4612. }
  4613. impl ::protobuf::Message for CreateSelectOptionPayload {
  4614. fn is_initialized(&self) -> bool {
  4615. true
  4616. }
  4617. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4618. while !is.eof()? {
  4619. let (field_number, wire_type) = is.read_tag_unpack()?;
  4620. match field_number {
  4621. 1 => {
  4622. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.option_name)?;
  4623. },
  4624. _ => {
  4625. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  4626. },
  4627. };
  4628. }
  4629. ::std::result::Result::Ok(())
  4630. }
  4631. // Compute sizes of nested messages
  4632. #[allow(unused_variables)]
  4633. fn compute_size(&self) -> u32 {
  4634. let mut my_size = 0;
  4635. if !self.option_name.is_empty() {
  4636. my_size += ::protobuf::rt::string_size(1, &self.option_name);
  4637. }
  4638. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  4639. self.cached_size.set(my_size);
  4640. my_size
  4641. }
  4642. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  4643. if !self.option_name.is_empty() {
  4644. os.write_string(1, &self.option_name)?;
  4645. }
  4646. os.write_unknown_fields(self.get_unknown_fields())?;
  4647. ::std::result::Result::Ok(())
  4648. }
  4649. fn get_cached_size(&self) -> u32 {
  4650. self.cached_size.get()
  4651. }
  4652. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  4653. &self.unknown_fields
  4654. }
  4655. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  4656. &mut self.unknown_fields
  4657. }
  4658. fn as_any(&self) -> &dyn (::std::any::Any) {
  4659. self as &dyn (::std::any::Any)
  4660. }
  4661. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  4662. self as &mut dyn (::std::any::Any)
  4663. }
  4664. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  4665. self
  4666. }
  4667. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  4668. Self::descriptor_static()
  4669. }
  4670. fn new() -> CreateSelectOptionPayload {
  4671. CreateSelectOptionPayload::new()
  4672. }
  4673. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  4674. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  4675. descriptor.get(|| {
  4676. let mut fields = ::std::vec::Vec::new();
  4677. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  4678. "option_name",
  4679. |m: &CreateSelectOptionPayload| { &m.option_name },
  4680. |m: &mut CreateSelectOptionPayload| { &mut m.option_name },
  4681. ));
  4682. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateSelectOptionPayload>(
  4683. "CreateSelectOptionPayload",
  4684. fields,
  4685. file_descriptor_proto()
  4686. )
  4687. })
  4688. }
  4689. fn default_instance() -> &'static CreateSelectOptionPayload {
  4690. static instance: ::protobuf::rt::LazyV2<CreateSelectOptionPayload> = ::protobuf::rt::LazyV2::INIT;
  4691. instance.get(CreateSelectOptionPayload::new)
  4692. }
  4693. }
  4694. impl ::protobuf::Clear for CreateSelectOptionPayload {
  4695. fn clear(&mut self) {
  4696. self.option_name.clear();
  4697. self.unknown_fields.clear();
  4698. }
  4699. }
  4700. impl ::std::fmt::Debug for CreateSelectOptionPayload {
  4701. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  4702. ::protobuf::text_format::fmt(self, f)
  4703. }
  4704. }
  4705. impl ::protobuf::reflect::ProtobufValue for CreateSelectOptionPayload {
  4706. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  4707. ::protobuf::reflect::ReflectValueRef::Message(self)
  4708. }
  4709. }
  4710. static file_descriptor_proto_data: &'static [u8] = b"\
  4711. \n\ngrid.proto\x1a\nmeta.proto\"z\n\x04Grid\x12\x0e\n\x02id\x18\x01\x20\
  4712. \x01(\tR\x02id\x12.\n\x0cfield_orders\x18\x02\x20\x03(\x0b2\x0b.FieldOrd\
  4713. erR\x0bfieldOrders\x122\n\x0cblock_orders\x18\x03\x20\x03(\x0b2\x0f.Grid\
  4714. BlockOrderR\x0bblockOrders\"\xb8\x01\n\x05Field\x12\x0e\n\x02id\x18\x01\
  4715. \x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\
  4716. \n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12)\n\nfield_type\x18\x04\x20\
  4717. \x01(\x0e2\n.FieldTypeR\tfieldType\x12\x16\n\x06frozen\x18\x05\x20\x01(\
  4718. \x08R\x06frozen\x12\x1e\n\nvisibility\x18\x06\x20\x01(\x08R\nvisibility\
  4719. \x12\x14\n\x05width\x18\x07\x20\x01(\x05R\x05width\"L\n\x16FieldIdentifi\
  4720. erPayload\x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x17\n\
  4721. \x07grid_id\x18\x02\x20\x01(\tR\x06gridId\"K\n\x15FieldIdentifierParams\
  4722. \x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x17\n\x07grid_\
  4723. id\x18\x02\x20\x01(\tR\x06gridId\"'\n\nFieldOrder\x12\x19\n\x08field_id\
  4724. \x18\x01\x20\x01(\tR\x07fieldId\"\x8f\x01\n\x19GetEditFieldContextParams\
  4725. \x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x1b\n\x08field_i\
  4726. d\x18\x02\x20\x01(\tH\0R\x07fieldId\x12)\n\nfield_type\x18\x03\x20\x01(\
  4727. \x0e2\n.FieldTypeR\tfieldTypeB\x11\n\x0fone_of_field_id\"|\n\x10EditFiel\
  4728. dContext\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12%\n\ngrid\
  4729. _field\x18\x02\x20\x01(\x0b2\x06.FieldR\tgridField\x12(\n\x10type_option\
  4730. _data\x18\x03\x20\x01(\x0cR\x0etypeOptionData\"-\n\rRepeatedField\x12\
  4731. \x1c\n\x05items\x18\x01\x20\x03(\x0b2\x06.FieldR\x05items\"7\n\x12Repeat\
  4732. edFieldOrder\x12!\n\x05items\x18\x01\x20\x03(\x0b2\x0b.FieldOrderR\x05it\
  4733. ems\"T\n\x08RowOrder\x12\x15\n\x06row_id\x18\x01\x20\x01(\tR\x05rowId\
  4734. \x12\x19\n\x08block_id\x18\x02\x20\x01(\tR\x07blockId\x12\x16\n\x06heigh\
  4735. t\x18\x03\x20\x01(\x05R\x06height\"\xb8\x01\n\x03Row\x12\x0e\n\x02id\x18\
  4736. \x01\x20\x01(\tR\x02id\x12@\n\x10cell_by_field_id\x18\x02\x20\x03(\x0b2\
  4737. \x17.Row.CellByFieldIdEntryR\rcellByFieldId\x12\x16\n\x06height\x18\x03\
  4738. \x20\x01(\x05R\x06height\x1aG\n\x12CellByFieldIdEntry\x12\x10\n\x03key\
  4739. \x18\x01\x20\x01(\tR\x03key\x12\x1b\n\x05value\x18\x02\x20\x01(\x0b2\x05\
  4740. .CellR\x05value:\x028\x01\")\n\x0bRepeatedRow\x12\x1a\n\x05items\x18\x01\
  4741. \x20\x03(\x0b2\x04.RowR\x05items\"5\n\x11RepeatedGridBlock\x12\x20\n\x05\
  4742. items\x18\x01\x20\x03(\x0b2\n.GridBlockR\x05items\"+\n\x0eGridBlockOrder\
  4743. \x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\x07blockId\"E\n\tGridBlock\
  4744. \x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12(\n\nrow_orders\x18\x02\
  4745. \x20\x03(\x0b2\t.RowOrderR\trowOrders\";\n\x04Cell\x12\x19\n\x08field_id\
  4746. \x18\x01\x20\x01(\tR\x07fieldId\x12\x18\n\x07content\x18\x02\x20\x01(\tR\
  4747. \x07content\"+\n\x0cRepeatedCell\x12\x1b\n\x05items\x18\x01\x20\x03(\x0b\
  4748. 2\x05.CellR\x05items\"'\n\x11CreateGridPayload\x12\x12\n\x04name\x18\x01\
  4749. \x20\x01(\tR\x04name\"\x1e\n\x06GridId\x12\x14\n\x05value\x18\x01\x20\
  4750. \x01(\tR\x05value\"#\n\x0bGridBlockId\x12\x14\n\x05value\x18\x01\x20\x01\
  4751. (\tR\x05value\"f\n\x10CreateRowPayload\x12\x17\n\x07grid_id\x18\x01\x20\
  4752. \x01(\tR\x06gridId\x12\"\n\x0cstart_row_id\x18\x02\x20\x01(\tH\0R\nstart\
  4753. RowIdB\x15\n\x13one_of_start_row_id\"\xb6\x01\n\x12CreateFieldPayload\
  4754. \x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x1c\n\x05field\
  4755. \x18\x02\x20\x01(\x0b2\x06.FieldR\x05field\x12(\n\x10type_option_data\
  4756. \x18\x03\x20\x01(\x0cR\x0etypeOptionData\x12&\n\x0estart_field_id\x18\
  4757. \x04\x20\x01(\tH\0R\x0cstartFieldIdB\x17\n\x15one_of_start_field_id\"d\n\
  4758. \x11QueryFieldPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\
  4759. \x126\n\x0cfield_orders\x18\x02\x20\x01(\x0b2\x13.RepeatedFieldOrderR\
  4760. \x0bfieldOrders\"e\n\x16QueryGridBlocksPayload\x12\x17\n\x07grid_id\x18\
  4761. \x01\x20\x01(\tR\x06gridId\x122\n\x0cblock_orders\x18\x02\x20\x03(\x0b2\
  4762. \x0f.GridBlockOrderR\x0bblockOrders\"\\\n\x0fQueryRowPayload\x12\x17\n\
  4763. \x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x19\n\x08block_id\x18\x02\
  4764. \x20\x01(\tR\x07blockId\x12\x15\n\x06row_id\x18\x03\x20\x01(\tR\x05rowId\
  4765. \"<\n\x19CreateSelectOptionPayload\x12\x1f\n\x0boption_name\x18\x01\x20\
  4766. \x01(\tR\noptionNameb\x06proto3\
  4767. ";
  4768. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  4769. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  4770. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  4771. }
  4772. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  4773. file_descriptor_proto_lazy.get(|| {
  4774. parse_descriptor_proto()
  4775. })
  4776. }