grid.rs 89 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811
  1. // This file is generated by rust-protobuf 2.25.2. Do not edit
  2. // @generated
  3. // https://github.com/rust-lang/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![allow(unused_attributes)]
  7. #![cfg_attr(rustfmt, rustfmt::skip)]
  8. #![allow(box_pointers)]
  9. #![allow(dead_code)]
  10. #![allow(missing_docs)]
  11. #![allow(non_camel_case_types)]
  12. #![allow(non_snake_case)]
  13. #![allow(non_upper_case_globals)]
  14. #![allow(trivial_casts)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `grid.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
  21. #[derive(PartialEq,Clone,Default)]
  22. pub struct Grid {
  23. // message fields
  24. pub grid_id: ::std::string::String,
  25. pub filters: ::protobuf::SingularPtrField<RepeatedGridFilter>,
  26. pub field_orders: ::protobuf::SingularPtrField<RepeatedFieldOrder>,
  27. pub row_orders: ::protobuf::SingularPtrField<RepeatedRowOrder>,
  28. // special fields
  29. pub unknown_fields: ::protobuf::UnknownFields,
  30. pub cached_size: ::protobuf::CachedSize,
  31. }
  32. impl<'a> ::std::default::Default for &'a Grid {
  33. fn default() -> &'a Grid {
  34. <Grid as ::protobuf::Message>::default_instance()
  35. }
  36. }
  37. impl Grid {
  38. pub fn new() -> Grid {
  39. ::std::default::Default::default()
  40. }
  41. // string grid_id = 1;
  42. pub fn get_grid_id(&self) -> &str {
  43. &self.grid_id
  44. }
  45. pub fn clear_grid_id(&mut self) {
  46. self.grid_id.clear();
  47. }
  48. // Param is passed by value, moved
  49. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  50. self.grid_id = v;
  51. }
  52. // Mutable pointer to the field.
  53. // If field is not initialized, it is initialized with default value first.
  54. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  55. &mut self.grid_id
  56. }
  57. // Take field
  58. pub fn take_grid_id(&mut self) -> ::std::string::String {
  59. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  60. }
  61. // .RepeatedGridFilter filters = 2;
  62. pub fn get_filters(&self) -> &RepeatedGridFilter {
  63. self.filters.as_ref().unwrap_or_else(|| <RepeatedGridFilter as ::protobuf::Message>::default_instance())
  64. }
  65. pub fn clear_filters(&mut self) {
  66. self.filters.clear();
  67. }
  68. pub fn has_filters(&self) -> bool {
  69. self.filters.is_some()
  70. }
  71. // Param is passed by value, moved
  72. pub fn set_filters(&mut self, v: RepeatedGridFilter) {
  73. self.filters = ::protobuf::SingularPtrField::some(v);
  74. }
  75. // Mutable pointer to the field.
  76. // If field is not initialized, it is initialized with default value first.
  77. pub fn mut_filters(&mut self) -> &mut RepeatedGridFilter {
  78. if self.filters.is_none() {
  79. self.filters.set_default();
  80. }
  81. self.filters.as_mut().unwrap()
  82. }
  83. // Take field
  84. pub fn take_filters(&mut self) -> RepeatedGridFilter {
  85. self.filters.take().unwrap_or_else(|| RepeatedGridFilter::new())
  86. }
  87. // .RepeatedFieldOrder field_orders = 3;
  88. pub fn get_field_orders(&self) -> &RepeatedFieldOrder {
  89. self.field_orders.as_ref().unwrap_or_else(|| <RepeatedFieldOrder as ::protobuf::Message>::default_instance())
  90. }
  91. pub fn clear_field_orders(&mut self) {
  92. self.field_orders.clear();
  93. }
  94. pub fn has_field_orders(&self) -> bool {
  95. self.field_orders.is_some()
  96. }
  97. // Param is passed by value, moved
  98. pub fn set_field_orders(&mut self, v: RepeatedFieldOrder) {
  99. self.field_orders = ::protobuf::SingularPtrField::some(v);
  100. }
  101. // Mutable pointer to the field.
  102. // If field is not initialized, it is initialized with default value first.
  103. pub fn mut_field_orders(&mut self) -> &mut RepeatedFieldOrder {
  104. if self.field_orders.is_none() {
  105. self.field_orders.set_default();
  106. }
  107. self.field_orders.as_mut().unwrap()
  108. }
  109. // Take field
  110. pub fn take_field_orders(&mut self) -> RepeatedFieldOrder {
  111. self.field_orders.take().unwrap_or_else(|| RepeatedFieldOrder::new())
  112. }
  113. // .RepeatedRowOrder row_orders = 4;
  114. pub fn get_row_orders(&self) -> &RepeatedRowOrder {
  115. self.row_orders.as_ref().unwrap_or_else(|| <RepeatedRowOrder as ::protobuf::Message>::default_instance())
  116. }
  117. pub fn clear_row_orders(&mut self) {
  118. self.row_orders.clear();
  119. }
  120. pub fn has_row_orders(&self) -> bool {
  121. self.row_orders.is_some()
  122. }
  123. // Param is passed by value, moved
  124. pub fn set_row_orders(&mut self, v: RepeatedRowOrder) {
  125. self.row_orders = ::protobuf::SingularPtrField::some(v);
  126. }
  127. // Mutable pointer to the field.
  128. // If field is not initialized, it is initialized with default value first.
  129. pub fn mut_row_orders(&mut self) -> &mut RepeatedRowOrder {
  130. if self.row_orders.is_none() {
  131. self.row_orders.set_default();
  132. }
  133. self.row_orders.as_mut().unwrap()
  134. }
  135. // Take field
  136. pub fn take_row_orders(&mut self) -> RepeatedRowOrder {
  137. self.row_orders.take().unwrap_or_else(|| RepeatedRowOrder::new())
  138. }
  139. }
  140. impl ::protobuf::Message for Grid {
  141. fn is_initialized(&self) -> bool {
  142. for v in &self.filters {
  143. if !v.is_initialized() {
  144. return false;
  145. }
  146. };
  147. for v in &self.field_orders {
  148. if !v.is_initialized() {
  149. return false;
  150. }
  151. };
  152. for v in &self.row_orders {
  153. if !v.is_initialized() {
  154. return false;
  155. }
  156. };
  157. true
  158. }
  159. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  160. while !is.eof()? {
  161. let (field_number, wire_type) = is.read_tag_unpack()?;
  162. match field_number {
  163. 1 => {
  164. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  165. },
  166. 2 => {
  167. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.filters)?;
  168. },
  169. 3 => {
  170. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_orders)?;
  171. },
  172. 4 => {
  173. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.row_orders)?;
  174. },
  175. _ => {
  176. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  177. },
  178. };
  179. }
  180. ::std::result::Result::Ok(())
  181. }
  182. // Compute sizes of nested messages
  183. #[allow(unused_variables)]
  184. fn compute_size(&self) -> u32 {
  185. let mut my_size = 0;
  186. if !self.grid_id.is_empty() {
  187. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  188. }
  189. if let Some(ref v) = self.filters.as_ref() {
  190. let len = v.compute_size();
  191. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  192. }
  193. if let Some(ref v) = self.field_orders.as_ref() {
  194. let len = v.compute_size();
  195. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  196. }
  197. if let Some(ref v) = self.row_orders.as_ref() {
  198. let len = v.compute_size();
  199. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  200. }
  201. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  202. self.cached_size.set(my_size);
  203. my_size
  204. }
  205. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  206. if !self.grid_id.is_empty() {
  207. os.write_string(1, &self.grid_id)?;
  208. }
  209. if let Some(ref v) = self.filters.as_ref() {
  210. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  211. os.write_raw_varint32(v.get_cached_size())?;
  212. v.write_to_with_cached_sizes(os)?;
  213. }
  214. if let Some(ref v) = self.field_orders.as_ref() {
  215. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  216. os.write_raw_varint32(v.get_cached_size())?;
  217. v.write_to_with_cached_sizes(os)?;
  218. }
  219. if let Some(ref v) = self.row_orders.as_ref() {
  220. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  221. os.write_raw_varint32(v.get_cached_size())?;
  222. v.write_to_with_cached_sizes(os)?;
  223. }
  224. os.write_unknown_fields(self.get_unknown_fields())?;
  225. ::std::result::Result::Ok(())
  226. }
  227. fn get_cached_size(&self) -> u32 {
  228. self.cached_size.get()
  229. }
  230. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  231. &self.unknown_fields
  232. }
  233. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  234. &mut self.unknown_fields
  235. }
  236. fn as_any(&self) -> &dyn (::std::any::Any) {
  237. self as &dyn (::std::any::Any)
  238. }
  239. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  240. self as &mut dyn (::std::any::Any)
  241. }
  242. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  243. self
  244. }
  245. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  246. Self::descriptor_static()
  247. }
  248. fn new() -> Grid {
  249. Grid::new()
  250. }
  251. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  252. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  253. descriptor.get(|| {
  254. let mut fields = ::std::vec::Vec::new();
  255. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  256. "grid_id",
  257. |m: &Grid| { &m.grid_id },
  258. |m: &mut Grid| { &mut m.grid_id },
  259. ));
  260. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedGridFilter>>(
  261. "filters",
  262. |m: &Grid| { &m.filters },
  263. |m: &mut Grid| { &mut m.filters },
  264. ));
  265. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedFieldOrder>>(
  266. "field_orders",
  267. |m: &Grid| { &m.field_orders },
  268. |m: &mut Grid| { &mut m.field_orders },
  269. ));
  270. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedRowOrder>>(
  271. "row_orders",
  272. |m: &Grid| { &m.row_orders },
  273. |m: &mut Grid| { &mut m.row_orders },
  274. ));
  275. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Grid>(
  276. "Grid",
  277. fields,
  278. file_descriptor_proto()
  279. )
  280. })
  281. }
  282. fn default_instance() -> &'static Grid {
  283. static instance: ::protobuf::rt::LazyV2<Grid> = ::protobuf::rt::LazyV2::INIT;
  284. instance.get(Grid::new)
  285. }
  286. }
  287. impl ::protobuf::Clear for Grid {
  288. fn clear(&mut self) {
  289. self.grid_id.clear();
  290. self.filters.clear();
  291. self.field_orders.clear();
  292. self.row_orders.clear();
  293. self.unknown_fields.clear();
  294. }
  295. }
  296. impl ::std::fmt::Debug for Grid {
  297. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  298. ::protobuf::text_format::fmt(self, f)
  299. }
  300. }
  301. impl ::protobuf::reflect::ProtobufValue for Grid {
  302. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  303. ::protobuf::reflect::ReflectValueRef::Message(self)
  304. }
  305. }
  306. #[derive(PartialEq,Clone,Default)]
  307. pub struct GridFilter {
  308. // message fields
  309. pub id: ::std::string::String,
  310. pub name: ::std::string::String,
  311. pub desc: ::std::string::String,
  312. // special fields
  313. pub unknown_fields: ::protobuf::UnknownFields,
  314. pub cached_size: ::protobuf::CachedSize,
  315. }
  316. impl<'a> ::std::default::Default for &'a GridFilter {
  317. fn default() -> &'a GridFilter {
  318. <GridFilter as ::protobuf::Message>::default_instance()
  319. }
  320. }
  321. impl GridFilter {
  322. pub fn new() -> GridFilter {
  323. ::std::default::Default::default()
  324. }
  325. // string id = 1;
  326. pub fn get_id(&self) -> &str {
  327. &self.id
  328. }
  329. pub fn clear_id(&mut self) {
  330. self.id.clear();
  331. }
  332. // Param is passed by value, moved
  333. pub fn set_id(&mut self, v: ::std::string::String) {
  334. self.id = v;
  335. }
  336. // Mutable pointer to the field.
  337. // If field is not initialized, it is initialized with default value first.
  338. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  339. &mut self.id
  340. }
  341. // Take field
  342. pub fn take_id(&mut self) -> ::std::string::String {
  343. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  344. }
  345. // string name = 2;
  346. pub fn get_name(&self) -> &str {
  347. &self.name
  348. }
  349. pub fn clear_name(&mut self) {
  350. self.name.clear();
  351. }
  352. // Param is passed by value, moved
  353. pub fn set_name(&mut self, v: ::std::string::String) {
  354. self.name = v;
  355. }
  356. // Mutable pointer to the field.
  357. // If field is not initialized, it is initialized with default value first.
  358. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  359. &mut self.name
  360. }
  361. // Take field
  362. pub fn take_name(&mut self) -> ::std::string::String {
  363. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  364. }
  365. // string desc = 3;
  366. pub fn get_desc(&self) -> &str {
  367. &self.desc
  368. }
  369. pub fn clear_desc(&mut self) {
  370. self.desc.clear();
  371. }
  372. // Param is passed by value, moved
  373. pub fn set_desc(&mut self, v: ::std::string::String) {
  374. self.desc = v;
  375. }
  376. // Mutable pointer to the field.
  377. // If field is not initialized, it is initialized with default value first.
  378. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  379. &mut self.desc
  380. }
  381. // Take field
  382. pub fn take_desc(&mut self) -> ::std::string::String {
  383. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  384. }
  385. }
  386. impl ::protobuf::Message for GridFilter {
  387. fn is_initialized(&self) -> bool {
  388. true
  389. }
  390. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  391. while !is.eof()? {
  392. let (field_number, wire_type) = is.read_tag_unpack()?;
  393. match field_number {
  394. 1 => {
  395. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  396. },
  397. 2 => {
  398. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  399. },
  400. 3 => {
  401. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  402. },
  403. _ => {
  404. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  405. },
  406. };
  407. }
  408. ::std::result::Result::Ok(())
  409. }
  410. // Compute sizes of nested messages
  411. #[allow(unused_variables)]
  412. fn compute_size(&self) -> u32 {
  413. let mut my_size = 0;
  414. if !self.id.is_empty() {
  415. my_size += ::protobuf::rt::string_size(1, &self.id);
  416. }
  417. if !self.name.is_empty() {
  418. my_size += ::protobuf::rt::string_size(2, &self.name);
  419. }
  420. if !self.desc.is_empty() {
  421. my_size += ::protobuf::rt::string_size(3, &self.desc);
  422. }
  423. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  424. self.cached_size.set(my_size);
  425. my_size
  426. }
  427. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  428. if !self.id.is_empty() {
  429. os.write_string(1, &self.id)?;
  430. }
  431. if !self.name.is_empty() {
  432. os.write_string(2, &self.name)?;
  433. }
  434. if !self.desc.is_empty() {
  435. os.write_string(3, &self.desc)?;
  436. }
  437. os.write_unknown_fields(self.get_unknown_fields())?;
  438. ::std::result::Result::Ok(())
  439. }
  440. fn get_cached_size(&self) -> u32 {
  441. self.cached_size.get()
  442. }
  443. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  444. &self.unknown_fields
  445. }
  446. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  447. &mut self.unknown_fields
  448. }
  449. fn as_any(&self) -> &dyn (::std::any::Any) {
  450. self as &dyn (::std::any::Any)
  451. }
  452. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  453. self as &mut dyn (::std::any::Any)
  454. }
  455. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  456. self
  457. }
  458. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  459. Self::descriptor_static()
  460. }
  461. fn new() -> GridFilter {
  462. GridFilter::new()
  463. }
  464. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  465. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  466. descriptor.get(|| {
  467. let mut fields = ::std::vec::Vec::new();
  468. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  469. "id",
  470. |m: &GridFilter| { &m.id },
  471. |m: &mut GridFilter| { &mut m.id },
  472. ));
  473. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  474. "name",
  475. |m: &GridFilter| { &m.name },
  476. |m: &mut GridFilter| { &mut m.name },
  477. ));
  478. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  479. "desc",
  480. |m: &GridFilter| { &m.desc },
  481. |m: &mut GridFilter| { &mut m.desc },
  482. ));
  483. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridFilter>(
  484. "GridFilter",
  485. fields,
  486. file_descriptor_proto()
  487. )
  488. })
  489. }
  490. fn default_instance() -> &'static GridFilter {
  491. static instance: ::protobuf::rt::LazyV2<GridFilter> = ::protobuf::rt::LazyV2::INIT;
  492. instance.get(GridFilter::new)
  493. }
  494. }
  495. impl ::protobuf::Clear for GridFilter {
  496. fn clear(&mut self) {
  497. self.id.clear();
  498. self.name.clear();
  499. self.desc.clear();
  500. self.unknown_fields.clear();
  501. }
  502. }
  503. impl ::std::fmt::Debug for GridFilter {
  504. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  505. ::protobuf::text_format::fmt(self, f)
  506. }
  507. }
  508. impl ::protobuf::reflect::ProtobufValue for GridFilter {
  509. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  510. ::protobuf::reflect::ReflectValueRef::Message(self)
  511. }
  512. }
  513. #[derive(PartialEq,Clone,Default)]
  514. pub struct RepeatedGridFilter {
  515. // message fields
  516. pub items: ::protobuf::RepeatedField<GridFilter>,
  517. // special fields
  518. pub unknown_fields: ::protobuf::UnknownFields,
  519. pub cached_size: ::protobuf::CachedSize,
  520. }
  521. impl<'a> ::std::default::Default for &'a RepeatedGridFilter {
  522. fn default() -> &'a RepeatedGridFilter {
  523. <RepeatedGridFilter as ::protobuf::Message>::default_instance()
  524. }
  525. }
  526. impl RepeatedGridFilter {
  527. pub fn new() -> RepeatedGridFilter {
  528. ::std::default::Default::default()
  529. }
  530. // repeated .GridFilter items = 1;
  531. pub fn get_items(&self) -> &[GridFilter] {
  532. &self.items
  533. }
  534. pub fn clear_items(&mut self) {
  535. self.items.clear();
  536. }
  537. // Param is passed by value, moved
  538. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<GridFilter>) {
  539. self.items = v;
  540. }
  541. // Mutable pointer to the field.
  542. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<GridFilter> {
  543. &mut self.items
  544. }
  545. // Take field
  546. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<GridFilter> {
  547. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  548. }
  549. }
  550. impl ::protobuf::Message for RepeatedGridFilter {
  551. fn is_initialized(&self) -> bool {
  552. for v in &self.items {
  553. if !v.is_initialized() {
  554. return false;
  555. }
  556. };
  557. true
  558. }
  559. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  560. while !is.eof()? {
  561. let (field_number, wire_type) = is.read_tag_unpack()?;
  562. match field_number {
  563. 1 => {
  564. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  565. },
  566. _ => {
  567. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  568. },
  569. };
  570. }
  571. ::std::result::Result::Ok(())
  572. }
  573. // Compute sizes of nested messages
  574. #[allow(unused_variables)]
  575. fn compute_size(&self) -> u32 {
  576. let mut my_size = 0;
  577. for value in &self.items {
  578. let len = value.compute_size();
  579. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  580. };
  581. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  582. self.cached_size.set(my_size);
  583. my_size
  584. }
  585. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  586. for v in &self.items {
  587. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  588. os.write_raw_varint32(v.get_cached_size())?;
  589. v.write_to_with_cached_sizes(os)?;
  590. };
  591. os.write_unknown_fields(self.get_unknown_fields())?;
  592. ::std::result::Result::Ok(())
  593. }
  594. fn get_cached_size(&self) -> u32 {
  595. self.cached_size.get()
  596. }
  597. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  598. &self.unknown_fields
  599. }
  600. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  601. &mut self.unknown_fields
  602. }
  603. fn as_any(&self) -> &dyn (::std::any::Any) {
  604. self as &dyn (::std::any::Any)
  605. }
  606. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  607. self as &mut dyn (::std::any::Any)
  608. }
  609. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  610. self
  611. }
  612. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  613. Self::descriptor_static()
  614. }
  615. fn new() -> RepeatedGridFilter {
  616. RepeatedGridFilter::new()
  617. }
  618. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  619. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  620. descriptor.get(|| {
  621. let mut fields = ::std::vec::Vec::new();
  622. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<GridFilter>>(
  623. "items",
  624. |m: &RepeatedGridFilter| { &m.items },
  625. |m: &mut RepeatedGridFilter| { &mut m.items },
  626. ));
  627. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedGridFilter>(
  628. "RepeatedGridFilter",
  629. fields,
  630. file_descriptor_proto()
  631. )
  632. })
  633. }
  634. fn default_instance() -> &'static RepeatedGridFilter {
  635. static instance: ::protobuf::rt::LazyV2<RepeatedGridFilter> = ::protobuf::rt::LazyV2::INIT;
  636. instance.get(RepeatedGridFilter::new)
  637. }
  638. }
  639. impl ::protobuf::Clear for RepeatedGridFilter {
  640. fn clear(&mut self) {
  641. self.items.clear();
  642. self.unknown_fields.clear();
  643. }
  644. }
  645. impl ::std::fmt::Debug for RepeatedGridFilter {
  646. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  647. ::protobuf::text_format::fmt(self, f)
  648. }
  649. }
  650. impl ::protobuf::reflect::ProtobufValue for RepeatedGridFilter {
  651. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  652. ::protobuf::reflect::ReflectValueRef::Message(self)
  653. }
  654. }
  655. #[derive(PartialEq,Clone,Default)]
  656. pub struct FieldOrder {
  657. // message fields
  658. pub field_id: ::std::string::String,
  659. pub visibility: bool,
  660. pub width: i32,
  661. // special fields
  662. pub unknown_fields: ::protobuf::UnknownFields,
  663. pub cached_size: ::protobuf::CachedSize,
  664. }
  665. impl<'a> ::std::default::Default for &'a FieldOrder {
  666. fn default() -> &'a FieldOrder {
  667. <FieldOrder as ::protobuf::Message>::default_instance()
  668. }
  669. }
  670. impl FieldOrder {
  671. pub fn new() -> FieldOrder {
  672. ::std::default::Default::default()
  673. }
  674. // string field_id = 1;
  675. pub fn get_field_id(&self) -> &str {
  676. &self.field_id
  677. }
  678. pub fn clear_field_id(&mut self) {
  679. self.field_id.clear();
  680. }
  681. // Param is passed by value, moved
  682. pub fn set_field_id(&mut self, v: ::std::string::String) {
  683. self.field_id = v;
  684. }
  685. // Mutable pointer to the field.
  686. // If field is not initialized, it is initialized with default value first.
  687. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  688. &mut self.field_id
  689. }
  690. // Take field
  691. pub fn take_field_id(&mut self) -> ::std::string::String {
  692. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  693. }
  694. // bool visibility = 2;
  695. pub fn get_visibility(&self) -> bool {
  696. self.visibility
  697. }
  698. pub fn clear_visibility(&mut self) {
  699. self.visibility = false;
  700. }
  701. // Param is passed by value, moved
  702. pub fn set_visibility(&mut self, v: bool) {
  703. self.visibility = v;
  704. }
  705. // int32 width = 3;
  706. pub fn get_width(&self) -> i32 {
  707. self.width
  708. }
  709. pub fn clear_width(&mut self) {
  710. self.width = 0;
  711. }
  712. // Param is passed by value, moved
  713. pub fn set_width(&mut self, v: i32) {
  714. self.width = v;
  715. }
  716. }
  717. impl ::protobuf::Message for FieldOrder {
  718. fn is_initialized(&self) -> bool {
  719. true
  720. }
  721. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  722. while !is.eof()? {
  723. let (field_number, wire_type) = is.read_tag_unpack()?;
  724. match field_number {
  725. 1 => {
  726. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  727. },
  728. 2 => {
  729. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  730. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  731. }
  732. let tmp = is.read_bool()?;
  733. self.visibility = tmp;
  734. },
  735. 3 => {
  736. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  737. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  738. }
  739. let tmp = is.read_int32()?;
  740. self.width = tmp;
  741. },
  742. _ => {
  743. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  744. },
  745. };
  746. }
  747. ::std::result::Result::Ok(())
  748. }
  749. // Compute sizes of nested messages
  750. #[allow(unused_variables)]
  751. fn compute_size(&self) -> u32 {
  752. let mut my_size = 0;
  753. if !self.field_id.is_empty() {
  754. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  755. }
  756. if self.visibility != false {
  757. my_size += 2;
  758. }
  759. if self.width != 0 {
  760. my_size += ::protobuf::rt::value_size(3, self.width, ::protobuf::wire_format::WireTypeVarint);
  761. }
  762. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  763. self.cached_size.set(my_size);
  764. my_size
  765. }
  766. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  767. if !self.field_id.is_empty() {
  768. os.write_string(1, &self.field_id)?;
  769. }
  770. if self.visibility != false {
  771. os.write_bool(2, self.visibility)?;
  772. }
  773. if self.width != 0 {
  774. os.write_int32(3, self.width)?;
  775. }
  776. os.write_unknown_fields(self.get_unknown_fields())?;
  777. ::std::result::Result::Ok(())
  778. }
  779. fn get_cached_size(&self) -> u32 {
  780. self.cached_size.get()
  781. }
  782. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  783. &self.unknown_fields
  784. }
  785. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  786. &mut self.unknown_fields
  787. }
  788. fn as_any(&self) -> &dyn (::std::any::Any) {
  789. self as &dyn (::std::any::Any)
  790. }
  791. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  792. self as &mut dyn (::std::any::Any)
  793. }
  794. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  795. self
  796. }
  797. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  798. Self::descriptor_static()
  799. }
  800. fn new() -> FieldOrder {
  801. FieldOrder::new()
  802. }
  803. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  804. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  805. descriptor.get(|| {
  806. let mut fields = ::std::vec::Vec::new();
  807. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  808. "field_id",
  809. |m: &FieldOrder| { &m.field_id },
  810. |m: &mut FieldOrder| { &mut m.field_id },
  811. ));
  812. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  813. "visibility",
  814. |m: &FieldOrder| { &m.visibility },
  815. |m: &mut FieldOrder| { &mut m.visibility },
  816. ));
  817. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  818. "width",
  819. |m: &FieldOrder| { &m.width },
  820. |m: &mut FieldOrder| { &mut m.width },
  821. ));
  822. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldOrder>(
  823. "FieldOrder",
  824. fields,
  825. file_descriptor_proto()
  826. )
  827. })
  828. }
  829. fn default_instance() -> &'static FieldOrder {
  830. static instance: ::protobuf::rt::LazyV2<FieldOrder> = ::protobuf::rt::LazyV2::INIT;
  831. instance.get(FieldOrder::new)
  832. }
  833. }
  834. impl ::protobuf::Clear for FieldOrder {
  835. fn clear(&mut self) {
  836. self.field_id.clear();
  837. self.visibility = false;
  838. self.width = 0;
  839. self.unknown_fields.clear();
  840. }
  841. }
  842. impl ::std::fmt::Debug for FieldOrder {
  843. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  844. ::protobuf::text_format::fmt(self, f)
  845. }
  846. }
  847. impl ::protobuf::reflect::ProtobufValue for FieldOrder {
  848. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  849. ::protobuf::reflect::ReflectValueRef::Message(self)
  850. }
  851. }
  852. #[derive(PartialEq,Clone,Default)]
  853. pub struct RepeatedFieldOrder {
  854. // message fields
  855. pub items: ::protobuf::RepeatedField<FieldOrder>,
  856. // special fields
  857. pub unknown_fields: ::protobuf::UnknownFields,
  858. pub cached_size: ::protobuf::CachedSize,
  859. }
  860. impl<'a> ::std::default::Default for &'a RepeatedFieldOrder {
  861. fn default() -> &'a RepeatedFieldOrder {
  862. <RepeatedFieldOrder as ::protobuf::Message>::default_instance()
  863. }
  864. }
  865. impl RepeatedFieldOrder {
  866. pub fn new() -> RepeatedFieldOrder {
  867. ::std::default::Default::default()
  868. }
  869. // repeated .FieldOrder items = 1;
  870. pub fn get_items(&self) -> &[FieldOrder] {
  871. &self.items
  872. }
  873. pub fn clear_items(&mut self) {
  874. self.items.clear();
  875. }
  876. // Param is passed by value, moved
  877. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
  878. self.items = v;
  879. }
  880. // Mutable pointer to the field.
  881. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
  882. &mut self.items
  883. }
  884. // Take field
  885. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
  886. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  887. }
  888. }
  889. impl ::protobuf::Message for RepeatedFieldOrder {
  890. fn is_initialized(&self) -> bool {
  891. for v in &self.items {
  892. if !v.is_initialized() {
  893. return false;
  894. }
  895. };
  896. true
  897. }
  898. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  899. while !is.eof()? {
  900. let (field_number, wire_type) = is.read_tag_unpack()?;
  901. match field_number {
  902. 1 => {
  903. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  904. },
  905. _ => {
  906. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  907. },
  908. };
  909. }
  910. ::std::result::Result::Ok(())
  911. }
  912. // Compute sizes of nested messages
  913. #[allow(unused_variables)]
  914. fn compute_size(&self) -> u32 {
  915. let mut my_size = 0;
  916. for value in &self.items {
  917. let len = value.compute_size();
  918. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  919. };
  920. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  921. self.cached_size.set(my_size);
  922. my_size
  923. }
  924. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  925. for v in &self.items {
  926. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  927. os.write_raw_varint32(v.get_cached_size())?;
  928. v.write_to_with_cached_sizes(os)?;
  929. };
  930. os.write_unknown_fields(self.get_unknown_fields())?;
  931. ::std::result::Result::Ok(())
  932. }
  933. fn get_cached_size(&self) -> u32 {
  934. self.cached_size.get()
  935. }
  936. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  937. &self.unknown_fields
  938. }
  939. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  940. &mut self.unknown_fields
  941. }
  942. fn as_any(&self) -> &dyn (::std::any::Any) {
  943. self as &dyn (::std::any::Any)
  944. }
  945. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  946. self as &mut dyn (::std::any::Any)
  947. }
  948. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  949. self
  950. }
  951. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  952. Self::descriptor_static()
  953. }
  954. fn new() -> RepeatedFieldOrder {
  955. RepeatedFieldOrder::new()
  956. }
  957. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  958. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  959. descriptor.get(|| {
  960. let mut fields = ::std::vec::Vec::new();
  961. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
  962. "items",
  963. |m: &RepeatedFieldOrder| { &m.items },
  964. |m: &mut RepeatedFieldOrder| { &mut m.items },
  965. ));
  966. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedFieldOrder>(
  967. "RepeatedFieldOrder",
  968. fields,
  969. file_descriptor_proto()
  970. )
  971. })
  972. }
  973. fn default_instance() -> &'static RepeatedFieldOrder {
  974. static instance: ::protobuf::rt::LazyV2<RepeatedFieldOrder> = ::protobuf::rt::LazyV2::INIT;
  975. instance.get(RepeatedFieldOrder::new)
  976. }
  977. }
  978. impl ::protobuf::Clear for RepeatedFieldOrder {
  979. fn clear(&mut self) {
  980. self.items.clear();
  981. self.unknown_fields.clear();
  982. }
  983. }
  984. impl ::std::fmt::Debug for RepeatedFieldOrder {
  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 RepeatedFieldOrder {
  990. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  991. ::protobuf::reflect::ReflectValueRef::Message(self)
  992. }
  993. }
  994. #[derive(PartialEq,Clone,Default)]
  995. pub struct Field {
  996. // message fields
  997. pub id: ::std::string::String,
  998. pub name: ::std::string::String,
  999. pub desc: ::std::string::String,
  1000. pub field_type: FieldType,
  1001. pub frozen: bool,
  1002. pub type_options: ::protobuf::SingularPtrField<AnyData>,
  1003. // special fields
  1004. pub unknown_fields: ::protobuf::UnknownFields,
  1005. pub cached_size: ::protobuf::CachedSize,
  1006. }
  1007. impl<'a> ::std::default::Default for &'a Field {
  1008. fn default() -> &'a Field {
  1009. <Field as ::protobuf::Message>::default_instance()
  1010. }
  1011. }
  1012. impl Field {
  1013. pub fn new() -> Field {
  1014. ::std::default::Default::default()
  1015. }
  1016. // string id = 1;
  1017. pub fn get_id(&self) -> &str {
  1018. &self.id
  1019. }
  1020. pub fn clear_id(&mut self) {
  1021. self.id.clear();
  1022. }
  1023. // Param is passed by value, moved
  1024. pub fn set_id(&mut self, v: ::std::string::String) {
  1025. self.id = v;
  1026. }
  1027. // Mutable pointer to the field.
  1028. // If field is not initialized, it is initialized with default value first.
  1029. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  1030. &mut self.id
  1031. }
  1032. // Take field
  1033. pub fn take_id(&mut self) -> ::std::string::String {
  1034. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  1035. }
  1036. // string name = 2;
  1037. pub fn get_name(&self) -> &str {
  1038. &self.name
  1039. }
  1040. pub fn clear_name(&mut self) {
  1041. self.name.clear();
  1042. }
  1043. // Param is passed by value, moved
  1044. pub fn set_name(&mut self, v: ::std::string::String) {
  1045. self.name = v;
  1046. }
  1047. // Mutable pointer to the field.
  1048. // If field is not initialized, it is initialized with default value first.
  1049. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  1050. &mut self.name
  1051. }
  1052. // Take field
  1053. pub fn take_name(&mut self) -> ::std::string::String {
  1054. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  1055. }
  1056. // string desc = 3;
  1057. pub fn get_desc(&self) -> &str {
  1058. &self.desc
  1059. }
  1060. pub fn clear_desc(&mut self) {
  1061. self.desc.clear();
  1062. }
  1063. // Param is passed by value, moved
  1064. pub fn set_desc(&mut self, v: ::std::string::String) {
  1065. self.desc = v;
  1066. }
  1067. // Mutable pointer to the field.
  1068. // If field is not initialized, it is initialized with default value first.
  1069. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  1070. &mut self.desc
  1071. }
  1072. // Take field
  1073. pub fn take_desc(&mut self) -> ::std::string::String {
  1074. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  1075. }
  1076. // .FieldType field_type = 4;
  1077. pub fn get_field_type(&self) -> FieldType {
  1078. self.field_type
  1079. }
  1080. pub fn clear_field_type(&mut self) {
  1081. self.field_type = FieldType::RichText;
  1082. }
  1083. // Param is passed by value, moved
  1084. pub fn set_field_type(&mut self, v: FieldType) {
  1085. self.field_type = v;
  1086. }
  1087. // bool frozen = 5;
  1088. pub fn get_frozen(&self) -> bool {
  1089. self.frozen
  1090. }
  1091. pub fn clear_frozen(&mut self) {
  1092. self.frozen = false;
  1093. }
  1094. // Param is passed by value, moved
  1095. pub fn set_frozen(&mut self, v: bool) {
  1096. self.frozen = v;
  1097. }
  1098. // .AnyData type_options = 6;
  1099. pub fn get_type_options(&self) -> &AnyData {
  1100. self.type_options.as_ref().unwrap_or_else(|| <AnyData as ::protobuf::Message>::default_instance())
  1101. }
  1102. pub fn clear_type_options(&mut self) {
  1103. self.type_options.clear();
  1104. }
  1105. pub fn has_type_options(&self) -> bool {
  1106. self.type_options.is_some()
  1107. }
  1108. // Param is passed by value, moved
  1109. pub fn set_type_options(&mut self, v: AnyData) {
  1110. self.type_options = ::protobuf::SingularPtrField::some(v);
  1111. }
  1112. // Mutable pointer to the field.
  1113. // If field is not initialized, it is initialized with default value first.
  1114. pub fn mut_type_options(&mut self) -> &mut AnyData {
  1115. if self.type_options.is_none() {
  1116. self.type_options.set_default();
  1117. }
  1118. self.type_options.as_mut().unwrap()
  1119. }
  1120. // Take field
  1121. pub fn take_type_options(&mut self) -> AnyData {
  1122. self.type_options.take().unwrap_or_else(|| AnyData::new())
  1123. }
  1124. }
  1125. impl ::protobuf::Message for Field {
  1126. fn is_initialized(&self) -> bool {
  1127. for v in &self.type_options {
  1128. if !v.is_initialized() {
  1129. return false;
  1130. }
  1131. };
  1132. true
  1133. }
  1134. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1135. while !is.eof()? {
  1136. let (field_number, wire_type) = is.read_tag_unpack()?;
  1137. match field_number {
  1138. 1 => {
  1139. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  1140. },
  1141. 2 => {
  1142. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  1143. },
  1144. 3 => {
  1145. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  1146. },
  1147. 4 => {
  1148. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 4, &mut self.unknown_fields)?
  1149. },
  1150. 5 => {
  1151. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1152. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1153. }
  1154. let tmp = is.read_bool()?;
  1155. self.frozen = tmp;
  1156. },
  1157. 6 => {
  1158. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.type_options)?;
  1159. },
  1160. _ => {
  1161. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1162. },
  1163. };
  1164. }
  1165. ::std::result::Result::Ok(())
  1166. }
  1167. // Compute sizes of nested messages
  1168. #[allow(unused_variables)]
  1169. fn compute_size(&self) -> u32 {
  1170. let mut my_size = 0;
  1171. if !self.id.is_empty() {
  1172. my_size += ::protobuf::rt::string_size(1, &self.id);
  1173. }
  1174. if !self.name.is_empty() {
  1175. my_size += ::protobuf::rt::string_size(2, &self.name);
  1176. }
  1177. if !self.desc.is_empty() {
  1178. my_size += ::protobuf::rt::string_size(3, &self.desc);
  1179. }
  1180. if self.field_type != FieldType::RichText {
  1181. my_size += ::protobuf::rt::enum_size(4, self.field_type);
  1182. }
  1183. if self.frozen != false {
  1184. my_size += 2;
  1185. }
  1186. if let Some(ref v) = self.type_options.as_ref() {
  1187. let len = v.compute_size();
  1188. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1189. }
  1190. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1191. self.cached_size.set(my_size);
  1192. my_size
  1193. }
  1194. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1195. if !self.id.is_empty() {
  1196. os.write_string(1, &self.id)?;
  1197. }
  1198. if !self.name.is_empty() {
  1199. os.write_string(2, &self.name)?;
  1200. }
  1201. if !self.desc.is_empty() {
  1202. os.write_string(3, &self.desc)?;
  1203. }
  1204. if self.field_type != FieldType::RichText {
  1205. os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  1206. }
  1207. if self.frozen != false {
  1208. os.write_bool(5, self.frozen)?;
  1209. }
  1210. if let Some(ref v) = self.type_options.as_ref() {
  1211. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1212. os.write_raw_varint32(v.get_cached_size())?;
  1213. v.write_to_with_cached_sizes(os)?;
  1214. }
  1215. os.write_unknown_fields(self.get_unknown_fields())?;
  1216. ::std::result::Result::Ok(())
  1217. }
  1218. fn get_cached_size(&self) -> u32 {
  1219. self.cached_size.get()
  1220. }
  1221. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1222. &self.unknown_fields
  1223. }
  1224. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1225. &mut self.unknown_fields
  1226. }
  1227. fn as_any(&self) -> &dyn (::std::any::Any) {
  1228. self as &dyn (::std::any::Any)
  1229. }
  1230. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1231. self as &mut dyn (::std::any::Any)
  1232. }
  1233. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1234. self
  1235. }
  1236. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1237. Self::descriptor_static()
  1238. }
  1239. fn new() -> Field {
  1240. Field::new()
  1241. }
  1242. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1243. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1244. descriptor.get(|| {
  1245. let mut fields = ::std::vec::Vec::new();
  1246. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1247. "id",
  1248. |m: &Field| { &m.id },
  1249. |m: &mut Field| { &mut m.id },
  1250. ));
  1251. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1252. "name",
  1253. |m: &Field| { &m.name },
  1254. |m: &mut Field| { &mut m.name },
  1255. ));
  1256. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1257. "desc",
  1258. |m: &Field| { &m.desc },
  1259. |m: &mut Field| { &mut m.desc },
  1260. ));
  1261. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
  1262. "field_type",
  1263. |m: &Field| { &m.field_type },
  1264. |m: &mut Field| { &mut m.field_type },
  1265. ));
  1266. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1267. "frozen",
  1268. |m: &Field| { &m.frozen },
  1269. |m: &mut Field| { &mut m.frozen },
  1270. ));
  1271. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AnyData>>(
  1272. "type_options",
  1273. |m: &Field| { &m.type_options },
  1274. |m: &mut Field| { &mut m.type_options },
  1275. ));
  1276. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Field>(
  1277. "Field",
  1278. fields,
  1279. file_descriptor_proto()
  1280. )
  1281. })
  1282. }
  1283. fn default_instance() -> &'static Field {
  1284. static instance: ::protobuf::rt::LazyV2<Field> = ::protobuf::rt::LazyV2::INIT;
  1285. instance.get(Field::new)
  1286. }
  1287. }
  1288. impl ::protobuf::Clear for Field {
  1289. fn clear(&mut self) {
  1290. self.id.clear();
  1291. self.name.clear();
  1292. self.desc.clear();
  1293. self.field_type = FieldType::RichText;
  1294. self.frozen = false;
  1295. self.type_options.clear();
  1296. self.unknown_fields.clear();
  1297. }
  1298. }
  1299. impl ::std::fmt::Debug for Field {
  1300. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1301. ::protobuf::text_format::fmt(self, f)
  1302. }
  1303. }
  1304. impl ::protobuf::reflect::ProtobufValue for Field {
  1305. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1306. ::protobuf::reflect::ReflectValueRef::Message(self)
  1307. }
  1308. }
  1309. #[derive(PartialEq,Clone,Default)]
  1310. pub struct AnyData {
  1311. // message fields
  1312. pub type_url: ::std::string::String,
  1313. pub value: ::std::vec::Vec<u8>,
  1314. // special fields
  1315. pub unknown_fields: ::protobuf::UnknownFields,
  1316. pub cached_size: ::protobuf::CachedSize,
  1317. }
  1318. impl<'a> ::std::default::Default for &'a AnyData {
  1319. fn default() -> &'a AnyData {
  1320. <AnyData as ::protobuf::Message>::default_instance()
  1321. }
  1322. }
  1323. impl AnyData {
  1324. pub fn new() -> AnyData {
  1325. ::std::default::Default::default()
  1326. }
  1327. // string type_url = 1;
  1328. pub fn get_type_url(&self) -> &str {
  1329. &self.type_url
  1330. }
  1331. pub fn clear_type_url(&mut self) {
  1332. self.type_url.clear();
  1333. }
  1334. // Param is passed by value, moved
  1335. pub fn set_type_url(&mut self, v: ::std::string::String) {
  1336. self.type_url = v;
  1337. }
  1338. // Mutable pointer to the field.
  1339. // If field is not initialized, it is initialized with default value first.
  1340. pub fn mut_type_url(&mut self) -> &mut ::std::string::String {
  1341. &mut self.type_url
  1342. }
  1343. // Take field
  1344. pub fn take_type_url(&mut self) -> ::std::string::String {
  1345. ::std::mem::replace(&mut self.type_url, ::std::string::String::new())
  1346. }
  1347. // bytes value = 2;
  1348. pub fn get_value(&self) -> &[u8] {
  1349. &self.value
  1350. }
  1351. pub fn clear_value(&mut self) {
  1352. self.value.clear();
  1353. }
  1354. // Param is passed by value, moved
  1355. pub fn set_value(&mut self, v: ::std::vec::Vec<u8>) {
  1356. self.value = v;
  1357. }
  1358. // Mutable pointer to the field.
  1359. // If field is not initialized, it is initialized with default value first.
  1360. pub fn mut_value(&mut self) -> &mut ::std::vec::Vec<u8> {
  1361. &mut self.value
  1362. }
  1363. // Take field
  1364. pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
  1365. ::std::mem::replace(&mut self.value, ::std::vec::Vec::new())
  1366. }
  1367. }
  1368. impl ::protobuf::Message for AnyData {
  1369. fn is_initialized(&self) -> bool {
  1370. true
  1371. }
  1372. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1373. while !is.eof()? {
  1374. let (field_number, wire_type) = is.read_tag_unpack()?;
  1375. match field_number {
  1376. 1 => {
  1377. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.type_url)?;
  1378. },
  1379. 2 => {
  1380. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?;
  1381. },
  1382. _ => {
  1383. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1384. },
  1385. };
  1386. }
  1387. ::std::result::Result::Ok(())
  1388. }
  1389. // Compute sizes of nested messages
  1390. #[allow(unused_variables)]
  1391. fn compute_size(&self) -> u32 {
  1392. let mut my_size = 0;
  1393. if !self.type_url.is_empty() {
  1394. my_size += ::protobuf::rt::string_size(1, &self.type_url);
  1395. }
  1396. if !self.value.is_empty() {
  1397. my_size += ::protobuf::rt::bytes_size(2, &self.value);
  1398. }
  1399. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1400. self.cached_size.set(my_size);
  1401. my_size
  1402. }
  1403. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1404. if !self.type_url.is_empty() {
  1405. os.write_string(1, &self.type_url)?;
  1406. }
  1407. if !self.value.is_empty() {
  1408. os.write_bytes(2, &self.value)?;
  1409. }
  1410. os.write_unknown_fields(self.get_unknown_fields())?;
  1411. ::std::result::Result::Ok(())
  1412. }
  1413. fn get_cached_size(&self) -> u32 {
  1414. self.cached_size.get()
  1415. }
  1416. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1417. &self.unknown_fields
  1418. }
  1419. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1420. &mut self.unknown_fields
  1421. }
  1422. fn as_any(&self) -> &dyn (::std::any::Any) {
  1423. self as &dyn (::std::any::Any)
  1424. }
  1425. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1426. self as &mut dyn (::std::any::Any)
  1427. }
  1428. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1429. self
  1430. }
  1431. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1432. Self::descriptor_static()
  1433. }
  1434. fn new() -> AnyData {
  1435. AnyData::new()
  1436. }
  1437. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1438. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1439. descriptor.get(|| {
  1440. let mut fields = ::std::vec::Vec::new();
  1441. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1442. "type_url",
  1443. |m: &AnyData| { &m.type_url },
  1444. |m: &mut AnyData| { &mut m.type_url },
  1445. ));
  1446. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1447. "value",
  1448. |m: &AnyData| { &m.value },
  1449. |m: &mut AnyData| { &mut m.value },
  1450. ));
  1451. ::protobuf::reflect::MessageDescriptor::new_pb_name::<AnyData>(
  1452. "AnyData",
  1453. fields,
  1454. file_descriptor_proto()
  1455. )
  1456. })
  1457. }
  1458. fn default_instance() -> &'static AnyData {
  1459. static instance: ::protobuf::rt::LazyV2<AnyData> = ::protobuf::rt::LazyV2::INIT;
  1460. instance.get(AnyData::new)
  1461. }
  1462. }
  1463. impl ::protobuf::Clear for AnyData {
  1464. fn clear(&mut self) {
  1465. self.type_url.clear();
  1466. self.value.clear();
  1467. self.unknown_fields.clear();
  1468. }
  1469. }
  1470. impl ::std::fmt::Debug for AnyData {
  1471. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1472. ::protobuf::text_format::fmt(self, f)
  1473. }
  1474. }
  1475. impl ::protobuf::reflect::ProtobufValue for AnyData {
  1476. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1477. ::protobuf::reflect::ReflectValueRef::Message(self)
  1478. }
  1479. }
  1480. #[derive(PartialEq,Clone,Default)]
  1481. pub struct RowOrder {
  1482. // message fields
  1483. pub grid_id: ::std::string::String,
  1484. pub row_id: ::std::string::String,
  1485. pub visibility: bool,
  1486. // special fields
  1487. pub unknown_fields: ::protobuf::UnknownFields,
  1488. pub cached_size: ::protobuf::CachedSize,
  1489. }
  1490. impl<'a> ::std::default::Default for &'a RowOrder {
  1491. fn default() -> &'a RowOrder {
  1492. <RowOrder as ::protobuf::Message>::default_instance()
  1493. }
  1494. }
  1495. impl RowOrder {
  1496. pub fn new() -> RowOrder {
  1497. ::std::default::Default::default()
  1498. }
  1499. // string grid_id = 1;
  1500. pub fn get_grid_id(&self) -> &str {
  1501. &self.grid_id
  1502. }
  1503. pub fn clear_grid_id(&mut self) {
  1504. self.grid_id.clear();
  1505. }
  1506. // Param is passed by value, moved
  1507. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1508. self.grid_id = v;
  1509. }
  1510. // Mutable pointer to the field.
  1511. // If field is not initialized, it is initialized with default value first.
  1512. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1513. &mut self.grid_id
  1514. }
  1515. // Take field
  1516. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1517. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1518. }
  1519. // string row_id = 2;
  1520. pub fn get_row_id(&self) -> &str {
  1521. &self.row_id
  1522. }
  1523. pub fn clear_row_id(&mut self) {
  1524. self.row_id.clear();
  1525. }
  1526. // Param is passed by value, moved
  1527. pub fn set_row_id(&mut self, v: ::std::string::String) {
  1528. self.row_id = v;
  1529. }
  1530. // Mutable pointer to the field.
  1531. // If field is not initialized, it is initialized with default value first.
  1532. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  1533. &mut self.row_id
  1534. }
  1535. // Take field
  1536. pub fn take_row_id(&mut self) -> ::std::string::String {
  1537. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  1538. }
  1539. // bool visibility = 3;
  1540. pub fn get_visibility(&self) -> bool {
  1541. self.visibility
  1542. }
  1543. pub fn clear_visibility(&mut self) {
  1544. self.visibility = false;
  1545. }
  1546. // Param is passed by value, moved
  1547. pub fn set_visibility(&mut self, v: bool) {
  1548. self.visibility = v;
  1549. }
  1550. }
  1551. impl ::protobuf::Message for RowOrder {
  1552. fn is_initialized(&self) -> bool {
  1553. true
  1554. }
  1555. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1556. while !is.eof()? {
  1557. let (field_number, wire_type) = is.read_tag_unpack()?;
  1558. match field_number {
  1559. 1 => {
  1560. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1561. },
  1562. 2 => {
  1563. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  1564. },
  1565. 3 => {
  1566. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1567. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1568. }
  1569. let tmp = is.read_bool()?;
  1570. self.visibility = tmp;
  1571. },
  1572. _ => {
  1573. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1574. },
  1575. };
  1576. }
  1577. ::std::result::Result::Ok(())
  1578. }
  1579. // Compute sizes of nested messages
  1580. #[allow(unused_variables)]
  1581. fn compute_size(&self) -> u32 {
  1582. let mut my_size = 0;
  1583. if !self.grid_id.is_empty() {
  1584. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1585. }
  1586. if !self.row_id.is_empty() {
  1587. my_size += ::protobuf::rt::string_size(2, &self.row_id);
  1588. }
  1589. if self.visibility != false {
  1590. my_size += 2;
  1591. }
  1592. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1593. self.cached_size.set(my_size);
  1594. my_size
  1595. }
  1596. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1597. if !self.grid_id.is_empty() {
  1598. os.write_string(1, &self.grid_id)?;
  1599. }
  1600. if !self.row_id.is_empty() {
  1601. os.write_string(2, &self.row_id)?;
  1602. }
  1603. if self.visibility != false {
  1604. os.write_bool(3, self.visibility)?;
  1605. }
  1606. os.write_unknown_fields(self.get_unknown_fields())?;
  1607. ::std::result::Result::Ok(())
  1608. }
  1609. fn get_cached_size(&self) -> u32 {
  1610. self.cached_size.get()
  1611. }
  1612. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1613. &self.unknown_fields
  1614. }
  1615. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1616. &mut self.unknown_fields
  1617. }
  1618. fn as_any(&self) -> &dyn (::std::any::Any) {
  1619. self as &dyn (::std::any::Any)
  1620. }
  1621. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1622. self as &mut dyn (::std::any::Any)
  1623. }
  1624. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1625. self
  1626. }
  1627. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1628. Self::descriptor_static()
  1629. }
  1630. fn new() -> RowOrder {
  1631. RowOrder::new()
  1632. }
  1633. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1634. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1635. descriptor.get(|| {
  1636. let mut fields = ::std::vec::Vec::new();
  1637. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1638. "grid_id",
  1639. |m: &RowOrder| { &m.grid_id },
  1640. |m: &mut RowOrder| { &mut m.grid_id },
  1641. ));
  1642. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1643. "row_id",
  1644. |m: &RowOrder| { &m.row_id },
  1645. |m: &mut RowOrder| { &mut m.row_id },
  1646. ));
  1647. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1648. "visibility",
  1649. |m: &RowOrder| { &m.visibility },
  1650. |m: &mut RowOrder| { &mut m.visibility },
  1651. ));
  1652. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RowOrder>(
  1653. "RowOrder",
  1654. fields,
  1655. file_descriptor_proto()
  1656. )
  1657. })
  1658. }
  1659. fn default_instance() -> &'static RowOrder {
  1660. static instance: ::protobuf::rt::LazyV2<RowOrder> = ::protobuf::rt::LazyV2::INIT;
  1661. instance.get(RowOrder::new)
  1662. }
  1663. }
  1664. impl ::protobuf::Clear for RowOrder {
  1665. fn clear(&mut self) {
  1666. self.grid_id.clear();
  1667. self.row_id.clear();
  1668. self.visibility = false;
  1669. self.unknown_fields.clear();
  1670. }
  1671. }
  1672. impl ::std::fmt::Debug for RowOrder {
  1673. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1674. ::protobuf::text_format::fmt(self, f)
  1675. }
  1676. }
  1677. impl ::protobuf::reflect::ProtobufValue for RowOrder {
  1678. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1679. ::protobuf::reflect::ReflectValueRef::Message(self)
  1680. }
  1681. }
  1682. #[derive(PartialEq,Clone,Default)]
  1683. pub struct RepeatedRowOrder {
  1684. // message fields
  1685. pub items: ::protobuf::RepeatedField<RowOrder>,
  1686. // special fields
  1687. pub unknown_fields: ::protobuf::UnknownFields,
  1688. pub cached_size: ::protobuf::CachedSize,
  1689. }
  1690. impl<'a> ::std::default::Default for &'a RepeatedRowOrder {
  1691. fn default() -> &'a RepeatedRowOrder {
  1692. <RepeatedRowOrder as ::protobuf::Message>::default_instance()
  1693. }
  1694. }
  1695. impl RepeatedRowOrder {
  1696. pub fn new() -> RepeatedRowOrder {
  1697. ::std::default::Default::default()
  1698. }
  1699. // repeated .RowOrder items = 1;
  1700. pub fn get_items(&self) -> &[RowOrder] {
  1701. &self.items
  1702. }
  1703. pub fn clear_items(&mut self) {
  1704. self.items.clear();
  1705. }
  1706. // Param is passed by value, moved
  1707. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<RowOrder>) {
  1708. self.items = v;
  1709. }
  1710. // Mutable pointer to the field.
  1711. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<RowOrder> {
  1712. &mut self.items
  1713. }
  1714. // Take field
  1715. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<RowOrder> {
  1716. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  1717. }
  1718. }
  1719. impl ::protobuf::Message for RepeatedRowOrder {
  1720. fn is_initialized(&self) -> bool {
  1721. for v in &self.items {
  1722. if !v.is_initialized() {
  1723. return false;
  1724. }
  1725. };
  1726. true
  1727. }
  1728. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1729. while !is.eof()? {
  1730. let (field_number, wire_type) = is.read_tag_unpack()?;
  1731. match field_number {
  1732. 1 => {
  1733. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  1734. },
  1735. _ => {
  1736. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1737. },
  1738. };
  1739. }
  1740. ::std::result::Result::Ok(())
  1741. }
  1742. // Compute sizes of nested messages
  1743. #[allow(unused_variables)]
  1744. fn compute_size(&self) -> u32 {
  1745. let mut my_size = 0;
  1746. for value in &self.items {
  1747. let len = value.compute_size();
  1748. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1749. };
  1750. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1751. self.cached_size.set(my_size);
  1752. my_size
  1753. }
  1754. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1755. for v in &self.items {
  1756. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1757. os.write_raw_varint32(v.get_cached_size())?;
  1758. v.write_to_with_cached_sizes(os)?;
  1759. };
  1760. os.write_unknown_fields(self.get_unknown_fields())?;
  1761. ::std::result::Result::Ok(())
  1762. }
  1763. fn get_cached_size(&self) -> u32 {
  1764. self.cached_size.get()
  1765. }
  1766. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1767. &self.unknown_fields
  1768. }
  1769. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1770. &mut self.unknown_fields
  1771. }
  1772. fn as_any(&self) -> &dyn (::std::any::Any) {
  1773. self as &dyn (::std::any::Any)
  1774. }
  1775. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1776. self as &mut dyn (::std::any::Any)
  1777. }
  1778. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1779. self
  1780. }
  1781. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1782. Self::descriptor_static()
  1783. }
  1784. fn new() -> RepeatedRowOrder {
  1785. RepeatedRowOrder::new()
  1786. }
  1787. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1788. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1789. descriptor.get(|| {
  1790. let mut fields = ::std::vec::Vec::new();
  1791. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RowOrder>>(
  1792. "items",
  1793. |m: &RepeatedRowOrder| { &m.items },
  1794. |m: &mut RepeatedRowOrder| { &mut m.items },
  1795. ));
  1796. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedRowOrder>(
  1797. "RepeatedRowOrder",
  1798. fields,
  1799. file_descriptor_proto()
  1800. )
  1801. })
  1802. }
  1803. fn default_instance() -> &'static RepeatedRowOrder {
  1804. static instance: ::protobuf::rt::LazyV2<RepeatedRowOrder> = ::protobuf::rt::LazyV2::INIT;
  1805. instance.get(RepeatedRowOrder::new)
  1806. }
  1807. }
  1808. impl ::protobuf::Clear for RepeatedRowOrder {
  1809. fn clear(&mut self) {
  1810. self.items.clear();
  1811. self.unknown_fields.clear();
  1812. }
  1813. }
  1814. impl ::std::fmt::Debug for RepeatedRowOrder {
  1815. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1816. ::protobuf::text_format::fmt(self, f)
  1817. }
  1818. }
  1819. impl ::protobuf::reflect::ProtobufValue for RepeatedRowOrder {
  1820. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1821. ::protobuf::reflect::ReflectValueRef::Message(self)
  1822. }
  1823. }
  1824. #[derive(PartialEq,Clone,Default)]
  1825. pub struct Row {
  1826. // message fields
  1827. pub id: ::std::string::String,
  1828. pub grid_id: ::std::string::String,
  1829. pub modified_time: i64,
  1830. pub cell_by_field_id: ::std::collections::HashMap<::std::string::String, Cell>,
  1831. // special fields
  1832. pub unknown_fields: ::protobuf::UnknownFields,
  1833. pub cached_size: ::protobuf::CachedSize,
  1834. }
  1835. impl<'a> ::std::default::Default for &'a Row {
  1836. fn default() -> &'a Row {
  1837. <Row as ::protobuf::Message>::default_instance()
  1838. }
  1839. }
  1840. impl Row {
  1841. pub fn new() -> Row {
  1842. ::std::default::Default::default()
  1843. }
  1844. // string id = 1;
  1845. pub fn get_id(&self) -> &str {
  1846. &self.id
  1847. }
  1848. pub fn clear_id(&mut self) {
  1849. self.id.clear();
  1850. }
  1851. // Param is passed by value, moved
  1852. pub fn set_id(&mut self, v: ::std::string::String) {
  1853. self.id = v;
  1854. }
  1855. // Mutable pointer to the field.
  1856. // If field is not initialized, it is initialized with default value first.
  1857. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  1858. &mut self.id
  1859. }
  1860. // Take field
  1861. pub fn take_id(&mut self) -> ::std::string::String {
  1862. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  1863. }
  1864. // string grid_id = 2;
  1865. pub fn get_grid_id(&self) -> &str {
  1866. &self.grid_id
  1867. }
  1868. pub fn clear_grid_id(&mut self) {
  1869. self.grid_id.clear();
  1870. }
  1871. // Param is passed by value, moved
  1872. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1873. self.grid_id = v;
  1874. }
  1875. // Mutable pointer to the field.
  1876. // If field is not initialized, it is initialized with default value first.
  1877. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1878. &mut self.grid_id
  1879. }
  1880. // Take field
  1881. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1882. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1883. }
  1884. // int64 modified_time = 3;
  1885. pub fn get_modified_time(&self) -> i64 {
  1886. self.modified_time
  1887. }
  1888. pub fn clear_modified_time(&mut self) {
  1889. self.modified_time = 0;
  1890. }
  1891. // Param is passed by value, moved
  1892. pub fn set_modified_time(&mut self, v: i64) {
  1893. self.modified_time = v;
  1894. }
  1895. // repeated .Row.CellByFieldIdEntry cell_by_field_id = 4;
  1896. pub fn get_cell_by_field_id(&self) -> &::std::collections::HashMap<::std::string::String, Cell> {
  1897. &self.cell_by_field_id
  1898. }
  1899. pub fn clear_cell_by_field_id(&mut self) {
  1900. self.cell_by_field_id.clear();
  1901. }
  1902. // Param is passed by value, moved
  1903. pub fn set_cell_by_field_id(&mut self, v: ::std::collections::HashMap<::std::string::String, Cell>) {
  1904. self.cell_by_field_id = v;
  1905. }
  1906. // Mutable pointer to the field.
  1907. pub fn mut_cell_by_field_id(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, Cell> {
  1908. &mut self.cell_by_field_id
  1909. }
  1910. // Take field
  1911. pub fn take_cell_by_field_id(&mut self) -> ::std::collections::HashMap<::std::string::String, Cell> {
  1912. ::std::mem::replace(&mut self.cell_by_field_id, ::std::collections::HashMap::new())
  1913. }
  1914. }
  1915. impl ::protobuf::Message for Row {
  1916. fn is_initialized(&self) -> bool {
  1917. true
  1918. }
  1919. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1920. while !is.eof()? {
  1921. let (field_number, wire_type) = is.read_tag_unpack()?;
  1922. match field_number {
  1923. 1 => {
  1924. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  1925. },
  1926. 2 => {
  1927. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1928. },
  1929. 3 => {
  1930. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1931. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1932. }
  1933. let tmp = is.read_int64()?;
  1934. self.modified_time = tmp;
  1935. },
  1936. 4 => {
  1937. ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(wire_type, is, &mut self.cell_by_field_id)?;
  1938. },
  1939. _ => {
  1940. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1941. },
  1942. };
  1943. }
  1944. ::std::result::Result::Ok(())
  1945. }
  1946. // Compute sizes of nested messages
  1947. #[allow(unused_variables)]
  1948. fn compute_size(&self) -> u32 {
  1949. let mut my_size = 0;
  1950. if !self.id.is_empty() {
  1951. my_size += ::protobuf::rt::string_size(1, &self.id);
  1952. }
  1953. if !self.grid_id.is_empty() {
  1954. my_size += ::protobuf::rt::string_size(2, &self.grid_id);
  1955. }
  1956. if self.modified_time != 0 {
  1957. my_size += ::protobuf::rt::value_size(3, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
  1958. }
  1959. my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(4, &self.cell_by_field_id);
  1960. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1961. self.cached_size.set(my_size);
  1962. my_size
  1963. }
  1964. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1965. if !self.id.is_empty() {
  1966. os.write_string(1, &self.id)?;
  1967. }
  1968. if !self.grid_id.is_empty() {
  1969. os.write_string(2, &self.grid_id)?;
  1970. }
  1971. if self.modified_time != 0 {
  1972. os.write_int64(3, self.modified_time)?;
  1973. }
  1974. ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(4, &self.cell_by_field_id, os)?;
  1975. os.write_unknown_fields(self.get_unknown_fields())?;
  1976. ::std::result::Result::Ok(())
  1977. }
  1978. fn get_cached_size(&self) -> u32 {
  1979. self.cached_size.get()
  1980. }
  1981. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1982. &self.unknown_fields
  1983. }
  1984. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1985. &mut self.unknown_fields
  1986. }
  1987. fn as_any(&self) -> &dyn (::std::any::Any) {
  1988. self as &dyn (::std::any::Any)
  1989. }
  1990. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1991. self as &mut dyn (::std::any::Any)
  1992. }
  1993. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1994. self
  1995. }
  1996. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1997. Self::descriptor_static()
  1998. }
  1999. fn new() -> Row {
  2000. Row::new()
  2001. }
  2002. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2003. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2004. descriptor.get(|| {
  2005. let mut fields = ::std::vec::Vec::new();
  2006. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2007. "id",
  2008. |m: &Row| { &m.id },
  2009. |m: &mut Row| { &mut m.id },
  2010. ));
  2011. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2012. "grid_id",
  2013. |m: &Row| { &m.grid_id },
  2014. |m: &mut Row| { &mut m.grid_id },
  2015. ));
  2016. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  2017. "modified_time",
  2018. |m: &Row| { &m.modified_time },
  2019. |m: &mut Row| { &mut m.modified_time },
  2020. ));
  2021. fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<Cell>>(
  2022. "cell_by_field_id",
  2023. |m: &Row| { &m.cell_by_field_id },
  2024. |m: &mut Row| { &mut m.cell_by_field_id },
  2025. ));
  2026. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Row>(
  2027. "Row",
  2028. fields,
  2029. file_descriptor_proto()
  2030. )
  2031. })
  2032. }
  2033. fn default_instance() -> &'static Row {
  2034. static instance: ::protobuf::rt::LazyV2<Row> = ::protobuf::rt::LazyV2::INIT;
  2035. instance.get(Row::new)
  2036. }
  2037. }
  2038. impl ::protobuf::Clear for Row {
  2039. fn clear(&mut self) {
  2040. self.id.clear();
  2041. self.grid_id.clear();
  2042. self.modified_time = 0;
  2043. self.cell_by_field_id.clear();
  2044. self.unknown_fields.clear();
  2045. }
  2046. }
  2047. impl ::std::fmt::Debug for Row {
  2048. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2049. ::protobuf::text_format::fmt(self, f)
  2050. }
  2051. }
  2052. impl ::protobuf::reflect::ProtobufValue for Row {
  2053. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2054. ::protobuf::reflect::ReflectValueRef::Message(self)
  2055. }
  2056. }
  2057. #[derive(PartialEq,Clone,Default)]
  2058. pub struct Cell {
  2059. // message fields
  2060. pub id: ::std::string::String,
  2061. pub row_id: ::std::string::String,
  2062. pub field_id: ::std::string::String,
  2063. pub data: ::protobuf::SingularPtrField<AnyData>,
  2064. // special fields
  2065. pub unknown_fields: ::protobuf::UnknownFields,
  2066. pub cached_size: ::protobuf::CachedSize,
  2067. }
  2068. impl<'a> ::std::default::Default for &'a Cell {
  2069. fn default() -> &'a Cell {
  2070. <Cell as ::protobuf::Message>::default_instance()
  2071. }
  2072. }
  2073. impl Cell {
  2074. pub fn new() -> Cell {
  2075. ::std::default::Default::default()
  2076. }
  2077. // string id = 1;
  2078. pub fn get_id(&self) -> &str {
  2079. &self.id
  2080. }
  2081. pub fn clear_id(&mut self) {
  2082. self.id.clear();
  2083. }
  2084. // Param is passed by value, moved
  2085. pub fn set_id(&mut self, v: ::std::string::String) {
  2086. self.id = v;
  2087. }
  2088. // Mutable pointer to the field.
  2089. // If field is not initialized, it is initialized with default value first.
  2090. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  2091. &mut self.id
  2092. }
  2093. // Take field
  2094. pub fn take_id(&mut self) -> ::std::string::String {
  2095. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  2096. }
  2097. // string row_id = 2;
  2098. pub fn get_row_id(&self) -> &str {
  2099. &self.row_id
  2100. }
  2101. pub fn clear_row_id(&mut self) {
  2102. self.row_id.clear();
  2103. }
  2104. // Param is passed by value, moved
  2105. pub fn set_row_id(&mut self, v: ::std::string::String) {
  2106. self.row_id = v;
  2107. }
  2108. // Mutable pointer to the field.
  2109. // If field is not initialized, it is initialized with default value first.
  2110. pub fn mut_row_id(&mut self) -> &mut ::std::string::String {
  2111. &mut self.row_id
  2112. }
  2113. // Take field
  2114. pub fn take_row_id(&mut self) -> ::std::string::String {
  2115. ::std::mem::replace(&mut self.row_id, ::std::string::String::new())
  2116. }
  2117. // string field_id = 3;
  2118. pub fn get_field_id(&self) -> &str {
  2119. &self.field_id
  2120. }
  2121. pub fn clear_field_id(&mut self) {
  2122. self.field_id.clear();
  2123. }
  2124. // Param is passed by value, moved
  2125. pub fn set_field_id(&mut self, v: ::std::string::String) {
  2126. self.field_id = v;
  2127. }
  2128. // Mutable pointer to the field.
  2129. // If field is not initialized, it is initialized with default value first.
  2130. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  2131. &mut self.field_id
  2132. }
  2133. // Take field
  2134. pub fn take_field_id(&mut self) -> ::std::string::String {
  2135. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  2136. }
  2137. // .AnyData data = 4;
  2138. pub fn get_data(&self) -> &AnyData {
  2139. self.data.as_ref().unwrap_or_else(|| <AnyData as ::protobuf::Message>::default_instance())
  2140. }
  2141. pub fn clear_data(&mut self) {
  2142. self.data.clear();
  2143. }
  2144. pub fn has_data(&self) -> bool {
  2145. self.data.is_some()
  2146. }
  2147. // Param is passed by value, moved
  2148. pub fn set_data(&mut self, v: AnyData) {
  2149. self.data = ::protobuf::SingularPtrField::some(v);
  2150. }
  2151. // Mutable pointer to the field.
  2152. // If field is not initialized, it is initialized with default value first.
  2153. pub fn mut_data(&mut self) -> &mut AnyData {
  2154. if self.data.is_none() {
  2155. self.data.set_default();
  2156. }
  2157. self.data.as_mut().unwrap()
  2158. }
  2159. // Take field
  2160. pub fn take_data(&mut self) -> AnyData {
  2161. self.data.take().unwrap_or_else(|| AnyData::new())
  2162. }
  2163. }
  2164. impl ::protobuf::Message for Cell {
  2165. fn is_initialized(&self) -> bool {
  2166. for v in &self.data {
  2167. if !v.is_initialized() {
  2168. return false;
  2169. }
  2170. };
  2171. true
  2172. }
  2173. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2174. while !is.eof()? {
  2175. let (field_number, wire_type) = is.read_tag_unpack()?;
  2176. match field_number {
  2177. 1 => {
  2178. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  2179. },
  2180. 2 => {
  2181. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.row_id)?;
  2182. },
  2183. 3 => {
  2184. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  2185. },
  2186. 4 => {
  2187. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.data)?;
  2188. },
  2189. _ => {
  2190. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2191. },
  2192. };
  2193. }
  2194. ::std::result::Result::Ok(())
  2195. }
  2196. // Compute sizes of nested messages
  2197. #[allow(unused_variables)]
  2198. fn compute_size(&self) -> u32 {
  2199. let mut my_size = 0;
  2200. if !self.id.is_empty() {
  2201. my_size += ::protobuf::rt::string_size(1, &self.id);
  2202. }
  2203. if !self.row_id.is_empty() {
  2204. my_size += ::protobuf::rt::string_size(2, &self.row_id);
  2205. }
  2206. if !self.field_id.is_empty() {
  2207. my_size += ::protobuf::rt::string_size(3, &self.field_id);
  2208. }
  2209. if let Some(ref v) = self.data.as_ref() {
  2210. let len = v.compute_size();
  2211. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2212. }
  2213. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2214. self.cached_size.set(my_size);
  2215. my_size
  2216. }
  2217. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2218. if !self.id.is_empty() {
  2219. os.write_string(1, &self.id)?;
  2220. }
  2221. if !self.row_id.is_empty() {
  2222. os.write_string(2, &self.row_id)?;
  2223. }
  2224. if !self.field_id.is_empty() {
  2225. os.write_string(3, &self.field_id)?;
  2226. }
  2227. if let Some(ref v) = self.data.as_ref() {
  2228. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2229. os.write_raw_varint32(v.get_cached_size())?;
  2230. v.write_to_with_cached_sizes(os)?;
  2231. }
  2232. os.write_unknown_fields(self.get_unknown_fields())?;
  2233. ::std::result::Result::Ok(())
  2234. }
  2235. fn get_cached_size(&self) -> u32 {
  2236. self.cached_size.get()
  2237. }
  2238. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2239. &self.unknown_fields
  2240. }
  2241. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2242. &mut self.unknown_fields
  2243. }
  2244. fn as_any(&self) -> &dyn (::std::any::Any) {
  2245. self as &dyn (::std::any::Any)
  2246. }
  2247. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2248. self as &mut dyn (::std::any::Any)
  2249. }
  2250. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2251. self
  2252. }
  2253. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2254. Self::descriptor_static()
  2255. }
  2256. fn new() -> Cell {
  2257. Cell::new()
  2258. }
  2259. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2260. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2261. descriptor.get(|| {
  2262. let mut fields = ::std::vec::Vec::new();
  2263. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2264. "id",
  2265. |m: &Cell| { &m.id },
  2266. |m: &mut Cell| { &mut m.id },
  2267. ));
  2268. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2269. "row_id",
  2270. |m: &Cell| { &m.row_id },
  2271. |m: &mut Cell| { &mut m.row_id },
  2272. ));
  2273. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2274. "field_id",
  2275. |m: &Cell| { &m.field_id },
  2276. |m: &mut Cell| { &mut m.field_id },
  2277. ));
  2278. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<AnyData>>(
  2279. "data",
  2280. |m: &Cell| { &m.data },
  2281. |m: &mut Cell| { &mut m.data },
  2282. ));
  2283. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Cell>(
  2284. "Cell",
  2285. fields,
  2286. file_descriptor_proto()
  2287. )
  2288. })
  2289. }
  2290. fn default_instance() -> &'static Cell {
  2291. static instance: ::protobuf::rt::LazyV2<Cell> = ::protobuf::rt::LazyV2::INIT;
  2292. instance.get(Cell::new)
  2293. }
  2294. }
  2295. impl ::protobuf::Clear for Cell {
  2296. fn clear(&mut self) {
  2297. self.id.clear();
  2298. self.row_id.clear();
  2299. self.field_id.clear();
  2300. self.data.clear();
  2301. self.unknown_fields.clear();
  2302. }
  2303. }
  2304. impl ::std::fmt::Debug for Cell {
  2305. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2306. ::protobuf::text_format::fmt(self, f)
  2307. }
  2308. }
  2309. impl ::protobuf::reflect::ProtobufValue for Cell {
  2310. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2311. ::protobuf::reflect::ReflectValueRef::Message(self)
  2312. }
  2313. }
  2314. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  2315. pub enum FieldType {
  2316. RichText = 0,
  2317. Number = 1,
  2318. DateTime = 2,
  2319. SingleSelect = 3,
  2320. MultiSelect = 4,
  2321. Checkbox = 5,
  2322. }
  2323. impl ::protobuf::ProtobufEnum for FieldType {
  2324. fn value(&self) -> i32 {
  2325. *self as i32
  2326. }
  2327. fn from_i32(value: i32) -> ::std::option::Option<FieldType> {
  2328. match value {
  2329. 0 => ::std::option::Option::Some(FieldType::RichText),
  2330. 1 => ::std::option::Option::Some(FieldType::Number),
  2331. 2 => ::std::option::Option::Some(FieldType::DateTime),
  2332. 3 => ::std::option::Option::Some(FieldType::SingleSelect),
  2333. 4 => ::std::option::Option::Some(FieldType::MultiSelect),
  2334. 5 => ::std::option::Option::Some(FieldType::Checkbox),
  2335. _ => ::std::option::Option::None
  2336. }
  2337. }
  2338. fn values() -> &'static [Self] {
  2339. static values: &'static [FieldType] = &[
  2340. FieldType::RichText,
  2341. FieldType::Number,
  2342. FieldType::DateTime,
  2343. FieldType::SingleSelect,
  2344. FieldType::MultiSelect,
  2345. FieldType::Checkbox,
  2346. ];
  2347. values
  2348. }
  2349. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  2350. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2351. descriptor.get(|| {
  2352. ::protobuf::reflect::EnumDescriptor::new_pb_name::<FieldType>("FieldType", file_descriptor_proto())
  2353. })
  2354. }
  2355. }
  2356. impl ::std::marker::Copy for FieldType {
  2357. }
  2358. impl ::std::default::Default for FieldType {
  2359. fn default() -> Self {
  2360. FieldType::RichText
  2361. }
  2362. }
  2363. impl ::protobuf::reflect::ProtobufValue for FieldType {
  2364. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2365. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  2366. }
  2367. }
  2368. static file_descriptor_proto_data: &'static [u8] = b"\
  2369. \n\ngrid.proto\"\xb8\x01\n\x04Grid\x12\x17\n\x07grid_id\x18\x01\x20\x01(\
  2370. \tR\x06gridId\x12-\n\x07filters\x18\x02\x20\x01(\x0b2\x13.RepeatedGridFi\
  2371. lterR\x07filters\x126\n\x0cfield_orders\x18\x03\x20\x01(\x0b2\x13.Repeat\
  2372. edFieldOrderR\x0bfieldOrders\x120\n\nrow_orders\x18\x04\x20\x01(\x0b2\
  2373. \x11.RepeatedRowOrderR\trowOrders\"D\n\nGridFilter\x12\x0e\n\x02id\x18\
  2374. \x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\
  2375. \x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\"7\n\x12RepeatedGridFilter\
  2376. \x12!\n\x05items\x18\x01\x20\x03(\x0b2\x0b.GridFilterR\x05items\"]\n\nFi\
  2377. eldOrder\x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x1e\n\
  2378. \nvisibility\x18\x02\x20\x01(\x08R\nvisibility\x12\x14\n\x05width\x18\
  2379. \x03\x20\x01(\x05R\x05width\"7\n\x12RepeatedFieldOrder\x12!\n\x05items\
  2380. \x18\x01\x20\x03(\x0b2\x0b.FieldOrderR\x05items\"\xaf\x01\n\x05Field\x12\
  2381. \x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01\
  2382. (\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12)\n\nfield\
  2383. _type\x18\x04\x20\x01(\x0e2\n.FieldTypeR\tfieldType\x12\x16\n\x06frozen\
  2384. \x18\x05\x20\x01(\x08R\x06frozen\x12+\n\x0ctype_options\x18\x06\x20\x01(\
  2385. \x0b2\x08.AnyDataR\x0btypeOptions\":\n\x07AnyData\x12\x19\n\x08type_url\
  2386. \x18\x01\x20\x01(\tR\x07typeUrl\x12\x14\n\x05value\x18\x02\x20\x01(\x0cR\
  2387. \x05value\"Z\n\x08RowOrder\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06g\
  2388. ridId\x12\x15\n\x06row_id\x18\x02\x20\x01(\tR\x05rowId\x12\x1e\n\nvisibi\
  2389. lity\x18\x03\x20\x01(\x08R\nvisibility\"3\n\x10RepeatedRowOrder\x12\x1f\
  2390. \n\x05items\x18\x01\x20\x03(\x0b2\t.RowOrderR\x05items\"\xde\x01\n\x03Ro\
  2391. w\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x17\n\x07grid_id\x18\x02\
  2392. \x20\x01(\tR\x06gridId\x12#\n\rmodified_time\x18\x03\x20\x01(\x03R\x0cmo\
  2393. difiedTime\x12@\n\x10cell_by_field_id\x18\x04\x20\x03(\x0b2\x17.Row.Cell\
  2394. ByFieldIdEntryR\rcellByFieldId\x1aG\n\x12CellByFieldIdEntry\x12\x10\n\
  2395. \x03key\x18\x01\x20\x01(\tR\x03key\x12\x1b\n\x05value\x18\x02\x20\x01(\
  2396. \x0b2\x05.CellR\x05value:\x028\x01\"f\n\x04Cell\x12\x0e\n\x02id\x18\x01\
  2397. \x20\x01(\tR\x02id\x12\x15\n\x06row_id\x18\x02\x20\x01(\tR\x05rowId\x12\
  2398. \x19\n\x08field_id\x18\x03\x20\x01(\tR\x07fieldId\x12\x1c\n\x04data\x18\
  2399. \x04\x20\x01(\x0b2\x08.AnyDataR\x04data*d\n\tFieldType\x12\x0c\n\x08Rich\
  2400. Text\x10\0\x12\n\n\x06Number\x10\x01\x12\x0c\n\x08DateTime\x10\x02\x12\
  2401. \x10\n\x0cSingleSelect\x10\x03\x12\x0f\n\x0bMultiSelect\x10\x04\x12\x0c\
  2402. \n\x08Checkbox\x10\x05b\x06proto3\
  2403. ";
  2404. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  2405. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  2406. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  2407. }
  2408. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  2409. file_descriptor_proto_lazy.get(|| {
  2410. parse_descriptor_proto()
  2411. })
  2412. }