meta.rs 120 KB

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