grid.rs 116 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683
  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 blocks: ::protobuf::RepeatedField<super::meta::GridBlockMeta>,
  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 .GridBlockMeta blocks = 3;
  80. pub fn get_blocks(&self) -> &[super::meta::GridBlockMeta] {
  81. &self.blocks
  82. }
  83. pub fn clear_blocks(&mut self) {
  84. self.blocks.clear();
  85. }
  86. // Param is passed by value, moved
  87. pub fn set_blocks(&mut self, v: ::protobuf::RepeatedField<super::meta::GridBlockMeta>) {
  88. self.blocks = v;
  89. }
  90. // Mutable pointer to the field.
  91. pub fn mut_blocks(&mut self) -> &mut ::protobuf::RepeatedField<super::meta::GridBlockMeta> {
  92. &mut self.blocks
  93. }
  94. // Take field
  95. pub fn take_blocks(&mut self) -> ::protobuf::RepeatedField<super::meta::GridBlockMeta> {
  96. ::std::mem::replace(&mut self.blocks, ::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.blocks {
  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.blocks)?;
  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.blocks {
  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.blocks {
  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<super::meta::GridBlockMeta>>(
  208. "blocks",
  209. |m: &Grid| { &m.blocks },
  210. |m: &mut Grid| { &mut m.blocks },
  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.blocks.clear();
  229. self.unknown_fields.clear();
  230. }
  231. }
  232. impl ::std::fmt::Debug for Grid {
  233. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  234. ::protobuf::text_format::fmt(self, f)
  235. }
  236. }
  237. impl ::protobuf::reflect::ProtobufValue for Grid {
  238. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  239. ::protobuf::reflect::ReflectValueRef::Message(self)
  240. }
  241. }
  242. #[derive(PartialEq,Clone,Default)]
  243. pub struct Field {
  244. // message fields
  245. pub id: ::std::string::String,
  246. pub name: ::std::string::String,
  247. pub desc: ::std::string::String,
  248. pub field_type: super::meta::FieldType,
  249. pub frozen: bool,
  250. pub visibility: bool,
  251. pub width: i32,
  252. // special fields
  253. pub unknown_fields: ::protobuf::UnknownFields,
  254. pub cached_size: ::protobuf::CachedSize,
  255. }
  256. impl<'a> ::std::default::Default for &'a Field {
  257. fn default() -> &'a Field {
  258. <Field as ::protobuf::Message>::default_instance()
  259. }
  260. }
  261. impl Field {
  262. pub fn new() -> Field {
  263. ::std::default::Default::default()
  264. }
  265. // string id = 1;
  266. pub fn get_id(&self) -> &str {
  267. &self.id
  268. }
  269. pub fn clear_id(&mut self) {
  270. self.id.clear();
  271. }
  272. // Param is passed by value, moved
  273. pub fn set_id(&mut self, v: ::std::string::String) {
  274. self.id = v;
  275. }
  276. // Mutable pointer to the field.
  277. // If field is not initialized, it is initialized with default value first.
  278. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  279. &mut self.id
  280. }
  281. // Take field
  282. pub fn take_id(&mut self) -> ::std::string::String {
  283. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  284. }
  285. // string name = 2;
  286. pub fn get_name(&self) -> &str {
  287. &self.name
  288. }
  289. pub fn clear_name(&mut self) {
  290. self.name.clear();
  291. }
  292. // Param is passed by value, moved
  293. pub fn set_name(&mut self, v: ::std::string::String) {
  294. self.name = v;
  295. }
  296. // Mutable pointer to the field.
  297. // If field is not initialized, it is initialized with default value first.
  298. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  299. &mut self.name
  300. }
  301. // Take field
  302. pub fn take_name(&mut self) -> ::std::string::String {
  303. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  304. }
  305. // string desc = 3;
  306. pub fn get_desc(&self) -> &str {
  307. &self.desc
  308. }
  309. pub fn clear_desc(&mut self) {
  310. self.desc.clear();
  311. }
  312. // Param is passed by value, moved
  313. pub fn set_desc(&mut self, v: ::std::string::String) {
  314. self.desc = v;
  315. }
  316. // Mutable pointer to the field.
  317. // If field is not initialized, it is initialized with default value first.
  318. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  319. &mut self.desc
  320. }
  321. // Take field
  322. pub fn take_desc(&mut self) -> ::std::string::String {
  323. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  324. }
  325. // .FieldType field_type = 4;
  326. pub fn get_field_type(&self) -> super::meta::FieldType {
  327. self.field_type
  328. }
  329. pub fn clear_field_type(&mut self) {
  330. self.field_type = super::meta::FieldType::RichText;
  331. }
  332. // Param is passed by value, moved
  333. pub fn set_field_type(&mut self, v: super::meta::FieldType) {
  334. self.field_type = v;
  335. }
  336. // bool frozen = 5;
  337. pub fn get_frozen(&self) -> bool {
  338. self.frozen
  339. }
  340. pub fn clear_frozen(&mut self) {
  341. self.frozen = false;
  342. }
  343. // Param is passed by value, moved
  344. pub fn set_frozen(&mut self, v: bool) {
  345. self.frozen = v;
  346. }
  347. // bool visibility = 6;
  348. pub fn get_visibility(&self) -> bool {
  349. self.visibility
  350. }
  351. pub fn clear_visibility(&mut self) {
  352. self.visibility = false;
  353. }
  354. // Param is passed by value, moved
  355. pub fn set_visibility(&mut self, v: bool) {
  356. self.visibility = v;
  357. }
  358. // int32 width = 7;
  359. pub fn get_width(&self) -> i32 {
  360. self.width
  361. }
  362. pub fn clear_width(&mut self) {
  363. self.width = 0;
  364. }
  365. // Param is passed by value, moved
  366. pub fn set_width(&mut self, v: i32) {
  367. self.width = v;
  368. }
  369. }
  370. impl ::protobuf::Message for Field {
  371. fn is_initialized(&self) -> bool {
  372. true
  373. }
  374. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  375. while !is.eof()? {
  376. let (field_number, wire_type) = is.read_tag_unpack()?;
  377. match field_number {
  378. 1 => {
  379. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  380. },
  381. 2 => {
  382. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  383. },
  384. 3 => {
  385. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  386. },
  387. 4 => {
  388. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 4, &mut self.unknown_fields)?
  389. },
  390. 5 => {
  391. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  392. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  393. }
  394. let tmp = is.read_bool()?;
  395. self.frozen = tmp;
  396. },
  397. 6 => {
  398. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  399. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  400. }
  401. let tmp = is.read_bool()?;
  402. self.visibility = tmp;
  403. },
  404. 7 => {
  405. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  406. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  407. }
  408. let tmp = is.read_int32()?;
  409. self.width = tmp;
  410. },
  411. _ => {
  412. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  413. },
  414. };
  415. }
  416. ::std::result::Result::Ok(())
  417. }
  418. // Compute sizes of nested messages
  419. #[allow(unused_variables)]
  420. fn compute_size(&self) -> u32 {
  421. let mut my_size = 0;
  422. if !self.id.is_empty() {
  423. my_size += ::protobuf::rt::string_size(1, &self.id);
  424. }
  425. if !self.name.is_empty() {
  426. my_size += ::protobuf::rt::string_size(2, &self.name);
  427. }
  428. if !self.desc.is_empty() {
  429. my_size += ::protobuf::rt::string_size(3, &self.desc);
  430. }
  431. if self.field_type != super::meta::FieldType::RichText {
  432. my_size += ::protobuf::rt::enum_size(4, self.field_type);
  433. }
  434. if self.frozen != false {
  435. my_size += 2;
  436. }
  437. if self.visibility != false {
  438. my_size += 2;
  439. }
  440. if self.width != 0 {
  441. my_size += ::protobuf::rt::value_size(7, self.width, ::protobuf::wire_format::WireTypeVarint);
  442. }
  443. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  444. self.cached_size.set(my_size);
  445. my_size
  446. }
  447. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  448. if !self.id.is_empty() {
  449. os.write_string(1, &self.id)?;
  450. }
  451. if !self.name.is_empty() {
  452. os.write_string(2, &self.name)?;
  453. }
  454. if !self.desc.is_empty() {
  455. os.write_string(3, &self.desc)?;
  456. }
  457. if self.field_type != super::meta::FieldType::RichText {
  458. os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  459. }
  460. if self.frozen != false {
  461. os.write_bool(5, self.frozen)?;
  462. }
  463. if self.visibility != false {
  464. os.write_bool(6, self.visibility)?;
  465. }
  466. if self.width != 0 {
  467. os.write_int32(7, self.width)?;
  468. }
  469. os.write_unknown_fields(self.get_unknown_fields())?;
  470. ::std::result::Result::Ok(())
  471. }
  472. fn get_cached_size(&self) -> u32 {
  473. self.cached_size.get()
  474. }
  475. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  476. &self.unknown_fields
  477. }
  478. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  479. &mut self.unknown_fields
  480. }
  481. fn as_any(&self) -> &dyn (::std::any::Any) {
  482. self as &dyn (::std::any::Any)
  483. }
  484. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  485. self as &mut dyn (::std::any::Any)
  486. }
  487. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  488. self
  489. }
  490. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  491. Self::descriptor_static()
  492. }
  493. fn new() -> Field {
  494. Field::new()
  495. }
  496. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  497. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  498. descriptor.get(|| {
  499. let mut fields = ::std::vec::Vec::new();
  500. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  501. "id",
  502. |m: &Field| { &m.id },
  503. |m: &mut Field| { &mut m.id },
  504. ));
  505. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  506. "name",
  507. |m: &Field| { &m.name },
  508. |m: &mut Field| { &mut m.name },
  509. ));
  510. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  511. "desc",
  512. |m: &Field| { &m.desc },
  513. |m: &mut Field| { &mut m.desc },
  514. ));
  515. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::meta::FieldType>>(
  516. "field_type",
  517. |m: &Field| { &m.field_type },
  518. |m: &mut Field| { &mut m.field_type },
  519. ));
  520. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  521. "frozen",
  522. |m: &Field| { &m.frozen },
  523. |m: &mut Field| { &mut m.frozen },
  524. ));
  525. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  526. "visibility",
  527. |m: &Field| { &m.visibility },
  528. |m: &mut Field| { &mut m.visibility },
  529. ));
  530. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  531. "width",
  532. |m: &Field| { &m.width },
  533. |m: &mut Field| { &mut m.width },
  534. ));
  535. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Field>(
  536. "Field",
  537. fields,
  538. file_descriptor_proto()
  539. )
  540. })
  541. }
  542. fn default_instance() -> &'static Field {
  543. static instance: ::protobuf::rt::LazyV2<Field> = ::protobuf::rt::LazyV2::INIT;
  544. instance.get(Field::new)
  545. }
  546. }
  547. impl ::protobuf::Clear for Field {
  548. fn clear(&mut self) {
  549. self.id.clear();
  550. self.name.clear();
  551. self.desc.clear();
  552. self.field_type = super::meta::FieldType::RichText;
  553. self.frozen = false;
  554. self.visibility = false;
  555. self.width = 0;
  556. self.unknown_fields.clear();
  557. }
  558. }
  559. impl ::std::fmt::Debug for Field {
  560. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  561. ::protobuf::text_format::fmt(self, f)
  562. }
  563. }
  564. impl ::protobuf::reflect::ProtobufValue for Field {
  565. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  566. ::protobuf::reflect::ReflectValueRef::Message(self)
  567. }
  568. }
  569. #[derive(PartialEq,Clone,Default)]
  570. pub struct 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 RepeatedField {
  706. // message fields
  707. pub items: ::protobuf::RepeatedField<Field>,
  708. // special fields
  709. pub unknown_fields: ::protobuf::UnknownFields,
  710. pub cached_size: ::protobuf::CachedSize,
  711. }
  712. impl<'a> ::std::default::Default for &'a RepeatedField {
  713. fn default() -> &'a RepeatedField {
  714. <RepeatedField as ::protobuf::Message>::default_instance()
  715. }
  716. }
  717. impl RepeatedField {
  718. pub fn new() -> RepeatedField {
  719. ::std::default::Default::default()
  720. }
  721. // repeated .Field items = 1;
  722. pub fn get_items(&self) -> &[Field] {
  723. &self.items
  724. }
  725. pub fn clear_items(&mut self) {
  726. self.items.clear();
  727. }
  728. // Param is passed by value, moved
  729. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Field>) {
  730. self.items = v;
  731. }
  732. // Mutable pointer to the field.
  733. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Field> {
  734. &mut self.items
  735. }
  736. // Take field
  737. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Field> {
  738. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  739. }
  740. }
  741. impl ::protobuf::Message for RepeatedField {
  742. fn is_initialized(&self) -> bool {
  743. for v in &self.items {
  744. if !v.is_initialized() {
  745. return false;
  746. }
  747. };
  748. true
  749. }
  750. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  751. while !is.eof()? {
  752. let (field_number, wire_type) = is.read_tag_unpack()?;
  753. match field_number {
  754. 1 => {
  755. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  756. },
  757. _ => {
  758. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  759. },
  760. };
  761. }
  762. ::std::result::Result::Ok(())
  763. }
  764. // Compute sizes of nested messages
  765. #[allow(unused_variables)]
  766. fn compute_size(&self) -> u32 {
  767. let mut my_size = 0;
  768. for value in &self.items {
  769. let len = value.compute_size();
  770. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  771. };
  772. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  773. self.cached_size.set(my_size);
  774. my_size
  775. }
  776. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  777. for v in &self.items {
  778. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  779. os.write_raw_varint32(v.get_cached_size())?;
  780. v.write_to_with_cached_sizes(os)?;
  781. };
  782. os.write_unknown_fields(self.get_unknown_fields())?;
  783. ::std::result::Result::Ok(())
  784. }
  785. fn get_cached_size(&self) -> u32 {
  786. self.cached_size.get()
  787. }
  788. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  789. &self.unknown_fields
  790. }
  791. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  792. &mut self.unknown_fields
  793. }
  794. fn as_any(&self) -> &dyn (::std::any::Any) {
  795. self as &dyn (::std::any::Any)
  796. }
  797. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  798. self as &mut dyn (::std::any::Any)
  799. }
  800. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  801. self
  802. }
  803. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  804. Self::descriptor_static()
  805. }
  806. fn new() -> RepeatedField {
  807. RepeatedField::new()
  808. }
  809. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  810. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  811. descriptor.get(|| {
  812. let mut fields = ::std::vec::Vec::new();
  813. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  814. "items",
  815. |m: &RepeatedField| { &m.items },
  816. |m: &mut RepeatedField| { &mut m.items },
  817. ));
  818. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedField>(
  819. "RepeatedField",
  820. fields,
  821. file_descriptor_proto()
  822. )
  823. })
  824. }
  825. fn default_instance() -> &'static RepeatedField {
  826. static instance: ::protobuf::rt::LazyV2<RepeatedField> = ::protobuf::rt::LazyV2::INIT;
  827. instance.get(RepeatedField::new)
  828. }
  829. }
  830. impl ::protobuf::Clear for RepeatedField {
  831. fn clear(&mut self) {
  832. self.items.clear();
  833. self.unknown_fields.clear();
  834. }
  835. }
  836. impl ::std::fmt::Debug for RepeatedField {
  837. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  838. ::protobuf::text_format::fmt(self, f)
  839. }
  840. }
  841. impl ::protobuf::reflect::ProtobufValue for RepeatedField {
  842. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  843. ::protobuf::reflect::ReflectValueRef::Message(self)
  844. }
  845. }
  846. #[derive(PartialEq,Clone,Default)]
  847. pub struct RepeatedFieldOrder {
  848. // message fields
  849. pub items: ::protobuf::RepeatedField<FieldOrder>,
  850. // special fields
  851. pub unknown_fields: ::protobuf::UnknownFields,
  852. pub cached_size: ::protobuf::CachedSize,
  853. }
  854. impl<'a> ::std::default::Default for &'a RepeatedFieldOrder {
  855. fn default() -> &'a RepeatedFieldOrder {
  856. <RepeatedFieldOrder as ::protobuf::Message>::default_instance()
  857. }
  858. }
  859. impl RepeatedFieldOrder {
  860. pub fn new() -> RepeatedFieldOrder {
  861. ::std::default::Default::default()
  862. }
  863. // repeated .FieldOrder items = 1;
  864. pub fn get_items(&self) -> &[FieldOrder] {
  865. &self.items
  866. }
  867. pub fn clear_items(&mut self) {
  868. self.items.clear();
  869. }
  870. // Param is passed by value, moved
  871. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
  872. self.items = v;
  873. }
  874. // Mutable pointer to the field.
  875. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
  876. &mut self.items
  877. }
  878. // Take field
  879. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
  880. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  881. }
  882. }
  883. impl ::protobuf::Message for RepeatedFieldOrder {
  884. fn is_initialized(&self) -> bool {
  885. for v in &self.items {
  886. if !v.is_initialized() {
  887. return false;
  888. }
  889. };
  890. true
  891. }
  892. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  893. while !is.eof()? {
  894. let (field_number, wire_type) = is.read_tag_unpack()?;
  895. match field_number {
  896. 1 => {
  897. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  898. },
  899. _ => {
  900. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  901. },
  902. };
  903. }
  904. ::std::result::Result::Ok(())
  905. }
  906. // Compute sizes of nested messages
  907. #[allow(unused_variables)]
  908. fn compute_size(&self) -> u32 {
  909. let mut my_size = 0;
  910. for value in &self.items {
  911. let len = value.compute_size();
  912. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  913. };
  914. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  915. self.cached_size.set(my_size);
  916. my_size
  917. }
  918. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  919. for v in &self.items {
  920. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  921. os.write_raw_varint32(v.get_cached_size())?;
  922. v.write_to_with_cached_sizes(os)?;
  923. };
  924. os.write_unknown_fields(self.get_unknown_fields())?;
  925. ::std::result::Result::Ok(())
  926. }
  927. fn get_cached_size(&self) -> u32 {
  928. self.cached_size.get()
  929. }
  930. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  931. &self.unknown_fields
  932. }
  933. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  934. &mut self.unknown_fields
  935. }
  936. fn as_any(&self) -> &dyn (::std::any::Any) {
  937. self as &dyn (::std::any::Any)
  938. }
  939. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  940. self as &mut dyn (::std::any::Any)
  941. }
  942. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  943. self
  944. }
  945. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  946. Self::descriptor_static()
  947. }
  948. fn new() -> RepeatedFieldOrder {
  949. RepeatedFieldOrder::new()
  950. }
  951. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  952. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  953. descriptor.get(|| {
  954. let mut fields = ::std::vec::Vec::new();
  955. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
  956. "items",
  957. |m: &RepeatedFieldOrder| { &m.items },
  958. |m: &mut RepeatedFieldOrder| { &mut m.items },
  959. ));
  960. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedFieldOrder>(
  961. "RepeatedFieldOrder",
  962. fields,
  963. file_descriptor_proto()
  964. )
  965. })
  966. }
  967. fn default_instance() -> &'static RepeatedFieldOrder {
  968. static instance: ::protobuf::rt::LazyV2<RepeatedFieldOrder> = ::protobuf::rt::LazyV2::INIT;
  969. instance.get(RepeatedFieldOrder::new)
  970. }
  971. }
  972. impl ::protobuf::Clear for RepeatedFieldOrder {
  973. fn clear(&mut self) {
  974. self.items.clear();
  975. self.unknown_fields.clear();
  976. }
  977. }
  978. impl ::std::fmt::Debug for RepeatedFieldOrder {
  979. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  980. ::protobuf::text_format::fmt(self, f)
  981. }
  982. }
  983. impl ::protobuf::reflect::ProtobufValue for RepeatedFieldOrder {
  984. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  985. ::protobuf::reflect::ReflectValueRef::Message(self)
  986. }
  987. }
  988. #[derive(PartialEq,Clone,Default)]
  989. pub struct RowOrder {
  990. // message fields
  991. pub row_id: ::std::string::String,
  992. pub block_id: ::std::string::String,
  993. // special fields
  994. pub unknown_fields: ::protobuf::UnknownFields,
  995. pub cached_size: ::protobuf::CachedSize,
  996. }
  997. impl<'a> ::std::default::Default for &'a RowOrder {
  998. fn default() -> &'a RowOrder {
  999. <RowOrder as ::protobuf::Message>::default_instance()
  1000. }
  1001. }
  1002. impl RowOrder {
  1003. pub fn new() -> RowOrder {
  1004. ::std::default::Default::default()
  1005. }
  1006. // string row_id = 1;
  1007. pub fn get_row_id(&self) -> &str {
  1008. &self.row_id
  1009. }
  1010. pub fn clear_row_id(&mut self) {
  1011. self.row_id.clear();
  1012. }
  1013. // Param is passed by value, moved
  1014. pub fn set_row_id(&mut self, v: ::std::string::String) {
  1015. self.row_id = v;
  1016. }
  1017. // Mutable pointer to the field.
  1018. // If field is not initialized, it is initialized with default value first.
  1019. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  1020. &mut self.row_id
  1021. }
  1022. // Take field
  1023. pub fn take_row_id(&mut self) -> ::std::string::String {
  1024. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  1025. }
  1026. // string block_id = 2;
  1027. pub fn get_block_id(&self) -> &str {
  1028. &self.block_id
  1029. }
  1030. pub fn clear_block_id(&mut self) {
  1031. self.block_id.clear();
  1032. }
  1033. // Param is passed by value, moved
  1034. pub fn set_block_id(&mut self, v: ::std::string::String) {
  1035. self.block_id = v;
  1036. }
  1037. // Mutable pointer to the field.
  1038. // If field is not initialized, it is initialized with default value first.
  1039. pub fn mut_block_id(&mut self) -> &mut ::std::string::String {
  1040. &mut self.block_id
  1041. }
  1042. // Take field
  1043. pub fn take_block_id(&mut self) -> ::std::string::String {
  1044. ::std::mem::replace(&mut self.block_id, ::std::string::String::new())
  1045. }
  1046. }
  1047. impl ::protobuf::Message for RowOrder {
  1048. fn is_initialized(&self) -> bool {
  1049. true
  1050. }
  1051. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1052. while !is.eof()? {
  1053. let (field_number, wire_type) = is.read_tag_unpack()?;
  1054. match field_number {
  1055. 1 => {
  1056. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  1057. },
  1058. 2 => {
  1059. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
  1060. },
  1061. _ => {
  1062. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1063. },
  1064. };
  1065. }
  1066. ::std::result::Result::Ok(())
  1067. }
  1068. // Compute sizes of nested messages
  1069. #[allow(unused_variables)]
  1070. fn compute_size(&self) -> u32 {
  1071. let mut my_size = 0;
  1072. if !self.row_id.is_empty() {
  1073. my_size += ::protobuf::rt::string_size(1, &self.row_id);
  1074. }
  1075. if !self.block_id.is_empty() {
  1076. my_size += ::protobuf::rt::string_size(2, &self.block_id);
  1077. }
  1078. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1079. self.cached_size.set(my_size);
  1080. my_size
  1081. }
  1082. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1083. if !self.row_id.is_empty() {
  1084. os.write_string(1, &self.row_id)?;
  1085. }
  1086. if !self.block_id.is_empty() {
  1087. os.write_string(2, &self.block_id)?;
  1088. }
  1089. os.write_unknown_fields(self.get_unknown_fields())?;
  1090. ::std::result::Result::Ok(())
  1091. }
  1092. fn get_cached_size(&self) -> u32 {
  1093. self.cached_size.get()
  1094. }
  1095. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1096. &self.unknown_fields
  1097. }
  1098. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1099. &mut self.unknown_fields
  1100. }
  1101. fn as_any(&self) -> &dyn (::std::any::Any) {
  1102. self as &dyn (::std::any::Any)
  1103. }
  1104. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1105. self as &mut dyn (::std::any::Any)
  1106. }
  1107. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1108. self
  1109. }
  1110. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1111. Self::descriptor_static()
  1112. }
  1113. fn new() -> RowOrder {
  1114. RowOrder::new()
  1115. }
  1116. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1117. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1118. descriptor.get(|| {
  1119. let mut fields = ::std::vec::Vec::new();
  1120. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1121. "row_id",
  1122. |m: &RowOrder| { &m.row_id },
  1123. |m: &mut RowOrder| { &mut m.row_id },
  1124. ));
  1125. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1126. "block_id",
  1127. |m: &RowOrder| { &m.block_id },
  1128. |m: &mut RowOrder| { &mut m.block_id },
  1129. ));
  1130. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RowOrder>(
  1131. "RowOrder",
  1132. fields,
  1133. file_descriptor_proto()
  1134. )
  1135. })
  1136. }
  1137. fn default_instance() -> &'static RowOrder {
  1138. static instance: ::protobuf::rt::LazyV2<RowOrder> = ::protobuf::rt::LazyV2::INIT;
  1139. instance.get(RowOrder::new)
  1140. }
  1141. }
  1142. impl ::protobuf::Clear for RowOrder {
  1143. fn clear(&mut self) {
  1144. self.row_id.clear();
  1145. self.block_id.clear();
  1146. self.unknown_fields.clear();
  1147. }
  1148. }
  1149. impl ::std::fmt::Debug for RowOrder {
  1150. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1151. ::protobuf::text_format::fmt(self, f)
  1152. }
  1153. }
  1154. impl ::protobuf::reflect::ProtobufValue for RowOrder {
  1155. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1156. ::protobuf::reflect::ReflectValueRef::Message(self)
  1157. }
  1158. }
  1159. #[derive(PartialEq,Clone,Default)]
  1160. pub struct RepeatedRowOrder {
  1161. // message fields
  1162. pub items: ::protobuf::RepeatedField<RowOrder>,
  1163. // special fields
  1164. pub unknown_fields: ::protobuf::UnknownFields,
  1165. pub cached_size: ::protobuf::CachedSize,
  1166. }
  1167. impl<'a> ::std::default::Default for &'a RepeatedRowOrder {
  1168. fn default() -> &'a RepeatedRowOrder {
  1169. <RepeatedRowOrder as ::protobuf::Message>::default_instance()
  1170. }
  1171. }
  1172. impl RepeatedRowOrder {
  1173. pub fn new() -> RepeatedRowOrder {
  1174. ::std::default::Default::default()
  1175. }
  1176. // repeated .RowOrder items = 1;
  1177. pub fn get_items(&self) -> &[RowOrder] {
  1178. &self.items
  1179. }
  1180. pub fn clear_items(&mut self) {
  1181. self.items.clear();
  1182. }
  1183. // Param is passed by value, moved
  1184. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<RowOrder>) {
  1185. self.items = v;
  1186. }
  1187. // Mutable pointer to the field.
  1188. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<RowOrder> {
  1189. &mut self.items
  1190. }
  1191. // Take field
  1192. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<RowOrder> {
  1193. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  1194. }
  1195. }
  1196. impl ::protobuf::Message for RepeatedRowOrder {
  1197. fn is_initialized(&self) -> bool {
  1198. for v in &self.items {
  1199. if !v.is_initialized() {
  1200. return false;
  1201. }
  1202. };
  1203. true
  1204. }
  1205. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1206. while !is.eof()? {
  1207. let (field_number, wire_type) = is.read_tag_unpack()?;
  1208. match field_number {
  1209. 1 => {
  1210. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  1211. },
  1212. _ => {
  1213. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1214. },
  1215. };
  1216. }
  1217. ::std::result::Result::Ok(())
  1218. }
  1219. // Compute sizes of nested messages
  1220. #[allow(unused_variables)]
  1221. fn compute_size(&self) -> u32 {
  1222. let mut my_size = 0;
  1223. for value in &self.items {
  1224. let len = value.compute_size();
  1225. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1226. };
  1227. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1228. self.cached_size.set(my_size);
  1229. my_size
  1230. }
  1231. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1232. for v in &self.items {
  1233. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1234. os.write_raw_varint32(v.get_cached_size())?;
  1235. v.write_to_with_cached_sizes(os)?;
  1236. };
  1237. os.write_unknown_fields(self.get_unknown_fields())?;
  1238. ::std::result::Result::Ok(())
  1239. }
  1240. fn get_cached_size(&self) -> u32 {
  1241. self.cached_size.get()
  1242. }
  1243. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1244. &self.unknown_fields
  1245. }
  1246. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1247. &mut self.unknown_fields
  1248. }
  1249. fn as_any(&self) -> &dyn (::std::any::Any) {
  1250. self as &dyn (::std::any::Any)
  1251. }
  1252. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1253. self as &mut dyn (::std::any::Any)
  1254. }
  1255. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1256. self
  1257. }
  1258. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1259. Self::descriptor_static()
  1260. }
  1261. fn new() -> RepeatedRowOrder {
  1262. RepeatedRowOrder::new()
  1263. }
  1264. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1265. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1266. descriptor.get(|| {
  1267. let mut fields = ::std::vec::Vec::new();
  1268. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
  1269. "items",
  1270. |m: &RepeatedRowOrder| { &m.items },
  1271. |m: &mut RepeatedRowOrder| { &mut m.items },
  1272. ));
  1273. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedRowOrder>(
  1274. "RepeatedRowOrder",
  1275. fields,
  1276. file_descriptor_proto()
  1277. )
  1278. })
  1279. }
  1280. fn default_instance() -> &'static RepeatedRowOrder {
  1281. static instance: ::protobuf::rt::LazyV2<RepeatedRowOrder> = ::protobuf::rt::LazyV2::INIT;
  1282. instance.get(RepeatedRowOrder::new)
  1283. }
  1284. }
  1285. impl ::protobuf::Clear for RepeatedRowOrder {
  1286. fn clear(&mut self) {
  1287. self.items.clear();
  1288. self.unknown_fields.clear();
  1289. }
  1290. }
  1291. impl ::std::fmt::Debug for RepeatedRowOrder {
  1292. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1293. ::protobuf::text_format::fmt(self, f)
  1294. }
  1295. }
  1296. impl ::protobuf::reflect::ProtobufValue for RepeatedRowOrder {
  1297. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1298. ::protobuf::reflect::ReflectValueRef::Message(self)
  1299. }
  1300. }
  1301. #[derive(PartialEq,Clone,Default)]
  1302. pub struct Row {
  1303. // message fields
  1304. pub id: ::std::string::String,
  1305. pub cell_by_field_id: ::std::collections::HashMap<::std::string::String, Cell>,
  1306. pub height: i32,
  1307. // special fields
  1308. pub unknown_fields: ::protobuf::UnknownFields,
  1309. pub cached_size: ::protobuf::CachedSize,
  1310. }
  1311. impl<'a> ::std::default::Default for &'a Row {
  1312. fn default() -> &'a Row {
  1313. <Row as ::protobuf::Message>::default_instance()
  1314. }
  1315. }
  1316. impl Row {
  1317. pub fn new() -> Row {
  1318. ::std::default::Default::default()
  1319. }
  1320. // string id = 1;
  1321. pub fn get_id(&self) -> &str {
  1322. &self.id
  1323. }
  1324. pub fn clear_id(&mut self) {
  1325. self.id.clear();
  1326. }
  1327. // Param is passed by value, moved
  1328. pub fn set_id(&mut self, v: ::std::string::String) {
  1329. self.id = v;
  1330. }
  1331. // Mutable pointer to the field.
  1332. // If field is not initialized, it is initialized with default value first.
  1333. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  1334. &mut self.id
  1335. }
  1336. // Take field
  1337. pub fn take_id(&mut self) -> ::std::string::String {
  1338. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  1339. }
  1340. // repeated .Row.CellByFieldIdEntry cell_by_field_id = 2;
  1341. pub fn get_cell_by_field_id(&self) -> &::std::collections::HashMap<::std::string::String, Cell> {
  1342. &self.cell_by_field_id
  1343. }
  1344. pub fn clear_cell_by_field_id(&mut self) {
  1345. self.cell_by_field_id.clear();
  1346. }
  1347. // Param is passed by value, moved
  1348. pub fn set_cell_by_field_id(&mut self, v: ::std::collections::HashMap<::std::string::String, Cell>) {
  1349. self.cell_by_field_id = v;
  1350. }
  1351. // Mutable pointer to the field.
  1352. pub fn mut_cell_by_field_id(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, Cell> {
  1353. &mut self.cell_by_field_id
  1354. }
  1355. // Take field
  1356. pub fn take_cell_by_field_id(&mut self) -> ::std::collections::HashMap<::std::string::String, Cell> {
  1357. ::std::mem::replace(&mut self.cell_by_field_id, ::std::collections::HashMap::new())
  1358. }
  1359. // int32 height = 3;
  1360. pub fn get_height(&self) -> i32 {
  1361. self.height
  1362. }
  1363. pub fn clear_height(&mut self) {
  1364. self.height = 0;
  1365. }
  1366. // Param is passed by value, moved
  1367. pub fn set_height(&mut self, v: i32) {
  1368. self.height = v;
  1369. }
  1370. }
  1371. impl ::protobuf::Message for Row {
  1372. fn is_initialized(&self) -> bool {
  1373. true
  1374. }
  1375. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1376. while !is.eof()? {
  1377. let (field_number, wire_type) = is.read_tag_unpack()?;
  1378. match field_number {
  1379. 1 => {
  1380. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  1381. },
  1382. 2 => {
  1383. ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(wire_type, is, &mut self.cell_by_field_id)?;
  1384. },
  1385. 3 => {
  1386. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1387. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1388. }
  1389. let tmp = is.read_int32()?;
  1390. self.height = tmp;
  1391. },
  1392. _ => {
  1393. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1394. },
  1395. };
  1396. }
  1397. ::std::result::Result::Ok(())
  1398. }
  1399. // Compute sizes of nested messages
  1400. #[allow(unused_variables)]
  1401. fn compute_size(&self) -> u32 {
  1402. let mut my_size = 0;
  1403. if !self.id.is_empty() {
  1404. my_size += ::protobuf::rt::string_size(1, &self.id);
  1405. }
  1406. my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(2, &self.cell_by_field_id);
  1407. if self.height != 0 {
  1408. my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint);
  1409. }
  1410. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1411. self.cached_size.set(my_size);
  1412. my_size
  1413. }
  1414. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1415. if !self.id.is_empty() {
  1416. os.write_string(1, &self.id)?;
  1417. }
  1418. ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(2, &self.cell_by_field_id, os)?;
  1419. if self.height != 0 {
  1420. os.write_int32(3, self.height)?;
  1421. }
  1422. os.write_unknown_fields(self.get_unknown_fields())?;
  1423. ::std::result::Result::Ok(())
  1424. }
  1425. fn get_cached_size(&self) -> u32 {
  1426. self.cached_size.get()
  1427. }
  1428. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1429. &self.unknown_fields
  1430. }
  1431. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1432. &mut self.unknown_fields
  1433. }
  1434. fn as_any(&self) -> &dyn (::std::any::Any) {
  1435. self as &dyn (::std::any::Any)
  1436. }
  1437. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1438. self as &mut dyn (::std::any::Any)
  1439. }
  1440. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1441. self
  1442. }
  1443. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1444. Self::descriptor_static()
  1445. }
  1446. fn new() -> Row {
  1447. Row::new()
  1448. }
  1449. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1450. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1451. descriptor.get(|| {
  1452. let mut fields = ::std::vec::Vec::new();
  1453. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1454. "id",
  1455. |m: &Row| { &m.id },
  1456. |m: &mut Row| { &mut m.id },
  1457. ));
  1458. fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(
  1459. "cell_by_field_id",
  1460. |m: &Row| { &m.cell_by_field_id },
  1461. |m: &mut Row| { &mut m.cell_by_field_id },
  1462. ));
  1463. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  1464. "height",
  1465. |m: &Row| { &m.height },
  1466. |m: &mut Row| { &mut m.height },
  1467. ));
  1468. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Row>(
  1469. "Row",
  1470. fields,
  1471. file_descriptor_proto()
  1472. )
  1473. })
  1474. }
  1475. fn default_instance() -> &'static Row {
  1476. static instance: ::protobuf::rt::LazyV2<Row> = ::protobuf::rt::LazyV2::INIT;
  1477. instance.get(Row::new)
  1478. }
  1479. }
  1480. impl ::protobuf::Clear for Row {
  1481. fn clear(&mut self) {
  1482. self.id.clear();
  1483. self.cell_by_field_id.clear();
  1484. self.height = 0;
  1485. self.unknown_fields.clear();
  1486. }
  1487. }
  1488. impl ::std::fmt::Debug for Row {
  1489. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1490. ::protobuf::text_format::fmt(self, f)
  1491. }
  1492. }
  1493. impl ::protobuf::reflect::ProtobufValue for Row {
  1494. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1495. ::protobuf::reflect::ReflectValueRef::Message(self)
  1496. }
  1497. }
  1498. #[derive(PartialEq,Clone,Default)]
  1499. pub struct RepeatedGridBlock {
  1500. // message fields
  1501. pub items: ::protobuf::RepeatedField<GridBlock>,
  1502. // special fields
  1503. pub unknown_fields: ::protobuf::UnknownFields,
  1504. pub cached_size: ::protobuf::CachedSize,
  1505. }
  1506. impl<'a> ::std::default::Default for &'a RepeatedGridBlock {
  1507. fn default() -> &'a RepeatedGridBlock {
  1508. <RepeatedGridBlock as ::protobuf::Message>::default_instance()
  1509. }
  1510. }
  1511. impl RepeatedGridBlock {
  1512. pub fn new() -> RepeatedGridBlock {
  1513. ::std::default::Default::default()
  1514. }
  1515. // repeated .GridBlock items = 1;
  1516. pub fn get_items(&self) -> &[GridBlock] {
  1517. &self.items
  1518. }
  1519. pub fn clear_items(&mut self) {
  1520. self.items.clear();
  1521. }
  1522. // Param is passed by value, moved
  1523. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<GridBlock>) {
  1524. self.items = v;
  1525. }
  1526. // Mutable pointer to the field.
  1527. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<GridBlock> {
  1528. &mut self.items
  1529. }
  1530. // Take field
  1531. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<GridBlock> {
  1532. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  1533. }
  1534. }
  1535. impl ::protobuf::Message for RepeatedGridBlock {
  1536. fn is_initialized(&self) -> bool {
  1537. for v in &self.items {
  1538. if !v.is_initialized() {
  1539. return false;
  1540. }
  1541. };
  1542. true
  1543. }
  1544. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1545. while !is.eof()? {
  1546. let (field_number, wire_type) = is.read_tag_unpack()?;
  1547. match field_number {
  1548. 1 => {
  1549. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  1550. },
  1551. _ => {
  1552. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1553. },
  1554. };
  1555. }
  1556. ::std::result::Result::Ok(())
  1557. }
  1558. // Compute sizes of nested messages
  1559. #[allow(unused_variables)]
  1560. fn compute_size(&self) -> u32 {
  1561. let mut my_size = 0;
  1562. for value in &self.items {
  1563. let len = value.compute_size();
  1564. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1565. };
  1566. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1567. self.cached_size.set(my_size);
  1568. my_size
  1569. }
  1570. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1571. for v in &self.items {
  1572. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1573. os.write_raw_varint32(v.get_cached_size())?;
  1574. v.write_to_with_cached_sizes(os)?;
  1575. };
  1576. os.write_unknown_fields(self.get_unknown_fields())?;
  1577. ::std::result::Result::Ok(())
  1578. }
  1579. fn get_cached_size(&self) -> u32 {
  1580. self.cached_size.get()
  1581. }
  1582. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1583. &self.unknown_fields
  1584. }
  1585. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1586. &mut self.unknown_fields
  1587. }
  1588. fn as_any(&self) -> &dyn (::std::any::Any) {
  1589. self as &dyn (::std::any::Any)
  1590. }
  1591. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1592. self as &mut dyn (::std::any::Any)
  1593. }
  1594. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1595. self
  1596. }
  1597. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1598. Self::descriptor_static()
  1599. }
  1600. fn new() -> RepeatedGridBlock {
  1601. RepeatedGridBlock::new()
  1602. }
  1603. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1604. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1605. descriptor.get(|| {
  1606. let mut fields = ::std::vec::Vec::new();
  1607. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlock>>(
  1608. "items",
  1609. |m: &RepeatedGridBlock| { &m.items },
  1610. |m: &mut RepeatedGridBlock| { &mut m.items },
  1611. ));
  1612. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedGridBlock>(
  1613. "RepeatedGridBlock",
  1614. fields,
  1615. file_descriptor_proto()
  1616. )
  1617. })
  1618. }
  1619. fn default_instance() -> &'static RepeatedGridBlock {
  1620. static instance: ::protobuf::rt::LazyV2<RepeatedGridBlock> = ::protobuf::rt::LazyV2::INIT;
  1621. instance.get(RepeatedGridBlock::new)
  1622. }
  1623. }
  1624. impl ::protobuf::Clear for RepeatedGridBlock {
  1625. fn clear(&mut self) {
  1626. self.items.clear();
  1627. self.unknown_fields.clear();
  1628. }
  1629. }
  1630. impl ::std::fmt::Debug for RepeatedGridBlock {
  1631. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1632. ::protobuf::text_format::fmt(self, f)
  1633. }
  1634. }
  1635. impl ::protobuf::reflect::ProtobufValue for RepeatedGridBlock {
  1636. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1637. ::protobuf::reflect::ReflectValueRef::Message(self)
  1638. }
  1639. }
  1640. #[derive(PartialEq,Clone,Default)]
  1641. pub struct GridBlock {
  1642. // message fields
  1643. pub block_id: ::std::string::String,
  1644. pub rows: ::protobuf::RepeatedField<Row>,
  1645. // special fields
  1646. pub unknown_fields: ::protobuf::UnknownFields,
  1647. pub cached_size: ::protobuf::CachedSize,
  1648. }
  1649. impl<'a> ::std::default::Default for &'a GridBlock {
  1650. fn default() -> &'a GridBlock {
  1651. <GridBlock as ::protobuf::Message>::default_instance()
  1652. }
  1653. }
  1654. impl GridBlock {
  1655. pub fn new() -> GridBlock {
  1656. ::std::default::Default::default()
  1657. }
  1658. // string block_id = 1;
  1659. pub fn get_block_id(&self) -> &str {
  1660. &self.block_id
  1661. }
  1662. pub fn clear_block_id(&mut self) {
  1663. self.block_id.clear();
  1664. }
  1665. // Param is passed by value, moved
  1666. pub fn set_block_id(&mut self, v: ::std::string::String) {
  1667. self.block_id = v;
  1668. }
  1669. // Mutable pointer to the field.
  1670. // If field is not initialized, it is initialized with default value first.
  1671. pub fn mut_block_id(&mut self) -> &mut ::std::string::String {
  1672. &mut self.block_id
  1673. }
  1674. // Take field
  1675. pub fn take_block_id(&mut self) -> ::std::string::String {
  1676. ::std::mem::replace(&mut self.block_id, ::std::string::String::new())
  1677. }
  1678. // repeated .Row rows = 2;
  1679. pub fn get_rows(&self) -> &[Row] {
  1680. &self.rows
  1681. }
  1682. pub fn clear_rows(&mut self) {
  1683. self.rows.clear();
  1684. }
  1685. // Param is passed by value, moved
  1686. pub fn set_rows(&mut self, v: ::protobuf::RepeatedField<Row>) {
  1687. self.rows = v;
  1688. }
  1689. // Mutable pointer to the field.
  1690. pub fn mut_rows(&mut self) -> &mut ::protobuf::RepeatedField<Row> {
  1691. &mut self.rows
  1692. }
  1693. // Take field
  1694. pub fn take_rows(&mut self) -> ::protobuf::RepeatedField<Row> {
  1695. ::std::mem::replace(&mut self.rows, ::protobuf::RepeatedField::new())
  1696. }
  1697. }
  1698. impl ::protobuf::Message for GridBlock {
  1699. fn is_initialized(&self) -> bool {
  1700. for v in &self.rows {
  1701. if !v.is_initialized() {
  1702. return false;
  1703. }
  1704. };
  1705. true
  1706. }
  1707. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1708. while !is.eof()? {
  1709. let (field_number, wire_type) = is.read_tag_unpack()?;
  1710. match field_number {
  1711. 1 => {
  1712. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
  1713. },
  1714. 2 => {
  1715. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.rows)?;
  1716. },
  1717. _ => {
  1718. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1719. },
  1720. };
  1721. }
  1722. ::std::result::Result::Ok(())
  1723. }
  1724. // Compute sizes of nested messages
  1725. #[allow(unused_variables)]
  1726. fn compute_size(&self) -> u32 {
  1727. let mut my_size = 0;
  1728. if !self.block_id.is_empty() {
  1729. my_size += ::protobuf::rt::string_size(1, &self.block_id);
  1730. }
  1731. for value in &self.rows {
  1732. let len = value.compute_size();
  1733. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1734. };
  1735. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1736. self.cached_size.set(my_size);
  1737. my_size
  1738. }
  1739. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1740. if !self.block_id.is_empty() {
  1741. os.write_string(1, &self.block_id)?;
  1742. }
  1743. for v in &self.rows {
  1744. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1745. os.write_raw_varint32(v.get_cached_size())?;
  1746. v.write_to_with_cached_sizes(os)?;
  1747. };
  1748. os.write_unknown_fields(self.get_unknown_fields())?;
  1749. ::std::result::Result::Ok(())
  1750. }
  1751. fn get_cached_size(&self) -> u32 {
  1752. self.cached_size.get()
  1753. }
  1754. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1755. &self.unknown_fields
  1756. }
  1757. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1758. &mut self.unknown_fields
  1759. }
  1760. fn as_any(&self) -> &dyn (::std::any::Any) {
  1761. self as &dyn (::std::any::Any)
  1762. }
  1763. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1764. self as &mut dyn (::std::any::Any)
  1765. }
  1766. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1767. self
  1768. }
  1769. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1770. Self::descriptor_static()
  1771. }
  1772. fn new() -> GridBlock {
  1773. GridBlock::new()
  1774. }
  1775. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1776. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1777. descriptor.get(|| {
  1778. let mut fields = ::std::vec::Vec::new();
  1779. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1780. "block_id",
  1781. |m: &GridBlock| { &m.block_id },
  1782. |m: &mut GridBlock| { &mut m.block_id },
  1783. ));
  1784. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Row>>(
  1785. "rows",
  1786. |m: &GridBlock| { &m.rows },
  1787. |m: &mut GridBlock| { &mut m.rows },
  1788. ));
  1789. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlock>(
  1790. "GridBlock",
  1791. fields,
  1792. file_descriptor_proto()
  1793. )
  1794. })
  1795. }
  1796. fn default_instance() -> &'static GridBlock {
  1797. static instance: ::protobuf::rt::LazyV2<GridBlock> = ::protobuf::rt::LazyV2::INIT;
  1798. instance.get(GridBlock::new)
  1799. }
  1800. }
  1801. impl ::protobuf::Clear for GridBlock {
  1802. fn clear(&mut self) {
  1803. self.block_id.clear();
  1804. self.rows.clear();
  1805. self.unknown_fields.clear();
  1806. }
  1807. }
  1808. impl ::std::fmt::Debug for GridBlock {
  1809. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1810. ::protobuf::text_format::fmt(self, f)
  1811. }
  1812. }
  1813. impl ::protobuf::reflect::ProtobufValue for GridBlock {
  1814. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1815. ::protobuf::reflect::ReflectValueRef::Message(self)
  1816. }
  1817. }
  1818. #[derive(PartialEq,Clone,Default)]
  1819. pub struct Cell {
  1820. // message fields
  1821. pub field_id: ::std::string::String,
  1822. pub content: ::std::string::String,
  1823. // special fields
  1824. pub unknown_fields: ::protobuf::UnknownFields,
  1825. pub cached_size: ::protobuf::CachedSize,
  1826. }
  1827. impl<'a> ::std::default::Default for &'a Cell {
  1828. fn default() -> &'a Cell {
  1829. <Cell as ::protobuf::Message>::default_instance()
  1830. }
  1831. }
  1832. impl Cell {
  1833. pub fn new() -> Cell {
  1834. ::std::default::Default::default()
  1835. }
  1836. // string field_id = 1;
  1837. pub fn get_field_id(&self) -> &str {
  1838. &self.field_id
  1839. }
  1840. pub fn clear_field_id(&mut self) {
  1841. self.field_id.clear();
  1842. }
  1843. // Param is passed by value, moved
  1844. pub fn set_field_id(&mut self, v: ::std::string::String) {
  1845. self.field_id = v;
  1846. }
  1847. // Mutable pointer to the field.
  1848. // If field is not initialized, it is initialized with default value first.
  1849. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  1850. &mut self.field_id
  1851. }
  1852. // Take field
  1853. pub fn take_field_id(&mut self) -> ::std::string::String {
  1854. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  1855. }
  1856. // string content = 2;
  1857. pub fn get_content(&self) -> &str {
  1858. &self.content
  1859. }
  1860. pub fn clear_content(&mut self) {
  1861. self.content.clear();
  1862. }
  1863. // Param is passed by value, moved
  1864. pub fn set_content(&mut self, v: ::std::string::String) {
  1865. self.content = v;
  1866. }
  1867. // Mutable pointer to the field.
  1868. // If field is not initialized, it is initialized with default value first.
  1869. pub fn mut_content(&mut self) -> &mut ::std::string::String {
  1870. &mut self.content
  1871. }
  1872. // Take field
  1873. pub fn take_content(&mut self) -> ::std::string::String {
  1874. ::std::mem::replace(&mut self.content, ::std::string::String::new())
  1875. }
  1876. }
  1877. impl ::protobuf::Message for Cell {
  1878. fn is_initialized(&self) -> bool {
  1879. true
  1880. }
  1881. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1882. while !is.eof()? {
  1883. let (field_number, wire_type) = is.read_tag_unpack()?;
  1884. match field_number {
  1885. 1 => {
  1886. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  1887. },
  1888. 2 => {
  1889. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.content)?;
  1890. },
  1891. _ => {
  1892. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1893. },
  1894. };
  1895. }
  1896. ::std::result::Result::Ok(())
  1897. }
  1898. // Compute sizes of nested messages
  1899. #[allow(unused_variables)]
  1900. fn compute_size(&self) -> u32 {
  1901. let mut my_size = 0;
  1902. if !self.field_id.is_empty() {
  1903. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  1904. }
  1905. if !self.content.is_empty() {
  1906. my_size += ::protobuf::rt::string_size(2, &self.content);
  1907. }
  1908. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1909. self.cached_size.set(my_size);
  1910. my_size
  1911. }
  1912. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1913. if !self.field_id.is_empty() {
  1914. os.write_string(1, &self.field_id)?;
  1915. }
  1916. if !self.content.is_empty() {
  1917. os.write_string(2, &self.content)?;
  1918. }
  1919. os.write_unknown_fields(self.get_unknown_fields())?;
  1920. ::std::result::Result::Ok(())
  1921. }
  1922. fn get_cached_size(&self) -> u32 {
  1923. self.cached_size.get()
  1924. }
  1925. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1926. &self.unknown_fields
  1927. }
  1928. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1929. &mut self.unknown_fields
  1930. }
  1931. fn as_any(&self) -> &dyn (::std::any::Any) {
  1932. self as &dyn (::std::any::Any)
  1933. }
  1934. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1935. self as &mut dyn (::std::any::Any)
  1936. }
  1937. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1938. self
  1939. }
  1940. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1941. Self::descriptor_static()
  1942. }
  1943. fn new() -> Cell {
  1944. Cell::new()
  1945. }
  1946. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1947. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1948. descriptor.get(|| {
  1949. let mut fields = ::std::vec::Vec::new();
  1950. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1951. "field_id",
  1952. |m: &Cell| { &m.field_id },
  1953. |m: &mut Cell| { &mut m.field_id },
  1954. ));
  1955. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1956. "content",
  1957. |m: &Cell| { &m.content },
  1958. |m: &mut Cell| { &mut m.content },
  1959. ));
  1960. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Cell>(
  1961. "Cell",
  1962. fields,
  1963. file_descriptor_proto()
  1964. )
  1965. })
  1966. }
  1967. fn default_instance() -> &'static Cell {
  1968. static instance: ::protobuf::rt::LazyV2<Cell> = ::protobuf::rt::LazyV2::INIT;
  1969. instance.get(Cell::new)
  1970. }
  1971. }
  1972. impl ::protobuf::Clear for Cell {
  1973. fn clear(&mut self) {
  1974. self.field_id.clear();
  1975. self.content.clear();
  1976. self.unknown_fields.clear();
  1977. }
  1978. }
  1979. impl ::std::fmt::Debug for Cell {
  1980. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1981. ::protobuf::text_format::fmt(self, f)
  1982. }
  1983. }
  1984. impl ::protobuf::reflect::ProtobufValue for Cell {
  1985. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1986. ::protobuf::reflect::ReflectValueRef::Message(self)
  1987. }
  1988. }
  1989. #[derive(PartialEq,Clone,Default)]
  1990. pub struct RepeatedCell {
  1991. // message fields
  1992. pub items: ::protobuf::RepeatedField<Cell>,
  1993. // special fields
  1994. pub unknown_fields: ::protobuf::UnknownFields,
  1995. pub cached_size: ::protobuf::CachedSize,
  1996. }
  1997. impl<'a> ::std::default::Default for &'a RepeatedCell {
  1998. fn default() -> &'a RepeatedCell {
  1999. <RepeatedCell as ::protobuf::Message>::default_instance()
  2000. }
  2001. }
  2002. impl RepeatedCell {
  2003. pub fn new() -> RepeatedCell {
  2004. ::std::default::Default::default()
  2005. }
  2006. // repeated .Cell items = 1;
  2007. pub fn get_items(&self) -> &[Cell] {
  2008. &self.items
  2009. }
  2010. pub fn clear_items(&mut self) {
  2011. self.items.clear();
  2012. }
  2013. // Param is passed by value, moved
  2014. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Cell>) {
  2015. self.items = v;
  2016. }
  2017. // Mutable pointer to the field.
  2018. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Cell> {
  2019. &mut self.items
  2020. }
  2021. // Take field
  2022. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Cell> {
  2023. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  2024. }
  2025. }
  2026. impl ::protobuf::Message for RepeatedCell {
  2027. fn is_initialized(&self) -> bool {
  2028. for v in &self.items {
  2029. if !v.is_initialized() {
  2030. return false;
  2031. }
  2032. };
  2033. true
  2034. }
  2035. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2036. while !is.eof()? {
  2037. let (field_number, wire_type) = is.read_tag_unpack()?;
  2038. match field_number {
  2039. 1 => {
  2040. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  2041. },
  2042. _ => {
  2043. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2044. },
  2045. };
  2046. }
  2047. ::std::result::Result::Ok(())
  2048. }
  2049. // Compute sizes of nested messages
  2050. #[allow(unused_variables)]
  2051. fn compute_size(&self) -> u32 {
  2052. let mut my_size = 0;
  2053. for value in &self.items {
  2054. let len = value.compute_size();
  2055. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2056. };
  2057. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2058. self.cached_size.set(my_size);
  2059. my_size
  2060. }
  2061. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2062. for v in &self.items {
  2063. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2064. os.write_raw_varint32(v.get_cached_size())?;
  2065. v.write_to_with_cached_sizes(os)?;
  2066. };
  2067. os.write_unknown_fields(self.get_unknown_fields())?;
  2068. ::std::result::Result::Ok(())
  2069. }
  2070. fn get_cached_size(&self) -> u32 {
  2071. self.cached_size.get()
  2072. }
  2073. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2074. &self.unknown_fields
  2075. }
  2076. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2077. &mut self.unknown_fields
  2078. }
  2079. fn as_any(&self) -> &dyn (::std::any::Any) {
  2080. self as &dyn (::std::any::Any)
  2081. }
  2082. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2083. self as &mut dyn (::std::any::Any)
  2084. }
  2085. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2086. self
  2087. }
  2088. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2089. Self::descriptor_static()
  2090. }
  2091. fn new() -> RepeatedCell {
  2092. RepeatedCell::new()
  2093. }
  2094. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2095. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2096. descriptor.get(|| {
  2097. let mut fields = ::std::vec::Vec::new();
  2098. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Cell>>(
  2099. "items",
  2100. |m: &RepeatedCell| { &m.items },
  2101. |m: &mut RepeatedCell| { &mut m.items },
  2102. ));
  2103. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedCell>(
  2104. "RepeatedCell",
  2105. fields,
  2106. file_descriptor_proto()
  2107. )
  2108. })
  2109. }
  2110. fn default_instance() -> &'static RepeatedCell {
  2111. static instance: ::protobuf::rt::LazyV2<RepeatedCell> = ::protobuf::rt::LazyV2::INIT;
  2112. instance.get(RepeatedCell::new)
  2113. }
  2114. }
  2115. impl ::protobuf::Clear for RepeatedCell {
  2116. fn clear(&mut self) {
  2117. self.items.clear();
  2118. self.unknown_fields.clear();
  2119. }
  2120. }
  2121. impl ::std::fmt::Debug for RepeatedCell {
  2122. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2123. ::protobuf::text_format::fmt(self, f)
  2124. }
  2125. }
  2126. impl ::protobuf::reflect::ProtobufValue for RepeatedCell {
  2127. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2128. ::protobuf::reflect::ReflectValueRef::Message(self)
  2129. }
  2130. }
  2131. #[derive(PartialEq,Clone,Default)]
  2132. pub struct CreateGridPayload {
  2133. // message fields
  2134. pub name: ::std::string::String,
  2135. // special fields
  2136. pub unknown_fields: ::protobuf::UnknownFields,
  2137. pub cached_size: ::protobuf::CachedSize,
  2138. }
  2139. impl<'a> ::std::default::Default for &'a CreateGridPayload {
  2140. fn default() -> &'a CreateGridPayload {
  2141. <CreateGridPayload as ::protobuf::Message>::default_instance()
  2142. }
  2143. }
  2144. impl CreateGridPayload {
  2145. pub fn new() -> CreateGridPayload {
  2146. ::std::default::Default::default()
  2147. }
  2148. // string name = 1;
  2149. pub fn get_name(&self) -> &str {
  2150. &self.name
  2151. }
  2152. pub fn clear_name(&mut self) {
  2153. self.name.clear();
  2154. }
  2155. // Param is passed by value, moved
  2156. pub fn set_name(&mut self, v: ::std::string::String) {
  2157. self.name = v;
  2158. }
  2159. // Mutable pointer to the field.
  2160. // If field is not initialized, it is initialized with default value first.
  2161. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  2162. &mut self.name
  2163. }
  2164. // Take field
  2165. pub fn take_name(&mut self) -> ::std::string::String {
  2166. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  2167. }
  2168. }
  2169. impl ::protobuf::Message for CreateGridPayload {
  2170. fn is_initialized(&self) -> bool {
  2171. true
  2172. }
  2173. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2174. while !is.eof()? {
  2175. let (field_number, wire_type) = is.read_tag_unpack()?;
  2176. match field_number {
  2177. 1 => {
  2178. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  2179. },
  2180. _ => {
  2181. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2182. },
  2183. };
  2184. }
  2185. ::std::result::Result::Ok(())
  2186. }
  2187. // Compute sizes of nested messages
  2188. #[allow(unused_variables)]
  2189. fn compute_size(&self) -> u32 {
  2190. let mut my_size = 0;
  2191. if !self.name.is_empty() {
  2192. my_size += ::protobuf::rt::string_size(1, &self.name);
  2193. }
  2194. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2195. self.cached_size.set(my_size);
  2196. my_size
  2197. }
  2198. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2199. if !self.name.is_empty() {
  2200. os.write_string(1, &self.name)?;
  2201. }
  2202. os.write_unknown_fields(self.get_unknown_fields())?;
  2203. ::std::result::Result::Ok(())
  2204. }
  2205. fn get_cached_size(&self) -> u32 {
  2206. self.cached_size.get()
  2207. }
  2208. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2209. &self.unknown_fields
  2210. }
  2211. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2212. &mut self.unknown_fields
  2213. }
  2214. fn as_any(&self) -> &dyn (::std::any::Any) {
  2215. self as &dyn (::std::any::Any)
  2216. }
  2217. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2218. self as &mut dyn (::std::any::Any)
  2219. }
  2220. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2221. self
  2222. }
  2223. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2224. Self::descriptor_static()
  2225. }
  2226. fn new() -> CreateGridPayload {
  2227. CreateGridPayload::new()
  2228. }
  2229. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2230. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2231. descriptor.get(|| {
  2232. let mut fields = ::std::vec::Vec::new();
  2233. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2234. "name",
  2235. |m: &CreateGridPayload| { &m.name },
  2236. |m: &mut CreateGridPayload| { &mut m.name },
  2237. ));
  2238. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateGridPayload>(
  2239. "CreateGridPayload",
  2240. fields,
  2241. file_descriptor_proto()
  2242. )
  2243. })
  2244. }
  2245. fn default_instance() -> &'static CreateGridPayload {
  2246. static instance: ::protobuf::rt::LazyV2<CreateGridPayload> = ::protobuf::rt::LazyV2::INIT;
  2247. instance.get(CreateGridPayload::new)
  2248. }
  2249. }
  2250. impl ::protobuf::Clear for CreateGridPayload {
  2251. fn clear(&mut self) {
  2252. self.name.clear();
  2253. self.unknown_fields.clear();
  2254. }
  2255. }
  2256. impl ::std::fmt::Debug for CreateGridPayload {
  2257. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2258. ::protobuf::text_format::fmt(self, f)
  2259. }
  2260. }
  2261. impl ::protobuf::reflect::ProtobufValue for CreateGridPayload {
  2262. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2263. ::protobuf::reflect::ReflectValueRef::Message(self)
  2264. }
  2265. }
  2266. #[derive(PartialEq,Clone,Default)]
  2267. pub struct GridId {
  2268. // message fields
  2269. pub value: ::std::string::String,
  2270. // special fields
  2271. pub unknown_fields: ::protobuf::UnknownFields,
  2272. pub cached_size: ::protobuf::CachedSize,
  2273. }
  2274. impl<'a> ::std::default::Default for &'a GridId {
  2275. fn default() -> &'a GridId {
  2276. <GridId as ::protobuf::Message>::default_instance()
  2277. }
  2278. }
  2279. impl GridId {
  2280. pub fn new() -> GridId {
  2281. ::std::default::Default::default()
  2282. }
  2283. // string value = 1;
  2284. pub fn get_value(&self) -> &str {
  2285. &self.value
  2286. }
  2287. pub fn clear_value(&mut self) {
  2288. self.value.clear();
  2289. }
  2290. // Param is passed by value, moved
  2291. pub fn set_value(&mut self, v: ::std::string::String) {
  2292. self.value = v;
  2293. }
  2294. // Mutable pointer to the field.
  2295. // If field is not initialized, it is initialized with default value first.
  2296. pub fn mut_value(&mut self) -> &mut ::std::string::String {
  2297. &mut self.value
  2298. }
  2299. // Take field
  2300. pub fn take_value(&mut self) -> ::std::string::String {
  2301. ::std::mem::replace(&mut self.value, ::std::string::String::new())
  2302. }
  2303. }
  2304. impl ::protobuf::Message for GridId {
  2305. fn is_initialized(&self) -> bool {
  2306. true
  2307. }
  2308. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2309. while !is.eof()? {
  2310. let (field_number, wire_type) = is.read_tag_unpack()?;
  2311. match field_number {
  2312. 1 => {
  2313. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
  2314. },
  2315. _ => {
  2316. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2317. },
  2318. };
  2319. }
  2320. ::std::result::Result::Ok(())
  2321. }
  2322. // Compute sizes of nested messages
  2323. #[allow(unused_variables)]
  2324. fn compute_size(&self) -> u32 {
  2325. let mut my_size = 0;
  2326. if !self.value.is_empty() {
  2327. my_size += ::protobuf::rt::string_size(1, &self.value);
  2328. }
  2329. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2330. self.cached_size.set(my_size);
  2331. my_size
  2332. }
  2333. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2334. if !self.value.is_empty() {
  2335. os.write_string(1, &self.value)?;
  2336. }
  2337. os.write_unknown_fields(self.get_unknown_fields())?;
  2338. ::std::result::Result::Ok(())
  2339. }
  2340. fn get_cached_size(&self) -> u32 {
  2341. self.cached_size.get()
  2342. }
  2343. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2344. &self.unknown_fields
  2345. }
  2346. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2347. &mut self.unknown_fields
  2348. }
  2349. fn as_any(&self) -> &dyn (::std::any::Any) {
  2350. self as &dyn (::std::any::Any)
  2351. }
  2352. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2353. self as &mut dyn (::std::any::Any)
  2354. }
  2355. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2356. self
  2357. }
  2358. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2359. Self::descriptor_static()
  2360. }
  2361. fn new() -> GridId {
  2362. GridId::new()
  2363. }
  2364. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2365. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2366. descriptor.get(|| {
  2367. let mut fields = ::std::vec::Vec::new();
  2368. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2369. "value",
  2370. |m: &GridId| { &m.value },
  2371. |m: &mut GridId| { &mut m.value },
  2372. ));
  2373. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridId>(
  2374. "GridId",
  2375. fields,
  2376. file_descriptor_proto()
  2377. )
  2378. })
  2379. }
  2380. fn default_instance() -> &'static GridId {
  2381. static instance: ::protobuf::rt::LazyV2<GridId> = ::protobuf::rt::LazyV2::INIT;
  2382. instance.get(GridId::new)
  2383. }
  2384. }
  2385. impl ::protobuf::Clear for GridId {
  2386. fn clear(&mut self) {
  2387. self.value.clear();
  2388. self.unknown_fields.clear();
  2389. }
  2390. }
  2391. impl ::std::fmt::Debug for GridId {
  2392. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2393. ::protobuf::text_format::fmt(self, f)
  2394. }
  2395. }
  2396. impl ::protobuf::reflect::ProtobufValue for GridId {
  2397. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2398. ::protobuf::reflect::ReflectValueRef::Message(self)
  2399. }
  2400. }
  2401. #[derive(PartialEq,Clone,Default)]
  2402. pub struct GridBlockId {
  2403. // message fields
  2404. pub value: ::std::string::String,
  2405. // special fields
  2406. pub unknown_fields: ::protobuf::UnknownFields,
  2407. pub cached_size: ::protobuf::CachedSize,
  2408. }
  2409. impl<'a> ::std::default::Default for &'a GridBlockId {
  2410. fn default() -> &'a GridBlockId {
  2411. <GridBlockId as ::protobuf::Message>::default_instance()
  2412. }
  2413. }
  2414. impl GridBlockId {
  2415. pub fn new() -> GridBlockId {
  2416. ::std::default::Default::default()
  2417. }
  2418. // string value = 1;
  2419. pub fn get_value(&self) -> &str {
  2420. &self.value
  2421. }
  2422. pub fn clear_value(&mut self) {
  2423. self.value.clear();
  2424. }
  2425. // Param is passed by value, moved
  2426. pub fn set_value(&mut self, v: ::std::string::String) {
  2427. self.value = v;
  2428. }
  2429. // Mutable pointer to the field.
  2430. // If field is not initialized, it is initialized with default value first.
  2431. pub fn mut_value(&mut self) -> &mut ::std::string::String {
  2432. &mut self.value
  2433. }
  2434. // Take field
  2435. pub fn take_value(&mut self) -> ::std::string::String {
  2436. ::std::mem::replace(&mut self.value, ::std::string::String::new())
  2437. }
  2438. }
  2439. impl ::protobuf::Message for GridBlockId {
  2440. fn is_initialized(&self) -> bool {
  2441. true
  2442. }
  2443. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2444. while !is.eof()? {
  2445. let (field_number, wire_type) = is.read_tag_unpack()?;
  2446. match field_number {
  2447. 1 => {
  2448. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
  2449. },
  2450. _ => {
  2451. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2452. },
  2453. };
  2454. }
  2455. ::std::result::Result::Ok(())
  2456. }
  2457. // Compute sizes of nested messages
  2458. #[allow(unused_variables)]
  2459. fn compute_size(&self) -> u32 {
  2460. let mut my_size = 0;
  2461. if !self.value.is_empty() {
  2462. my_size += ::protobuf::rt::string_size(1, &self.value);
  2463. }
  2464. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2465. self.cached_size.set(my_size);
  2466. my_size
  2467. }
  2468. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2469. if !self.value.is_empty() {
  2470. os.write_string(1, &self.value)?;
  2471. }
  2472. os.write_unknown_fields(self.get_unknown_fields())?;
  2473. ::std::result::Result::Ok(())
  2474. }
  2475. fn get_cached_size(&self) -> u32 {
  2476. self.cached_size.get()
  2477. }
  2478. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2479. &self.unknown_fields
  2480. }
  2481. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2482. &mut self.unknown_fields
  2483. }
  2484. fn as_any(&self) -> &dyn (::std::any::Any) {
  2485. self as &dyn (::std::any::Any)
  2486. }
  2487. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2488. self as &mut dyn (::std::any::Any)
  2489. }
  2490. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2491. self
  2492. }
  2493. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2494. Self::descriptor_static()
  2495. }
  2496. fn new() -> GridBlockId {
  2497. GridBlockId::new()
  2498. }
  2499. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2500. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2501. descriptor.get(|| {
  2502. let mut fields = ::std::vec::Vec::new();
  2503. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2504. "value",
  2505. |m: &GridBlockId| { &m.value },
  2506. |m: &mut GridBlockId| { &mut m.value },
  2507. ));
  2508. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlockId>(
  2509. "GridBlockId",
  2510. fields,
  2511. file_descriptor_proto()
  2512. )
  2513. })
  2514. }
  2515. fn default_instance() -> &'static GridBlockId {
  2516. static instance: ::protobuf::rt::LazyV2<GridBlockId> = ::protobuf::rt::LazyV2::INIT;
  2517. instance.get(GridBlockId::new)
  2518. }
  2519. }
  2520. impl ::protobuf::Clear for GridBlockId {
  2521. fn clear(&mut self) {
  2522. self.value.clear();
  2523. self.unknown_fields.clear();
  2524. }
  2525. }
  2526. impl ::std::fmt::Debug for GridBlockId {
  2527. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2528. ::protobuf::text_format::fmt(self, f)
  2529. }
  2530. }
  2531. impl ::protobuf::reflect::ProtobufValue for GridBlockId {
  2532. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2533. ::protobuf::reflect::ReflectValueRef::Message(self)
  2534. }
  2535. }
  2536. #[derive(PartialEq,Clone,Default)]
  2537. pub struct CreateRowPayload {
  2538. // message fields
  2539. pub grid_id: ::std::string::String,
  2540. // message oneof groups
  2541. pub one_of_upper_row_id: ::std::option::Option<CreateRowPayload_oneof_one_of_upper_row_id>,
  2542. // special fields
  2543. pub unknown_fields: ::protobuf::UnknownFields,
  2544. pub cached_size: ::protobuf::CachedSize,
  2545. }
  2546. impl<'a> ::std::default::Default for &'a CreateRowPayload {
  2547. fn default() -> &'a CreateRowPayload {
  2548. <CreateRowPayload as ::protobuf::Message>::default_instance()
  2549. }
  2550. }
  2551. #[derive(Clone,PartialEq,Debug)]
  2552. pub enum CreateRowPayload_oneof_one_of_upper_row_id {
  2553. upper_row_id(::std::string::String),
  2554. }
  2555. impl CreateRowPayload {
  2556. pub fn new() -> CreateRowPayload {
  2557. ::std::default::Default::default()
  2558. }
  2559. // string grid_id = 1;
  2560. pub fn get_grid_id(&self) -> &str {
  2561. &self.grid_id
  2562. }
  2563. pub fn clear_grid_id(&mut self) {
  2564. self.grid_id.clear();
  2565. }
  2566. // Param is passed by value, moved
  2567. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2568. self.grid_id = v;
  2569. }
  2570. // Mutable pointer to the field.
  2571. // If field is not initialized, it is initialized with default value first.
  2572. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2573. &mut self.grid_id
  2574. }
  2575. // Take field
  2576. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2577. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2578. }
  2579. // string upper_row_id = 2;
  2580. pub fn get_upper_row_id(&self) -> &str {
  2581. match self.one_of_upper_row_id {
  2582. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(ref v)) => v,
  2583. _ => "",
  2584. }
  2585. }
  2586. pub fn clear_upper_row_id(&mut self) {
  2587. self.one_of_upper_row_id = ::std::option::Option::None;
  2588. }
  2589. pub fn has_upper_row_id(&self) -> bool {
  2590. match self.one_of_upper_row_id {
  2591. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(..)) => true,
  2592. _ => false,
  2593. }
  2594. }
  2595. // Param is passed by value, moved
  2596. pub fn set_upper_row_id(&mut self, v: ::std::string::String) {
  2597. self.one_of_upper_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(v))
  2598. }
  2599. // Mutable pointer to the field.
  2600. pub fn mut_upper_row_id(&mut self) -> &mut ::std::string::String {
  2601. if let ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(_)) = self.one_of_upper_row_id {
  2602. } else {
  2603. self.one_of_upper_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(::std::string::String::new()));
  2604. }
  2605. match self.one_of_upper_row_id {
  2606. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(ref mut v)) => v,
  2607. _ => panic!(),
  2608. }
  2609. }
  2610. // Take field
  2611. pub fn take_upper_row_id(&mut self) -> ::std::string::String {
  2612. if self.has_upper_row_id() {
  2613. match self.one_of_upper_row_id.take() {
  2614. ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(v)) => v,
  2615. _ => panic!(),
  2616. }
  2617. } else {
  2618. ::std::string::String::new()
  2619. }
  2620. }
  2621. }
  2622. impl ::protobuf::Message for CreateRowPayload {
  2623. fn is_initialized(&self) -> bool {
  2624. true
  2625. }
  2626. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2627. while !is.eof()? {
  2628. let (field_number, wire_type) = is.read_tag_unpack()?;
  2629. match field_number {
  2630. 1 => {
  2631. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  2632. },
  2633. 2 => {
  2634. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  2635. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2636. }
  2637. self.one_of_upper_row_id = ::std::option::Option::Some(CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(is.read_string()?));
  2638. },
  2639. _ => {
  2640. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2641. },
  2642. };
  2643. }
  2644. ::std::result::Result::Ok(())
  2645. }
  2646. // Compute sizes of nested messages
  2647. #[allow(unused_variables)]
  2648. fn compute_size(&self) -> u32 {
  2649. let mut my_size = 0;
  2650. if !self.grid_id.is_empty() {
  2651. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  2652. }
  2653. if let ::std::option::Option::Some(ref v) = self.one_of_upper_row_id {
  2654. match v {
  2655. &CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(ref v) => {
  2656. my_size += ::protobuf::rt::string_size(2, &v);
  2657. },
  2658. };
  2659. }
  2660. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2661. self.cached_size.set(my_size);
  2662. my_size
  2663. }
  2664. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2665. if !self.grid_id.is_empty() {
  2666. os.write_string(1, &self.grid_id)?;
  2667. }
  2668. if let ::std::option::Option::Some(ref v) = self.one_of_upper_row_id {
  2669. match v {
  2670. &CreateRowPayload_oneof_one_of_upper_row_id::upper_row_id(ref v) => {
  2671. os.write_string(2, v)?;
  2672. },
  2673. };
  2674. }
  2675. os.write_unknown_fields(self.get_unknown_fields())?;
  2676. ::std::result::Result::Ok(())
  2677. }
  2678. fn get_cached_size(&self) -> u32 {
  2679. self.cached_size.get()
  2680. }
  2681. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2682. &self.unknown_fields
  2683. }
  2684. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2685. &mut self.unknown_fields
  2686. }
  2687. fn as_any(&self) -> &dyn (::std::any::Any) {
  2688. self as &dyn (::std::any::Any)
  2689. }
  2690. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2691. self as &mut dyn (::std::any::Any)
  2692. }
  2693. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2694. self
  2695. }
  2696. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2697. Self::descriptor_static()
  2698. }
  2699. fn new() -> CreateRowPayload {
  2700. CreateRowPayload::new()
  2701. }
  2702. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2703. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2704. descriptor.get(|| {
  2705. let mut fields = ::std::vec::Vec::new();
  2706. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2707. "grid_id",
  2708. |m: &CreateRowPayload| { &m.grid_id },
  2709. |m: &mut CreateRowPayload| { &mut m.grid_id },
  2710. ));
  2711. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  2712. "upper_row_id",
  2713. CreateRowPayload::has_upper_row_id,
  2714. CreateRowPayload::get_upper_row_id,
  2715. ));
  2716. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateRowPayload>(
  2717. "CreateRowPayload",
  2718. fields,
  2719. file_descriptor_proto()
  2720. )
  2721. })
  2722. }
  2723. fn default_instance() -> &'static CreateRowPayload {
  2724. static instance: ::protobuf::rt::LazyV2<CreateRowPayload> = ::protobuf::rt::LazyV2::INIT;
  2725. instance.get(CreateRowPayload::new)
  2726. }
  2727. }
  2728. impl ::protobuf::Clear for CreateRowPayload {
  2729. fn clear(&mut self) {
  2730. self.grid_id.clear();
  2731. self.one_of_upper_row_id = ::std::option::Option::None;
  2732. self.unknown_fields.clear();
  2733. }
  2734. }
  2735. impl ::std::fmt::Debug for CreateRowPayload {
  2736. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2737. ::protobuf::text_format::fmt(self, f)
  2738. }
  2739. }
  2740. impl ::protobuf::reflect::ProtobufValue for CreateRowPayload {
  2741. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2742. ::protobuf::reflect::ReflectValueRef::Message(self)
  2743. }
  2744. }
  2745. #[derive(PartialEq,Clone,Default)]
  2746. pub struct QueryFieldPayload {
  2747. // message fields
  2748. pub grid_id: ::std::string::String,
  2749. pub field_orders: ::protobuf::SingularPtrField<RepeatedFieldOrder>,
  2750. // special fields
  2751. pub unknown_fields: ::protobuf::UnknownFields,
  2752. pub cached_size: ::protobuf::CachedSize,
  2753. }
  2754. impl<'a> ::std::default::Default for &'a QueryFieldPayload {
  2755. fn default() -> &'a QueryFieldPayload {
  2756. <QueryFieldPayload as ::protobuf::Message>::default_instance()
  2757. }
  2758. }
  2759. impl QueryFieldPayload {
  2760. pub fn new() -> QueryFieldPayload {
  2761. ::std::default::Default::default()
  2762. }
  2763. // string grid_id = 1;
  2764. pub fn get_grid_id(&self) -> &str {
  2765. &self.grid_id
  2766. }
  2767. pub fn clear_grid_id(&mut self) {
  2768. self.grid_id.clear();
  2769. }
  2770. // Param is passed by value, moved
  2771. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2772. self.grid_id = v;
  2773. }
  2774. // Mutable pointer to the field.
  2775. // If field is not initialized, it is initialized with default value first.
  2776. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2777. &mut self.grid_id
  2778. }
  2779. // Take field
  2780. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2781. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2782. }
  2783. // .RepeatedFieldOrder field_orders = 2;
  2784. pub fn get_field_orders(&self) -> &RepeatedFieldOrder {
  2785. self.field_orders.as_ref().unwrap_or_else(|| <RepeatedFieldOrder as ::protobuf::Message>::default_instance())
  2786. }
  2787. pub fn clear_field_orders(&mut self) {
  2788. self.field_orders.clear();
  2789. }
  2790. pub fn has_field_orders(&self) -> bool {
  2791. self.field_orders.is_some()
  2792. }
  2793. // Param is passed by value, moved
  2794. pub fn set_field_orders(&mut self, v: RepeatedFieldOrder) {
  2795. self.field_orders = ::protobuf::SingularPtrField::some(v);
  2796. }
  2797. // Mutable pointer to the field.
  2798. // If field is not initialized, it is initialized with default value first.
  2799. pub fn mut_field_orders(&mut self) -> &mut RepeatedFieldOrder {
  2800. if self.field_orders.is_none() {
  2801. self.field_orders.set_default();
  2802. }
  2803. self.field_orders.as_mut().unwrap()
  2804. }
  2805. // Take field
  2806. pub fn take_field_orders(&mut self) -> RepeatedFieldOrder {
  2807. self.field_orders.take().unwrap_or_else(|| RepeatedFieldOrder::new())
  2808. }
  2809. }
  2810. impl ::protobuf::Message for QueryFieldPayload {
  2811. fn is_initialized(&self) -> bool {
  2812. for v in &self.field_orders {
  2813. if !v.is_initialized() {
  2814. return false;
  2815. }
  2816. };
  2817. true
  2818. }
  2819. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2820. while !is.eof()? {
  2821. let (field_number, wire_type) = is.read_tag_unpack()?;
  2822. match field_number {
  2823. 1 => {
  2824. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  2825. },
  2826. 2 => {
  2827. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_orders)?;
  2828. },
  2829. _ => {
  2830. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2831. },
  2832. };
  2833. }
  2834. ::std::result::Result::Ok(())
  2835. }
  2836. // Compute sizes of nested messages
  2837. #[allow(unused_variables)]
  2838. fn compute_size(&self) -> u32 {
  2839. let mut my_size = 0;
  2840. if !self.grid_id.is_empty() {
  2841. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  2842. }
  2843. if let Some(ref v) = self.field_orders.as_ref() {
  2844. let len = v.compute_size();
  2845. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2846. }
  2847. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2848. self.cached_size.set(my_size);
  2849. my_size
  2850. }
  2851. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2852. if !self.grid_id.is_empty() {
  2853. os.write_string(1, &self.grid_id)?;
  2854. }
  2855. if let Some(ref v) = self.field_orders.as_ref() {
  2856. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2857. os.write_raw_varint32(v.get_cached_size())?;
  2858. v.write_to_with_cached_sizes(os)?;
  2859. }
  2860. os.write_unknown_fields(self.get_unknown_fields())?;
  2861. ::std::result::Result::Ok(())
  2862. }
  2863. fn get_cached_size(&self) -> u32 {
  2864. self.cached_size.get()
  2865. }
  2866. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2867. &self.unknown_fields
  2868. }
  2869. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2870. &mut self.unknown_fields
  2871. }
  2872. fn as_any(&self) -> &dyn (::std::any::Any) {
  2873. self as &dyn (::std::any::Any)
  2874. }
  2875. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2876. self as &mut dyn (::std::any::Any)
  2877. }
  2878. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2879. self
  2880. }
  2881. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2882. Self::descriptor_static()
  2883. }
  2884. fn new() -> QueryFieldPayload {
  2885. QueryFieldPayload::new()
  2886. }
  2887. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2888. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2889. descriptor.get(|| {
  2890. let mut fields = ::std::vec::Vec::new();
  2891. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2892. "grid_id",
  2893. |m: &QueryFieldPayload| { &m.grid_id },
  2894. |m: &mut QueryFieldPayload| { &mut m.grid_id },
  2895. ));
  2896. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedFieldOrder>>(
  2897. "field_orders",
  2898. |m: &QueryFieldPayload| { &m.field_orders },
  2899. |m: &mut QueryFieldPayload| { &mut m.field_orders },
  2900. ));
  2901. ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryFieldPayload>(
  2902. "QueryFieldPayload",
  2903. fields,
  2904. file_descriptor_proto()
  2905. )
  2906. })
  2907. }
  2908. fn default_instance() -> &'static QueryFieldPayload {
  2909. static instance: ::protobuf::rt::LazyV2<QueryFieldPayload> = ::protobuf::rt::LazyV2::INIT;
  2910. instance.get(QueryFieldPayload::new)
  2911. }
  2912. }
  2913. impl ::protobuf::Clear for QueryFieldPayload {
  2914. fn clear(&mut self) {
  2915. self.grid_id.clear();
  2916. self.field_orders.clear();
  2917. self.unknown_fields.clear();
  2918. }
  2919. }
  2920. impl ::std::fmt::Debug for QueryFieldPayload {
  2921. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2922. ::protobuf::text_format::fmt(self, f)
  2923. }
  2924. }
  2925. impl ::protobuf::reflect::ProtobufValue for QueryFieldPayload {
  2926. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2927. ::protobuf::reflect::ReflectValueRef::Message(self)
  2928. }
  2929. }
  2930. #[derive(PartialEq,Clone,Default)]
  2931. pub struct QueryGridBlocksPayload {
  2932. // message fields
  2933. pub grid_id: ::std::string::String,
  2934. pub blocks: ::protobuf::RepeatedField<super::meta::GridBlockMeta>,
  2935. // special fields
  2936. pub unknown_fields: ::protobuf::UnknownFields,
  2937. pub cached_size: ::protobuf::CachedSize,
  2938. }
  2939. impl<'a> ::std::default::Default for &'a QueryGridBlocksPayload {
  2940. fn default() -> &'a QueryGridBlocksPayload {
  2941. <QueryGridBlocksPayload as ::protobuf::Message>::default_instance()
  2942. }
  2943. }
  2944. impl QueryGridBlocksPayload {
  2945. pub fn new() -> QueryGridBlocksPayload {
  2946. ::std::default::Default::default()
  2947. }
  2948. // string grid_id = 1;
  2949. pub fn get_grid_id(&self) -> &str {
  2950. &self.grid_id
  2951. }
  2952. pub fn clear_grid_id(&mut self) {
  2953. self.grid_id.clear();
  2954. }
  2955. // Param is passed by value, moved
  2956. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2957. self.grid_id = v;
  2958. }
  2959. // Mutable pointer to the field.
  2960. // If field is not initialized, it is initialized with default value first.
  2961. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2962. &mut self.grid_id
  2963. }
  2964. // Take field
  2965. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2966. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2967. }
  2968. // repeated .GridBlockMeta blocks = 2;
  2969. pub fn get_blocks(&self) -> &[super::meta::GridBlockMeta] {
  2970. &self.blocks
  2971. }
  2972. pub fn clear_blocks(&mut self) {
  2973. self.blocks.clear();
  2974. }
  2975. // Param is passed by value, moved
  2976. pub fn set_blocks(&mut self, v: ::protobuf::RepeatedField<super::meta::GridBlockMeta>) {
  2977. self.blocks = v;
  2978. }
  2979. // Mutable pointer to the field.
  2980. pub fn mut_blocks(&mut self) -> &mut ::protobuf::RepeatedField<super::meta::GridBlockMeta> {
  2981. &mut self.blocks
  2982. }
  2983. // Take field
  2984. pub fn take_blocks(&mut self) -> ::protobuf::RepeatedField<super::meta::GridBlockMeta> {
  2985. ::std::mem::replace(&mut self.blocks, ::protobuf::RepeatedField::new())
  2986. }
  2987. }
  2988. impl ::protobuf::Message for QueryGridBlocksPayload {
  2989. fn is_initialized(&self) -> bool {
  2990. for v in &self.blocks {
  2991. if !v.is_initialized() {
  2992. return false;
  2993. }
  2994. };
  2995. true
  2996. }
  2997. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2998. while !is.eof()? {
  2999. let (field_number, wire_type) = is.read_tag_unpack()?;
  3000. match field_number {
  3001. 1 => {
  3002. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  3003. },
  3004. 2 => {
  3005. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.blocks)?;
  3006. },
  3007. _ => {
  3008. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3009. },
  3010. };
  3011. }
  3012. ::std::result::Result::Ok(())
  3013. }
  3014. // Compute sizes of nested messages
  3015. #[allow(unused_variables)]
  3016. fn compute_size(&self) -> u32 {
  3017. let mut my_size = 0;
  3018. if !self.grid_id.is_empty() {
  3019. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  3020. }
  3021. for value in &self.blocks {
  3022. let len = value.compute_size();
  3023. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3024. };
  3025. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3026. self.cached_size.set(my_size);
  3027. my_size
  3028. }
  3029. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3030. if !self.grid_id.is_empty() {
  3031. os.write_string(1, &self.grid_id)?;
  3032. }
  3033. for v in &self.blocks {
  3034. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3035. os.write_raw_varint32(v.get_cached_size())?;
  3036. v.write_to_with_cached_sizes(os)?;
  3037. };
  3038. os.write_unknown_fields(self.get_unknown_fields())?;
  3039. ::std::result::Result::Ok(())
  3040. }
  3041. fn get_cached_size(&self) -> u32 {
  3042. self.cached_size.get()
  3043. }
  3044. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3045. &self.unknown_fields
  3046. }
  3047. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3048. &mut self.unknown_fields
  3049. }
  3050. fn as_any(&self) -> &dyn (::std::any::Any) {
  3051. self as &dyn (::std::any::Any)
  3052. }
  3053. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3054. self as &mut dyn (::std::any::Any)
  3055. }
  3056. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3057. self
  3058. }
  3059. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3060. Self::descriptor_static()
  3061. }
  3062. fn new() -> QueryGridBlocksPayload {
  3063. QueryGridBlocksPayload::new()
  3064. }
  3065. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3066. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3067. descriptor.get(|| {
  3068. let mut fields = ::std::vec::Vec::new();
  3069. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3070. "grid_id",
  3071. |m: &QueryGridBlocksPayload| { &m.grid_id },
  3072. |m: &mut QueryGridBlocksPayload| { &mut m.grid_id },
  3073. ));
  3074. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::meta::GridBlockMeta>>(
  3075. "blocks",
  3076. |m: &QueryGridBlocksPayload| { &m.blocks },
  3077. |m: &mut QueryGridBlocksPayload| { &mut m.blocks },
  3078. ));
  3079. ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryGridBlocksPayload>(
  3080. "QueryGridBlocksPayload",
  3081. fields,
  3082. file_descriptor_proto()
  3083. )
  3084. })
  3085. }
  3086. fn default_instance() -> &'static QueryGridBlocksPayload {
  3087. static instance: ::protobuf::rt::LazyV2<QueryGridBlocksPayload> = ::protobuf::rt::LazyV2::INIT;
  3088. instance.get(QueryGridBlocksPayload::new)
  3089. }
  3090. }
  3091. impl ::protobuf::Clear for QueryGridBlocksPayload {
  3092. fn clear(&mut self) {
  3093. self.grid_id.clear();
  3094. self.blocks.clear();
  3095. self.unknown_fields.clear();
  3096. }
  3097. }
  3098. impl ::std::fmt::Debug for QueryGridBlocksPayload {
  3099. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3100. ::protobuf::text_format::fmt(self, f)
  3101. }
  3102. }
  3103. impl ::protobuf::reflect::ProtobufValue for QueryGridBlocksPayload {
  3104. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3105. ::protobuf::reflect::ReflectValueRef::Message(self)
  3106. }
  3107. }
  3108. static file_descriptor_proto_data: &'static [u8] = b"\
  3109. \n\ngrid.proto\x1a\nmeta.proto\"n\n\x04Grid\x12\x0e\n\x02id\x18\x01\x20\
  3110. \x01(\tR\x02id\x12.\n\x0cfield_orders\x18\x02\x20\x03(\x0b2\x0b.FieldOrd\
  3111. erR\x0bfieldOrders\x12&\n\x06blocks\x18\x03\x20\x03(\x0b2\x0e.GridBlockM\
  3112. etaR\x06blocks\"\xb8\x01\n\x05Field\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\
  3113. \x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\
  3114. \x18\x03\x20\x01(\tR\x04desc\x12)\n\nfield_type\x18\x04\x20\x01(\x0e2\n.\
  3115. FieldTypeR\tfieldType\x12\x16\n\x06frozen\x18\x05\x20\x01(\x08R\x06froze\
  3116. n\x12\x1e\n\nvisibility\x18\x06\x20\x01(\x08R\nvisibility\x12\x14\n\x05w\
  3117. idth\x18\x07\x20\x01(\x05R\x05width\"'\n\nFieldOrder\x12\x19\n\x08field_\
  3118. id\x18\x01\x20\x01(\tR\x07fieldId\"-\n\rRepeatedField\x12\x1c\n\x05items\
  3119. \x18\x01\x20\x03(\x0b2\x06.FieldR\x05items\"7\n\x12RepeatedFieldOrder\
  3120. \x12!\n\x05items\x18\x01\x20\x03(\x0b2\x0b.FieldOrderR\x05items\"<\n\x08\
  3121. RowOrder\x12\x15\n\x06row_id\x18\x01\x20\x01(\tR\x05rowId\x12\x19\n\x08b\
  3122. lock_id\x18\x02\x20\x01(\tR\x07blockId\"3\n\x10RepeatedRowOrder\x12\x1f\
  3123. \n\x05items\x18\x01\x20\x03(\x0b2\t.RowOrderR\x05items\"\xb8\x01\n\x03Ro\
  3124. w\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12@\n\x10cell_by_field_id\
  3125. \x18\x02\x20\x03(\x0b2\x17.Row.CellByFieldIdEntryR\rcellByFieldId\x12\
  3126. \x16\n\x06height\x18\x03\x20\x01(\x05R\x06height\x1aG\n\x12CellByFieldId\
  3127. Entry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x1b\n\x05value\x18\
  3128. \x02\x20\x01(\x0b2\x05.CellR\x05value:\x028\x01\"5\n\x11RepeatedGridBloc\
  3129. k\x12\x20\n\x05items\x18\x01\x20\x03(\x0b2\n.GridBlockR\x05items\"@\n\tG\
  3130. ridBlock\x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\x07blockId\x12\x18\n\
  3131. \x04rows\x18\x02\x20\x03(\x0b2\x04.RowR\x04rows\";\n\x04Cell\x12\x19\n\
  3132. \x08field_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x18\n\x07content\x18\x02\
  3133. \x20\x01(\tR\x07content\"+\n\x0cRepeatedCell\x12\x1b\n\x05items\x18\x01\
  3134. \x20\x03(\x0b2\x05.CellR\x05items\"'\n\x11CreateGridPayload\x12\x12\n\
  3135. \x04name\x18\x01\x20\x01(\tR\x04name\"\x1e\n\x06GridId\x12\x14\n\x05valu\
  3136. e\x18\x01\x20\x01(\tR\x05value\"#\n\x0bGridBlockId\x12\x14\n\x05value\
  3137. \x18\x01\x20\x01(\tR\x05value\"f\n\x10CreateRowPayload\x12\x17\n\x07grid\
  3138. _id\x18\x01\x20\x01(\tR\x06gridId\x12\"\n\x0cupper_row_id\x18\x02\x20\
  3139. \x01(\tH\0R\nupperRowIdB\x15\n\x13one_of_upper_row_id\"d\n\x11QueryField\
  3140. Payload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x126\n\x0cfie\
  3141. ld_orders\x18\x02\x20\x01(\x0b2\x13.RepeatedFieldOrderR\x0bfieldOrders\"\
  3142. Y\n\x16QueryGridBlocksPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\
  3143. \x06gridId\x12&\n\x06blocks\x18\x02\x20\x03(\x0b2\x0e.GridBlockMetaR\x06\
  3144. blocksb\x06proto3\
  3145. ";
  3146. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  3147. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  3148. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  3149. }
  3150. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  3151. file_descriptor_proto_lazy.get(|| {
  3152. parse_descriptor_proto()
  3153. })
  3154. }