grid.rs 230 KB

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