meta.rs 127 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740
  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 GridBlockMetaData {
  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 GridBlockMetaData {
  449. fn default() -> &'a GridBlockMetaData {
  450. <GridBlockMetaData as ::protobuf::Message>::default_instance()
  451. }
  452. }
  453. impl GridBlockMetaData {
  454. pub fn new() -> GridBlockMetaData {
  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 GridBlockMetaData {
  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() -> GridBlockMetaData {
  572. GridBlockMetaData::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: &GridBlockMetaData| { &m.block_id },
  581. |m: &mut GridBlockMetaData| { &mut m.block_id },
  582. ));
  583. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowMeta>>(
  584. "row_metas",
  585. |m: &GridBlockMetaData| { &m.row_metas },
  586. |m: &mut GridBlockMetaData| { &mut m.row_metas },
  587. ));
  588. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridBlockMetaData>(
  589. "GridBlockMetaData",
  590. fields,
  591. file_descriptor_proto()
  592. )
  593. })
  594. }
  595. fn default_instance() -> &'static GridBlockMetaData {
  596. static instance: ::protobuf::rt::LazyV2<GridBlockMetaData> = ::protobuf::rt::LazyV2::INIT;
  597. instance.get(GridBlockMetaData::new)
  598. }
  599. }
  600. impl ::protobuf::Clear for GridBlockMetaData {
  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 GridBlockMetaData {
  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 GridBlockMetaData {
  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_by_field_type_id: ::protobuf::SingularPtrField<TypeOptionDataByFieldTypeId>,
  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. // .TypeOptionDataByFieldTypeId type_option_by_field_type_id = 8;
  746. pub fn get_type_option_by_field_type_id(&self) -> &TypeOptionDataByFieldTypeId {
  747. self.type_option_by_field_type_id.as_ref().unwrap_or_else(|| <TypeOptionDataByFieldTypeId as ::protobuf::Message>::default_instance())
  748. }
  749. pub fn clear_type_option_by_field_type_id(&mut self) {
  750. self.type_option_by_field_type_id.clear();
  751. }
  752. pub fn has_type_option_by_field_type_id(&self) -> bool {
  753. self.type_option_by_field_type_id.is_some()
  754. }
  755. // Param is passed by value, moved
  756. pub fn set_type_option_by_field_type_id(&mut self, v: TypeOptionDataByFieldTypeId) {
  757. self.type_option_by_field_type_id = ::protobuf::SingularPtrField::some(v);
  758. }
  759. // Mutable pointer to the field.
  760. // If field is not initialized, it is initialized with default value first.
  761. pub fn mut_type_option_by_field_type_id(&mut self) -> &mut TypeOptionDataByFieldTypeId {
  762. if self.type_option_by_field_type_id.is_none() {
  763. self.type_option_by_field_type_id.set_default();
  764. }
  765. self.type_option_by_field_type_id.as_mut().unwrap()
  766. }
  767. // Take field
  768. pub fn take_type_option_by_field_type_id(&mut self) -> TypeOptionDataByFieldTypeId {
  769. self.type_option_by_field_type_id.take().unwrap_or_else(|| TypeOptionDataByFieldTypeId::new())
  770. }
  771. }
  772. impl ::protobuf::Message for FieldMeta {
  773. fn is_initialized(&self) -> bool {
  774. for v in &self.type_option_by_field_type_id {
  775. if !v.is_initialized() {
  776. return false;
  777. }
  778. };
  779. true
  780. }
  781. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  782. while !is.eof()? {
  783. let (field_number, wire_type) = is.read_tag_unpack()?;
  784. match field_number {
  785. 1 => {
  786. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  787. },
  788. 2 => {
  789. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  790. },
  791. 3 => {
  792. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  793. },
  794. 4 => {
  795. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 4, &mut self.unknown_fields)?
  796. },
  797. 5 => {
  798. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  799. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  800. }
  801. let tmp = is.read_bool()?;
  802. self.frozen = tmp;
  803. },
  804. 6 => {
  805. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  806. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  807. }
  808. let tmp = is.read_bool()?;
  809. self.visibility = tmp;
  810. },
  811. 7 => {
  812. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  813. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  814. }
  815. let tmp = is.read_int32()?;
  816. self.width = tmp;
  817. },
  818. 8 => {
  819. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.type_option_by_field_type_id)?;
  820. },
  821. _ => {
  822. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  823. },
  824. };
  825. }
  826. ::std::result::Result::Ok(())
  827. }
  828. // Compute sizes of nested messages
  829. #[allow(unused_variables)]
  830. fn compute_size(&self) -> u32 {
  831. let mut my_size = 0;
  832. if !self.id.is_empty() {
  833. my_size += ::protobuf::rt::string_size(1, &self.id);
  834. }
  835. if !self.name.is_empty() {
  836. my_size += ::protobuf::rt::string_size(2, &self.name);
  837. }
  838. if !self.desc.is_empty() {
  839. my_size += ::protobuf::rt::string_size(3, &self.desc);
  840. }
  841. if self.field_type != FieldType::RichText {
  842. my_size += ::protobuf::rt::enum_size(4, self.field_type);
  843. }
  844. if self.frozen != false {
  845. my_size += 2;
  846. }
  847. if self.visibility != false {
  848. my_size += 2;
  849. }
  850. if self.width != 0 {
  851. my_size += ::protobuf::rt::value_size(7, self.width, ::protobuf::wire_format::WireTypeVarint);
  852. }
  853. if let Some(ref v) = self.type_option_by_field_type_id.as_ref() {
  854. let len = v.compute_size();
  855. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  856. }
  857. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  858. self.cached_size.set(my_size);
  859. my_size
  860. }
  861. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  862. if !self.id.is_empty() {
  863. os.write_string(1, &self.id)?;
  864. }
  865. if !self.name.is_empty() {
  866. os.write_string(2, &self.name)?;
  867. }
  868. if !self.desc.is_empty() {
  869. os.write_string(3, &self.desc)?;
  870. }
  871. if self.field_type != FieldType::RichText {
  872. os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  873. }
  874. if self.frozen != false {
  875. os.write_bool(5, self.frozen)?;
  876. }
  877. if self.visibility != false {
  878. os.write_bool(6, self.visibility)?;
  879. }
  880. if self.width != 0 {
  881. os.write_int32(7, self.width)?;
  882. }
  883. if let Some(ref v) = self.type_option_by_field_type_id.as_ref() {
  884. os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  885. os.write_raw_varint32(v.get_cached_size())?;
  886. v.write_to_with_cached_sizes(os)?;
  887. }
  888. os.write_unknown_fields(self.get_unknown_fields())?;
  889. ::std::result::Result::Ok(())
  890. }
  891. fn get_cached_size(&self) -> u32 {
  892. self.cached_size.get()
  893. }
  894. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  895. &self.unknown_fields
  896. }
  897. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  898. &mut self.unknown_fields
  899. }
  900. fn as_any(&self) -> &dyn (::std::any::Any) {
  901. self as &dyn (::std::any::Any)
  902. }
  903. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  904. self as &mut dyn (::std::any::Any)
  905. }
  906. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  907. self
  908. }
  909. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  910. Self::descriptor_static()
  911. }
  912. fn new() -> FieldMeta {
  913. FieldMeta::new()
  914. }
  915. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  916. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  917. descriptor.get(|| {
  918. let mut fields = ::std::vec::Vec::new();
  919. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  920. "id",
  921. |m: &FieldMeta| { &m.id },
  922. |m: &mut FieldMeta| { &mut m.id },
  923. ));
  924. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  925. "name",
  926. |m: &FieldMeta| { &m.name },
  927. |m: &mut FieldMeta| { &mut m.name },
  928. ));
  929. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  930. "desc",
  931. |m: &FieldMeta| { &m.desc },
  932. |m: &mut FieldMeta| { &mut m.desc },
  933. ));
  934. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
  935. "field_type",
  936. |m: &FieldMeta| { &m.field_type },
  937. |m: &mut FieldMeta| { &mut m.field_type },
  938. ));
  939. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  940. "frozen",
  941. |m: &FieldMeta| { &m.frozen },
  942. |m: &mut FieldMeta| { &mut m.frozen },
  943. ));
  944. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  945. "visibility",
  946. |m: &FieldMeta| { &m.visibility },
  947. |m: &mut FieldMeta| { &mut m.visibility },
  948. ));
  949. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  950. "width",
  951. |m: &FieldMeta| { &m.width },
  952. |m: &mut FieldMeta| { &mut m.width },
  953. ));
  954. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TypeOptionDataByFieldTypeId>>(
  955. "type_option_by_field_type_id",
  956. |m: &FieldMeta| { &m.type_option_by_field_type_id },
  957. |m: &mut FieldMeta| { &mut m.type_option_by_field_type_id },
  958. ));
  959. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldMeta>(
  960. "FieldMeta",
  961. fields,
  962. file_descriptor_proto()
  963. )
  964. })
  965. }
  966. fn default_instance() -> &'static FieldMeta {
  967. static instance: ::protobuf::rt::LazyV2<FieldMeta> = ::protobuf::rt::LazyV2::INIT;
  968. instance.get(FieldMeta::new)
  969. }
  970. }
  971. impl ::protobuf::Clear for FieldMeta {
  972. fn clear(&mut self) {
  973. self.id.clear();
  974. self.name.clear();
  975. self.desc.clear();
  976. self.field_type = FieldType::RichText;
  977. self.frozen = false;
  978. self.visibility = false;
  979. self.width = 0;
  980. self.type_option_by_field_type_id.clear();
  981. self.unknown_fields.clear();
  982. }
  983. }
  984. impl ::std::fmt::Debug for FieldMeta {
  985. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  986. ::protobuf::text_format::fmt(self, f)
  987. }
  988. }
  989. impl ::protobuf::reflect::ProtobufValue for FieldMeta {
  990. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  991. ::protobuf::reflect::ReflectValueRef::Message(self)
  992. }
  993. }
  994. #[derive(PartialEq,Clone,Default)]
  995. pub struct TypeOptionDataByFieldTypeId {
  996. // message fields
  997. pub map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  998. // special fields
  999. pub unknown_fields: ::protobuf::UnknownFields,
  1000. pub cached_size: ::protobuf::CachedSize,
  1001. }
  1002. impl<'a> ::std::default::Default for &'a TypeOptionDataByFieldTypeId {
  1003. fn default() -> &'a TypeOptionDataByFieldTypeId {
  1004. <TypeOptionDataByFieldTypeId as ::protobuf::Message>::default_instance()
  1005. }
  1006. }
  1007. impl TypeOptionDataByFieldTypeId {
  1008. pub fn new() -> TypeOptionDataByFieldTypeId {
  1009. ::std::default::Default::default()
  1010. }
  1011. // repeated .TypeOptionDataByFieldTypeId.MapEntry map = 1;
  1012. pub fn get_map(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
  1013. &self.map
  1014. }
  1015. pub fn clear_map(&mut self) {
  1016. self.map.clear();
  1017. }
  1018. // Param is passed by value, moved
  1019. pub fn set_map(&mut self, v: ::std::collections::HashMap<::std::string::String, ::std::string::String>) {
  1020. self.map = v;
  1021. }
  1022. // Mutable pointer to the field.
  1023. pub fn mut_map(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, ::std::string::String> {
  1024. &mut self.map
  1025. }
  1026. // Take field
  1027. pub fn take_map(&mut self) -> ::std::collections::HashMap<::std::string::String, ::std::string::String> {
  1028. ::std::mem::replace(&mut self.map, ::std::collections::HashMap::new())
  1029. }
  1030. }
  1031. impl ::protobuf::Message for TypeOptionDataByFieldTypeId {
  1032. fn is_initialized(&self) -> bool {
  1033. true
  1034. }
  1035. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1036. while !is.eof()? {
  1037. let (field_number, wire_type) = is.read_tag_unpack()?;
  1038. match field_number {
  1039. 1 => {
  1040. ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.map)?;
  1041. },
  1042. _ => {
  1043. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1044. },
  1045. };
  1046. }
  1047. ::std::result::Result::Ok(())
  1048. }
  1049. // Compute sizes of nested messages
  1050. #[allow(unused_variables)]
  1051. fn compute_size(&self) -> u32 {
  1052. let mut my_size = 0;
  1053. my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(1, &self.map);
  1054. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1055. self.cached_size.set(my_size);
  1056. my_size
  1057. }
  1058. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1059. ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(1, &self.map, os)?;
  1060. os.write_unknown_fields(self.get_unknown_fields())?;
  1061. ::std::result::Result::Ok(())
  1062. }
  1063. fn get_cached_size(&self) -> u32 {
  1064. self.cached_size.get()
  1065. }
  1066. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1067. &self.unknown_fields
  1068. }
  1069. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1070. &mut self.unknown_fields
  1071. }
  1072. fn as_any(&self) -> &dyn (::std::any::Any) {
  1073. self as &dyn (::std::any::Any)
  1074. }
  1075. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1076. self as &mut dyn (::std::any::Any)
  1077. }
  1078. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1079. self
  1080. }
  1081. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1082. Self::descriptor_static()
  1083. }
  1084. fn new() -> TypeOptionDataByFieldTypeId {
  1085. TypeOptionDataByFieldTypeId::new()
  1086. }
  1087. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1088. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1089. descriptor.get(|| {
  1090. let mut fields = ::std::vec::Vec::new();
  1091. fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeString>(
  1092. "map",
  1093. |m: &TypeOptionDataByFieldTypeId| { &m.map },
  1094. |m: &mut TypeOptionDataByFieldTypeId| { &mut m.map },
  1095. ));
  1096. ::protobuf::reflect::MessageDescriptor::new_pb_name::<TypeOptionDataByFieldTypeId>(
  1097. "TypeOptionDataByFieldTypeId",
  1098. fields,
  1099. file_descriptor_proto()
  1100. )
  1101. })
  1102. }
  1103. fn default_instance() -> &'static TypeOptionDataByFieldTypeId {
  1104. static instance: ::protobuf::rt::LazyV2<TypeOptionDataByFieldTypeId> = ::protobuf::rt::LazyV2::INIT;
  1105. instance.get(TypeOptionDataByFieldTypeId::new)
  1106. }
  1107. }
  1108. impl ::protobuf::Clear for TypeOptionDataByFieldTypeId {
  1109. fn clear(&mut self) {
  1110. self.map.clear();
  1111. self.unknown_fields.clear();
  1112. }
  1113. }
  1114. impl ::std::fmt::Debug for TypeOptionDataByFieldTypeId {
  1115. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1116. ::protobuf::text_format::fmt(self, f)
  1117. }
  1118. }
  1119. impl ::protobuf::reflect::ProtobufValue for TypeOptionDataByFieldTypeId {
  1120. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1121. ::protobuf::reflect::ReflectValueRef::Message(self)
  1122. }
  1123. }
  1124. #[derive(PartialEq,Clone,Default)]
  1125. pub struct FieldChangesetPayload {
  1126. // message fields
  1127. pub field_id: ::std::string::String,
  1128. pub grid_id: ::std::string::String,
  1129. // message oneof groups
  1130. pub one_of_name: ::std::option::Option<FieldChangesetPayload_oneof_one_of_name>,
  1131. pub one_of_desc: ::std::option::Option<FieldChangesetPayload_oneof_one_of_desc>,
  1132. pub one_of_field_type: ::std::option::Option<FieldChangesetPayload_oneof_one_of_field_type>,
  1133. pub one_of_frozen: ::std::option::Option<FieldChangesetPayload_oneof_one_of_frozen>,
  1134. pub one_of_visibility: ::std::option::Option<FieldChangesetPayload_oneof_one_of_visibility>,
  1135. pub one_of_width: ::std::option::Option<FieldChangesetPayload_oneof_one_of_width>,
  1136. pub one_of_type_option_data: ::std::option::Option<FieldChangesetPayload_oneof_one_of_type_option_data>,
  1137. // special fields
  1138. pub unknown_fields: ::protobuf::UnknownFields,
  1139. pub cached_size: ::protobuf::CachedSize,
  1140. }
  1141. impl<'a> ::std::default::Default for &'a FieldChangesetPayload {
  1142. fn default() -> &'a FieldChangesetPayload {
  1143. <FieldChangesetPayload as ::protobuf::Message>::default_instance()
  1144. }
  1145. }
  1146. #[derive(Clone,PartialEq,Debug)]
  1147. pub enum FieldChangesetPayload_oneof_one_of_name {
  1148. name(::std::string::String),
  1149. }
  1150. #[derive(Clone,PartialEq,Debug)]
  1151. pub enum FieldChangesetPayload_oneof_one_of_desc {
  1152. desc(::std::string::String),
  1153. }
  1154. #[derive(Clone,PartialEq,Debug)]
  1155. pub enum FieldChangesetPayload_oneof_one_of_field_type {
  1156. field_type(FieldType),
  1157. }
  1158. #[derive(Clone,PartialEq,Debug)]
  1159. pub enum FieldChangesetPayload_oneof_one_of_frozen {
  1160. frozen(bool),
  1161. }
  1162. #[derive(Clone,PartialEq,Debug)]
  1163. pub enum FieldChangesetPayload_oneof_one_of_visibility {
  1164. visibility(bool),
  1165. }
  1166. #[derive(Clone,PartialEq,Debug)]
  1167. pub enum FieldChangesetPayload_oneof_one_of_width {
  1168. width(i32),
  1169. }
  1170. #[derive(Clone,PartialEq,Debug)]
  1171. pub enum FieldChangesetPayload_oneof_one_of_type_option_data {
  1172. type_option_data(::std::vec::Vec<u8>),
  1173. }
  1174. impl FieldChangesetPayload {
  1175. pub fn new() -> FieldChangesetPayload {
  1176. ::std::default::Default::default()
  1177. }
  1178. // string field_id = 1;
  1179. pub fn get_field_id(&self) -> &str {
  1180. &self.field_id
  1181. }
  1182. pub fn clear_field_id(&mut self) {
  1183. self.field_id.clear();
  1184. }
  1185. // Param is passed by value, moved
  1186. pub fn set_field_id(&mut self, v: ::std::string::String) {
  1187. self.field_id = v;
  1188. }
  1189. // Mutable pointer to the field.
  1190. // If field is not initialized, it is initialized with default value first.
  1191. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  1192. &mut self.field_id
  1193. }
  1194. // Take field
  1195. pub fn take_field_id(&mut self) -> ::std::string::String {
  1196. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  1197. }
  1198. // string grid_id = 2;
  1199. pub fn get_grid_id(&self) -> &str {
  1200. &self.grid_id
  1201. }
  1202. pub fn clear_grid_id(&mut self) {
  1203. self.grid_id.clear();
  1204. }
  1205. // Param is passed by value, moved
  1206. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1207. self.grid_id = v;
  1208. }
  1209. // Mutable pointer to the field.
  1210. // If field is not initialized, it is initialized with default value first.
  1211. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1212. &mut self.grid_id
  1213. }
  1214. // Take field
  1215. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1216. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1217. }
  1218. // string name = 3;
  1219. pub fn get_name(&self) -> &str {
  1220. match self.one_of_name {
  1221. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(ref v)) => v,
  1222. _ => "",
  1223. }
  1224. }
  1225. pub fn clear_name(&mut self) {
  1226. self.one_of_name = ::std::option::Option::None;
  1227. }
  1228. pub fn has_name(&self) -> bool {
  1229. match self.one_of_name {
  1230. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(..)) => true,
  1231. _ => false,
  1232. }
  1233. }
  1234. // Param is passed by value, moved
  1235. pub fn set_name(&mut self, v: ::std::string::String) {
  1236. self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(v))
  1237. }
  1238. // Mutable pointer to the field.
  1239. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  1240. if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(_)) = self.one_of_name {
  1241. } else {
  1242. self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(::std::string::String::new()));
  1243. }
  1244. match self.one_of_name {
  1245. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(ref mut v)) => v,
  1246. _ => panic!(),
  1247. }
  1248. }
  1249. // Take field
  1250. pub fn take_name(&mut self) -> ::std::string::String {
  1251. if self.has_name() {
  1252. match self.one_of_name.take() {
  1253. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(v)) => v,
  1254. _ => panic!(),
  1255. }
  1256. } else {
  1257. ::std::string::String::new()
  1258. }
  1259. }
  1260. // string desc = 4;
  1261. pub fn get_desc(&self) -> &str {
  1262. match self.one_of_desc {
  1263. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(ref v)) => v,
  1264. _ => "",
  1265. }
  1266. }
  1267. pub fn clear_desc(&mut self) {
  1268. self.one_of_desc = ::std::option::Option::None;
  1269. }
  1270. pub fn has_desc(&self) -> bool {
  1271. match self.one_of_desc {
  1272. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(..)) => true,
  1273. _ => false,
  1274. }
  1275. }
  1276. // Param is passed by value, moved
  1277. pub fn set_desc(&mut self, v: ::std::string::String) {
  1278. self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(v))
  1279. }
  1280. // Mutable pointer to the field.
  1281. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  1282. if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(_)) = self.one_of_desc {
  1283. } else {
  1284. self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(::std::string::String::new()));
  1285. }
  1286. match self.one_of_desc {
  1287. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(ref mut v)) => v,
  1288. _ => panic!(),
  1289. }
  1290. }
  1291. // Take field
  1292. pub fn take_desc(&mut self) -> ::std::string::String {
  1293. if self.has_desc() {
  1294. match self.one_of_desc.take() {
  1295. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(v)) => v,
  1296. _ => panic!(),
  1297. }
  1298. } else {
  1299. ::std::string::String::new()
  1300. }
  1301. }
  1302. // .FieldType field_type = 5;
  1303. pub fn get_field_type(&self) -> FieldType {
  1304. match self.one_of_field_type {
  1305. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(v)) => v,
  1306. _ => FieldType::RichText,
  1307. }
  1308. }
  1309. pub fn clear_field_type(&mut self) {
  1310. self.one_of_field_type = ::std::option::Option::None;
  1311. }
  1312. pub fn has_field_type(&self) -> bool {
  1313. match self.one_of_field_type {
  1314. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(..)) => true,
  1315. _ => false,
  1316. }
  1317. }
  1318. // Param is passed by value, moved
  1319. pub fn set_field_type(&mut self, v: FieldType) {
  1320. self.one_of_field_type = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(v))
  1321. }
  1322. // bool frozen = 6;
  1323. pub fn get_frozen(&self) -> bool {
  1324. match self.one_of_frozen {
  1325. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(v)) => v,
  1326. _ => false,
  1327. }
  1328. }
  1329. pub fn clear_frozen(&mut self) {
  1330. self.one_of_frozen = ::std::option::Option::None;
  1331. }
  1332. pub fn has_frozen(&self) -> bool {
  1333. match self.one_of_frozen {
  1334. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(..)) => true,
  1335. _ => false,
  1336. }
  1337. }
  1338. // Param is passed by value, moved
  1339. pub fn set_frozen(&mut self, v: bool) {
  1340. self.one_of_frozen = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(v))
  1341. }
  1342. // bool visibility = 7;
  1343. pub fn get_visibility(&self) -> bool {
  1344. match self.one_of_visibility {
  1345. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(v)) => v,
  1346. _ => false,
  1347. }
  1348. }
  1349. pub fn clear_visibility(&mut self) {
  1350. self.one_of_visibility = ::std::option::Option::None;
  1351. }
  1352. pub fn has_visibility(&self) -> bool {
  1353. match self.one_of_visibility {
  1354. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(..)) => true,
  1355. _ => false,
  1356. }
  1357. }
  1358. // Param is passed by value, moved
  1359. pub fn set_visibility(&mut self, v: bool) {
  1360. self.one_of_visibility = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(v))
  1361. }
  1362. // int32 width = 8;
  1363. pub fn get_width(&self) -> i32 {
  1364. match self.one_of_width {
  1365. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(v)) => v,
  1366. _ => 0,
  1367. }
  1368. }
  1369. pub fn clear_width(&mut self) {
  1370. self.one_of_width = ::std::option::Option::None;
  1371. }
  1372. pub fn has_width(&self) -> bool {
  1373. match self.one_of_width {
  1374. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(..)) => true,
  1375. _ => false,
  1376. }
  1377. }
  1378. // Param is passed by value, moved
  1379. pub fn set_width(&mut self, v: i32) {
  1380. self.one_of_width = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(v))
  1381. }
  1382. // bytes type_option_data = 9;
  1383. pub fn get_type_option_data(&self) -> &[u8] {
  1384. match self.one_of_type_option_data {
  1385. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v)) => v,
  1386. _ => &[],
  1387. }
  1388. }
  1389. pub fn clear_type_option_data(&mut self) {
  1390. self.one_of_type_option_data = ::std::option::Option::None;
  1391. }
  1392. pub fn has_type_option_data(&self) -> bool {
  1393. match self.one_of_type_option_data {
  1394. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(..)) => true,
  1395. _ => false,
  1396. }
  1397. }
  1398. // Param is passed by value, moved
  1399. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  1400. self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(v))
  1401. }
  1402. // Mutable pointer to the field.
  1403. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  1404. if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(_)) = self.one_of_type_option_data {
  1405. } else {
  1406. self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(::std::vec::Vec::new()));
  1407. }
  1408. match self.one_of_type_option_data {
  1409. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref mut v)) => v,
  1410. _ => panic!(),
  1411. }
  1412. }
  1413. // Take field
  1414. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  1415. if self.has_type_option_data() {
  1416. match self.one_of_type_option_data.take() {
  1417. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(v)) => v,
  1418. _ => panic!(),
  1419. }
  1420. } else {
  1421. ::std::vec::Vec::new()
  1422. }
  1423. }
  1424. }
  1425. impl ::protobuf::Message for FieldChangesetPayload {
  1426. fn is_initialized(&self) -> bool {
  1427. true
  1428. }
  1429. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1430. while !is.eof()? {
  1431. let (field_number, wire_type) = is.read_tag_unpack()?;
  1432. match field_number {
  1433. 1 => {
  1434. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  1435. },
  1436. 2 => {
  1437. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1438. },
  1439. 3 => {
  1440. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  1441. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1442. }
  1443. self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(is.read_string()?));
  1444. },
  1445. 4 => {
  1446. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  1447. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1448. }
  1449. self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(is.read_string()?));
  1450. },
  1451. 5 => {
  1452. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1453. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1454. }
  1455. self.one_of_field_type = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(is.read_enum()?));
  1456. },
  1457. 6 => {
  1458. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1459. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1460. }
  1461. self.one_of_frozen = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(is.read_bool()?));
  1462. },
  1463. 7 => {
  1464. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1465. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1466. }
  1467. self.one_of_visibility = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(is.read_bool()?));
  1468. },
  1469. 8 => {
  1470. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1471. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1472. }
  1473. self.one_of_width = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(is.read_int32()?));
  1474. },
  1475. 9 => {
  1476. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  1477. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1478. }
  1479. self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(is.read_bytes()?));
  1480. },
  1481. _ => {
  1482. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1483. },
  1484. };
  1485. }
  1486. ::std::result::Result::Ok(())
  1487. }
  1488. // Compute sizes of nested messages
  1489. #[allow(unused_variables)]
  1490. fn compute_size(&self) -> u32 {
  1491. let mut my_size = 0;
  1492. if !self.field_id.is_empty() {
  1493. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  1494. }
  1495. if !self.grid_id.is_empty() {
  1496. my_size += ::protobuf::rt::string_size(2, &self.grid_id);
  1497. }
  1498. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  1499. match v {
  1500. &FieldChangesetPayload_oneof_one_of_name::name(ref v) => {
  1501. my_size += ::protobuf::rt::string_size(3, &v);
  1502. },
  1503. };
  1504. }
  1505. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  1506. match v {
  1507. &FieldChangesetPayload_oneof_one_of_desc::desc(ref v) => {
  1508. my_size += ::protobuf::rt::string_size(4, &v);
  1509. },
  1510. };
  1511. }
  1512. if let ::std::option::Option::Some(ref v) = self.one_of_field_type {
  1513. match v {
  1514. &FieldChangesetPayload_oneof_one_of_field_type::field_type(v) => {
  1515. my_size += ::protobuf::rt::enum_size(5, v);
  1516. },
  1517. };
  1518. }
  1519. if let ::std::option::Option::Some(ref v) = self.one_of_frozen {
  1520. match v {
  1521. &FieldChangesetPayload_oneof_one_of_frozen::frozen(v) => {
  1522. my_size += 2;
  1523. },
  1524. };
  1525. }
  1526. if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
  1527. match v {
  1528. &FieldChangesetPayload_oneof_one_of_visibility::visibility(v) => {
  1529. my_size += 2;
  1530. },
  1531. };
  1532. }
  1533. if let ::std::option::Option::Some(ref v) = self.one_of_width {
  1534. match v {
  1535. &FieldChangesetPayload_oneof_one_of_width::width(v) => {
  1536. my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
  1537. },
  1538. };
  1539. }
  1540. if let ::std::option::Option::Some(ref v) = self.one_of_type_option_data {
  1541. match v {
  1542. &FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v) => {
  1543. my_size += ::protobuf::rt::bytes_size(9, &v);
  1544. },
  1545. };
  1546. }
  1547. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1548. self.cached_size.set(my_size);
  1549. my_size
  1550. }
  1551. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1552. if !self.field_id.is_empty() {
  1553. os.write_string(1, &self.field_id)?;
  1554. }
  1555. if !self.grid_id.is_empty() {
  1556. os.write_string(2, &self.grid_id)?;
  1557. }
  1558. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  1559. match v {
  1560. &FieldChangesetPayload_oneof_one_of_name::name(ref v) => {
  1561. os.write_string(3, v)?;
  1562. },
  1563. };
  1564. }
  1565. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  1566. match v {
  1567. &FieldChangesetPayload_oneof_one_of_desc::desc(ref v) => {
  1568. os.write_string(4, v)?;
  1569. },
  1570. };
  1571. }
  1572. if let ::std::option::Option::Some(ref v) = self.one_of_field_type {
  1573. match v {
  1574. &FieldChangesetPayload_oneof_one_of_field_type::field_type(v) => {
  1575. os.write_enum(5, ::protobuf::ProtobufEnum::value(&v))?;
  1576. },
  1577. };
  1578. }
  1579. if let ::std::option::Option::Some(ref v) = self.one_of_frozen {
  1580. match v {
  1581. &FieldChangesetPayload_oneof_one_of_frozen::frozen(v) => {
  1582. os.write_bool(6, v)?;
  1583. },
  1584. };
  1585. }
  1586. if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
  1587. match v {
  1588. &FieldChangesetPayload_oneof_one_of_visibility::visibility(v) => {
  1589. os.write_bool(7, v)?;
  1590. },
  1591. };
  1592. }
  1593. if let ::std::option::Option::Some(ref v) = self.one_of_width {
  1594. match v {
  1595. &FieldChangesetPayload_oneof_one_of_width::width(v) => {
  1596. os.write_int32(8, v)?;
  1597. },
  1598. };
  1599. }
  1600. if let ::std::option::Option::Some(ref v) = self.one_of_type_option_data {
  1601. match v {
  1602. &FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v) => {
  1603. os.write_bytes(9, v)?;
  1604. },
  1605. };
  1606. }
  1607. os.write_unknown_fields(self.get_unknown_fields())?;
  1608. ::std::result::Result::Ok(())
  1609. }
  1610. fn get_cached_size(&self) -> u32 {
  1611. self.cached_size.get()
  1612. }
  1613. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1614. &self.unknown_fields
  1615. }
  1616. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1617. &mut self.unknown_fields
  1618. }
  1619. fn as_any(&self) -> &dyn (::std::any::Any) {
  1620. self as &dyn (::std::any::Any)
  1621. }
  1622. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1623. self as &mut dyn (::std::any::Any)
  1624. }
  1625. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1626. self
  1627. }
  1628. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1629. Self::descriptor_static()
  1630. }
  1631. fn new() -> FieldChangesetPayload {
  1632. FieldChangesetPayload::new()
  1633. }
  1634. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1635. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1636. descriptor.get(|| {
  1637. let mut fields = ::std::vec::Vec::new();
  1638. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1639. "field_id",
  1640. |m: &FieldChangesetPayload| { &m.field_id },
  1641. |m: &mut FieldChangesetPayload| { &mut m.field_id },
  1642. ));
  1643. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1644. "grid_id",
  1645. |m: &FieldChangesetPayload| { &m.grid_id },
  1646. |m: &mut FieldChangesetPayload| { &mut m.grid_id },
  1647. ));
  1648. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1649. "name",
  1650. FieldChangesetPayload::has_name,
  1651. FieldChangesetPayload::get_name,
  1652. ));
  1653. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1654. "desc",
  1655. FieldChangesetPayload::has_desc,
  1656. FieldChangesetPayload::get_desc,
  1657. ));
  1658. fields.push(::protobuf::reflect::accessor::make_singular_enum_accessor::<_, FieldType>(
  1659. "field_type",
  1660. FieldChangesetPayload::has_field_type,
  1661. FieldChangesetPayload::get_field_type,
  1662. ));
  1663. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  1664. "frozen",
  1665. FieldChangesetPayload::has_frozen,
  1666. FieldChangesetPayload::get_frozen,
  1667. ));
  1668. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  1669. "visibility",
  1670. FieldChangesetPayload::has_visibility,
  1671. FieldChangesetPayload::get_visibility,
  1672. ));
  1673. fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor::<_>(
  1674. "width",
  1675. FieldChangesetPayload::has_width,
  1676. FieldChangesetPayload::get_width,
  1677. ));
  1678. fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
  1679. "type_option_data",
  1680. FieldChangesetPayload::has_type_option_data,
  1681. FieldChangesetPayload::get_type_option_data,
  1682. ));
  1683. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldChangesetPayload>(
  1684. "FieldChangesetPayload",
  1685. fields,
  1686. file_descriptor_proto()
  1687. )
  1688. })
  1689. }
  1690. fn default_instance() -> &'static FieldChangesetPayload {
  1691. static instance: ::protobuf::rt::LazyV2<FieldChangesetPayload> = ::protobuf::rt::LazyV2::INIT;
  1692. instance.get(FieldChangesetPayload::new)
  1693. }
  1694. }
  1695. impl ::protobuf::Clear for FieldChangesetPayload {
  1696. fn clear(&mut self) {
  1697. self.field_id.clear();
  1698. self.grid_id.clear();
  1699. self.one_of_name = ::std::option::Option::None;
  1700. self.one_of_desc = ::std::option::Option::None;
  1701. self.one_of_field_type = ::std::option::Option::None;
  1702. self.one_of_frozen = ::std::option::Option::None;
  1703. self.one_of_visibility = ::std::option::Option::None;
  1704. self.one_of_width = ::std::option::Option::None;
  1705. self.one_of_type_option_data = ::std::option::Option::None;
  1706. self.unknown_fields.clear();
  1707. }
  1708. }
  1709. impl ::std::fmt::Debug for FieldChangesetPayload {
  1710. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1711. ::protobuf::text_format::fmt(self, f)
  1712. }
  1713. }
  1714. impl ::protobuf::reflect::ProtobufValue for FieldChangesetPayload {
  1715. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1716. ::protobuf::reflect::ReflectValueRef::Message(self)
  1717. }
  1718. }
  1719. #[derive(PartialEq,Clone,Default)]
  1720. pub struct AnyData {
  1721. // message fields
  1722. pub type_id: ::std::string::String,
  1723. pub value: ::std::vec::Vec<u8>,
  1724. // special fields
  1725. pub unknown_fields: ::protobuf::UnknownFields,
  1726. pub cached_size: ::protobuf::CachedSize,
  1727. }
  1728. impl<'a> ::std::default::Default for &'a AnyData {
  1729. fn default() -> &'a AnyData {
  1730. <AnyData as ::protobuf::Message>::default_instance()
  1731. }
  1732. }
  1733. impl AnyData {
  1734. pub fn new() -> AnyData {
  1735. ::std::default::Default::default()
  1736. }
  1737. // string type_id = 1;
  1738. pub fn get_type_id(&self) -> &str {
  1739. &self.type_id
  1740. }
  1741. pub fn clear_type_id(&mut self) {
  1742. self.type_id.clear();
  1743. }
  1744. // Param is passed by value, moved
  1745. pub fn set_type_id(&mut self, v: ::std::string::String) {
  1746. self.type_id = v;
  1747. }
  1748. // Mutable pointer to the field.
  1749. // If field is not initialized, it is initialized with default value first.
  1750. pub fn mut_type_id(&mut self) -> &mut ::std::string::String {
  1751. &mut self.type_id
  1752. }
  1753. // Take field
  1754. pub fn take_type_id(&mut self) -> ::std::string::String {
  1755. ::std::mem::replace(&mut self.type_id, ::std::string::String::new())
  1756. }
  1757. // bytes value = 2;
  1758. pub fn get_value(&self) -> &[u8] {
  1759. &self.value
  1760. }
  1761. pub fn clear_value(&mut self) {
  1762. self.value.clear();
  1763. }
  1764. // Param is passed by value, moved
  1765. pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
  1766. self.value = v;
  1767. }
  1768. // Mutable pointer to the field.
  1769. // If field is not initialized, it is initialized with default value first.
  1770. pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
  1771. &mut self.value
  1772. }
  1773. // Take field
  1774. pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
  1775. ::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
  1776. }
  1777. }
  1778. impl ::protobuf::Message for AnyData {
  1779. fn is_initialized(&self) -> bool {
  1780. true
  1781. }
  1782. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1783. while !is.eof()? {
  1784. let (field_number, wire_type) = is.read_tag_unpack()?;
  1785. match field_number {
  1786. 1 => {
  1787. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.type_id)?;
  1788. },
  1789. 2 => {
  1790. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
  1791. },
  1792. _ => {
  1793. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1794. },
  1795. };
  1796. }
  1797. ::std::result::Result::Ok(())
  1798. }
  1799. // Compute sizes of nested messages
  1800. #[allow(unused_variables)]
  1801. fn compute_size(&self) -> u32 {
  1802. let mut my_size = 0;
  1803. if !self.type_id.is_empty() {
  1804. my_size += ::protobuf::rt::string_size(1, &self.type_id);
  1805. }
  1806. if !self.value.is_empty() {
  1807. my_size += ::protobuf::rt::bytes_size(2, &self.value);
  1808. }
  1809. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1810. self.cached_size.set(my_size);
  1811. my_size
  1812. }
  1813. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1814. if !self.type_id.is_empty() {
  1815. os.write_string(1, &self.type_id)?;
  1816. }
  1817. if !self.value.is_empty() {
  1818. os.write_bytes(2, &self.value)?;
  1819. }
  1820. os.write_unknown_fields(self.get_unknown_fields())?;
  1821. ::std::result::Result::Ok(())
  1822. }
  1823. fn get_cached_size(&self) -> u32 {
  1824. self.cached_size.get()
  1825. }
  1826. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1827. &self.unknown_fields
  1828. }
  1829. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1830. &mut self.unknown_fields
  1831. }
  1832. fn as_any(&self) -> &dyn (::std::any::Any) {
  1833. self as &dyn (::std::any::Any)
  1834. }
  1835. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1836. self as &mut dyn (::std::any::Any)
  1837. }
  1838. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1839. self
  1840. }
  1841. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1842. Self::descriptor_static()
  1843. }
  1844. fn new() -> AnyData {
  1845. AnyData::new()
  1846. }
  1847. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1848. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1849. descriptor.get(|| {
  1850. let mut fields = ::std::vec::Vec::new();
  1851. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1852. "type_id",
  1853. |m: &AnyData| { &m.type_id },
  1854. |m: &mut AnyData| { &mut m.type_id },
  1855. ));
  1856. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1857. "value",
  1858. |m: &AnyData| { &m.value },
  1859. |m: &mut AnyData| { &mut m.value },
  1860. ));
  1861. ::protobuf::reflect::MessageDescriptor::new_pb_name::<AnyData>(
  1862. "AnyData",
  1863. fields,
  1864. file_descriptor_proto()
  1865. )
  1866. })
  1867. }
  1868. fn default_instance() -> &'static AnyData {
  1869. static instance: ::protobuf::rt::LazyV2<AnyData> = ::protobuf::rt::LazyV2::INIT;
  1870. instance.get(AnyData::new)
  1871. }
  1872. }
  1873. impl ::protobuf::Clear for AnyData {
  1874. fn clear(&mut self) {
  1875. self.type_id.clear();
  1876. self.value.clear();
  1877. self.unknown_fields.clear();
  1878. }
  1879. }
  1880. impl ::std::fmt::Debug for AnyData {
  1881. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1882. ::protobuf::text_format::fmt(self, f)
  1883. }
  1884. }
  1885. impl ::protobuf::reflect::ProtobufValue for AnyData {
  1886. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1887. ::protobuf::reflect::ReflectValueRef::Message(self)
  1888. }
  1889. }
  1890. #[derive(PartialEq,Clone,Default)]
  1891. pub struct RowMeta {
  1892. // message fields
  1893. pub id: ::std::string::String,
  1894. pub block_id: ::std::string::String,
  1895. pub cell_by_field_id: ::std::collections::HashMap<::std::string::String, CellMeta>,
  1896. pub height: i32,
  1897. pub visibility: bool,
  1898. // special fields
  1899. pub unknown_fields: ::protobuf::UnknownFields,
  1900. pub cached_size: ::protobuf::CachedSize,
  1901. }
  1902. impl<'a> ::std::default::Default for &'a RowMeta {
  1903. fn default() -> &'a RowMeta {
  1904. <RowMeta as ::protobuf::Message>::default_instance()
  1905. }
  1906. }
  1907. impl RowMeta {
  1908. pub fn new() -> RowMeta {
  1909. ::std::default::Default::default()
  1910. }
  1911. // string id = 1;
  1912. pub fn get_id(&self) -> &str {
  1913. &self.id
  1914. }
  1915. pub fn clear_id(&mut self) {
  1916. self.id.clear();
  1917. }
  1918. // Param is passed by value, moved
  1919. pub fn set_id(&mut self, v: ::std::string::String) {
  1920. self.id = v;
  1921. }
  1922. // Mutable pointer to the field.
  1923. // If field is not initialized, it is initialized with default value first.
  1924. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  1925. &mut self.id
  1926. }
  1927. // Take field
  1928. pub fn take_id(&mut self) -> ::std::string::String {
  1929. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  1930. }
  1931. // string block_id = 2;
  1932. pub fn get_block_id(&self) -> &str {
  1933. &self.block_id
  1934. }
  1935. pub fn clear_block_id(&mut self) {
  1936. self.block_id.clear();
  1937. }
  1938. // Param is passed by value, moved
  1939. pub fn set_block_id(&mut self, v: ::std::string::String) {
  1940. self.block_id = v;
  1941. }
  1942. // Mutable pointer to the field.
  1943. // If field is not initialized, it is initialized with default value first.
  1944. pub fn mut_block_id(&mut self) -> &mut ::std::string::String {
  1945. &mut self.block_id
  1946. }
  1947. // Take field
  1948. pub fn take_block_id(&mut self) -> ::std::string::String {
  1949. ::std::mem::replace(&mut self.block_id, ::std::string::String::new())
  1950. }
  1951. // repeated .RowMeta.CellByFieldIdEntry cell_by_field_id = 3;
  1952. pub fn get_cell_by_field_id(&self) -> &::std::collections::HashMap<::std::string::String, CellMeta> {
  1953. &self.cell_by_field_id
  1954. }
  1955. pub fn clear_cell_by_field_id(&mut self) {
  1956. self.cell_by_field_id.clear();
  1957. }
  1958. // Param is passed by value, moved
  1959. pub fn set_cell_by_field_id(&mut self, v: ::std::collections::HashMap<::std::string::String, CellMeta>) {
  1960. self.cell_by_field_id = v;
  1961. }
  1962. // Mutable pointer to the field.
  1963. pub fn mut_cell_by_field_id(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, CellMeta> {
  1964. &mut self.cell_by_field_id
  1965. }
  1966. // Take field
  1967. pub fn take_cell_by_field_id(&mut self) -> ::std::collections::HashMap<::std::string::String, CellMeta> {
  1968. ::std::mem::replace(&mut self.cell_by_field_id, ::std::collections::HashMap::new())
  1969. }
  1970. // int32 height = 4;
  1971. pub fn get_height(&self) -> i32 {
  1972. self.height
  1973. }
  1974. pub fn clear_height(&mut self) {
  1975. self.height = 0;
  1976. }
  1977. // Param is passed by value, moved
  1978. pub fn set_height(&mut self, v: i32) {
  1979. self.height = v;
  1980. }
  1981. // bool visibility = 5;
  1982. pub fn get_visibility(&self) -> bool {
  1983. self.visibility
  1984. }
  1985. pub fn clear_visibility(&mut self) {
  1986. self.visibility = false;
  1987. }
  1988. // Param is passed by value, moved
  1989. pub fn set_visibility(&mut self, v: bool) {
  1990. self.visibility = v;
  1991. }
  1992. }
  1993. impl ::protobuf::Message for RowMeta {
  1994. fn is_initialized(&self) -> bool {
  1995. true
  1996. }
  1997. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1998. while !is.eof()? {
  1999. let (field_number, wire_type) = is.read_tag_unpack()?;
  2000. match field_number {
  2001. 1 => {
  2002. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  2003. },
  2004. 2 => {
  2005. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.block_id)?;
  2006. },
  2007. 3 => {
  2008. ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(wire_type, is, &mut self.cell_by_field_id)?;
  2009. },
  2010. 4 => {
  2011. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2012. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2013. }
  2014. let tmp = is.read_int32()?;
  2015. self.height = tmp;
  2016. },
  2017. 5 => {
  2018. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2019. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2020. }
  2021. let tmp = is.read_bool()?;
  2022. self.visibility = tmp;
  2023. },
  2024. _ => {
  2025. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2026. },
  2027. };
  2028. }
  2029. ::std::result::Result::Ok(())
  2030. }
  2031. // Compute sizes of nested messages
  2032. #[allow(unused_variables)]
  2033. fn compute_size(&self) -> u32 {
  2034. let mut my_size = 0;
  2035. if !self.id.is_empty() {
  2036. my_size += ::protobuf::rt::string_size(1, &self.id);
  2037. }
  2038. if !self.block_id.is_empty() {
  2039. my_size += ::protobuf::rt::string_size(2, &self.block_id);
  2040. }
  2041. my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(3, &self.cell_by_field_id);
  2042. if self.height != 0 {
  2043. my_size += ::protobuf::rt::value_size(4, self.height, ::protobuf::wire_format::WireTypeVarint);
  2044. }
  2045. if self.visibility != false {
  2046. my_size += 2;
  2047. }
  2048. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2049. self.cached_size.set(my_size);
  2050. my_size
  2051. }
  2052. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2053. if !self.id.is_empty() {
  2054. os.write_string(1, &self.id)?;
  2055. }
  2056. if !self.block_id.is_empty() {
  2057. os.write_string(2, &self.block_id)?;
  2058. }
  2059. ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(3, &self.cell_by_field_id, os)?;
  2060. if self.height != 0 {
  2061. os.write_int32(4, self.height)?;
  2062. }
  2063. if self.visibility != false {
  2064. os.write_bool(5, self.visibility)?;
  2065. }
  2066. os.write_unknown_fields(self.get_unknown_fields())?;
  2067. ::std::result::Result::Ok(())
  2068. }
  2069. fn get_cached_size(&self) -> u32 {
  2070. self.cached_size.get()
  2071. }
  2072. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2073. &self.unknown_fields
  2074. }
  2075. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2076. &mut self.unknown_fields
  2077. }
  2078. fn as_any(&self) -> &dyn (::std::any::Any) {
  2079. self as &dyn (::std::any::Any)
  2080. }
  2081. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2082. self as &mut dyn (::std::any::Any)
  2083. }
  2084. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2085. self
  2086. }
  2087. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2088. Self::descriptor_static()
  2089. }
  2090. fn new() -> RowMeta {
  2091. RowMeta::new()
  2092. }
  2093. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2094. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2095. descriptor.get(|| {
  2096. let mut fields = ::std::vec::Vec::new();
  2097. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2098. "id",
  2099. |m: &RowMeta| { &m.id },
  2100. |m: &mut RowMeta| { &mut m.id },
  2101. ));
  2102. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2103. "block_id",
  2104. |m: &RowMeta| { &m.block_id },
  2105. |m: &mut RowMeta| { &mut m.block_id },
  2106. ));
  2107. fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(
  2108. "cell_by_field_id",
  2109. |m: &RowMeta| { &m.cell_by_field_id },
  2110. |m: &mut RowMeta| { &mut m.cell_by_field_id },
  2111. ));
  2112. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  2113. "height",
  2114. |m: &RowMeta| { &m.height },
  2115. |m: &mut RowMeta| { &mut m.height },
  2116. ));
  2117. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  2118. "visibility",
  2119. |m: &RowMeta| { &m.visibility },
  2120. |m: &mut RowMeta| { &mut m.visibility },
  2121. ));
  2122. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RowMeta>(
  2123. "RowMeta",
  2124. fields,
  2125. file_descriptor_proto()
  2126. )
  2127. })
  2128. }
  2129. fn default_instance() -> &'static RowMeta {
  2130. static instance: ::protobuf::rt::LazyV2<RowMeta> = ::protobuf::rt::LazyV2::INIT;
  2131. instance.get(RowMeta::new)
  2132. }
  2133. }
  2134. impl ::protobuf::Clear for RowMeta {
  2135. fn clear(&mut self) {
  2136. self.id.clear();
  2137. self.block_id.clear();
  2138. self.cell_by_field_id.clear();
  2139. self.height = 0;
  2140. self.visibility = false;
  2141. self.unknown_fields.clear();
  2142. }
  2143. }
  2144. impl ::std::fmt::Debug for RowMeta {
  2145. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2146. ::protobuf::text_format::fmt(self, f)
  2147. }
  2148. }
  2149. impl ::protobuf::reflect::ProtobufValue for RowMeta {
  2150. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2151. ::protobuf::reflect::ReflectValueRef::Message(self)
  2152. }
  2153. }
  2154. #[derive(PartialEq,Clone,Default)]
  2155. pub struct RowMetaChangeset {
  2156. // message fields
  2157. pub row_id: ::std::string::String,
  2158. pub cell_by_field_id: ::std::collections::HashMap<::std::string::String, CellMeta>,
  2159. // message oneof groups
  2160. pub one_of_height: ::std::option::Option<RowMetaChangeset_oneof_one_of_height>,
  2161. pub one_of_visibility: ::std::option::Option<RowMetaChangeset_oneof_one_of_visibility>,
  2162. // special fields
  2163. pub unknown_fields: ::protobuf::UnknownFields,
  2164. pub cached_size: ::protobuf::CachedSize,
  2165. }
  2166. impl<'a> ::std::default::Default for &'a RowMetaChangeset {
  2167. fn default() -> &'a RowMetaChangeset {
  2168. <RowMetaChangeset as ::protobuf::Message>::default_instance()
  2169. }
  2170. }
  2171. #[derive(Clone,PartialEq,Debug)]
  2172. pub enum RowMetaChangeset_oneof_one_of_height {
  2173. height(i32),
  2174. }
  2175. #[derive(Clone,PartialEq,Debug)]
  2176. pub enum RowMetaChangeset_oneof_one_of_visibility {
  2177. visibility(bool),
  2178. }
  2179. impl RowMetaChangeset {
  2180. pub fn new() -> RowMetaChangeset {
  2181. ::std::default::Default::default()
  2182. }
  2183. // string row_id = 1;
  2184. pub fn get_row_id(&self) -> &str {
  2185. &self.row_id
  2186. }
  2187. pub fn clear_row_id(&mut self) {
  2188. self.row_id.clear();
  2189. }
  2190. // Param is passed by value, moved
  2191. pub fn set_row_id(&mut self, v: ::std::string::String) {
  2192. self.row_id = v;
  2193. }
  2194. // Mutable pointer to the field.
  2195. // If field is not initialized, it is initialized with default value first.
  2196. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  2197. &mut self.row_id
  2198. }
  2199. // Take field
  2200. pub fn take_row_id(&mut self) -> ::std::string::String {
  2201. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  2202. }
  2203. // int32 height = 2;
  2204. pub fn get_height(&self) -> i32 {
  2205. match self.one_of_height {
  2206. ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_height::height(v)) => v,
  2207. _ => 0,
  2208. }
  2209. }
  2210. pub fn clear_height(&mut self) {
  2211. self.one_of_height = ::std::option::Option::None;
  2212. }
  2213. pub fn has_height(&self) -> bool {
  2214. match self.one_of_height {
  2215. ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_height::height(..)) => true,
  2216. _ => false,
  2217. }
  2218. }
  2219. // Param is passed by value, moved
  2220. pub fn set_height(&mut self, v: i32) {
  2221. self.one_of_height = ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_height::height(v))
  2222. }
  2223. // bool visibility = 3;
  2224. pub fn get_visibility(&self) -> bool {
  2225. match self.one_of_visibility {
  2226. ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_visibility::visibility(v)) => v,
  2227. _ => false,
  2228. }
  2229. }
  2230. pub fn clear_visibility(&mut self) {
  2231. self.one_of_visibility = ::std::option::Option::None;
  2232. }
  2233. pub fn has_visibility(&self) -> bool {
  2234. match self.one_of_visibility {
  2235. ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_visibility::visibility(..)) => true,
  2236. _ => false,
  2237. }
  2238. }
  2239. // Param is passed by value, moved
  2240. pub fn set_visibility(&mut self, v: bool) {
  2241. self.one_of_visibility = ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_visibility::visibility(v))
  2242. }
  2243. // repeated .RowMetaChangeset.CellByFieldIdEntry cell_by_field_id = 4;
  2244. pub fn get_cell_by_field_id(&self) -> &::std::collections::HashMap<::std::string::String, CellMeta> {
  2245. &self.cell_by_field_id
  2246. }
  2247. pub fn clear_cell_by_field_id(&mut self) {
  2248. self.cell_by_field_id.clear();
  2249. }
  2250. // Param is passed by value, moved
  2251. pub fn set_cell_by_field_id(&mut self, v: ::std::collections::HashMap<::std::string::String, CellMeta>) {
  2252. self.cell_by_field_id = v;
  2253. }
  2254. // Mutable pointer to the field.
  2255. pub fn mut_cell_by_field_id(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, CellMeta> {
  2256. &mut self.cell_by_field_id
  2257. }
  2258. // Take field
  2259. pub fn take_cell_by_field_id(&mut self) -> ::std::collections::HashMap<::std::string::String, CellMeta> {
  2260. ::std::mem::replace(&mut self.cell_by_field_id, ::std::collections::HashMap::new())
  2261. }
  2262. }
  2263. impl ::protobuf::Message for RowMetaChangeset {
  2264. fn is_initialized(&self) -> bool {
  2265. true
  2266. }
  2267. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2268. while !is.eof()? {
  2269. let (field_number, wire_type) = is.read_tag_unpack()?;
  2270. match field_number {
  2271. 1 => {
  2272. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  2273. },
  2274. 2 => {
  2275. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2276. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2277. }
  2278. self.one_of_height = ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_height::height(is.read_int32()?));
  2279. },
  2280. 3 => {
  2281. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  2282. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2283. }
  2284. self.one_of_visibility = ::std::option::Option::Some(RowMetaChangeset_oneof_one_of_visibility::visibility(is.read_bool()?));
  2285. },
  2286. 4 => {
  2287. ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(wire_type, is, &mut self.cell_by_field_id)?;
  2288. },
  2289. _ => {
  2290. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2291. },
  2292. };
  2293. }
  2294. ::std::result::Result::Ok(())
  2295. }
  2296. // Compute sizes of nested messages
  2297. #[allow(unused_variables)]
  2298. fn compute_size(&self) -> u32 {
  2299. let mut my_size = 0;
  2300. if !self.row_id.is_empty() {
  2301. my_size += ::protobuf::rt::string_size(1, &self.row_id);
  2302. }
  2303. my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(4, &self.cell_by_field_id);
  2304. if let ::std::option::Option::Some(ref v) = self.one_of_height {
  2305. match v {
  2306. &RowMetaChangeset_oneof_one_of_height::height(v) => {
  2307. my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
  2308. },
  2309. };
  2310. }
  2311. if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
  2312. match v {
  2313. &RowMetaChangeset_oneof_one_of_visibility::visibility(v) => {
  2314. my_size += 2;
  2315. },
  2316. };
  2317. }
  2318. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2319. self.cached_size.set(my_size);
  2320. my_size
  2321. }
  2322. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2323. if !self.row_id.is_empty() {
  2324. os.write_string(1, &self.row_id)?;
  2325. }
  2326. ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(4, &self.cell_by_field_id, os)?;
  2327. if let ::std::option::Option::Some(ref v) = self.one_of_height {
  2328. match v {
  2329. &RowMetaChangeset_oneof_one_of_height::height(v) => {
  2330. os.write_int32(2, v)?;
  2331. },
  2332. };
  2333. }
  2334. if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
  2335. match v {
  2336. &RowMetaChangeset_oneof_one_of_visibility::visibility(v) => {
  2337. os.write_bool(3, v)?;
  2338. },
  2339. };
  2340. }
  2341. os.write_unknown_fields(self.get_unknown_fields())?;
  2342. ::std::result::Result::Ok(())
  2343. }
  2344. fn get_cached_size(&self) -> u32 {
  2345. self.cached_size.get()
  2346. }
  2347. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2348. &self.unknown_fields
  2349. }
  2350. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2351. &mut self.unknown_fields
  2352. }
  2353. fn as_any(&self) -> &dyn (::std::any::Any) {
  2354. self as &dyn (::std::any::Any)
  2355. }
  2356. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2357. self as &mut dyn (::std::any::Any)
  2358. }
  2359. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2360. self
  2361. }
  2362. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2363. Self::descriptor_static()
  2364. }
  2365. fn new() -> RowMetaChangeset {
  2366. RowMetaChangeset::new()
  2367. }
  2368. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2369. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2370. descriptor.get(|| {
  2371. let mut fields = ::std::vec::Vec::new();
  2372. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2373. "row_id",
  2374. |m: &RowMetaChangeset| { &m.row_id },
  2375. |m: &mut RowMetaChangeset| { &mut m.row_id },
  2376. ));
  2377. fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor::<_>(
  2378. "height",
  2379. RowMetaChangeset::has_height,
  2380. RowMetaChangeset::get_height,
  2381. ));
  2382. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  2383. "visibility",
  2384. RowMetaChangeset::has_visibility,
  2385. RowMetaChangeset::get_visibility,
  2386. ));
  2387. fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<CellMeta>>(
  2388. "cell_by_field_id",
  2389. |m: &RowMetaChangeset| { &m.cell_by_field_id },
  2390. |m: &mut RowMetaChangeset| { &mut m.cell_by_field_id },
  2391. ));
  2392. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RowMetaChangeset>(
  2393. "RowMetaChangeset",
  2394. fields,
  2395. file_descriptor_proto()
  2396. )
  2397. })
  2398. }
  2399. fn default_instance() -> &'static RowMetaChangeset {
  2400. static instance: ::protobuf::rt::LazyV2<RowMetaChangeset> = ::protobuf::rt::LazyV2::INIT;
  2401. instance.get(RowMetaChangeset::new)
  2402. }
  2403. }
  2404. impl ::protobuf::Clear for RowMetaChangeset {
  2405. fn clear(&mut self) {
  2406. self.row_id.clear();
  2407. self.one_of_height = ::std::option::Option::None;
  2408. self.one_of_visibility = ::std::option::Option::None;
  2409. self.cell_by_field_id.clear();
  2410. self.unknown_fields.clear();
  2411. }
  2412. }
  2413. impl ::std::fmt::Debug for RowMetaChangeset {
  2414. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2415. ::protobuf::text_format::fmt(self, f)
  2416. }
  2417. }
  2418. impl ::protobuf::reflect::ProtobufValue for RowMetaChangeset {
  2419. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2420. ::protobuf::reflect::ReflectValueRef::Message(self)
  2421. }
  2422. }
  2423. #[derive(PartialEq,Clone,Default)]
  2424. pub struct CellMeta {
  2425. // message fields
  2426. pub field_id: ::std::string::String,
  2427. pub data: ::std::string::String,
  2428. // special fields
  2429. pub unknown_fields: ::protobuf::UnknownFields,
  2430. pub cached_size: ::protobuf::CachedSize,
  2431. }
  2432. impl<'a> ::std::default::Default for &'a CellMeta {
  2433. fn default() -> &'a CellMeta {
  2434. <CellMeta as ::protobuf::Message>::default_instance()
  2435. }
  2436. }
  2437. impl CellMeta {
  2438. pub fn new() -> CellMeta {
  2439. ::std::default::Default::default()
  2440. }
  2441. // string field_id = 1;
  2442. pub fn get_field_id(&self) -> &str {
  2443. &self.field_id
  2444. }
  2445. pub fn clear_field_id(&mut self) {
  2446. self.field_id.clear();
  2447. }
  2448. // Param is passed by value, moved
  2449. pub fn set_field_id(&mut self, v: ::std::string::String) {
  2450. self.field_id = v;
  2451. }
  2452. // Mutable pointer to the field.
  2453. // If field is not initialized, it is initialized with default value first.
  2454. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  2455. &mut self.field_id
  2456. }
  2457. // Take field
  2458. pub fn take_field_id(&mut self) -> ::std::string::String {
  2459. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  2460. }
  2461. // string data = 2;
  2462. pub fn get_data(&self) -> &str {
  2463. &self.data
  2464. }
  2465. pub fn clear_data(&mut self) {
  2466. self.data.clear();
  2467. }
  2468. // Param is passed by value, moved
  2469. pub fn set_data(&mut self, v: ::std::string::String) {
  2470. self.data = v;
  2471. }
  2472. // Mutable pointer to the field.
  2473. // If field is not initialized, it is initialized with default value first.
  2474. pub fn mut_data(&mut self) -> &mut ::std::string::String {
  2475. &mut self.data
  2476. }
  2477. // Take field
  2478. pub fn take_data(&mut self) -> ::std::string::String {
  2479. ::std::mem::replace(&mut self.data, ::std::string::String::new())
  2480. }
  2481. }
  2482. impl ::protobuf::Message for CellMeta {
  2483. fn is_initialized(&self) -> bool {
  2484. true
  2485. }
  2486. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2487. while !is.eof()? {
  2488. let (field_number, wire_type) = is.read_tag_unpack()?;
  2489. match field_number {
  2490. 1 => {
  2491. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  2492. },
  2493. 2 => {
  2494. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data)?;
  2495. },
  2496. _ => {
  2497. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2498. },
  2499. };
  2500. }
  2501. ::std::result::Result::Ok(())
  2502. }
  2503. // Compute sizes of nested messages
  2504. #[allow(unused_variables)]
  2505. fn compute_size(&self) -> u32 {
  2506. let mut my_size = 0;
  2507. if !self.field_id.is_empty() {
  2508. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  2509. }
  2510. if !self.data.is_empty() {
  2511. my_size += ::protobuf::rt::string_size(2, &self.data);
  2512. }
  2513. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2514. self.cached_size.set(my_size);
  2515. my_size
  2516. }
  2517. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2518. if !self.field_id.is_empty() {
  2519. os.write_string(1, &self.field_id)?;
  2520. }
  2521. if !self.data.is_empty() {
  2522. os.write_string(2, &self.data)?;
  2523. }
  2524. os.write_unknown_fields(self.get_unknown_fields())?;
  2525. ::std::result::Result::Ok(())
  2526. }
  2527. fn get_cached_size(&self) -> u32 {
  2528. self.cached_size.get()
  2529. }
  2530. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2531. &self.unknown_fields
  2532. }
  2533. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2534. &mut self.unknown_fields
  2535. }
  2536. fn as_any(&self) -> &dyn (::std::any::Any) {
  2537. self as &dyn (::std::any::Any)
  2538. }
  2539. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2540. self as &mut dyn (::std::any::Any)
  2541. }
  2542. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2543. self
  2544. }
  2545. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2546. Self::descriptor_static()
  2547. }
  2548. fn new() -> CellMeta {
  2549. CellMeta::new()
  2550. }
  2551. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2552. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2553. descriptor.get(|| {
  2554. let mut fields = ::std::vec::Vec::new();
  2555. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2556. "field_id",
  2557. |m: &CellMeta| { &m.field_id },
  2558. |m: &mut CellMeta| { &mut m.field_id },
  2559. ));
  2560. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2561. "data",
  2562. |m: &CellMeta| { &m.data },
  2563. |m: &mut CellMeta| { &mut m.data },
  2564. ));
  2565. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CellMeta>(
  2566. "CellMeta",
  2567. fields,
  2568. file_descriptor_proto()
  2569. )
  2570. })
  2571. }
  2572. fn default_instance() -> &'static CellMeta {
  2573. static instance: ::protobuf::rt::LazyV2<CellMeta> = ::protobuf::rt::LazyV2::INIT;
  2574. instance.get(CellMeta::new)
  2575. }
  2576. }
  2577. impl ::protobuf::Clear for CellMeta {
  2578. fn clear(&mut self) {
  2579. self.field_id.clear();
  2580. self.data.clear();
  2581. self.unknown_fields.clear();
  2582. }
  2583. }
  2584. impl ::std::fmt::Debug for CellMeta {
  2585. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2586. ::protobuf::text_format::fmt(self, f)
  2587. }
  2588. }
  2589. impl ::protobuf::reflect::ProtobufValue for CellMeta {
  2590. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2591. ::protobuf::reflect::ReflectValueRef::Message(self)
  2592. }
  2593. }
  2594. #[derive(PartialEq,Clone,Default)]
  2595. pub struct CellMetaChangeset {
  2596. // message fields
  2597. pub grid_id: ::std::string::String,
  2598. pub row_id: ::std::string::String,
  2599. pub field_id: ::std::string::String,
  2600. // message oneof groups
  2601. pub one_of_data: ::std::option::Option<CellMetaChangeset_oneof_one_of_data>,
  2602. // special fields
  2603. pub unknown_fields: ::protobuf::UnknownFields,
  2604. pub cached_size: ::protobuf::CachedSize,
  2605. }
  2606. impl<'a> ::std::default::Default for &'a CellMetaChangeset {
  2607. fn default() -> &'a CellMetaChangeset {
  2608. <CellMetaChangeset as ::protobuf::Message>::default_instance()
  2609. }
  2610. }
  2611. #[derive(Clone,PartialEq,Debug)]
  2612. pub enum CellMetaChangeset_oneof_one_of_data {
  2613. data(::std::string::String),
  2614. }
  2615. impl CellMetaChangeset {
  2616. pub fn new() -> CellMetaChangeset {
  2617. ::std::default::Default::default()
  2618. }
  2619. // string grid_id = 1;
  2620. pub fn get_grid_id(&self) -> &str {
  2621. &self.grid_id
  2622. }
  2623. pub fn clear_grid_id(&mut self) {
  2624. self.grid_id.clear();
  2625. }
  2626. // Param is passed by value, moved
  2627. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2628. self.grid_id = v;
  2629. }
  2630. // Mutable pointer to the field.
  2631. // If field is not initialized, it is initialized with default value first.
  2632. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2633. &mut self.grid_id
  2634. }
  2635. // Take field
  2636. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2637. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2638. }
  2639. // string row_id = 2;
  2640. pub fn get_row_id(&self) -> &str {
  2641. &self.row_id
  2642. }
  2643. pub fn clear_row_id(&mut self) {
  2644. self.row_id.clear();
  2645. }
  2646. // Param is passed by value, moved
  2647. pub fn set_row_id(&mut self, v: ::std::string::String) {
  2648. self.row_id = v;
  2649. }
  2650. // Mutable pointer to the field.
  2651. // If field is not initialized, it is initialized with default value first.
  2652. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  2653. &mut self.row_id
  2654. }
  2655. // Take field
  2656. pub fn take_row_id(&mut self) -> ::std::string::String {
  2657. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  2658. }
  2659. // string field_id = 3;
  2660. pub fn get_field_id(&self) -> &str {
  2661. &self.field_id
  2662. }
  2663. pub fn clear_field_id(&mut self) {
  2664. self.field_id.clear();
  2665. }
  2666. // Param is passed by value, moved
  2667. pub fn set_field_id(&mut self, v: ::std::string::String) {
  2668. self.field_id = v;
  2669. }
  2670. // Mutable pointer to the field.
  2671. // If field is not initialized, it is initialized with default value first.
  2672. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  2673. &mut self.field_id
  2674. }
  2675. // Take field
  2676. pub fn take_field_id(&mut self) -> ::std::string::String {
  2677. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  2678. }
  2679. // string data = 4;
  2680. pub fn get_data(&self) -> &str {
  2681. match self.one_of_data {
  2682. ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(ref v)) => v,
  2683. _ => "",
  2684. }
  2685. }
  2686. pub fn clear_data(&mut self) {
  2687. self.one_of_data = ::std::option::Option::None;
  2688. }
  2689. pub fn has_data(&self) -> bool {
  2690. match self.one_of_data {
  2691. ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(..)) => true,
  2692. _ => false,
  2693. }
  2694. }
  2695. // Param is passed by value, moved
  2696. pub fn set_data(&mut self, v: ::std::string::String) {
  2697. self.one_of_data = ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(v))
  2698. }
  2699. // Mutable pointer to the field.
  2700. pub fn mut_data(&mut self) -> &mut ::std::string::String {
  2701. if let ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(_)) = self.one_of_data {
  2702. } else {
  2703. self.one_of_data = ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(::std::string::String::new()));
  2704. }
  2705. match self.one_of_data {
  2706. ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(ref mut v)) => v,
  2707. _ => panic!(),
  2708. }
  2709. }
  2710. // Take field
  2711. pub fn take_data(&mut self) -> ::std::string::String {
  2712. if self.has_data() {
  2713. match self.one_of_data.take() {
  2714. ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(v)) => v,
  2715. _ => panic!(),
  2716. }
  2717. } else {
  2718. ::std::string::String::new()
  2719. }
  2720. }
  2721. }
  2722. impl ::protobuf::Message for CellMetaChangeset {
  2723. fn is_initialized(&self) -> bool {
  2724. true
  2725. }
  2726. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2727. while !is.eof()? {
  2728. let (field_number, wire_type) = is.read_tag_unpack()?;
  2729. match field_number {
  2730. 1 => {
  2731. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  2732. },
  2733. 2 => {
  2734. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  2735. },
  2736. 3 => {
  2737. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  2738. },
  2739. 4 => {
  2740. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  2741. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2742. }
  2743. self.one_of_data = ::std::option::Option::Some(CellMetaChangeset_oneof_one_of_data::data(is.read_string()?));
  2744. },
  2745. _ => {
  2746. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2747. },
  2748. };
  2749. }
  2750. ::std::result::Result::Ok(())
  2751. }
  2752. // Compute sizes of nested messages
  2753. #[allow(unused_variables)]
  2754. fn compute_size(&self) -> u32 {
  2755. let mut my_size = 0;
  2756. if !self.grid_id.is_empty() {
  2757. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  2758. }
  2759. if !self.row_id.is_empty() {
  2760. my_size += ::protobuf::rt::string_size(2, &self.row_id);
  2761. }
  2762. if !self.field_id.is_empty() {
  2763. my_size += ::protobuf::rt::string_size(3, &self.field_id);
  2764. }
  2765. if let ::std::option::Option::Some(ref v) = self.one_of_data {
  2766. match v {
  2767. &CellMetaChangeset_oneof_one_of_data::data(ref v) => {
  2768. my_size += ::protobuf::rt::string_size(4, &v);
  2769. },
  2770. };
  2771. }
  2772. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2773. self.cached_size.set(my_size);
  2774. my_size
  2775. }
  2776. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2777. if !self.grid_id.is_empty() {
  2778. os.write_string(1, &self.grid_id)?;
  2779. }
  2780. if !self.row_id.is_empty() {
  2781. os.write_string(2, &self.row_id)?;
  2782. }
  2783. if !self.field_id.is_empty() {
  2784. os.write_string(3, &self.field_id)?;
  2785. }
  2786. if let ::std::option::Option::Some(ref v) = self.one_of_data {
  2787. match v {
  2788. &CellMetaChangeset_oneof_one_of_data::data(ref v) => {
  2789. os.write_string(4, v)?;
  2790. },
  2791. };
  2792. }
  2793. os.write_unknown_fields(self.get_unknown_fields())?;
  2794. ::std::result::Result::Ok(())
  2795. }
  2796. fn get_cached_size(&self) -> u32 {
  2797. self.cached_size.get()
  2798. }
  2799. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2800. &self.unknown_fields
  2801. }
  2802. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2803. &mut self.unknown_fields
  2804. }
  2805. fn as_any(&self) -> &dyn (::std::any::Any) {
  2806. self as &dyn (::std::any::Any)
  2807. }
  2808. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2809. self as &mut dyn (::std::any::Any)
  2810. }
  2811. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2812. self
  2813. }
  2814. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2815. Self::descriptor_static()
  2816. }
  2817. fn new() -> CellMetaChangeset {
  2818. CellMetaChangeset::new()
  2819. }
  2820. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2821. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2822. descriptor.get(|| {
  2823. let mut fields = ::std::vec::Vec::new();
  2824. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2825. "grid_id",
  2826. |m: &CellMetaChangeset| { &m.grid_id },
  2827. |m: &mut CellMetaChangeset| { &mut m.grid_id },
  2828. ));
  2829. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2830. "row_id",
  2831. |m: &CellMetaChangeset| { &m.row_id },
  2832. |m: &mut CellMetaChangeset| { &mut m.row_id },
  2833. ));
  2834. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2835. "field_id",
  2836. |m: &CellMetaChangeset| { &m.field_id },
  2837. |m: &mut CellMetaChangeset| { &mut m.field_id },
  2838. ));
  2839. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  2840. "data",
  2841. CellMetaChangeset::has_data,
  2842. CellMetaChangeset::get_data,
  2843. ));
  2844. ::protobuf::reflect::MessageDescriptor::new_pb_name::<CellMetaChangeset>(
  2845. "CellMetaChangeset",
  2846. fields,
  2847. file_descriptor_proto()
  2848. )
  2849. })
  2850. }
  2851. fn default_instance() -> &'static CellMetaChangeset {
  2852. static instance: ::protobuf::rt::LazyV2<CellMetaChangeset> = ::protobuf::rt::LazyV2::INIT;
  2853. instance.get(CellMetaChangeset::new)
  2854. }
  2855. }
  2856. impl ::protobuf::Clear for CellMetaChangeset {
  2857. fn clear(&mut self) {
  2858. self.grid_id.clear();
  2859. self.row_id.clear();
  2860. self.field_id.clear();
  2861. self.one_of_data = ::std::option::Option::None;
  2862. self.unknown_fields.clear();
  2863. }
  2864. }
  2865. impl ::std::fmt::Debug for CellMetaChangeset {
  2866. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2867. ::protobuf::text_format::fmt(self, f)
  2868. }
  2869. }
  2870. impl ::protobuf::reflect::ProtobufValue for CellMetaChangeset {
  2871. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2872. ::protobuf::reflect::ReflectValueRef::Message(self)
  2873. }
  2874. }
  2875. #[derive(PartialEq,Clone,Default)]
  2876. pub struct BuildGridContext {
  2877. // message fields
  2878. pub field_metas: ::protobuf::RepeatedField<FieldMeta>,
  2879. pub block_metas: ::protobuf::SingularPtrField<GridBlockMeta>,
  2880. pub block_meta_data: ::protobuf::SingularPtrField<GridBlockMetaData>,
  2881. // special fields
  2882. pub unknown_fields: ::protobuf::UnknownFields,
  2883. pub cached_size: ::protobuf::CachedSize,
  2884. }
  2885. impl<'a> ::std::default::Default for &'a BuildGridContext {
  2886. fn default() -> &'a BuildGridContext {
  2887. <BuildGridContext as ::protobuf::Message>::default_instance()
  2888. }
  2889. }
  2890. impl BuildGridContext {
  2891. pub fn new() -> BuildGridContext {
  2892. ::std::default::Default::default()
  2893. }
  2894. // repeated .FieldMeta field_metas = 1;
  2895. pub fn get_field_metas(&self) -> &[FieldMeta] {
  2896. &self.field_metas
  2897. }
  2898. pub fn clear_field_metas(&mut self) {
  2899. self.field_metas.clear();
  2900. }
  2901. // Param is passed by value, moved
  2902. pub fn set_field_metas(&mut self, v: ::protobuf::RepeatedField<FieldMeta>) {
  2903. self.field_metas = v;
  2904. }
  2905. // Mutable pointer to the field.
  2906. pub fn mut_field_metas(&mut self) -> &mut ::protobuf::RepeatedField<FieldMeta> {
  2907. &mut self.field_metas
  2908. }
  2909. // Take field
  2910. pub fn take_field_metas(&mut self) -> ::protobuf::RepeatedField<FieldMeta> {
  2911. ::std::mem::replace(&mut self.field_metas, ::protobuf::RepeatedField::new())
  2912. }
  2913. // .GridBlockMeta block_metas = 2;
  2914. pub fn get_block_metas(&self) -> &GridBlockMeta {
  2915. self.block_metas.as_ref().unwrap_or_else(|| <GridBlockMeta as ::protobuf::Message>::default_instance())
  2916. }
  2917. pub fn clear_block_metas(&mut self) {
  2918. self.block_metas.clear();
  2919. }
  2920. pub fn has_block_metas(&self) -> bool {
  2921. self.block_metas.is_some()
  2922. }
  2923. // Param is passed by value, moved
  2924. pub fn set_block_metas(&mut self, v: GridBlockMeta) {
  2925. self.block_metas = ::protobuf::SingularPtrField::some(v);
  2926. }
  2927. // Mutable pointer to the field.
  2928. // If field is not initialized, it is initialized with default value first.
  2929. pub fn mut_block_metas(&mut self) -> &mut GridBlockMeta {
  2930. if self.block_metas.is_none() {
  2931. self.block_metas.set_default();
  2932. }
  2933. self.block_metas.as_mut().unwrap()
  2934. }
  2935. // Take field
  2936. pub fn take_block_metas(&mut self) -> GridBlockMeta {
  2937. self.block_metas.take().unwrap_or_else(|| GridBlockMeta::new())
  2938. }
  2939. // .GridBlockMetaData block_meta_data = 3;
  2940. pub fn get_block_meta_data(&self) -> &GridBlockMetaData {
  2941. self.block_meta_data.as_ref().unwrap_or_else(|| <GridBlockMetaData as ::protobuf::Message>::default_instance())
  2942. }
  2943. pub fn clear_block_meta_data(&mut self) {
  2944. self.block_meta_data.clear();
  2945. }
  2946. pub fn has_block_meta_data(&self) -> bool {
  2947. self.block_meta_data.is_some()
  2948. }
  2949. // Param is passed by value, moved
  2950. pub fn set_block_meta_data(&mut self, v: GridBlockMetaData) {
  2951. self.block_meta_data = ::protobuf::SingularPtrField::some(v);
  2952. }
  2953. // Mutable pointer to the field.
  2954. // If field is not initialized, it is initialized with default value first.
  2955. pub fn mut_block_meta_data(&mut self) -> &mut GridBlockMetaData {
  2956. if self.block_meta_data.is_none() {
  2957. self.block_meta_data.set_default();
  2958. }
  2959. self.block_meta_data.as_mut().unwrap()
  2960. }
  2961. // Take field
  2962. pub fn take_block_meta_data(&mut self) -> GridBlockMetaData {
  2963. self.block_meta_data.take().unwrap_or_else(|| GridBlockMetaData::new())
  2964. }
  2965. }
  2966. impl ::protobuf::Message for BuildGridContext {
  2967. fn is_initialized(&self) -> bool {
  2968. for v in &self.field_metas {
  2969. if !v.is_initialized() {
  2970. return false;
  2971. }
  2972. };
  2973. for v in &self.block_metas {
  2974. if !v.is_initialized() {
  2975. return false;
  2976. }
  2977. };
  2978. for v in &self.block_meta_data {
  2979. if !v.is_initialized() {
  2980. return false;
  2981. }
  2982. };
  2983. true
  2984. }
  2985. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2986. while !is.eof()? {
  2987. let (field_number, wire_type) = is.read_tag_unpack()?;
  2988. match field_number {
  2989. 1 => {
  2990. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.field_metas)?;
  2991. },
  2992. 2 => {
  2993. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.block_metas)?;
  2994. },
  2995. 3 => {
  2996. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.block_meta_data)?;
  2997. },
  2998. _ => {
  2999. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3000. },
  3001. };
  3002. }
  3003. ::std::result::Result::Ok(())
  3004. }
  3005. // Compute sizes of nested messages
  3006. #[allow(unused_variables)]
  3007. fn compute_size(&self) -> u32 {
  3008. let mut my_size = 0;
  3009. for value in &self.field_metas {
  3010. let len = value.compute_size();
  3011. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3012. };
  3013. if let Some(ref v) = self.block_metas.as_ref() {
  3014. let len = v.compute_size();
  3015. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3016. }
  3017. if let Some(ref v) = self.block_meta_data.as_ref() {
  3018. let len = v.compute_size();
  3019. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  3020. }
  3021. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3022. self.cached_size.set(my_size);
  3023. my_size
  3024. }
  3025. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3026. for v in &self.field_metas {
  3027. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3028. os.write_raw_varint32(v.get_cached_size())?;
  3029. v.write_to_with_cached_sizes(os)?;
  3030. };
  3031. if let Some(ref v) = self.block_metas.as_ref() {
  3032. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3033. os.write_raw_varint32(v.get_cached_size())?;
  3034. v.write_to_with_cached_sizes(os)?;
  3035. }
  3036. if let Some(ref v) = self.block_meta_data.as_ref() {
  3037. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  3038. os.write_raw_varint32(v.get_cached_size())?;
  3039. v.write_to_with_cached_sizes(os)?;
  3040. }
  3041. os.write_unknown_fields(self.get_unknown_fields())?;
  3042. ::std::result::Result::Ok(())
  3043. }
  3044. fn get_cached_size(&self) -> u32 {
  3045. self.cached_size.get()
  3046. }
  3047. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3048. &self.unknown_fields
  3049. }
  3050. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3051. &mut self.unknown_fields
  3052. }
  3053. fn as_any(&self) -> &dyn (::std::any::Any) {
  3054. self as &dyn (::std::any::Any)
  3055. }
  3056. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3057. self as &mut dyn (::std::any::Any)
  3058. }
  3059. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3060. self
  3061. }
  3062. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3063. Self::descriptor_static()
  3064. }
  3065. fn new() -> BuildGridContext {
  3066. BuildGridContext::new()
  3067. }
  3068. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3069. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3070. descriptor.get(|| {
  3071. let mut fields = ::std::vec::Vec::new();
  3072. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldMeta>>(
  3073. "field_metas",
  3074. |m: &BuildGridContext| { &m.field_metas },
  3075. |m: &mut BuildGridContext| { &mut m.field_metas },
  3076. ));
  3077. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlockMeta>>(
  3078. "block_metas",
  3079. |m: &BuildGridContext| { &m.block_metas },
  3080. |m: &mut BuildGridContext| { &mut m.block_metas },
  3081. ));
  3082. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridBlockMetaData>>(
  3083. "block_meta_data",
  3084. |m: &BuildGridContext| { &m.block_meta_data },
  3085. |m: &mut BuildGridContext| { &mut m.block_meta_data },
  3086. ));
  3087. ::protobuf::reflect::MessageDescriptor::new_pb_name::<BuildGridContext>(
  3088. "BuildGridContext",
  3089. fields,
  3090. file_descriptor_proto()
  3091. )
  3092. })
  3093. }
  3094. fn default_instance() -> &'static BuildGridContext {
  3095. static instance: ::protobuf::rt::LazyV2<BuildGridContext> = ::protobuf::rt::LazyV2::INIT;
  3096. instance.get(BuildGridContext::new)
  3097. }
  3098. }
  3099. impl ::protobuf::Clear for BuildGridContext {
  3100. fn clear(&mut self) {
  3101. self.field_metas.clear();
  3102. self.block_metas.clear();
  3103. self.block_meta_data.clear();
  3104. self.unknown_fields.clear();
  3105. }
  3106. }
  3107. impl ::std::fmt::Debug for BuildGridContext {
  3108. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3109. ::protobuf::text_format::fmt(self, f)
  3110. }
  3111. }
  3112. impl ::protobuf::reflect::ProtobufValue for BuildGridContext {
  3113. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3114. ::protobuf::reflect::ReflectValueRef::Message(self)
  3115. }
  3116. }
  3117. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  3118. pub enum FieldType {
  3119. RichText = 0,
  3120. Number = 1,
  3121. DateTime = 2,
  3122. SingleSelect = 3,
  3123. MultiSelect = 4,
  3124. Checkbox = 5,
  3125. }
  3126. impl ::protobuf::ProtobufEnum for FieldType {
  3127. fn value(&self) -> i32 {
  3128. *self as i32
  3129. }
  3130. fn from_i32(value: i32) -> ::std::option::Option<FieldType> {
  3131. match value {
  3132. 0 => ::std::option::Option::Some(FieldType::RichText),
  3133. 1 => ::std::option::Option::Some(FieldType::Number),
  3134. 2 => ::std::option::Option::Some(FieldType::DateTime),
  3135. 3 => ::std::option::Option::Some(FieldType::SingleSelect),
  3136. 4 => ::std::option::Option::Some(FieldType::MultiSelect),
  3137. 5 => ::std::option::Option::Some(FieldType::Checkbox),
  3138. _ => ::std::option::Option::None
  3139. }
  3140. }
  3141. fn values() -> &'static [Self] {
  3142. static values: &'static [FieldType] = &[
  3143. FieldType::RichText,
  3144. FieldType::Number,
  3145. FieldType::DateTime,
  3146. FieldType::SingleSelect,
  3147. FieldType::MultiSelect,
  3148. FieldType::Checkbox,
  3149. ];
  3150. values
  3151. }
  3152. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  3153. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3154. descriptor.get(|| {
  3155. ::protobuf::reflect::EnumDescriptor::new_pb_name::<FieldType>("FieldType", file_descriptor_proto())
  3156. })
  3157. }
  3158. }
  3159. impl ::std::marker::Copy for FieldType {
  3160. }
  3161. impl ::std::default::Default for FieldType {
  3162. fn default() -> Self {
  3163. FieldType::RichText
  3164. }
  3165. }
  3166. impl ::protobuf::reflect::ProtobufValue for FieldType {
  3167. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3168. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  3169. }
  3170. }
  3171. static file_descriptor_proto_data: &'static [u8] = b"\
  3172. \n\nmeta.proto\"x\n\x08GridMeta\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\
  3173. \x06gridId\x12\"\n\x06fields\x18\x02\x20\x03(\x0b2\n.FieldMetaR\x06field\
  3174. s\x12/\n\x0bblock_metas\x18\x03\x20\x03(\x0b2\x0e.GridBlockMetaR\nblockM\
  3175. etas\"o\n\rGridBlockMeta\x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\x07bl\
  3176. ockId\x12&\n\x0fstart_row_index\x18\x02\x20\x01(\x05R\rstartRowIndex\x12\
  3177. \x1b\n\trow_count\x18\x03\x20\x01(\x05R\x08rowCount\"U\n\x11GridBlockMet\
  3178. aData\x12\x19\n\x08block_id\x18\x01\x20\x01(\tR\x07blockId\x12%\n\trow_m\
  3179. etas\x18\x02\x20\x03(\x0b2\x08.RowMetaR\x08rowMetas\"\x99\x02\n\tFieldMe\
  3180. ta\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\
  3181. \x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12)\
  3182. \n\nfield_type\x18\x04\x20\x01(\x0e2\n.FieldTypeR\tfieldType\x12\x16\n\
  3183. \x06frozen\x18\x05\x20\x01(\x08R\x06frozen\x12\x1e\n\nvisibility\x18\x06\
  3184. \x20\x01(\x08R\nvisibility\x12\x14\n\x05width\x18\x07\x20\x01(\x05R\x05w\
  3185. idth\x12[\n\x1ctype_option_by_field_type_id\x18\x08\x20\x01(\x0b2\x1c.Ty\
  3186. peOptionDataByFieldTypeIdR\x17typeOptionByFieldTypeId\"\x8e\x01\n\x1bTyp\
  3187. eOptionDataByFieldTypeId\x127\n\x03map\x18\x01\x20\x03(\x0b2%.TypeOption\
  3188. DataByFieldTypeId.MapEntryR\x03map\x1a6\n\x08MapEntry\x12\x10\n\x03key\
  3189. \x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05va\
  3190. lue:\x028\x01\"\xa8\x03\n\x15FieldChangesetPayload\x12\x19\n\x08field_id\
  3191. \x18\x01\x20\x01(\tR\x07fieldId\x12\x17\n\x07grid_id\x18\x02\x20\x01(\tR\
  3192. \x06gridId\x12\x14\n\x04name\x18\x03\x20\x01(\tH\0R\x04name\x12\x14\n\
  3193. \x04desc\x18\x04\x20\x01(\tH\x01R\x04desc\x12+\n\nfield_type\x18\x05\x20\
  3194. \x01(\x0e2\n.FieldTypeH\x02R\tfieldType\x12\x18\n\x06frozen\x18\x06\x20\
  3195. \x01(\x08H\x03R\x06frozen\x12\x20\n\nvisibility\x18\x07\x20\x01(\x08H\
  3196. \x04R\nvisibility\x12\x16\n\x05width\x18\x08\x20\x01(\x05H\x05R\x05width\
  3197. \x12*\n\x10type_option_data\x18\t\x20\x01(\x0cH\x06R\x0etypeOptionDataB\
  3198. \r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x13\n\x11one_of_field_typeB\x0f\
  3199. \n\rone_of_frozenB\x13\n\x11one_of_visibilityB\x0e\n\x0cone_of_widthB\
  3200. \x19\n\x17one_of_type_option_data\"8\n\x07AnyData\x12\x17\n\x07type_id\
  3201. \x18\x01\x20\x01(\tR\x06typeId\x12\x14\n\x05value\x18\x02\x20\x01(\x0cR\
  3202. \x05value\"\xff\x01\n\x07RowMeta\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02\
  3203. id\x12\x19\n\x08block_id\x18\x02\x20\x01(\tR\x07blockId\x12D\n\x10cell_b\
  3204. y_field_id\x18\x03\x20\x03(\x0b2\x1b.RowMeta.CellByFieldIdEntryR\rcellBy\
  3205. FieldId\x12\x16\n\x06height\x18\x04\x20\x01(\x05R\x06height\x12\x1e\n\nv\
  3206. isibility\x18\x05\x20\x01(\x08R\nvisibility\x1aK\n\x12CellByFieldIdEntry\
  3207. \x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x1f\n\x05value\x18\x02\
  3208. \x20\x01(\x0b2\t.CellMetaR\x05value:\x028\x01\"\xa7\x02\n\x10RowMetaChan\
  3209. geset\x12\x15\n\x06row_id\x18\x01\x20\x01(\tR\x05rowId\x12\x18\n\x06heig\
  3210. ht\x18\x02\x20\x01(\x05H\0R\x06height\x12\x20\n\nvisibility\x18\x03\x20\
  3211. \x01(\x08H\x01R\nvisibility\x12M\n\x10cell_by_field_id\x18\x04\x20\x03(\
  3212. \x0b2$.RowMetaChangeset.CellByFieldIdEntryR\rcellByFieldId\x1aK\n\x12Cel\
  3213. lByFieldIdEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x1f\n\
  3214. \x05value\x18\x02\x20\x01(\x0b2\t.CellMetaR\x05value:\x028\x01B\x0f\n\ro\
  3215. ne_of_heightB\x13\n\x11one_of_visibility\"9\n\x08CellMeta\x12\x19\n\x08f\
  3216. ield_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x12\n\x04data\x18\x02\x20\x01\
  3217. (\tR\x04data\"\x83\x01\n\x11CellMetaChangeset\x12\x17\n\x07grid_id\x18\
  3218. \x01\x20\x01(\tR\x06gridId\x12\x15\n\x06row_id\x18\x02\x20\x01(\tR\x05ro\
  3219. wId\x12\x19\n\x08field_id\x18\x03\x20\x01(\tR\x07fieldId\x12\x14\n\x04da\
  3220. ta\x18\x04\x20\x01(\tH\0R\x04dataB\r\n\x0bone_of_data\"\xac\x01\n\x10Bui\
  3221. ldGridContext\x12+\n\x0bfield_metas\x18\x01\x20\x03(\x0b2\n.FieldMetaR\n\
  3222. fieldMetas\x12/\n\x0bblock_metas\x18\x02\x20\x01(\x0b2\x0e.GridBlockMeta\
  3223. R\nblockMetas\x12:\n\x0fblock_meta_data\x18\x03\x20\x01(\x0b2\x12.GridBl\
  3224. ockMetaDataR\rblockMetaData*d\n\tFieldType\x12\x0c\n\x08RichText\x10\0\
  3225. \x12\n\n\x06Number\x10\x01\x12\x0c\n\x08DateTime\x10\x02\x12\x10\n\x0cSi\
  3226. ngleSelect\x10\x03\x12\x0f\n\x0bMultiSelect\x10\x04\x12\x0c\n\x08Checkbo\
  3227. x\x10\x05b\x06proto3\
  3228. ";
  3229. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  3230. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  3231. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  3232. }
  3233. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  3234. file_descriptor_proto_lazy.get(|| {
  3235. parse_descriptor_proto()
  3236. })
  3237. }