field.rs 139 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104
  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 `field.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 Field {
  23. // message fields
  24. pub id: ::std::string::String,
  25. pub name: ::std::string::String,
  26. pub desc: ::std::string::String,
  27. pub field_type: FieldType,
  28. pub frozen: bool,
  29. pub visibility: bool,
  30. pub width: i32,
  31. pub is_primary: bool,
  32. // special fields
  33. pub unknown_fields: ::protobuf::UnknownFields,
  34. pub cached_size: ::protobuf::CachedSize,
  35. }
  36. impl<'a> ::std::default::Default for &'a Field {
  37. fn default() -> &'a Field {
  38. <Field as ::protobuf::Message>::default_instance()
  39. }
  40. }
  41. impl Field {
  42. pub fn new() -> Field {
  43. ::std::default::Default::default()
  44. }
  45. // string id = 1;
  46. pub fn get_id(&self) -> &str {
  47. &self.id
  48. }
  49. pub fn clear_id(&mut self) {
  50. self.id.clear();
  51. }
  52. // Param is passed by value, moved
  53. pub fn set_id(&mut self, v: ::std::string::String) {
  54. self.id = v;
  55. }
  56. // Mutable pointer to the field.
  57. // If field is not initialized, it is initialized with default value first.
  58. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  59. &mut self.id
  60. }
  61. // Take field
  62. pub fn take_id(&mut self) -> ::std::string::String {
  63. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  64. }
  65. // string name = 2;
  66. pub fn get_name(&self) -> &str {
  67. &self.name
  68. }
  69. pub fn clear_name(&mut self) {
  70. self.name.clear();
  71. }
  72. // Param is passed by value, moved
  73. pub fn set_name(&mut self, v: ::std::string::String) {
  74. self.name = v;
  75. }
  76. // Mutable pointer to the field.
  77. // If field is not initialized, it is initialized with default value first.
  78. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  79. &mut self.name
  80. }
  81. // Take field
  82. pub fn take_name(&mut self) -> ::std::string::String {
  83. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  84. }
  85. // string desc = 3;
  86. pub fn get_desc(&self) -> &str {
  87. &self.desc
  88. }
  89. pub fn clear_desc(&mut self) {
  90. self.desc.clear();
  91. }
  92. // Param is passed by value, moved
  93. pub fn set_desc(&mut self, v: ::std::string::String) {
  94. self.desc = v;
  95. }
  96. // Mutable pointer to the field.
  97. // If field is not initialized, it is initialized with default value first.
  98. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  99. &mut self.desc
  100. }
  101. // Take field
  102. pub fn take_desc(&mut self) -> ::std::string::String {
  103. ::std::mem::replace(&mut self.desc, ::std::string::String::new())
  104. }
  105. // .FieldType field_type = 4;
  106. pub fn get_field_type(&self) -> FieldType {
  107. self.field_type
  108. }
  109. pub fn clear_field_type(&mut self) {
  110. self.field_type = FieldType::RichText;
  111. }
  112. // Param is passed by value, moved
  113. pub fn set_field_type(&mut self, v: FieldType) {
  114. self.field_type = v;
  115. }
  116. // bool frozen = 5;
  117. pub fn get_frozen(&self) -> bool {
  118. self.frozen
  119. }
  120. pub fn clear_frozen(&mut self) {
  121. self.frozen = false;
  122. }
  123. // Param is passed by value, moved
  124. pub fn set_frozen(&mut self, v: bool) {
  125. self.frozen = v;
  126. }
  127. // bool visibility = 6;
  128. pub fn get_visibility(&self) -> bool {
  129. self.visibility
  130. }
  131. pub fn clear_visibility(&mut self) {
  132. self.visibility = false;
  133. }
  134. // Param is passed by value, moved
  135. pub fn set_visibility(&mut self, v: bool) {
  136. self.visibility = v;
  137. }
  138. // int32 width = 7;
  139. pub fn get_width(&self) -> i32 {
  140. self.width
  141. }
  142. pub fn clear_width(&mut self) {
  143. self.width = 0;
  144. }
  145. // Param is passed by value, moved
  146. pub fn set_width(&mut self, v: i32) {
  147. self.width = v;
  148. }
  149. // bool is_primary = 8;
  150. pub fn get_is_primary(&self) -> bool {
  151. self.is_primary
  152. }
  153. pub fn clear_is_primary(&mut self) {
  154. self.is_primary = false;
  155. }
  156. // Param is passed by value, moved
  157. pub fn set_is_primary(&mut self, v: bool) {
  158. self.is_primary = v;
  159. }
  160. }
  161. impl ::protobuf::Message for Field {
  162. fn is_initialized(&self) -> bool {
  163. true
  164. }
  165. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  166. while !is.eof()? {
  167. let (field_number, wire_type) = is.read_tag_unpack()?;
  168. match field_number {
  169. 1 => {
  170. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  171. },
  172. 2 => {
  173. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  174. },
  175. 3 => {
  176. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?;
  177. },
  178. 4 => {
  179. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 4, &mut self.unknown_fields)?
  180. },
  181. 5 => {
  182. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  183. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  184. }
  185. let tmp = is.read_bool()?;
  186. self.frozen = tmp;
  187. },
  188. 6 => {
  189. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  190. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  191. }
  192. let tmp = is.read_bool()?;
  193. self.visibility = tmp;
  194. },
  195. 7 => {
  196. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  197. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  198. }
  199. let tmp = is.read_int32()?;
  200. self.width = tmp;
  201. },
  202. 8 => {
  203. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  204. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  205. }
  206. let tmp = is.read_bool()?;
  207. self.is_primary = tmp;
  208. },
  209. _ => {
  210. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  211. },
  212. };
  213. }
  214. ::std::result::Result::Ok(())
  215. }
  216. // Compute sizes of nested messages
  217. #[allow(unused_variables)]
  218. fn compute_size(&self) -> u32 {
  219. let mut my_size = 0;
  220. if !self.id.is_empty() {
  221. my_size += ::protobuf::rt::string_size(1, &self.id);
  222. }
  223. if !self.name.is_empty() {
  224. my_size += ::protobuf::rt::string_size(2, &self.name);
  225. }
  226. if !self.desc.is_empty() {
  227. my_size += ::protobuf::rt::string_size(3, &self.desc);
  228. }
  229. if self.field_type != FieldType::RichText {
  230. my_size += ::protobuf::rt::enum_size(4, self.field_type);
  231. }
  232. if self.frozen != false {
  233. my_size += 2;
  234. }
  235. if self.visibility != false {
  236. my_size += 2;
  237. }
  238. if self.width != 0 {
  239. my_size += ::protobuf::rt::value_size(7, self.width, ::protobuf::wire_format::WireTypeVarint);
  240. }
  241. if self.is_primary != false {
  242. my_size += 2;
  243. }
  244. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  245. self.cached_size.set(my_size);
  246. my_size
  247. }
  248. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  249. if !self.id.is_empty() {
  250. os.write_string(1, &self.id)?;
  251. }
  252. if !self.name.is_empty() {
  253. os.write_string(2, &self.name)?;
  254. }
  255. if !self.desc.is_empty() {
  256. os.write_string(3, &self.desc)?;
  257. }
  258. if self.field_type != FieldType::RichText {
  259. os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  260. }
  261. if self.frozen != false {
  262. os.write_bool(5, self.frozen)?;
  263. }
  264. if self.visibility != false {
  265. os.write_bool(6, self.visibility)?;
  266. }
  267. if self.width != 0 {
  268. os.write_int32(7, self.width)?;
  269. }
  270. if self.is_primary != false {
  271. os.write_bool(8, self.is_primary)?;
  272. }
  273. os.write_unknown_fields(self.get_unknown_fields())?;
  274. ::std::result::Result::Ok(())
  275. }
  276. fn get_cached_size(&self) -> u32 {
  277. self.cached_size.get()
  278. }
  279. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  280. &self.unknown_fields
  281. }
  282. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  283. &mut self.unknown_fields
  284. }
  285. fn as_any(&self) -> &dyn (::std::any::Any) {
  286. self as &dyn (::std::any::Any)
  287. }
  288. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  289. self as &mut dyn (::std::any::Any)
  290. }
  291. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  292. self
  293. }
  294. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  295. Self::descriptor_static()
  296. }
  297. fn new() -> Field {
  298. Field::new()
  299. }
  300. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  301. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  302. descriptor.get(|| {
  303. let mut fields = ::std::vec::Vec::new();
  304. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  305. "id",
  306. |m: &Field| { &m.id },
  307. |m: &mut Field| { &mut m.id },
  308. ));
  309. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  310. "name",
  311. |m: &Field| { &m.name },
  312. |m: &mut Field| { &mut m.name },
  313. ));
  314. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  315. "desc",
  316. |m: &Field| { &m.desc },
  317. |m: &mut Field| { &mut m.desc },
  318. ));
  319. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
  320. "field_type",
  321. |m: &Field| { &m.field_type },
  322. |m: &mut Field| { &mut m.field_type },
  323. ));
  324. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  325. "frozen",
  326. |m: &Field| { &m.frozen },
  327. |m: &mut Field| { &mut m.frozen },
  328. ));
  329. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  330. "visibility",
  331. |m: &Field| { &m.visibility },
  332. |m: &mut Field| { &mut m.visibility },
  333. ));
  334. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  335. "width",
  336. |m: &Field| { &m.width },
  337. |m: &mut Field| { &mut m.width },
  338. ));
  339. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  340. "is_primary",
  341. |m: &Field| { &m.is_primary },
  342. |m: &mut Field| { &mut m.is_primary },
  343. ));
  344. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Field>(
  345. "Field",
  346. fields,
  347. file_descriptor_proto()
  348. )
  349. })
  350. }
  351. fn default_instance() -> &'static Field {
  352. static instance: ::protobuf::rt::LazyV2<Field> = ::protobuf::rt::LazyV2::INIT;
  353. instance.get(Field::new)
  354. }
  355. }
  356. impl ::protobuf::Clear for Field {
  357. fn clear(&mut self) {
  358. self.id.clear();
  359. self.name.clear();
  360. self.desc.clear();
  361. self.field_type = FieldType::RichText;
  362. self.frozen = false;
  363. self.visibility = false;
  364. self.width = 0;
  365. self.is_primary = false;
  366. self.unknown_fields.clear();
  367. }
  368. }
  369. impl ::std::fmt::Debug for Field {
  370. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  371. ::protobuf::text_format::fmt(self, f)
  372. }
  373. }
  374. impl ::protobuf::reflect::ProtobufValue for Field {
  375. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  376. ::protobuf::reflect::ReflectValueRef::Message(self)
  377. }
  378. }
  379. #[derive(PartialEq,Clone,Default)]
  380. pub struct FieldOrder {
  381. // message fields
  382. pub field_id: ::std::string::String,
  383. // special fields
  384. pub unknown_fields: ::protobuf::UnknownFields,
  385. pub cached_size: ::protobuf::CachedSize,
  386. }
  387. impl<'a> ::std::default::Default for &'a FieldOrder {
  388. fn default() -> &'a FieldOrder {
  389. <FieldOrder as ::protobuf::Message>::default_instance()
  390. }
  391. }
  392. impl FieldOrder {
  393. pub fn new() -> FieldOrder {
  394. ::std::default::Default::default()
  395. }
  396. // string field_id = 1;
  397. pub fn get_field_id(&self) -> &str {
  398. &self.field_id
  399. }
  400. pub fn clear_field_id(&mut self) {
  401. self.field_id.clear();
  402. }
  403. // Param is passed by value, moved
  404. pub fn set_field_id(&mut self, v: ::std::string::String) {
  405. self.field_id = v;
  406. }
  407. // Mutable pointer to the field.
  408. // If field is not initialized, it is initialized with default value first.
  409. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  410. &mut self.field_id
  411. }
  412. // Take field
  413. pub fn take_field_id(&mut self) -> ::std::string::String {
  414. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  415. }
  416. }
  417. impl ::protobuf::Message for FieldOrder {
  418. fn is_initialized(&self) -> bool {
  419. true
  420. }
  421. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  422. while !is.eof()? {
  423. let (field_number, wire_type) = is.read_tag_unpack()?;
  424. match field_number {
  425. 1 => {
  426. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  427. },
  428. _ => {
  429. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  430. },
  431. };
  432. }
  433. ::std::result::Result::Ok(())
  434. }
  435. // Compute sizes of nested messages
  436. #[allow(unused_variables)]
  437. fn compute_size(&self) -> u32 {
  438. let mut my_size = 0;
  439. if !self.field_id.is_empty() {
  440. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  441. }
  442. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  443. self.cached_size.set(my_size);
  444. my_size
  445. }
  446. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  447. if !self.field_id.is_empty() {
  448. os.write_string(1, &self.field_id)?;
  449. }
  450. os.write_unknown_fields(self.get_unknown_fields())?;
  451. ::std::result::Result::Ok(())
  452. }
  453. fn get_cached_size(&self) -> u32 {
  454. self.cached_size.get()
  455. }
  456. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  457. &self.unknown_fields
  458. }
  459. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  460. &mut self.unknown_fields
  461. }
  462. fn as_any(&self) -> &dyn (::std::any::Any) {
  463. self as &dyn (::std::any::Any)
  464. }
  465. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  466. self as &mut dyn (::std::any::Any)
  467. }
  468. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  469. self
  470. }
  471. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  472. Self::descriptor_static()
  473. }
  474. fn new() -> FieldOrder {
  475. FieldOrder::new()
  476. }
  477. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  478. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  479. descriptor.get(|| {
  480. let mut fields = ::std::vec::Vec::new();
  481. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  482. "field_id",
  483. |m: &FieldOrder| { &m.field_id },
  484. |m: &mut FieldOrder| { &mut m.field_id },
  485. ));
  486. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldOrder>(
  487. "FieldOrder",
  488. fields,
  489. file_descriptor_proto()
  490. )
  491. })
  492. }
  493. fn default_instance() -> &'static FieldOrder {
  494. static instance: ::protobuf::rt::LazyV2<FieldOrder> = ::protobuf::rt::LazyV2::INIT;
  495. instance.get(FieldOrder::new)
  496. }
  497. }
  498. impl ::protobuf::Clear for FieldOrder {
  499. fn clear(&mut self) {
  500. self.field_id.clear();
  501. self.unknown_fields.clear();
  502. }
  503. }
  504. impl ::std::fmt::Debug for FieldOrder {
  505. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  506. ::protobuf::text_format::fmt(self, f)
  507. }
  508. }
  509. impl ::protobuf::reflect::ProtobufValue for FieldOrder {
  510. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  511. ::protobuf::reflect::ReflectValueRef::Message(self)
  512. }
  513. }
  514. #[derive(PartialEq,Clone,Default)]
  515. pub struct GridFieldChangeset {
  516. // message fields
  517. pub grid_id: ::std::string::String,
  518. pub inserted_fields: ::protobuf::RepeatedField<IndexField>,
  519. pub deleted_fields: ::protobuf::RepeatedField<FieldOrder>,
  520. pub updated_fields: ::protobuf::RepeatedField<Field>,
  521. // special fields
  522. pub unknown_fields: ::protobuf::UnknownFields,
  523. pub cached_size: ::protobuf::CachedSize,
  524. }
  525. impl<'a> ::std::default::Default for &'a GridFieldChangeset {
  526. fn default() -> &'a GridFieldChangeset {
  527. <GridFieldChangeset as ::protobuf::Message>::default_instance()
  528. }
  529. }
  530. impl GridFieldChangeset {
  531. pub fn new() -> GridFieldChangeset {
  532. ::std::default::Default::default()
  533. }
  534. // string grid_id = 1;
  535. pub fn get_grid_id(&self) -> &str {
  536. &self.grid_id
  537. }
  538. pub fn clear_grid_id(&mut self) {
  539. self.grid_id.clear();
  540. }
  541. // Param is passed by value, moved
  542. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  543. self.grid_id = v;
  544. }
  545. // Mutable pointer to the field.
  546. // If field is not initialized, it is initialized with default value first.
  547. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  548. &mut self.grid_id
  549. }
  550. // Take field
  551. pub fn take_grid_id(&mut self) -> ::std::string::String {
  552. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  553. }
  554. // repeated .IndexField inserted_fields = 2;
  555. pub fn get_inserted_fields(&self) -> &[IndexField] {
  556. &self.inserted_fields
  557. }
  558. pub fn clear_inserted_fields(&mut self) {
  559. self.inserted_fields.clear();
  560. }
  561. // Param is passed by value, moved
  562. pub fn set_inserted_fields(&mut self, v: ::protobuf::RepeatedField<IndexField>) {
  563. self.inserted_fields = v;
  564. }
  565. // Mutable pointer to the field.
  566. pub fn mut_inserted_fields(&mut self) -> &mut ::protobuf::RepeatedField<IndexField> {
  567. &mut self.inserted_fields
  568. }
  569. // Take field
  570. pub fn take_inserted_fields(&mut self) -> ::protobuf::RepeatedField<IndexField> {
  571. ::std::mem::replace(&mut self.inserted_fields, ::protobuf::RepeatedField::new())
  572. }
  573. // repeated .FieldOrder deleted_fields = 3;
  574. pub fn get_deleted_fields(&self) -> &[FieldOrder] {
  575. &self.deleted_fields
  576. }
  577. pub fn clear_deleted_fields(&mut self) {
  578. self.deleted_fields.clear();
  579. }
  580. // Param is passed by value, moved
  581. pub fn set_deleted_fields(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
  582. self.deleted_fields = v;
  583. }
  584. // Mutable pointer to the field.
  585. pub fn mut_deleted_fields(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
  586. &mut self.deleted_fields
  587. }
  588. // Take field
  589. pub fn take_deleted_fields(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
  590. ::std::mem::replace(&mut self.deleted_fields, ::protobuf::RepeatedField::new())
  591. }
  592. // repeated .Field updated_fields = 4;
  593. pub fn get_updated_fields(&self) -> &[Field] {
  594. &self.updated_fields
  595. }
  596. pub fn clear_updated_fields(&mut self) {
  597. self.updated_fields.clear();
  598. }
  599. // Param is passed by value, moved
  600. pub fn set_updated_fields(&mut self, v: ::protobuf::RepeatedField<Field>) {
  601. self.updated_fields = v;
  602. }
  603. // Mutable pointer to the field.
  604. pub fn mut_updated_fields(&mut self) -> &mut ::protobuf::RepeatedField<Field> {
  605. &mut self.updated_fields
  606. }
  607. // Take field
  608. pub fn take_updated_fields(&mut self) -> ::protobuf::RepeatedField<Field> {
  609. ::std::mem::replace(&mut self.updated_fields, ::protobuf::RepeatedField::new())
  610. }
  611. }
  612. impl ::protobuf::Message for GridFieldChangeset {
  613. fn is_initialized(&self) -> bool {
  614. for v in &self.inserted_fields {
  615. if !v.is_initialized() {
  616. return false;
  617. }
  618. };
  619. for v in &self.deleted_fields {
  620. if !v.is_initialized() {
  621. return false;
  622. }
  623. };
  624. for v in &self.updated_fields {
  625. if !v.is_initialized() {
  626. return false;
  627. }
  628. };
  629. true
  630. }
  631. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  632. while !is.eof()? {
  633. let (field_number, wire_type) = is.read_tag_unpack()?;
  634. match field_number {
  635. 1 => {
  636. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  637. },
  638. 2 => {
  639. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.inserted_fields)?;
  640. },
  641. 3 => {
  642. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.deleted_fields)?;
  643. },
  644. 4 => {
  645. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.updated_fields)?;
  646. },
  647. _ => {
  648. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  649. },
  650. };
  651. }
  652. ::std::result::Result::Ok(())
  653. }
  654. // Compute sizes of nested messages
  655. #[allow(unused_variables)]
  656. fn compute_size(&self) -> u32 {
  657. let mut my_size = 0;
  658. if !self.grid_id.is_empty() {
  659. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  660. }
  661. for value in &self.inserted_fields {
  662. let len = value.compute_size();
  663. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  664. };
  665. for value in &self.deleted_fields {
  666. let len = value.compute_size();
  667. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  668. };
  669. for value in &self.updated_fields {
  670. let len = value.compute_size();
  671. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  672. };
  673. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  674. self.cached_size.set(my_size);
  675. my_size
  676. }
  677. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  678. if !self.grid_id.is_empty() {
  679. os.write_string(1, &self.grid_id)?;
  680. }
  681. for v in &self.inserted_fields {
  682. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  683. os.write_raw_varint32(v.get_cached_size())?;
  684. v.write_to_with_cached_sizes(os)?;
  685. };
  686. for v in &self.deleted_fields {
  687. os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  688. os.write_raw_varint32(v.get_cached_size())?;
  689. v.write_to_with_cached_sizes(os)?;
  690. };
  691. for v in &self.updated_fields {
  692. os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  693. os.write_raw_varint32(v.get_cached_size())?;
  694. v.write_to_with_cached_sizes(os)?;
  695. };
  696. os.write_unknown_fields(self.get_unknown_fields())?;
  697. ::std::result::Result::Ok(())
  698. }
  699. fn get_cached_size(&self) -> u32 {
  700. self.cached_size.get()
  701. }
  702. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  703. &self.unknown_fields
  704. }
  705. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  706. &mut self.unknown_fields
  707. }
  708. fn as_any(&self) -> &dyn (::std::any::Any) {
  709. self as &dyn (::std::any::Any)
  710. }
  711. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  712. self as &mut dyn (::std::any::Any)
  713. }
  714. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  715. self
  716. }
  717. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  718. Self::descriptor_static()
  719. }
  720. fn new() -> GridFieldChangeset {
  721. GridFieldChangeset::new()
  722. }
  723. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  724. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  725. descriptor.get(|| {
  726. let mut fields = ::std::vec::Vec::new();
  727. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  728. "grid_id",
  729. |m: &GridFieldChangeset| { &m.grid_id },
  730. |m: &mut GridFieldChangeset| { &mut m.grid_id },
  731. ));
  732. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<IndexField>>(
  733. "inserted_fields",
  734. |m: &GridFieldChangeset| { &m.inserted_fields },
  735. |m: &mut GridFieldChangeset| { &mut m.inserted_fields },
  736. ));
  737. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
  738. "deleted_fields",
  739. |m: &GridFieldChangeset| { &m.deleted_fields },
  740. |m: &mut GridFieldChangeset| { &mut m.deleted_fields },
  741. ));
  742. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  743. "updated_fields",
  744. |m: &GridFieldChangeset| { &m.updated_fields },
  745. |m: &mut GridFieldChangeset| { &mut m.updated_fields },
  746. ));
  747. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GridFieldChangeset>(
  748. "GridFieldChangeset",
  749. fields,
  750. file_descriptor_proto()
  751. )
  752. })
  753. }
  754. fn default_instance() -> &'static GridFieldChangeset {
  755. static instance: ::protobuf::rt::LazyV2<GridFieldChangeset> = ::protobuf::rt::LazyV2::INIT;
  756. instance.get(GridFieldChangeset::new)
  757. }
  758. }
  759. impl ::protobuf::Clear for GridFieldChangeset {
  760. fn clear(&mut self) {
  761. self.grid_id.clear();
  762. self.inserted_fields.clear();
  763. self.deleted_fields.clear();
  764. self.updated_fields.clear();
  765. self.unknown_fields.clear();
  766. }
  767. }
  768. impl ::std::fmt::Debug for GridFieldChangeset {
  769. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  770. ::protobuf::text_format::fmt(self, f)
  771. }
  772. }
  773. impl ::protobuf::reflect::ProtobufValue for GridFieldChangeset {
  774. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  775. ::protobuf::reflect::ReflectValueRef::Message(self)
  776. }
  777. }
  778. #[derive(PartialEq,Clone,Default)]
  779. pub struct IndexField {
  780. // message fields
  781. pub field: ::protobuf::SingularPtrField<Field>,
  782. pub index: i32,
  783. // special fields
  784. pub unknown_fields: ::protobuf::UnknownFields,
  785. pub cached_size: ::protobuf::CachedSize,
  786. }
  787. impl<'a> ::std::default::Default for &'a IndexField {
  788. fn default() -> &'a IndexField {
  789. <IndexField as ::protobuf::Message>::default_instance()
  790. }
  791. }
  792. impl IndexField {
  793. pub fn new() -> IndexField {
  794. ::std::default::Default::default()
  795. }
  796. // .Field field = 1;
  797. pub fn get_field(&self) -> &Field {
  798. self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
  799. }
  800. pub fn clear_field(&mut self) {
  801. self.field.clear();
  802. }
  803. pub fn has_field(&self) -> bool {
  804. self.field.is_some()
  805. }
  806. // Param is passed by value, moved
  807. pub fn set_field(&mut self, v: Field) {
  808. self.field = ::protobuf::SingularPtrField::some(v);
  809. }
  810. // Mutable pointer to the field.
  811. // If field is not initialized, it is initialized with default value first.
  812. pub fn mut_field(&mut self) -> &mut Field {
  813. if self.field.is_none() {
  814. self.field.set_default();
  815. }
  816. self.field.as_mut().unwrap()
  817. }
  818. // Take field
  819. pub fn take_field(&mut self) -> Field {
  820. self.field.take().unwrap_or_else(|| Field::new())
  821. }
  822. // int32 index = 2;
  823. pub fn get_index(&self) -> i32 {
  824. self.index
  825. }
  826. pub fn clear_index(&mut self) {
  827. self.index = 0;
  828. }
  829. // Param is passed by value, moved
  830. pub fn set_index(&mut self, v: i32) {
  831. self.index = v;
  832. }
  833. }
  834. impl ::protobuf::Message for IndexField {
  835. fn is_initialized(&self) -> bool {
  836. for v in &self.field {
  837. if !v.is_initialized() {
  838. return false;
  839. }
  840. };
  841. true
  842. }
  843. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  844. while !is.eof()? {
  845. let (field_number, wire_type) = is.read_tag_unpack()?;
  846. match field_number {
  847. 1 => {
  848. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field)?;
  849. },
  850. 2 => {
  851. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  852. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  853. }
  854. let tmp = is.read_int32()?;
  855. self.index = tmp;
  856. },
  857. _ => {
  858. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  859. },
  860. };
  861. }
  862. ::std::result::Result::Ok(())
  863. }
  864. // Compute sizes of nested messages
  865. #[allow(unused_variables)]
  866. fn compute_size(&self) -> u32 {
  867. let mut my_size = 0;
  868. if let Some(ref v) = self.field.as_ref() {
  869. let len = v.compute_size();
  870. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  871. }
  872. if self.index != 0 {
  873. my_size += ::protobuf::rt::value_size(2, self.index, ::protobuf::wire_format::WireTypeVarint);
  874. }
  875. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  876. self.cached_size.set(my_size);
  877. my_size
  878. }
  879. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  880. if let Some(ref v) = self.field.as_ref() {
  881. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  882. os.write_raw_varint32(v.get_cached_size())?;
  883. v.write_to_with_cached_sizes(os)?;
  884. }
  885. if self.index != 0 {
  886. os.write_int32(2, self.index)?;
  887. }
  888. os.write_unknown_fields(self.get_unknown_fields())?;
  889. ::std::result::Result::Ok(())
  890. }
  891. fn get_cached_size(&self) -> u32 {
  892. self.cached_size.get()
  893. }
  894. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  895. &self.unknown_fields
  896. }
  897. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  898. &mut self.unknown_fields
  899. }
  900. fn as_any(&self) -> &dyn (::std::any::Any) {
  901. self as &dyn (::std::any::Any)
  902. }
  903. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  904. self as &mut dyn (::std::any::Any)
  905. }
  906. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  907. self
  908. }
  909. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  910. Self::descriptor_static()
  911. }
  912. fn new() -> IndexField {
  913. IndexField::new()
  914. }
  915. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  916. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  917. descriptor.get(|| {
  918. let mut fields = ::std::vec::Vec::new();
  919. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  920. "field",
  921. |m: &IndexField| { &m.field },
  922. |m: &mut IndexField| { &mut m.field },
  923. ));
  924. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  925. "index",
  926. |m: &IndexField| { &m.index },
  927. |m: &mut IndexField| { &mut m.index },
  928. ));
  929. ::protobuf::reflect::MessageDescriptor::new_pb_name::<IndexField>(
  930. "IndexField",
  931. fields,
  932. file_descriptor_proto()
  933. )
  934. })
  935. }
  936. fn default_instance() -> &'static IndexField {
  937. static instance: ::protobuf::rt::LazyV2<IndexField> = ::protobuf::rt::LazyV2::INIT;
  938. instance.get(IndexField::new)
  939. }
  940. }
  941. impl ::protobuf::Clear for IndexField {
  942. fn clear(&mut self) {
  943. self.field.clear();
  944. self.index = 0;
  945. self.unknown_fields.clear();
  946. }
  947. }
  948. impl ::std::fmt::Debug for IndexField {
  949. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  950. ::protobuf::text_format::fmt(self, f)
  951. }
  952. }
  953. impl ::protobuf::reflect::ProtobufValue for IndexField {
  954. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  955. ::protobuf::reflect::ReflectValueRef::Message(self)
  956. }
  957. }
  958. #[derive(PartialEq,Clone,Default)]
  959. pub struct GetEditFieldContextPayload {
  960. // message fields
  961. pub grid_id: ::std::string::String,
  962. pub field_type: FieldType,
  963. // message oneof groups
  964. pub one_of_field_id: ::std::option::Option<GetEditFieldContextPayload_oneof_one_of_field_id>,
  965. // special fields
  966. pub unknown_fields: ::protobuf::UnknownFields,
  967. pub cached_size: ::protobuf::CachedSize,
  968. }
  969. impl<'a> ::std::default::Default for &'a GetEditFieldContextPayload {
  970. fn default() -> &'a GetEditFieldContextPayload {
  971. <GetEditFieldContextPayload as ::protobuf::Message>::default_instance()
  972. }
  973. }
  974. #[derive(Clone,PartialEq,Debug)]
  975. pub enum GetEditFieldContextPayload_oneof_one_of_field_id {
  976. field_id(::std::string::String),
  977. }
  978. impl GetEditFieldContextPayload {
  979. pub fn new() -> GetEditFieldContextPayload {
  980. ::std::default::Default::default()
  981. }
  982. // string grid_id = 1;
  983. pub fn get_grid_id(&self) -> &str {
  984. &self.grid_id
  985. }
  986. pub fn clear_grid_id(&mut self) {
  987. self.grid_id.clear();
  988. }
  989. // Param is passed by value, moved
  990. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  991. self.grid_id = v;
  992. }
  993. // Mutable pointer to the field.
  994. // If field is not initialized, it is initialized with default value first.
  995. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  996. &mut self.grid_id
  997. }
  998. // Take field
  999. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1000. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1001. }
  1002. // string field_id = 2;
  1003. pub fn get_field_id(&self) -> &str {
  1004. match self.one_of_field_id {
  1005. ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref v)) => v,
  1006. _ => "",
  1007. }
  1008. }
  1009. pub fn clear_field_id(&mut self) {
  1010. self.one_of_field_id = ::std::option::Option::None;
  1011. }
  1012. pub fn has_field_id(&self) -> bool {
  1013. match self.one_of_field_id {
  1014. ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(..)) => true,
  1015. _ => false,
  1016. }
  1017. }
  1018. // Param is passed by value, moved
  1019. pub fn set_field_id(&mut self, v: ::std::string::String) {
  1020. self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(v))
  1021. }
  1022. // Mutable pointer to the field.
  1023. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  1024. if let ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(_)) = self.one_of_field_id {
  1025. } else {
  1026. self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(::std::string::String::new()));
  1027. }
  1028. match self.one_of_field_id {
  1029. ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref mut v)) => v,
  1030. _ => panic!(),
  1031. }
  1032. }
  1033. // Take field
  1034. pub fn take_field_id(&mut self) -> ::std::string::String {
  1035. if self.has_field_id() {
  1036. match self.one_of_field_id.take() {
  1037. ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(v)) => v,
  1038. _ => panic!(),
  1039. }
  1040. } else {
  1041. ::std::string::String::new()
  1042. }
  1043. }
  1044. // .FieldType field_type = 3;
  1045. pub fn get_field_type(&self) -> FieldType {
  1046. self.field_type
  1047. }
  1048. pub fn clear_field_type(&mut self) {
  1049. self.field_type = FieldType::RichText;
  1050. }
  1051. // Param is passed by value, moved
  1052. pub fn set_field_type(&mut self, v: FieldType) {
  1053. self.field_type = v;
  1054. }
  1055. }
  1056. impl ::protobuf::Message for GetEditFieldContextPayload {
  1057. fn is_initialized(&self) -> bool {
  1058. true
  1059. }
  1060. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1061. while !is.eof()? {
  1062. let (field_number, wire_type) = is.read_tag_unpack()?;
  1063. match field_number {
  1064. 1 => {
  1065. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1066. },
  1067. 2 => {
  1068. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  1069. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1070. }
  1071. self.one_of_field_id = ::std::option::Option::Some(GetEditFieldContextPayload_oneof_one_of_field_id::field_id(is.read_string()?));
  1072. },
  1073. 3 => {
  1074. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
  1075. },
  1076. _ => {
  1077. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1078. },
  1079. };
  1080. }
  1081. ::std::result::Result::Ok(())
  1082. }
  1083. // Compute sizes of nested messages
  1084. #[allow(unused_variables)]
  1085. fn compute_size(&self) -> u32 {
  1086. let mut my_size = 0;
  1087. if !self.grid_id.is_empty() {
  1088. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1089. }
  1090. if self.field_type != FieldType::RichText {
  1091. my_size += ::protobuf::rt::enum_size(3, self.field_type);
  1092. }
  1093. if let ::std::option::Option::Some(ref v) = self.one_of_field_id {
  1094. match v {
  1095. &GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref v) => {
  1096. my_size += ::protobuf::rt::string_size(2, &v);
  1097. },
  1098. };
  1099. }
  1100. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1101. self.cached_size.set(my_size);
  1102. my_size
  1103. }
  1104. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1105. if !self.grid_id.is_empty() {
  1106. os.write_string(1, &self.grid_id)?;
  1107. }
  1108. if self.field_type != FieldType::RichText {
  1109. os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  1110. }
  1111. if let ::std::option::Option::Some(ref v) = self.one_of_field_id {
  1112. match v {
  1113. &GetEditFieldContextPayload_oneof_one_of_field_id::field_id(ref v) => {
  1114. os.write_string(2, v)?;
  1115. },
  1116. };
  1117. }
  1118. os.write_unknown_fields(self.get_unknown_fields())?;
  1119. ::std::result::Result::Ok(())
  1120. }
  1121. fn get_cached_size(&self) -> u32 {
  1122. self.cached_size.get()
  1123. }
  1124. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1125. &self.unknown_fields
  1126. }
  1127. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1128. &mut self.unknown_fields
  1129. }
  1130. fn as_any(&self) -> &dyn (::std::any::Any) {
  1131. self as &dyn (::std::any::Any)
  1132. }
  1133. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1134. self as &mut dyn (::std::any::Any)
  1135. }
  1136. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1137. self
  1138. }
  1139. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1140. Self::descriptor_static()
  1141. }
  1142. fn new() -> GetEditFieldContextPayload {
  1143. GetEditFieldContextPayload::new()
  1144. }
  1145. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1146. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1147. descriptor.get(|| {
  1148. let mut fields = ::std::vec::Vec::new();
  1149. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1150. "grid_id",
  1151. |m: &GetEditFieldContextPayload| { &m.grid_id },
  1152. |m: &mut GetEditFieldContextPayload| { &mut m.grid_id },
  1153. ));
  1154. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  1155. "field_id",
  1156. GetEditFieldContextPayload::has_field_id,
  1157. GetEditFieldContextPayload::get_field_id,
  1158. ));
  1159. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
  1160. "field_type",
  1161. |m: &GetEditFieldContextPayload| { &m.field_type },
  1162. |m: &mut GetEditFieldContextPayload| { &mut m.field_type },
  1163. ));
  1164. ::protobuf::reflect::MessageDescriptor::new_pb_name::<GetEditFieldContextPayload>(
  1165. "GetEditFieldContextPayload",
  1166. fields,
  1167. file_descriptor_proto()
  1168. )
  1169. })
  1170. }
  1171. fn default_instance() -> &'static GetEditFieldContextPayload {
  1172. static instance: ::protobuf::rt::LazyV2<GetEditFieldContextPayload> = ::protobuf::rt::LazyV2::INIT;
  1173. instance.get(GetEditFieldContextPayload::new)
  1174. }
  1175. }
  1176. impl ::protobuf::Clear for GetEditFieldContextPayload {
  1177. fn clear(&mut self) {
  1178. self.grid_id.clear();
  1179. self.one_of_field_id = ::std::option::Option::None;
  1180. self.field_type = FieldType::RichText;
  1181. self.unknown_fields.clear();
  1182. }
  1183. }
  1184. impl ::std::fmt::Debug for GetEditFieldContextPayload {
  1185. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1186. ::protobuf::text_format::fmt(self, f)
  1187. }
  1188. }
  1189. impl ::protobuf::reflect::ProtobufValue for GetEditFieldContextPayload {
  1190. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1191. ::protobuf::reflect::ReflectValueRef::Message(self)
  1192. }
  1193. }
  1194. #[derive(PartialEq,Clone,Default)]
  1195. pub struct EditFieldPayload {
  1196. // message fields
  1197. pub grid_id: ::std::string::String,
  1198. pub field_id: ::std::string::String,
  1199. pub field_type: FieldType,
  1200. pub create_if_not_exist: bool,
  1201. // special fields
  1202. pub unknown_fields: ::protobuf::UnknownFields,
  1203. pub cached_size: ::protobuf::CachedSize,
  1204. }
  1205. impl<'a> ::std::default::Default for &'a EditFieldPayload {
  1206. fn default() -> &'a EditFieldPayload {
  1207. <EditFieldPayload as ::protobuf::Message>::default_instance()
  1208. }
  1209. }
  1210. impl EditFieldPayload {
  1211. pub fn new() -> EditFieldPayload {
  1212. ::std::default::Default::default()
  1213. }
  1214. // string grid_id = 1;
  1215. pub fn get_grid_id(&self) -> &str {
  1216. &self.grid_id
  1217. }
  1218. pub fn clear_grid_id(&mut self) {
  1219. self.grid_id.clear();
  1220. }
  1221. // Param is passed by value, moved
  1222. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1223. self.grid_id = v;
  1224. }
  1225. // Mutable pointer to the field.
  1226. // If field is not initialized, it is initialized with default value first.
  1227. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1228. &mut self.grid_id
  1229. }
  1230. // Take field
  1231. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1232. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1233. }
  1234. // string field_id = 2;
  1235. pub fn get_field_id(&self) -> &str {
  1236. &self.field_id
  1237. }
  1238. pub fn clear_field_id(&mut self) {
  1239. self.field_id.clear();
  1240. }
  1241. // Param is passed by value, moved
  1242. pub fn set_field_id(&mut self, v: ::std::string::String) {
  1243. self.field_id = v;
  1244. }
  1245. // Mutable pointer to the field.
  1246. // If field is not initialized, it is initialized with default value first.
  1247. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  1248. &mut self.field_id
  1249. }
  1250. // Take field
  1251. pub fn take_field_id(&mut self) -> ::std::string::String {
  1252. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  1253. }
  1254. // .FieldType field_type = 3;
  1255. pub fn get_field_type(&self) -> FieldType {
  1256. self.field_type
  1257. }
  1258. pub fn clear_field_type(&mut self) {
  1259. self.field_type = FieldType::RichText;
  1260. }
  1261. // Param is passed by value, moved
  1262. pub fn set_field_type(&mut self, v: FieldType) {
  1263. self.field_type = v;
  1264. }
  1265. // bool create_if_not_exist = 4;
  1266. pub fn get_create_if_not_exist(&self) -> bool {
  1267. self.create_if_not_exist
  1268. }
  1269. pub fn clear_create_if_not_exist(&mut self) {
  1270. self.create_if_not_exist = false;
  1271. }
  1272. // Param is passed by value, moved
  1273. pub fn set_create_if_not_exist(&mut self, v: bool) {
  1274. self.create_if_not_exist = v;
  1275. }
  1276. }
  1277. impl ::protobuf::Message for EditFieldPayload {
  1278. fn is_initialized(&self) -> bool {
  1279. true
  1280. }
  1281. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1282. while !is.eof()? {
  1283. let (field_number, wire_type) = is.read_tag_unpack()?;
  1284. match field_number {
  1285. 1 => {
  1286. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1287. },
  1288. 2 => {
  1289. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  1290. },
  1291. 3 => {
  1292. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
  1293. },
  1294. 4 => {
  1295. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1296. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1297. }
  1298. let tmp = is.read_bool()?;
  1299. self.create_if_not_exist = tmp;
  1300. },
  1301. _ => {
  1302. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1303. },
  1304. };
  1305. }
  1306. ::std::result::Result::Ok(())
  1307. }
  1308. // Compute sizes of nested messages
  1309. #[allow(unused_variables)]
  1310. fn compute_size(&self) -> u32 {
  1311. let mut my_size = 0;
  1312. if !self.grid_id.is_empty() {
  1313. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1314. }
  1315. if !self.field_id.is_empty() {
  1316. my_size += ::protobuf::rt::string_size(2, &self.field_id);
  1317. }
  1318. if self.field_type != FieldType::RichText {
  1319. my_size += ::protobuf::rt::enum_size(3, self.field_type);
  1320. }
  1321. if self.create_if_not_exist != false {
  1322. my_size += 2;
  1323. }
  1324. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1325. self.cached_size.set(my_size);
  1326. my_size
  1327. }
  1328. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1329. if !self.grid_id.is_empty() {
  1330. os.write_string(1, &self.grid_id)?;
  1331. }
  1332. if !self.field_id.is_empty() {
  1333. os.write_string(2, &self.field_id)?;
  1334. }
  1335. if self.field_type != FieldType::RichText {
  1336. os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.field_type))?;
  1337. }
  1338. if self.create_if_not_exist != false {
  1339. os.write_bool(4, self.create_if_not_exist)?;
  1340. }
  1341. os.write_unknown_fields(self.get_unknown_fields())?;
  1342. ::std::result::Result::Ok(())
  1343. }
  1344. fn get_cached_size(&self) -> u32 {
  1345. self.cached_size.get()
  1346. }
  1347. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1348. &self.unknown_fields
  1349. }
  1350. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1351. &mut self.unknown_fields
  1352. }
  1353. fn as_any(&self) -> &dyn (::std::any::Any) {
  1354. self as &dyn (::std::any::Any)
  1355. }
  1356. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1357. self as &mut dyn (::std::any::Any)
  1358. }
  1359. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1360. self
  1361. }
  1362. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1363. Self::descriptor_static()
  1364. }
  1365. fn new() -> EditFieldPayload {
  1366. EditFieldPayload::new()
  1367. }
  1368. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1369. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1370. descriptor.get(|| {
  1371. let mut fields = ::std::vec::Vec::new();
  1372. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1373. "grid_id",
  1374. |m: &EditFieldPayload| { &m.grid_id },
  1375. |m: &mut EditFieldPayload| { &mut m.grid_id },
  1376. ));
  1377. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1378. "field_id",
  1379. |m: &EditFieldPayload| { &m.field_id },
  1380. |m: &mut EditFieldPayload| { &mut m.field_id },
  1381. ));
  1382. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<FieldType>>(
  1383. "field_type",
  1384. |m: &EditFieldPayload| { &m.field_type },
  1385. |m: &mut EditFieldPayload| { &mut m.field_type },
  1386. ));
  1387. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1388. "create_if_not_exist",
  1389. |m: &EditFieldPayload| { &m.create_if_not_exist },
  1390. |m: &mut EditFieldPayload| { &mut m.create_if_not_exist },
  1391. ));
  1392. ::protobuf::reflect::MessageDescriptor::new_pb_name::<EditFieldPayload>(
  1393. "EditFieldPayload",
  1394. fields,
  1395. file_descriptor_proto()
  1396. )
  1397. })
  1398. }
  1399. fn default_instance() -> &'static EditFieldPayload {
  1400. static instance: ::protobuf::rt::LazyV2<EditFieldPayload> = ::protobuf::rt::LazyV2::INIT;
  1401. instance.get(EditFieldPayload::new)
  1402. }
  1403. }
  1404. impl ::protobuf::Clear for EditFieldPayload {
  1405. fn clear(&mut self) {
  1406. self.grid_id.clear();
  1407. self.field_id.clear();
  1408. self.field_type = FieldType::RichText;
  1409. self.create_if_not_exist = false;
  1410. self.unknown_fields.clear();
  1411. }
  1412. }
  1413. impl ::std::fmt::Debug for EditFieldPayload {
  1414. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1415. ::protobuf::text_format::fmt(self, f)
  1416. }
  1417. }
  1418. impl ::protobuf::reflect::ProtobufValue for EditFieldPayload {
  1419. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1420. ::protobuf::reflect::ReflectValueRef::Message(self)
  1421. }
  1422. }
  1423. #[derive(PartialEq,Clone,Default)]
  1424. pub struct FieldTypeOptionContext {
  1425. // message fields
  1426. pub grid_id: ::std::string::String,
  1427. pub grid_field: ::protobuf::SingularPtrField<Field>,
  1428. pub type_option_data: ::std::vec::Vec<u8>,
  1429. // special fields
  1430. pub unknown_fields: ::protobuf::UnknownFields,
  1431. pub cached_size: ::protobuf::CachedSize,
  1432. }
  1433. impl<'a> ::std::default::Default for &'a FieldTypeOptionContext {
  1434. fn default() -> &'a FieldTypeOptionContext {
  1435. <FieldTypeOptionContext as ::protobuf::Message>::default_instance()
  1436. }
  1437. }
  1438. impl FieldTypeOptionContext {
  1439. pub fn new() -> FieldTypeOptionContext {
  1440. ::std::default::Default::default()
  1441. }
  1442. // string grid_id = 1;
  1443. pub fn get_grid_id(&self) -> &str {
  1444. &self.grid_id
  1445. }
  1446. pub fn clear_grid_id(&mut self) {
  1447. self.grid_id.clear();
  1448. }
  1449. // Param is passed by value, moved
  1450. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1451. self.grid_id = v;
  1452. }
  1453. // Mutable pointer to the field.
  1454. // If field is not initialized, it is initialized with default value first.
  1455. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1456. &mut self.grid_id
  1457. }
  1458. // Take field
  1459. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1460. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1461. }
  1462. // .Field grid_field = 2;
  1463. pub fn get_grid_field(&self) -> &Field {
  1464. self.grid_field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
  1465. }
  1466. pub fn clear_grid_field(&mut self) {
  1467. self.grid_field.clear();
  1468. }
  1469. pub fn has_grid_field(&self) -> bool {
  1470. self.grid_field.is_some()
  1471. }
  1472. // Param is passed by value, moved
  1473. pub fn set_grid_field(&mut self, v: Field) {
  1474. self.grid_field = ::protobuf::SingularPtrField::some(v);
  1475. }
  1476. // Mutable pointer to the field.
  1477. // If field is not initialized, it is initialized with default value first.
  1478. pub fn mut_grid_field(&mut self) -> &mut Field {
  1479. if self.grid_field.is_none() {
  1480. self.grid_field.set_default();
  1481. }
  1482. self.grid_field.as_mut().unwrap()
  1483. }
  1484. // Take field
  1485. pub fn take_grid_field(&mut self) -> Field {
  1486. self.grid_field.take().unwrap_or_else(|| Field::new())
  1487. }
  1488. // bytes type_option_data = 3;
  1489. pub fn get_type_option_data(&self) -> &[u8] {
  1490. &self.type_option_data
  1491. }
  1492. pub fn clear_type_option_data(&mut self) {
  1493. self.type_option_data.clear();
  1494. }
  1495. // Param is passed by value, moved
  1496. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  1497. self.type_option_data = v;
  1498. }
  1499. // Mutable pointer to the field.
  1500. // If field is not initialized, it is initialized with default value first.
  1501. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  1502. &mut self.type_option_data
  1503. }
  1504. // Take field
  1505. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  1506. ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
  1507. }
  1508. }
  1509. impl ::protobuf::Message for FieldTypeOptionContext {
  1510. fn is_initialized(&self) -> bool {
  1511. for v in &self.grid_field {
  1512. if !v.is_initialized() {
  1513. return false;
  1514. }
  1515. };
  1516. true
  1517. }
  1518. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1519. while !is.eof()? {
  1520. let (field_number, wire_type) = is.read_tag_unpack()?;
  1521. match field_number {
  1522. 1 => {
  1523. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1524. },
  1525. 2 => {
  1526. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grid_field)?;
  1527. },
  1528. 3 => {
  1529. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
  1530. },
  1531. _ => {
  1532. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1533. },
  1534. };
  1535. }
  1536. ::std::result::Result::Ok(())
  1537. }
  1538. // Compute sizes of nested messages
  1539. #[allow(unused_variables)]
  1540. fn compute_size(&self) -> u32 {
  1541. let mut my_size = 0;
  1542. if !self.grid_id.is_empty() {
  1543. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1544. }
  1545. if let Some(ref v) = self.grid_field.as_ref() {
  1546. let len = v.compute_size();
  1547. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1548. }
  1549. if !self.type_option_data.is_empty() {
  1550. my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
  1551. }
  1552. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1553. self.cached_size.set(my_size);
  1554. my_size
  1555. }
  1556. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1557. if !self.grid_id.is_empty() {
  1558. os.write_string(1, &self.grid_id)?;
  1559. }
  1560. if let Some(ref v) = self.grid_field.as_ref() {
  1561. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1562. os.write_raw_varint32(v.get_cached_size())?;
  1563. v.write_to_with_cached_sizes(os)?;
  1564. }
  1565. if !self.type_option_data.is_empty() {
  1566. os.write_bytes(3, &self.type_option_data)?;
  1567. }
  1568. os.write_unknown_fields(self.get_unknown_fields())?;
  1569. ::std::result::Result::Ok(())
  1570. }
  1571. fn get_cached_size(&self) -> u32 {
  1572. self.cached_size.get()
  1573. }
  1574. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1575. &self.unknown_fields
  1576. }
  1577. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1578. &mut self.unknown_fields
  1579. }
  1580. fn as_any(&self) -> &dyn (::std::any::Any) {
  1581. self as &dyn (::std::any::Any)
  1582. }
  1583. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1584. self as &mut dyn (::std::any::Any)
  1585. }
  1586. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1587. self
  1588. }
  1589. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1590. Self::descriptor_static()
  1591. }
  1592. fn new() -> FieldTypeOptionContext {
  1593. FieldTypeOptionContext::new()
  1594. }
  1595. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1596. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1597. descriptor.get(|| {
  1598. let mut fields = ::std::vec::Vec::new();
  1599. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1600. "grid_id",
  1601. |m: &FieldTypeOptionContext| { &m.grid_id },
  1602. |m: &mut FieldTypeOptionContext| { &mut m.grid_id },
  1603. ));
  1604. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  1605. "grid_field",
  1606. |m: &FieldTypeOptionContext| { &m.grid_field },
  1607. |m: &mut FieldTypeOptionContext| { &mut m.grid_field },
  1608. ));
  1609. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1610. "type_option_data",
  1611. |m: &FieldTypeOptionContext| { &m.type_option_data },
  1612. |m: &mut FieldTypeOptionContext| { &mut m.type_option_data },
  1613. ));
  1614. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldTypeOptionContext>(
  1615. "FieldTypeOptionContext",
  1616. fields,
  1617. file_descriptor_proto()
  1618. )
  1619. })
  1620. }
  1621. fn default_instance() -> &'static FieldTypeOptionContext {
  1622. static instance: ::protobuf::rt::LazyV2<FieldTypeOptionContext> = ::protobuf::rt::LazyV2::INIT;
  1623. instance.get(FieldTypeOptionContext::new)
  1624. }
  1625. }
  1626. impl ::protobuf::Clear for FieldTypeOptionContext {
  1627. fn clear(&mut self) {
  1628. self.grid_id.clear();
  1629. self.grid_field.clear();
  1630. self.type_option_data.clear();
  1631. self.unknown_fields.clear();
  1632. }
  1633. }
  1634. impl ::std::fmt::Debug for FieldTypeOptionContext {
  1635. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1636. ::protobuf::text_format::fmt(self, f)
  1637. }
  1638. }
  1639. impl ::protobuf::reflect::ProtobufValue for FieldTypeOptionContext {
  1640. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1641. ::protobuf::reflect::ReflectValueRef::Message(self)
  1642. }
  1643. }
  1644. #[derive(PartialEq,Clone,Default)]
  1645. pub struct FieldTypeOptionData {
  1646. // message fields
  1647. pub grid_id: ::std::string::String,
  1648. pub field: ::protobuf::SingularPtrField<Field>,
  1649. pub type_option_data: ::std::vec::Vec<u8>,
  1650. // special fields
  1651. pub unknown_fields: ::protobuf::UnknownFields,
  1652. pub cached_size: ::protobuf::CachedSize,
  1653. }
  1654. impl<'a> ::std::default::Default for &'a FieldTypeOptionData {
  1655. fn default() -> &'a FieldTypeOptionData {
  1656. <FieldTypeOptionData as ::protobuf::Message>::default_instance()
  1657. }
  1658. }
  1659. impl FieldTypeOptionData {
  1660. pub fn new() -> FieldTypeOptionData {
  1661. ::std::default::Default::default()
  1662. }
  1663. // string grid_id = 1;
  1664. pub fn get_grid_id(&self) -> &str {
  1665. &self.grid_id
  1666. }
  1667. pub fn clear_grid_id(&mut self) {
  1668. self.grid_id.clear();
  1669. }
  1670. // Param is passed by value, moved
  1671. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  1672. self.grid_id = v;
  1673. }
  1674. // Mutable pointer to the field.
  1675. // If field is not initialized, it is initialized with default value first.
  1676. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  1677. &mut self.grid_id
  1678. }
  1679. // Take field
  1680. pub fn take_grid_id(&mut self) -> ::std::string::String {
  1681. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  1682. }
  1683. // .Field field = 2;
  1684. pub fn get_field(&self) -> &Field {
  1685. self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
  1686. }
  1687. pub fn clear_field(&mut self) {
  1688. self.field.clear();
  1689. }
  1690. pub fn has_field(&self) -> bool {
  1691. self.field.is_some()
  1692. }
  1693. // Param is passed by value, moved
  1694. pub fn set_field(&mut self, v: Field) {
  1695. self.field = ::protobuf::SingularPtrField::some(v);
  1696. }
  1697. // Mutable pointer to the field.
  1698. // If field is not initialized, it is initialized with default value first.
  1699. pub fn mut_field(&mut self) -> &mut Field {
  1700. if self.field.is_none() {
  1701. self.field.set_default();
  1702. }
  1703. self.field.as_mut().unwrap()
  1704. }
  1705. // Take field
  1706. pub fn take_field(&mut self) -> Field {
  1707. self.field.take().unwrap_or_else(|| Field::new())
  1708. }
  1709. // bytes type_option_data = 3;
  1710. pub fn get_type_option_data(&self) -> &[u8] {
  1711. &self.type_option_data
  1712. }
  1713. pub fn clear_type_option_data(&mut self) {
  1714. self.type_option_data.clear();
  1715. }
  1716. // Param is passed by value, moved
  1717. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  1718. self.type_option_data = v;
  1719. }
  1720. // Mutable pointer to the field.
  1721. // If field is not initialized, it is initialized with default value first.
  1722. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  1723. &mut self.type_option_data
  1724. }
  1725. // Take field
  1726. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  1727. ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
  1728. }
  1729. }
  1730. impl ::protobuf::Message for FieldTypeOptionData {
  1731. fn is_initialized(&self) -> bool {
  1732. for v in &self.field {
  1733. if !v.is_initialized() {
  1734. return false;
  1735. }
  1736. };
  1737. true
  1738. }
  1739. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1740. while !is.eof()? {
  1741. let (field_number, wire_type) = is.read_tag_unpack()?;
  1742. match field_number {
  1743. 1 => {
  1744. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  1745. },
  1746. 2 => {
  1747. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field)?;
  1748. },
  1749. 3 => {
  1750. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
  1751. },
  1752. _ => {
  1753. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1754. },
  1755. };
  1756. }
  1757. ::std::result::Result::Ok(())
  1758. }
  1759. // Compute sizes of nested messages
  1760. #[allow(unused_variables)]
  1761. fn compute_size(&self) -> u32 {
  1762. let mut my_size = 0;
  1763. if !self.grid_id.is_empty() {
  1764. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  1765. }
  1766. if let Some(ref v) = self.field.as_ref() {
  1767. let len = v.compute_size();
  1768. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1769. }
  1770. if !self.type_option_data.is_empty() {
  1771. my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
  1772. }
  1773. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1774. self.cached_size.set(my_size);
  1775. my_size
  1776. }
  1777. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1778. if !self.grid_id.is_empty() {
  1779. os.write_string(1, &self.grid_id)?;
  1780. }
  1781. if let Some(ref v) = self.field.as_ref() {
  1782. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1783. os.write_raw_varint32(v.get_cached_size())?;
  1784. v.write_to_with_cached_sizes(os)?;
  1785. }
  1786. if !self.type_option_data.is_empty() {
  1787. os.write_bytes(3, &self.type_option_data)?;
  1788. }
  1789. os.write_unknown_fields(self.get_unknown_fields())?;
  1790. ::std::result::Result::Ok(())
  1791. }
  1792. fn get_cached_size(&self) -> u32 {
  1793. self.cached_size.get()
  1794. }
  1795. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1796. &self.unknown_fields
  1797. }
  1798. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1799. &mut self.unknown_fields
  1800. }
  1801. fn as_any(&self) -> &dyn (::std::any::Any) {
  1802. self as &dyn (::std::any::Any)
  1803. }
  1804. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1805. self as &mut dyn (::std::any::Any)
  1806. }
  1807. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1808. self
  1809. }
  1810. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1811. Self::descriptor_static()
  1812. }
  1813. fn new() -> FieldTypeOptionData {
  1814. FieldTypeOptionData::new()
  1815. }
  1816. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1817. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1818. descriptor.get(|| {
  1819. let mut fields = ::std::vec::Vec::new();
  1820. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1821. "grid_id",
  1822. |m: &FieldTypeOptionData| { &m.grid_id },
  1823. |m: &mut FieldTypeOptionData| { &mut m.grid_id },
  1824. ));
  1825. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  1826. "field",
  1827. |m: &FieldTypeOptionData| { &m.field },
  1828. |m: &mut FieldTypeOptionData| { &mut m.field },
  1829. ));
  1830. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  1831. "type_option_data",
  1832. |m: &FieldTypeOptionData| { &m.type_option_data },
  1833. |m: &mut FieldTypeOptionData| { &mut m.type_option_data },
  1834. ));
  1835. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldTypeOptionData>(
  1836. "FieldTypeOptionData",
  1837. fields,
  1838. file_descriptor_proto()
  1839. )
  1840. })
  1841. }
  1842. fn default_instance() -> &'static FieldTypeOptionData {
  1843. static instance: ::protobuf::rt::LazyV2<FieldTypeOptionData> = ::protobuf::rt::LazyV2::INIT;
  1844. instance.get(FieldTypeOptionData::new)
  1845. }
  1846. }
  1847. impl ::protobuf::Clear for FieldTypeOptionData {
  1848. fn clear(&mut self) {
  1849. self.grid_id.clear();
  1850. self.field.clear();
  1851. self.type_option_data.clear();
  1852. self.unknown_fields.clear();
  1853. }
  1854. }
  1855. impl ::std::fmt::Debug for FieldTypeOptionData {
  1856. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1857. ::protobuf::text_format::fmt(self, f)
  1858. }
  1859. }
  1860. impl ::protobuf::reflect::ProtobufValue for FieldTypeOptionData {
  1861. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  1862. ::protobuf::reflect::ReflectValueRef::Message(self)
  1863. }
  1864. }
  1865. #[derive(PartialEq,Clone,Default)]
  1866. pub struct RepeatedField {
  1867. // message fields
  1868. pub items: ::protobuf::RepeatedField<Field>,
  1869. // special fields
  1870. pub unknown_fields: ::protobuf::UnknownFields,
  1871. pub cached_size: ::protobuf::CachedSize,
  1872. }
  1873. impl<'a> ::std::default::Default for &'a RepeatedField {
  1874. fn default() -> &'a RepeatedField {
  1875. <RepeatedField as ::protobuf::Message>::default_instance()
  1876. }
  1877. }
  1878. impl RepeatedField {
  1879. pub fn new() -> RepeatedField {
  1880. ::std::default::Default::default()
  1881. }
  1882. // repeated .Field items = 1;
  1883. pub fn get_items(&self) -> &[Field] {
  1884. &self.items
  1885. }
  1886. pub fn clear_items(&mut self) {
  1887. self.items.clear();
  1888. }
  1889. // Param is passed by value, moved
  1890. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Field>) {
  1891. self.items = v;
  1892. }
  1893. // Mutable pointer to the field.
  1894. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Field> {
  1895. &mut self.items
  1896. }
  1897. // Take field
  1898. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Field> {
  1899. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  1900. }
  1901. }
  1902. impl ::protobuf::Message for RepeatedField {
  1903. fn is_initialized(&self) -> bool {
  1904. for v in &self.items {
  1905. if !v.is_initialized() {
  1906. return false;
  1907. }
  1908. };
  1909. true
  1910. }
  1911. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1912. while !is.eof()? {
  1913. let (field_number, wire_type) = is.read_tag_unpack()?;
  1914. match field_number {
  1915. 1 => {
  1916. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  1917. },
  1918. _ => {
  1919. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1920. },
  1921. };
  1922. }
  1923. ::std::result::Result::Ok(())
  1924. }
  1925. // Compute sizes of nested messages
  1926. #[allow(unused_variables)]
  1927. fn compute_size(&self) -> u32 {
  1928. let mut my_size = 0;
  1929. for value in &self.items {
  1930. let len = value.compute_size();
  1931. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1932. };
  1933. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1934. self.cached_size.set(my_size);
  1935. my_size
  1936. }
  1937. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1938. for v in &self.items {
  1939. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1940. os.write_raw_varint32(v.get_cached_size())?;
  1941. v.write_to_with_cached_sizes(os)?;
  1942. };
  1943. os.write_unknown_fields(self.get_unknown_fields())?;
  1944. ::std::result::Result::Ok(())
  1945. }
  1946. fn get_cached_size(&self) -> u32 {
  1947. self.cached_size.get()
  1948. }
  1949. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1950. &self.unknown_fields
  1951. }
  1952. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1953. &mut self.unknown_fields
  1954. }
  1955. fn as_any(&self) -> &dyn (::std::any::Any) {
  1956. self as &dyn (::std::any::Any)
  1957. }
  1958. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1959. self as &mut dyn (::std::any::Any)
  1960. }
  1961. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1962. self
  1963. }
  1964. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1965. Self::descriptor_static()
  1966. }
  1967. fn new() -> RepeatedField {
  1968. RepeatedField::new()
  1969. }
  1970. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1971. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  1972. descriptor.get(|| {
  1973. let mut fields = ::std::vec::Vec::new();
  1974. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  1975. "items",
  1976. |m: &RepeatedField| { &m.items },
  1977. |m: &mut RepeatedField| { &mut m.items },
  1978. ));
  1979. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedField>(
  1980. "RepeatedField",
  1981. fields,
  1982. file_descriptor_proto()
  1983. )
  1984. })
  1985. }
  1986. fn default_instance() -> &'static RepeatedField {
  1987. static instance: ::protobuf::rt::LazyV2<RepeatedField> = ::protobuf::rt::LazyV2::INIT;
  1988. instance.get(RepeatedField::new)
  1989. }
  1990. }
  1991. impl ::protobuf::Clear for RepeatedField {
  1992. fn clear(&mut self) {
  1993. self.items.clear();
  1994. self.unknown_fields.clear();
  1995. }
  1996. }
  1997. impl ::std::fmt::Debug for RepeatedField {
  1998. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1999. ::protobuf::text_format::fmt(self, f)
  2000. }
  2001. }
  2002. impl ::protobuf::reflect::ProtobufValue for RepeatedField {
  2003. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2004. ::protobuf::reflect::ReflectValueRef::Message(self)
  2005. }
  2006. }
  2007. #[derive(PartialEq,Clone,Default)]
  2008. pub struct RepeatedFieldOrder {
  2009. // message fields
  2010. pub items: ::protobuf::RepeatedField<FieldOrder>,
  2011. // special fields
  2012. pub unknown_fields: ::protobuf::UnknownFields,
  2013. pub cached_size: ::protobuf::CachedSize,
  2014. }
  2015. impl<'a> ::std::default::Default for &'a RepeatedFieldOrder {
  2016. fn default() -> &'a RepeatedFieldOrder {
  2017. <RepeatedFieldOrder as ::protobuf::Message>::default_instance()
  2018. }
  2019. }
  2020. impl RepeatedFieldOrder {
  2021. pub fn new() -> RepeatedFieldOrder {
  2022. ::std::default::Default::default()
  2023. }
  2024. // repeated .FieldOrder items = 1;
  2025. pub fn get_items(&self) -> &[FieldOrder] {
  2026. &self.items
  2027. }
  2028. pub fn clear_items(&mut self) {
  2029. self.items.clear();
  2030. }
  2031. // Param is passed by value, moved
  2032. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<FieldOrder>) {
  2033. self.items = v;
  2034. }
  2035. // Mutable pointer to the field.
  2036. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<FieldOrder> {
  2037. &mut self.items
  2038. }
  2039. // Take field
  2040. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<FieldOrder> {
  2041. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  2042. }
  2043. }
  2044. impl ::protobuf::Message for RepeatedFieldOrder {
  2045. fn is_initialized(&self) -> bool {
  2046. for v in &self.items {
  2047. if !v.is_initialized() {
  2048. return false;
  2049. }
  2050. };
  2051. true
  2052. }
  2053. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2054. while !is.eof()? {
  2055. let (field_number, wire_type) = is.read_tag_unpack()?;
  2056. match field_number {
  2057. 1 => {
  2058. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  2059. },
  2060. _ => {
  2061. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2062. },
  2063. };
  2064. }
  2065. ::std::result::Result::Ok(())
  2066. }
  2067. // Compute sizes of nested messages
  2068. #[allow(unused_variables)]
  2069. fn compute_size(&self) -> u32 {
  2070. let mut my_size = 0;
  2071. for value in &self.items {
  2072. let len = value.compute_size();
  2073. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2074. };
  2075. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2076. self.cached_size.set(my_size);
  2077. my_size
  2078. }
  2079. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2080. for v in &self.items {
  2081. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2082. os.write_raw_varint32(v.get_cached_size())?;
  2083. v.write_to_with_cached_sizes(os)?;
  2084. };
  2085. os.write_unknown_fields(self.get_unknown_fields())?;
  2086. ::std::result::Result::Ok(())
  2087. }
  2088. fn get_cached_size(&self) -> u32 {
  2089. self.cached_size.get()
  2090. }
  2091. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2092. &self.unknown_fields
  2093. }
  2094. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2095. &mut self.unknown_fields
  2096. }
  2097. fn as_any(&self) -> &dyn (::std::any::Any) {
  2098. self as &dyn (::std::any::Any)
  2099. }
  2100. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2101. self as &mut dyn (::std::any::Any)
  2102. }
  2103. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2104. self
  2105. }
  2106. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2107. Self::descriptor_static()
  2108. }
  2109. fn new() -> RepeatedFieldOrder {
  2110. RepeatedFieldOrder::new()
  2111. }
  2112. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2113. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2114. descriptor.get(|| {
  2115. let mut fields = ::std::vec::Vec::new();
  2116. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<FieldOrder>>(
  2117. "items",
  2118. |m: &RepeatedFieldOrder| { &m.items },
  2119. |m: &mut RepeatedFieldOrder| { &mut m.items },
  2120. ));
  2121. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedFieldOrder>(
  2122. "RepeatedFieldOrder",
  2123. fields,
  2124. file_descriptor_proto()
  2125. )
  2126. })
  2127. }
  2128. fn default_instance() -> &'static RepeatedFieldOrder {
  2129. static instance: ::protobuf::rt::LazyV2<RepeatedFieldOrder> = ::protobuf::rt::LazyV2::INIT;
  2130. instance.get(RepeatedFieldOrder::new)
  2131. }
  2132. }
  2133. impl ::protobuf::Clear for RepeatedFieldOrder {
  2134. fn clear(&mut self) {
  2135. self.items.clear();
  2136. self.unknown_fields.clear();
  2137. }
  2138. }
  2139. impl ::std::fmt::Debug for RepeatedFieldOrder {
  2140. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2141. ::protobuf::text_format::fmt(self, f)
  2142. }
  2143. }
  2144. impl ::protobuf::reflect::ProtobufValue for RepeatedFieldOrder {
  2145. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2146. ::protobuf::reflect::ReflectValueRef::Message(self)
  2147. }
  2148. }
  2149. #[derive(PartialEq,Clone,Default)]
  2150. pub struct InsertFieldPayload {
  2151. // message fields
  2152. pub grid_id: ::std::string::String,
  2153. pub field: ::protobuf::SingularPtrField<Field>,
  2154. pub type_option_data: ::std::vec::Vec<u8>,
  2155. // message oneof groups
  2156. pub one_of_start_field_id: ::std::option::Option<InsertFieldPayload_oneof_one_of_start_field_id>,
  2157. // special fields
  2158. pub unknown_fields: ::protobuf::UnknownFields,
  2159. pub cached_size: ::protobuf::CachedSize,
  2160. }
  2161. impl<'a> ::std::default::Default for &'a InsertFieldPayload {
  2162. fn default() -> &'a InsertFieldPayload {
  2163. <InsertFieldPayload as ::protobuf::Message>::default_instance()
  2164. }
  2165. }
  2166. #[derive(Clone,PartialEq,Debug)]
  2167. pub enum InsertFieldPayload_oneof_one_of_start_field_id {
  2168. start_field_id(::std::string::String),
  2169. }
  2170. impl InsertFieldPayload {
  2171. pub fn new() -> InsertFieldPayload {
  2172. ::std::default::Default::default()
  2173. }
  2174. // string grid_id = 1;
  2175. pub fn get_grid_id(&self) -> &str {
  2176. &self.grid_id
  2177. }
  2178. pub fn clear_grid_id(&mut self) {
  2179. self.grid_id.clear();
  2180. }
  2181. // Param is passed by value, moved
  2182. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2183. self.grid_id = v;
  2184. }
  2185. // Mutable pointer to the field.
  2186. // If field is not initialized, it is initialized with default value first.
  2187. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2188. &mut self.grid_id
  2189. }
  2190. // Take field
  2191. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2192. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2193. }
  2194. // .Field field = 2;
  2195. pub fn get_field(&self) -> &Field {
  2196. self.field.as_ref().unwrap_or_else(|| <Field as ::protobuf::Message>::default_instance())
  2197. }
  2198. pub fn clear_field(&mut self) {
  2199. self.field.clear();
  2200. }
  2201. pub fn has_field(&self) -> bool {
  2202. self.field.is_some()
  2203. }
  2204. // Param is passed by value, moved
  2205. pub fn set_field(&mut self, v: Field) {
  2206. self.field = ::protobuf::SingularPtrField::some(v);
  2207. }
  2208. // Mutable pointer to the field.
  2209. // If field is not initialized, it is initialized with default value first.
  2210. pub fn mut_field(&mut self) -> &mut Field {
  2211. if self.field.is_none() {
  2212. self.field.set_default();
  2213. }
  2214. self.field.as_mut().unwrap()
  2215. }
  2216. // Take field
  2217. pub fn take_field(&mut self) -> Field {
  2218. self.field.take().unwrap_or_else(|| Field::new())
  2219. }
  2220. // bytes type_option_data = 3;
  2221. pub fn get_type_option_data(&self) -> &[u8] {
  2222. &self.type_option_data
  2223. }
  2224. pub fn clear_type_option_data(&mut self) {
  2225. self.type_option_data.clear();
  2226. }
  2227. // Param is passed by value, moved
  2228. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  2229. self.type_option_data = v;
  2230. }
  2231. // Mutable pointer to the field.
  2232. // If field is not initialized, it is initialized with default value first.
  2233. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  2234. &mut self.type_option_data
  2235. }
  2236. // Take field
  2237. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  2238. ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
  2239. }
  2240. // string start_field_id = 4;
  2241. pub fn get_start_field_id(&self) -> &str {
  2242. match self.one_of_start_field_id {
  2243. ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v)) => v,
  2244. _ => "",
  2245. }
  2246. }
  2247. pub fn clear_start_field_id(&mut self) {
  2248. self.one_of_start_field_id = ::std::option::Option::None;
  2249. }
  2250. pub fn has_start_field_id(&self) -> bool {
  2251. match self.one_of_start_field_id {
  2252. ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(..)) => true,
  2253. _ => false,
  2254. }
  2255. }
  2256. // Param is passed by value, moved
  2257. pub fn set_start_field_id(&mut self, v: ::std::string::String) {
  2258. self.one_of_start_field_id = ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(v))
  2259. }
  2260. // Mutable pointer to the field.
  2261. pub fn mut_start_field_id(&mut self) -> &mut ::std::string::String {
  2262. if let ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(_)) = self.one_of_start_field_id {
  2263. } else {
  2264. self.one_of_start_field_id = ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(::std::string::String::new()));
  2265. }
  2266. match self.one_of_start_field_id {
  2267. ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref mut v)) => v,
  2268. _ => panic!(),
  2269. }
  2270. }
  2271. // Take field
  2272. pub fn take_start_field_id(&mut self) -> ::std::string::String {
  2273. if self.has_start_field_id() {
  2274. match self.one_of_start_field_id.take() {
  2275. ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(v)) => v,
  2276. _ => panic!(),
  2277. }
  2278. } else {
  2279. ::std::string::String::new()
  2280. }
  2281. }
  2282. }
  2283. impl ::protobuf::Message for InsertFieldPayload {
  2284. fn is_initialized(&self) -> bool {
  2285. for v in &self.field {
  2286. if !v.is_initialized() {
  2287. return false;
  2288. }
  2289. };
  2290. true
  2291. }
  2292. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2293. while !is.eof()? {
  2294. let (field_number, wire_type) = is.read_tag_unpack()?;
  2295. match field_number {
  2296. 1 => {
  2297. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  2298. },
  2299. 2 => {
  2300. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field)?;
  2301. },
  2302. 3 => {
  2303. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
  2304. },
  2305. 4 => {
  2306. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  2307. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  2308. }
  2309. self.one_of_start_field_id = ::std::option::Option::Some(InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(is.read_string()?));
  2310. },
  2311. _ => {
  2312. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2313. },
  2314. };
  2315. }
  2316. ::std::result::Result::Ok(())
  2317. }
  2318. // Compute sizes of nested messages
  2319. #[allow(unused_variables)]
  2320. fn compute_size(&self) -> u32 {
  2321. let mut my_size = 0;
  2322. if !self.grid_id.is_empty() {
  2323. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  2324. }
  2325. if let Some(ref v) = self.field.as_ref() {
  2326. let len = v.compute_size();
  2327. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2328. }
  2329. if !self.type_option_data.is_empty() {
  2330. my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
  2331. }
  2332. if let ::std::option::Option::Some(ref v) = self.one_of_start_field_id {
  2333. match v {
  2334. &InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v) => {
  2335. my_size += ::protobuf::rt::string_size(4, &v);
  2336. },
  2337. };
  2338. }
  2339. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2340. self.cached_size.set(my_size);
  2341. my_size
  2342. }
  2343. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2344. if !self.grid_id.is_empty() {
  2345. os.write_string(1, &self.grid_id)?;
  2346. }
  2347. if let Some(ref v) = self.field.as_ref() {
  2348. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2349. os.write_raw_varint32(v.get_cached_size())?;
  2350. v.write_to_with_cached_sizes(os)?;
  2351. }
  2352. if !self.type_option_data.is_empty() {
  2353. os.write_bytes(3, &self.type_option_data)?;
  2354. }
  2355. if let ::std::option::Option::Some(ref v) = self.one_of_start_field_id {
  2356. match v {
  2357. &InsertFieldPayload_oneof_one_of_start_field_id::start_field_id(ref v) => {
  2358. os.write_string(4, v)?;
  2359. },
  2360. };
  2361. }
  2362. os.write_unknown_fields(self.get_unknown_fields())?;
  2363. ::std::result::Result::Ok(())
  2364. }
  2365. fn get_cached_size(&self) -> u32 {
  2366. self.cached_size.get()
  2367. }
  2368. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2369. &self.unknown_fields
  2370. }
  2371. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2372. &mut self.unknown_fields
  2373. }
  2374. fn as_any(&self) -> &dyn (::std::any::Any) {
  2375. self as &dyn (::std::any::Any)
  2376. }
  2377. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2378. self as &mut dyn (::std::any::Any)
  2379. }
  2380. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2381. self
  2382. }
  2383. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2384. Self::descriptor_static()
  2385. }
  2386. fn new() -> InsertFieldPayload {
  2387. InsertFieldPayload::new()
  2388. }
  2389. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2390. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2391. descriptor.get(|| {
  2392. let mut fields = ::std::vec::Vec::new();
  2393. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2394. "grid_id",
  2395. |m: &InsertFieldPayload| { &m.grid_id },
  2396. |m: &mut InsertFieldPayload| { &mut m.grid_id },
  2397. ));
  2398. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Field>>(
  2399. "field",
  2400. |m: &InsertFieldPayload| { &m.field },
  2401. |m: &mut InsertFieldPayload| { &mut m.field },
  2402. ));
  2403. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2404. "type_option_data",
  2405. |m: &InsertFieldPayload| { &m.type_option_data },
  2406. |m: &mut InsertFieldPayload| { &mut m.type_option_data },
  2407. ));
  2408. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  2409. "start_field_id",
  2410. InsertFieldPayload::has_start_field_id,
  2411. InsertFieldPayload::get_start_field_id,
  2412. ));
  2413. ::protobuf::reflect::MessageDescriptor::new_pb_name::<InsertFieldPayload>(
  2414. "InsertFieldPayload",
  2415. fields,
  2416. file_descriptor_proto()
  2417. )
  2418. })
  2419. }
  2420. fn default_instance() -> &'static InsertFieldPayload {
  2421. static instance: ::protobuf::rt::LazyV2<InsertFieldPayload> = ::protobuf::rt::LazyV2::INIT;
  2422. instance.get(InsertFieldPayload::new)
  2423. }
  2424. }
  2425. impl ::protobuf::Clear for InsertFieldPayload {
  2426. fn clear(&mut self) {
  2427. self.grid_id.clear();
  2428. self.field.clear();
  2429. self.type_option_data.clear();
  2430. self.one_of_start_field_id = ::std::option::Option::None;
  2431. self.unknown_fields.clear();
  2432. }
  2433. }
  2434. impl ::std::fmt::Debug for InsertFieldPayload {
  2435. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2436. ::protobuf::text_format::fmt(self, f)
  2437. }
  2438. }
  2439. impl ::protobuf::reflect::ProtobufValue for InsertFieldPayload {
  2440. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2441. ::protobuf::reflect::ReflectValueRef::Message(self)
  2442. }
  2443. }
  2444. #[derive(PartialEq,Clone,Default)]
  2445. pub struct UpdateFieldTypeOptionPayload {
  2446. // message fields
  2447. pub grid_id: ::std::string::String,
  2448. pub field_id: ::std::string::String,
  2449. pub type_option_data: ::std::vec::Vec<u8>,
  2450. // special fields
  2451. pub unknown_fields: ::protobuf::UnknownFields,
  2452. pub cached_size: ::protobuf::CachedSize,
  2453. }
  2454. impl<'a> ::std::default::Default for &'a UpdateFieldTypeOptionPayload {
  2455. fn default() -> &'a UpdateFieldTypeOptionPayload {
  2456. <UpdateFieldTypeOptionPayload as ::protobuf::Message>::default_instance()
  2457. }
  2458. }
  2459. impl UpdateFieldTypeOptionPayload {
  2460. pub fn new() -> UpdateFieldTypeOptionPayload {
  2461. ::std::default::Default::default()
  2462. }
  2463. // string grid_id = 1;
  2464. pub fn get_grid_id(&self) -> &str {
  2465. &self.grid_id
  2466. }
  2467. pub fn clear_grid_id(&mut self) {
  2468. self.grid_id.clear();
  2469. }
  2470. // Param is passed by value, moved
  2471. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2472. self.grid_id = v;
  2473. }
  2474. // Mutable pointer to the field.
  2475. // If field is not initialized, it is initialized with default value first.
  2476. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2477. &mut self.grid_id
  2478. }
  2479. // Take field
  2480. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2481. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2482. }
  2483. // string field_id = 2;
  2484. pub fn get_field_id(&self) -> &str {
  2485. &self.field_id
  2486. }
  2487. pub fn clear_field_id(&mut self) {
  2488. self.field_id.clear();
  2489. }
  2490. // Param is passed by value, moved
  2491. pub fn set_field_id(&mut self, v: ::std::string::String) {
  2492. self.field_id = v;
  2493. }
  2494. // Mutable pointer to the field.
  2495. // If field is not initialized, it is initialized with default value first.
  2496. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  2497. &mut self.field_id
  2498. }
  2499. // Take field
  2500. pub fn take_field_id(&mut self) -> ::std::string::String {
  2501. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  2502. }
  2503. // bytes type_option_data = 3;
  2504. pub fn get_type_option_data(&self) -> &[u8] {
  2505. &self.type_option_data
  2506. }
  2507. pub fn clear_type_option_data(&mut self) {
  2508. self.type_option_data.clear();
  2509. }
  2510. // Param is passed by value, moved
  2511. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  2512. self.type_option_data = v;
  2513. }
  2514. // Mutable pointer to the field.
  2515. // If field is not initialized, it is initialized with default value first.
  2516. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  2517. &mut self.type_option_data
  2518. }
  2519. // Take field
  2520. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  2521. ::std::mem::replace(&mut self.type_option_data, ::std::vec::Vec::new())
  2522. }
  2523. }
  2524. impl ::protobuf::Message for UpdateFieldTypeOptionPayload {
  2525. fn is_initialized(&self) -> bool {
  2526. true
  2527. }
  2528. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2529. while !is.eof()? {
  2530. let (field_number, wire_type) = is.read_tag_unpack()?;
  2531. match field_number {
  2532. 1 => {
  2533. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  2534. },
  2535. 2 => {
  2536. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  2537. },
  2538. 3 => {
  2539. ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.type_option_data)?;
  2540. },
  2541. _ => {
  2542. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2543. },
  2544. };
  2545. }
  2546. ::std::result::Result::Ok(())
  2547. }
  2548. // Compute sizes of nested messages
  2549. #[allow(unused_variables)]
  2550. fn compute_size(&self) -> u32 {
  2551. let mut my_size = 0;
  2552. if !self.grid_id.is_empty() {
  2553. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  2554. }
  2555. if !self.field_id.is_empty() {
  2556. my_size += ::protobuf::rt::string_size(2, &self.field_id);
  2557. }
  2558. if !self.type_option_data.is_empty() {
  2559. my_size += ::protobuf::rt::bytes_size(3, &self.type_option_data);
  2560. }
  2561. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2562. self.cached_size.set(my_size);
  2563. my_size
  2564. }
  2565. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2566. if !self.grid_id.is_empty() {
  2567. os.write_string(1, &self.grid_id)?;
  2568. }
  2569. if !self.field_id.is_empty() {
  2570. os.write_string(2, &self.field_id)?;
  2571. }
  2572. if !self.type_option_data.is_empty() {
  2573. os.write_bytes(3, &self.type_option_data)?;
  2574. }
  2575. os.write_unknown_fields(self.get_unknown_fields())?;
  2576. ::std::result::Result::Ok(())
  2577. }
  2578. fn get_cached_size(&self) -> u32 {
  2579. self.cached_size.get()
  2580. }
  2581. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2582. &self.unknown_fields
  2583. }
  2584. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2585. &mut self.unknown_fields
  2586. }
  2587. fn as_any(&self) -> &dyn (::std::any::Any) {
  2588. self as &dyn (::std::any::Any)
  2589. }
  2590. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2591. self as &mut dyn (::std::any::Any)
  2592. }
  2593. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2594. self
  2595. }
  2596. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2597. Self::descriptor_static()
  2598. }
  2599. fn new() -> UpdateFieldTypeOptionPayload {
  2600. UpdateFieldTypeOptionPayload::new()
  2601. }
  2602. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2603. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2604. descriptor.get(|| {
  2605. let mut fields = ::std::vec::Vec::new();
  2606. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2607. "grid_id",
  2608. |m: &UpdateFieldTypeOptionPayload| { &m.grid_id },
  2609. |m: &mut UpdateFieldTypeOptionPayload| { &mut m.grid_id },
  2610. ));
  2611. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2612. "field_id",
  2613. |m: &UpdateFieldTypeOptionPayload| { &m.field_id },
  2614. |m: &mut UpdateFieldTypeOptionPayload| { &mut m.field_id },
  2615. ));
  2616. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  2617. "type_option_data",
  2618. |m: &UpdateFieldTypeOptionPayload| { &m.type_option_data },
  2619. |m: &mut UpdateFieldTypeOptionPayload| { &mut m.type_option_data },
  2620. ));
  2621. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateFieldTypeOptionPayload>(
  2622. "UpdateFieldTypeOptionPayload",
  2623. fields,
  2624. file_descriptor_proto()
  2625. )
  2626. })
  2627. }
  2628. fn default_instance() -> &'static UpdateFieldTypeOptionPayload {
  2629. static instance: ::protobuf::rt::LazyV2<UpdateFieldTypeOptionPayload> = ::protobuf::rt::LazyV2::INIT;
  2630. instance.get(UpdateFieldTypeOptionPayload::new)
  2631. }
  2632. }
  2633. impl ::protobuf::Clear for UpdateFieldTypeOptionPayload {
  2634. fn clear(&mut self) {
  2635. self.grid_id.clear();
  2636. self.field_id.clear();
  2637. self.type_option_data.clear();
  2638. self.unknown_fields.clear();
  2639. }
  2640. }
  2641. impl ::std::fmt::Debug for UpdateFieldTypeOptionPayload {
  2642. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2643. ::protobuf::text_format::fmt(self, f)
  2644. }
  2645. }
  2646. impl ::protobuf::reflect::ProtobufValue for UpdateFieldTypeOptionPayload {
  2647. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2648. ::protobuf::reflect::ReflectValueRef::Message(self)
  2649. }
  2650. }
  2651. #[derive(PartialEq,Clone,Default)]
  2652. pub struct QueryFieldPayload {
  2653. // message fields
  2654. pub grid_id: ::std::string::String,
  2655. pub field_orders: ::protobuf::SingularPtrField<RepeatedFieldOrder>,
  2656. // special fields
  2657. pub unknown_fields: ::protobuf::UnknownFields,
  2658. pub cached_size: ::protobuf::CachedSize,
  2659. }
  2660. impl<'a> ::std::default::Default for &'a QueryFieldPayload {
  2661. fn default() -> &'a QueryFieldPayload {
  2662. <QueryFieldPayload as ::protobuf::Message>::default_instance()
  2663. }
  2664. }
  2665. impl QueryFieldPayload {
  2666. pub fn new() -> QueryFieldPayload {
  2667. ::std::default::Default::default()
  2668. }
  2669. // string grid_id = 1;
  2670. pub fn get_grid_id(&self) -> &str {
  2671. &self.grid_id
  2672. }
  2673. pub fn clear_grid_id(&mut self) {
  2674. self.grid_id.clear();
  2675. }
  2676. // Param is passed by value, moved
  2677. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2678. self.grid_id = v;
  2679. }
  2680. // Mutable pointer to the field.
  2681. // If field is not initialized, it is initialized with default value first.
  2682. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2683. &mut self.grid_id
  2684. }
  2685. // Take field
  2686. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2687. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2688. }
  2689. // .RepeatedFieldOrder field_orders = 2;
  2690. pub fn get_field_orders(&self) -> &RepeatedFieldOrder {
  2691. self.field_orders.as_ref().unwrap_or_else(|| <RepeatedFieldOrder as ::protobuf::Message>::default_instance())
  2692. }
  2693. pub fn clear_field_orders(&mut self) {
  2694. self.field_orders.clear();
  2695. }
  2696. pub fn has_field_orders(&self) -> bool {
  2697. self.field_orders.is_some()
  2698. }
  2699. // Param is passed by value, moved
  2700. pub fn set_field_orders(&mut self, v: RepeatedFieldOrder) {
  2701. self.field_orders = ::protobuf::SingularPtrField::some(v);
  2702. }
  2703. // Mutable pointer to the field.
  2704. // If field is not initialized, it is initialized with default value first.
  2705. pub fn mut_field_orders(&mut self) -> &mut RepeatedFieldOrder {
  2706. if self.field_orders.is_none() {
  2707. self.field_orders.set_default();
  2708. }
  2709. self.field_orders.as_mut().unwrap()
  2710. }
  2711. // Take field
  2712. pub fn take_field_orders(&mut self) -> RepeatedFieldOrder {
  2713. self.field_orders.take().unwrap_or_else(|| RepeatedFieldOrder::new())
  2714. }
  2715. }
  2716. impl ::protobuf::Message for QueryFieldPayload {
  2717. fn is_initialized(&self) -> bool {
  2718. for v in &self.field_orders {
  2719. if !v.is_initialized() {
  2720. return false;
  2721. }
  2722. };
  2723. true
  2724. }
  2725. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2726. while !is.eof()? {
  2727. let (field_number, wire_type) = is.read_tag_unpack()?;
  2728. match field_number {
  2729. 1 => {
  2730. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  2731. },
  2732. 2 => {
  2733. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.field_orders)?;
  2734. },
  2735. _ => {
  2736. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  2737. },
  2738. };
  2739. }
  2740. ::std::result::Result::Ok(())
  2741. }
  2742. // Compute sizes of nested messages
  2743. #[allow(unused_variables)]
  2744. fn compute_size(&self) -> u32 {
  2745. let mut my_size = 0;
  2746. if !self.grid_id.is_empty() {
  2747. my_size += ::protobuf::rt::string_size(1, &self.grid_id);
  2748. }
  2749. if let Some(ref v) = self.field_orders.as_ref() {
  2750. let len = v.compute_size();
  2751. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  2752. }
  2753. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  2754. self.cached_size.set(my_size);
  2755. my_size
  2756. }
  2757. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  2758. if !self.grid_id.is_empty() {
  2759. os.write_string(1, &self.grid_id)?;
  2760. }
  2761. if let Some(ref v) = self.field_orders.as_ref() {
  2762. os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  2763. os.write_raw_varint32(v.get_cached_size())?;
  2764. v.write_to_with_cached_sizes(os)?;
  2765. }
  2766. os.write_unknown_fields(self.get_unknown_fields())?;
  2767. ::std::result::Result::Ok(())
  2768. }
  2769. fn get_cached_size(&self) -> u32 {
  2770. self.cached_size.get()
  2771. }
  2772. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  2773. &self.unknown_fields
  2774. }
  2775. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  2776. &mut self.unknown_fields
  2777. }
  2778. fn as_any(&self) -> &dyn (::std::any::Any) {
  2779. self as &dyn (::std::any::Any)
  2780. }
  2781. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  2782. self as &mut dyn (::std::any::Any)
  2783. }
  2784. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  2785. self
  2786. }
  2787. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  2788. Self::descriptor_static()
  2789. }
  2790. fn new() -> QueryFieldPayload {
  2791. QueryFieldPayload::new()
  2792. }
  2793. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  2794. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  2795. descriptor.get(|| {
  2796. let mut fields = ::std::vec::Vec::new();
  2797. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  2798. "grid_id",
  2799. |m: &QueryFieldPayload| { &m.grid_id },
  2800. |m: &mut QueryFieldPayload| { &mut m.grid_id },
  2801. ));
  2802. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<RepeatedFieldOrder>>(
  2803. "field_orders",
  2804. |m: &QueryFieldPayload| { &m.field_orders },
  2805. |m: &mut QueryFieldPayload| { &mut m.field_orders },
  2806. ));
  2807. ::protobuf::reflect::MessageDescriptor::new_pb_name::<QueryFieldPayload>(
  2808. "QueryFieldPayload",
  2809. fields,
  2810. file_descriptor_proto()
  2811. )
  2812. })
  2813. }
  2814. fn default_instance() -> &'static QueryFieldPayload {
  2815. static instance: ::protobuf::rt::LazyV2<QueryFieldPayload> = ::protobuf::rt::LazyV2::INIT;
  2816. instance.get(QueryFieldPayload::new)
  2817. }
  2818. }
  2819. impl ::protobuf::Clear for QueryFieldPayload {
  2820. fn clear(&mut self) {
  2821. self.grid_id.clear();
  2822. self.field_orders.clear();
  2823. self.unknown_fields.clear();
  2824. }
  2825. }
  2826. impl ::std::fmt::Debug for QueryFieldPayload {
  2827. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  2828. ::protobuf::text_format::fmt(self, f)
  2829. }
  2830. }
  2831. impl ::protobuf::reflect::ProtobufValue for QueryFieldPayload {
  2832. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  2833. ::protobuf::reflect::ReflectValueRef::Message(self)
  2834. }
  2835. }
  2836. #[derive(PartialEq,Clone,Default)]
  2837. pub struct FieldChangesetPayload {
  2838. // message fields
  2839. pub field_id: ::std::string::String,
  2840. pub grid_id: ::std::string::String,
  2841. // message oneof groups
  2842. pub one_of_name: ::std::option::Option<FieldChangesetPayload_oneof_one_of_name>,
  2843. pub one_of_desc: ::std::option::Option<FieldChangesetPayload_oneof_one_of_desc>,
  2844. pub one_of_field_type: ::std::option::Option<FieldChangesetPayload_oneof_one_of_field_type>,
  2845. pub one_of_frozen: ::std::option::Option<FieldChangesetPayload_oneof_one_of_frozen>,
  2846. pub one_of_visibility: ::std::option::Option<FieldChangesetPayload_oneof_one_of_visibility>,
  2847. pub one_of_width: ::std::option::Option<FieldChangesetPayload_oneof_one_of_width>,
  2848. pub one_of_type_option_data: ::std::option::Option<FieldChangesetPayload_oneof_one_of_type_option_data>,
  2849. // special fields
  2850. pub unknown_fields: ::protobuf::UnknownFields,
  2851. pub cached_size: ::protobuf::CachedSize,
  2852. }
  2853. impl<'a> ::std::default::Default for &'a FieldChangesetPayload {
  2854. fn default() -> &'a FieldChangesetPayload {
  2855. <FieldChangesetPayload as ::protobuf::Message>::default_instance()
  2856. }
  2857. }
  2858. #[derive(Clone,PartialEq,Debug)]
  2859. pub enum FieldChangesetPayload_oneof_one_of_name {
  2860. name(::std::string::String),
  2861. }
  2862. #[derive(Clone,PartialEq,Debug)]
  2863. pub enum FieldChangesetPayload_oneof_one_of_desc {
  2864. desc(::std::string::String),
  2865. }
  2866. #[derive(Clone,PartialEq,Debug)]
  2867. pub enum FieldChangesetPayload_oneof_one_of_field_type {
  2868. field_type(FieldType),
  2869. }
  2870. #[derive(Clone,PartialEq,Debug)]
  2871. pub enum FieldChangesetPayload_oneof_one_of_frozen {
  2872. frozen(bool),
  2873. }
  2874. #[derive(Clone,PartialEq,Debug)]
  2875. pub enum FieldChangesetPayload_oneof_one_of_visibility {
  2876. visibility(bool),
  2877. }
  2878. #[derive(Clone,PartialEq,Debug)]
  2879. pub enum FieldChangesetPayload_oneof_one_of_width {
  2880. width(i32),
  2881. }
  2882. #[derive(Clone,PartialEq,Debug)]
  2883. pub enum FieldChangesetPayload_oneof_one_of_type_option_data {
  2884. type_option_data(::std::vec::Vec<u8>),
  2885. }
  2886. impl FieldChangesetPayload {
  2887. pub fn new() -> FieldChangesetPayload {
  2888. ::std::default::Default::default()
  2889. }
  2890. // string field_id = 1;
  2891. pub fn get_field_id(&self) -> &str {
  2892. &self.field_id
  2893. }
  2894. pub fn clear_field_id(&mut self) {
  2895. self.field_id.clear();
  2896. }
  2897. // Param is passed by value, moved
  2898. pub fn set_field_id(&mut self, v: ::std::string::String) {
  2899. self.field_id = v;
  2900. }
  2901. // Mutable pointer to the field.
  2902. // If field is not initialized, it is initialized with default value first.
  2903. pub fn mut_field_id(&mut self) -> &mut ::std::string::String {
  2904. &mut self.field_id
  2905. }
  2906. // Take field
  2907. pub fn take_field_id(&mut self) -> ::std::string::String {
  2908. ::std::mem::replace(&mut self.field_id, ::std::string::String::new())
  2909. }
  2910. // string grid_id = 2;
  2911. pub fn get_grid_id(&self) -> &str {
  2912. &self.grid_id
  2913. }
  2914. pub fn clear_grid_id(&mut self) {
  2915. self.grid_id.clear();
  2916. }
  2917. // Param is passed by value, moved
  2918. pub fn set_grid_id(&mut self, v: ::std::string::String) {
  2919. self.grid_id = v;
  2920. }
  2921. // Mutable pointer to the field.
  2922. // If field is not initialized, it is initialized with default value first.
  2923. pub fn mut_grid_id(&mut self) -> &mut ::std::string::String {
  2924. &mut self.grid_id
  2925. }
  2926. // Take field
  2927. pub fn take_grid_id(&mut self) -> ::std::string::String {
  2928. ::std::mem::replace(&mut self.grid_id, ::std::string::String::new())
  2929. }
  2930. // string name = 3;
  2931. pub fn get_name(&self) -> &str {
  2932. match self.one_of_name {
  2933. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(ref v)) => v,
  2934. _ => "",
  2935. }
  2936. }
  2937. pub fn clear_name(&mut self) {
  2938. self.one_of_name = ::std::option::Option::None;
  2939. }
  2940. pub fn has_name(&self) -> bool {
  2941. match self.one_of_name {
  2942. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(..)) => true,
  2943. _ => false,
  2944. }
  2945. }
  2946. // Param is passed by value, moved
  2947. pub fn set_name(&mut self, v: ::std::string::String) {
  2948. self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(v))
  2949. }
  2950. // Mutable pointer to the field.
  2951. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  2952. if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(_)) = self.one_of_name {
  2953. } else {
  2954. self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(::std::string::String::new()));
  2955. }
  2956. match self.one_of_name {
  2957. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(ref mut v)) => v,
  2958. _ => panic!(),
  2959. }
  2960. }
  2961. // Take field
  2962. pub fn take_name(&mut self) -> ::std::string::String {
  2963. if self.has_name() {
  2964. match self.one_of_name.take() {
  2965. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(v)) => v,
  2966. _ => panic!(),
  2967. }
  2968. } else {
  2969. ::std::string::String::new()
  2970. }
  2971. }
  2972. // string desc = 4;
  2973. pub fn get_desc(&self) -> &str {
  2974. match self.one_of_desc {
  2975. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(ref v)) => v,
  2976. _ => "",
  2977. }
  2978. }
  2979. pub fn clear_desc(&mut self) {
  2980. self.one_of_desc = ::std::option::Option::None;
  2981. }
  2982. pub fn has_desc(&self) -> bool {
  2983. match self.one_of_desc {
  2984. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(..)) => true,
  2985. _ => false,
  2986. }
  2987. }
  2988. // Param is passed by value, moved
  2989. pub fn set_desc(&mut self, v: ::std::string::String) {
  2990. self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(v))
  2991. }
  2992. // Mutable pointer to the field.
  2993. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  2994. if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(_)) = self.one_of_desc {
  2995. } else {
  2996. self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(::std::string::String::new()));
  2997. }
  2998. match self.one_of_desc {
  2999. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(ref mut v)) => v,
  3000. _ => panic!(),
  3001. }
  3002. }
  3003. // Take field
  3004. pub fn take_desc(&mut self) -> ::std::string::String {
  3005. if self.has_desc() {
  3006. match self.one_of_desc.take() {
  3007. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(v)) => v,
  3008. _ => panic!(),
  3009. }
  3010. } else {
  3011. ::std::string::String::new()
  3012. }
  3013. }
  3014. // .FieldType field_type = 5;
  3015. pub fn get_field_type(&self) -> FieldType {
  3016. match self.one_of_field_type {
  3017. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(v)) => v,
  3018. _ => FieldType::RichText,
  3019. }
  3020. }
  3021. pub fn clear_field_type(&mut self) {
  3022. self.one_of_field_type = ::std::option::Option::None;
  3023. }
  3024. pub fn has_field_type(&self) -> bool {
  3025. match self.one_of_field_type {
  3026. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(..)) => true,
  3027. _ => false,
  3028. }
  3029. }
  3030. // Param is passed by value, moved
  3031. pub fn set_field_type(&mut self, v: FieldType) {
  3032. self.one_of_field_type = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(v))
  3033. }
  3034. // bool frozen = 6;
  3035. pub fn get_frozen(&self) -> bool {
  3036. match self.one_of_frozen {
  3037. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(v)) => v,
  3038. _ => false,
  3039. }
  3040. }
  3041. pub fn clear_frozen(&mut self) {
  3042. self.one_of_frozen = ::std::option::Option::None;
  3043. }
  3044. pub fn has_frozen(&self) -> bool {
  3045. match self.one_of_frozen {
  3046. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(..)) => true,
  3047. _ => false,
  3048. }
  3049. }
  3050. // Param is passed by value, moved
  3051. pub fn set_frozen(&mut self, v: bool) {
  3052. self.one_of_frozen = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(v))
  3053. }
  3054. // bool visibility = 7;
  3055. pub fn get_visibility(&self) -> bool {
  3056. match self.one_of_visibility {
  3057. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(v)) => v,
  3058. _ => false,
  3059. }
  3060. }
  3061. pub fn clear_visibility(&mut self) {
  3062. self.one_of_visibility = ::std::option::Option::None;
  3063. }
  3064. pub fn has_visibility(&self) -> bool {
  3065. match self.one_of_visibility {
  3066. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(..)) => true,
  3067. _ => false,
  3068. }
  3069. }
  3070. // Param is passed by value, moved
  3071. pub fn set_visibility(&mut self, v: bool) {
  3072. self.one_of_visibility = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(v))
  3073. }
  3074. // int32 width = 8;
  3075. pub fn get_width(&self) -> i32 {
  3076. match self.one_of_width {
  3077. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(v)) => v,
  3078. _ => 0,
  3079. }
  3080. }
  3081. pub fn clear_width(&mut self) {
  3082. self.one_of_width = ::std::option::Option::None;
  3083. }
  3084. pub fn has_width(&self) -> bool {
  3085. match self.one_of_width {
  3086. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(..)) => true,
  3087. _ => false,
  3088. }
  3089. }
  3090. // Param is passed by value, moved
  3091. pub fn set_width(&mut self, v: i32) {
  3092. self.one_of_width = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(v))
  3093. }
  3094. // bytes type_option_data = 9;
  3095. pub fn get_type_option_data(&self) -> &[u8] {
  3096. match self.one_of_type_option_data {
  3097. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v)) => v,
  3098. _ => &[],
  3099. }
  3100. }
  3101. pub fn clear_type_option_data(&mut self) {
  3102. self.one_of_type_option_data = ::std::option::Option::None;
  3103. }
  3104. pub fn has_type_option_data(&self) -> bool {
  3105. match self.one_of_type_option_data {
  3106. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(..)) => true,
  3107. _ => false,
  3108. }
  3109. }
  3110. // Param is passed by value, moved
  3111. pub fn set_type_option_data(&mut self, v: ::std::vec::Vec<u8>) {
  3112. self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(v))
  3113. }
  3114. // Mutable pointer to the field.
  3115. pub fn mut_type_option_data(&mut self) -> &mut ::std::vec::Vec<u8> {
  3116. if let ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(_)) = self.one_of_type_option_data {
  3117. } else {
  3118. self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(::std::vec::Vec::new()));
  3119. }
  3120. match self.one_of_type_option_data {
  3121. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref mut v)) => v,
  3122. _ => panic!(),
  3123. }
  3124. }
  3125. // Take field
  3126. pub fn take_type_option_data(&mut self) -> ::std::vec::Vec<u8> {
  3127. if self.has_type_option_data() {
  3128. match self.one_of_type_option_data.take() {
  3129. ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(v)) => v,
  3130. _ => panic!(),
  3131. }
  3132. } else {
  3133. ::std::vec::Vec::new()
  3134. }
  3135. }
  3136. }
  3137. impl ::protobuf::Message for FieldChangesetPayload {
  3138. fn is_initialized(&self) -> bool {
  3139. true
  3140. }
  3141. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3142. while !is.eof()? {
  3143. let (field_number, wire_type) = is.read_tag_unpack()?;
  3144. match field_number {
  3145. 1 => {
  3146. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.field_id)?;
  3147. },
  3148. 2 => {
  3149. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.grid_id)?;
  3150. },
  3151. 3 => {
  3152. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  3153. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3154. }
  3155. self.one_of_name = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_name::name(is.read_string()?));
  3156. },
  3157. 4 => {
  3158. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  3159. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3160. }
  3161. self.one_of_desc = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_desc::desc(is.read_string()?));
  3162. },
  3163. 5 => {
  3164. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3165. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3166. }
  3167. self.one_of_field_type = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_field_type::field_type(is.read_enum()?));
  3168. },
  3169. 6 => {
  3170. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3171. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3172. }
  3173. self.one_of_frozen = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_frozen::frozen(is.read_bool()?));
  3174. },
  3175. 7 => {
  3176. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3177. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3178. }
  3179. self.one_of_visibility = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_visibility::visibility(is.read_bool()?));
  3180. },
  3181. 8 => {
  3182. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  3183. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3184. }
  3185. self.one_of_width = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_width::width(is.read_int32()?));
  3186. },
  3187. 9 => {
  3188. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  3189. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  3190. }
  3191. self.one_of_type_option_data = ::std::option::Option::Some(FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(is.read_bytes()?));
  3192. },
  3193. _ => {
  3194. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  3195. },
  3196. };
  3197. }
  3198. ::std::result::Result::Ok(())
  3199. }
  3200. // Compute sizes of nested messages
  3201. #[allow(unused_variables)]
  3202. fn compute_size(&self) -> u32 {
  3203. let mut my_size = 0;
  3204. if !self.field_id.is_empty() {
  3205. my_size += ::protobuf::rt::string_size(1, &self.field_id);
  3206. }
  3207. if !self.grid_id.is_empty() {
  3208. my_size += ::protobuf::rt::string_size(2, &self.grid_id);
  3209. }
  3210. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  3211. match v {
  3212. &FieldChangesetPayload_oneof_one_of_name::name(ref v) => {
  3213. my_size += ::protobuf::rt::string_size(3, &v);
  3214. },
  3215. };
  3216. }
  3217. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  3218. match v {
  3219. &FieldChangesetPayload_oneof_one_of_desc::desc(ref v) => {
  3220. my_size += ::protobuf::rt::string_size(4, &v);
  3221. },
  3222. };
  3223. }
  3224. if let ::std::option::Option::Some(ref v) = self.one_of_field_type {
  3225. match v {
  3226. &FieldChangesetPayload_oneof_one_of_field_type::field_type(v) => {
  3227. my_size += ::protobuf::rt::enum_size(5, v);
  3228. },
  3229. };
  3230. }
  3231. if let ::std::option::Option::Some(ref v) = self.one_of_frozen {
  3232. match v {
  3233. &FieldChangesetPayload_oneof_one_of_frozen::frozen(v) => {
  3234. my_size += 2;
  3235. },
  3236. };
  3237. }
  3238. if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
  3239. match v {
  3240. &FieldChangesetPayload_oneof_one_of_visibility::visibility(v) => {
  3241. my_size += 2;
  3242. },
  3243. };
  3244. }
  3245. if let ::std::option::Option::Some(ref v) = self.one_of_width {
  3246. match v {
  3247. &FieldChangesetPayload_oneof_one_of_width::width(v) => {
  3248. my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
  3249. },
  3250. };
  3251. }
  3252. if let ::std::option::Option::Some(ref v) = self.one_of_type_option_data {
  3253. match v {
  3254. &FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v) => {
  3255. my_size += ::protobuf::rt::bytes_size(9, &v);
  3256. },
  3257. };
  3258. }
  3259. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  3260. self.cached_size.set(my_size);
  3261. my_size
  3262. }
  3263. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  3264. if !self.field_id.is_empty() {
  3265. os.write_string(1, &self.field_id)?;
  3266. }
  3267. if !self.grid_id.is_empty() {
  3268. os.write_string(2, &self.grid_id)?;
  3269. }
  3270. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  3271. match v {
  3272. &FieldChangesetPayload_oneof_one_of_name::name(ref v) => {
  3273. os.write_string(3, v)?;
  3274. },
  3275. };
  3276. }
  3277. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  3278. match v {
  3279. &FieldChangesetPayload_oneof_one_of_desc::desc(ref v) => {
  3280. os.write_string(4, v)?;
  3281. },
  3282. };
  3283. }
  3284. if let ::std::option::Option::Some(ref v) = self.one_of_field_type {
  3285. match v {
  3286. &FieldChangesetPayload_oneof_one_of_field_type::field_type(v) => {
  3287. os.write_enum(5, ::protobuf::ProtobufEnum::value(&v))?;
  3288. },
  3289. };
  3290. }
  3291. if let ::std::option::Option::Some(ref v) = self.one_of_frozen {
  3292. match v {
  3293. &FieldChangesetPayload_oneof_one_of_frozen::frozen(v) => {
  3294. os.write_bool(6, v)?;
  3295. },
  3296. };
  3297. }
  3298. if let ::std::option::Option::Some(ref v) = self.one_of_visibility {
  3299. match v {
  3300. &FieldChangesetPayload_oneof_one_of_visibility::visibility(v) => {
  3301. os.write_bool(7, v)?;
  3302. },
  3303. };
  3304. }
  3305. if let ::std::option::Option::Some(ref v) = self.one_of_width {
  3306. match v {
  3307. &FieldChangesetPayload_oneof_one_of_width::width(v) => {
  3308. os.write_int32(8, v)?;
  3309. },
  3310. };
  3311. }
  3312. if let ::std::option::Option::Some(ref v) = self.one_of_type_option_data {
  3313. match v {
  3314. &FieldChangesetPayload_oneof_one_of_type_option_data::type_option_data(ref v) => {
  3315. os.write_bytes(9, v)?;
  3316. },
  3317. };
  3318. }
  3319. os.write_unknown_fields(self.get_unknown_fields())?;
  3320. ::std::result::Result::Ok(())
  3321. }
  3322. fn get_cached_size(&self) -> u32 {
  3323. self.cached_size.get()
  3324. }
  3325. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  3326. &self.unknown_fields
  3327. }
  3328. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  3329. &mut self.unknown_fields
  3330. }
  3331. fn as_any(&self) -> &dyn (::std::any::Any) {
  3332. self as &dyn (::std::any::Any)
  3333. }
  3334. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  3335. self as &mut dyn (::std::any::Any)
  3336. }
  3337. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  3338. self
  3339. }
  3340. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  3341. Self::descriptor_static()
  3342. }
  3343. fn new() -> FieldChangesetPayload {
  3344. FieldChangesetPayload::new()
  3345. }
  3346. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  3347. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3348. descriptor.get(|| {
  3349. let mut fields = ::std::vec::Vec::new();
  3350. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3351. "field_id",
  3352. |m: &FieldChangesetPayload| { &m.field_id },
  3353. |m: &mut FieldChangesetPayload| { &mut m.field_id },
  3354. ));
  3355. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  3356. "grid_id",
  3357. |m: &FieldChangesetPayload| { &m.grid_id },
  3358. |m: &mut FieldChangesetPayload| { &mut m.grid_id },
  3359. ));
  3360. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  3361. "name",
  3362. FieldChangesetPayload::has_name,
  3363. FieldChangesetPayload::get_name,
  3364. ));
  3365. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  3366. "desc",
  3367. FieldChangesetPayload::has_desc,
  3368. FieldChangesetPayload::get_desc,
  3369. ));
  3370. fields.push(::protobuf::reflect::accessor::make_singular_enum_accessor::<_, FieldType>(
  3371. "field_type",
  3372. FieldChangesetPayload::has_field_type,
  3373. FieldChangesetPayload::get_field_type,
  3374. ));
  3375. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  3376. "frozen",
  3377. FieldChangesetPayload::has_frozen,
  3378. FieldChangesetPayload::get_frozen,
  3379. ));
  3380. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  3381. "visibility",
  3382. FieldChangesetPayload::has_visibility,
  3383. FieldChangesetPayload::get_visibility,
  3384. ));
  3385. fields.push(::protobuf::reflect::accessor::make_singular_i32_accessor::<_>(
  3386. "width",
  3387. FieldChangesetPayload::has_width,
  3388. FieldChangesetPayload::get_width,
  3389. ));
  3390. fields.push(::protobuf::reflect::accessor::make_singular_bytes_accessor::<_>(
  3391. "type_option_data",
  3392. FieldChangesetPayload::has_type_option_data,
  3393. FieldChangesetPayload::get_type_option_data,
  3394. ));
  3395. ::protobuf::reflect::MessageDescriptor::new_pb_name::<FieldChangesetPayload>(
  3396. "FieldChangesetPayload",
  3397. fields,
  3398. file_descriptor_proto()
  3399. )
  3400. })
  3401. }
  3402. fn default_instance() -> &'static FieldChangesetPayload {
  3403. static instance: ::protobuf::rt::LazyV2<FieldChangesetPayload> = ::protobuf::rt::LazyV2::INIT;
  3404. instance.get(FieldChangesetPayload::new)
  3405. }
  3406. }
  3407. impl ::protobuf::Clear for FieldChangesetPayload {
  3408. fn clear(&mut self) {
  3409. self.field_id.clear();
  3410. self.grid_id.clear();
  3411. self.one_of_name = ::std::option::Option::None;
  3412. self.one_of_desc = ::std::option::Option::None;
  3413. self.one_of_field_type = ::std::option::Option::None;
  3414. self.one_of_frozen = ::std::option::Option::None;
  3415. self.one_of_visibility = ::std::option::Option::None;
  3416. self.one_of_width = ::std::option::Option::None;
  3417. self.one_of_type_option_data = ::std::option::Option::None;
  3418. self.unknown_fields.clear();
  3419. }
  3420. }
  3421. impl ::std::fmt::Debug for FieldChangesetPayload {
  3422. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  3423. ::protobuf::text_format::fmt(self, f)
  3424. }
  3425. }
  3426. impl ::protobuf::reflect::ProtobufValue for FieldChangesetPayload {
  3427. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3428. ::protobuf::reflect::ReflectValueRef::Message(self)
  3429. }
  3430. }
  3431. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  3432. pub enum FieldType {
  3433. RichText = 0,
  3434. Number = 1,
  3435. DateTime = 2,
  3436. SingleSelect = 3,
  3437. MultiSelect = 4,
  3438. Checkbox = 5,
  3439. URL = 6,
  3440. }
  3441. impl ::protobuf::ProtobufEnum for FieldType {
  3442. fn value(&self) -> i32 {
  3443. *self as i32
  3444. }
  3445. fn from_i32(value: i32) -> ::std::option::Option<FieldType> {
  3446. match value {
  3447. 0 => ::std::option::Option::Some(FieldType::RichText),
  3448. 1 => ::std::option::Option::Some(FieldType::Number),
  3449. 2 => ::std::option::Option::Some(FieldType::DateTime),
  3450. 3 => ::std::option::Option::Some(FieldType::SingleSelect),
  3451. 4 => ::std::option::Option::Some(FieldType::MultiSelect),
  3452. 5 => ::std::option::Option::Some(FieldType::Checkbox),
  3453. 6 => ::std::option::Option::Some(FieldType::URL),
  3454. _ => ::std::option::Option::None
  3455. }
  3456. }
  3457. fn values() -> &'static [Self] {
  3458. static values: &'static [FieldType] = &[
  3459. FieldType::RichText,
  3460. FieldType::Number,
  3461. FieldType::DateTime,
  3462. FieldType::SingleSelect,
  3463. FieldType::MultiSelect,
  3464. FieldType::Checkbox,
  3465. FieldType::URL,
  3466. ];
  3467. values
  3468. }
  3469. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  3470. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  3471. descriptor.get(|| {
  3472. ::protobuf::reflect::EnumDescriptor::new_pb_name::<FieldType>("FieldType", file_descriptor_proto())
  3473. })
  3474. }
  3475. }
  3476. impl ::std::marker::Copy for FieldType {
  3477. }
  3478. impl ::std::default::Default for FieldType {
  3479. fn default() -> Self {
  3480. FieldType::RichText
  3481. }
  3482. }
  3483. impl ::protobuf::reflect::ProtobufValue for FieldType {
  3484. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  3485. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  3486. }
  3487. }
  3488. static file_descriptor_proto_data: &'static [u8] = b"\
  3489. \n\x0bfield.proto\"\xd7\x01\n\x05Field\x12\x0e\n\x02id\x18\x01\x20\x01(\
  3490. \tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04des\
  3491. c\x18\x03\x20\x01(\tR\x04desc\x12)\n\nfield_type\x18\x04\x20\x01(\x0e2\n\
  3492. .FieldTypeR\tfieldType\x12\x16\n\x06frozen\x18\x05\x20\x01(\x08R\x06froz\
  3493. en\x12\x1e\n\nvisibility\x18\x06\x20\x01(\x08R\nvisibility\x12\x14\n\x05\
  3494. width\x18\x07\x20\x01(\x05R\x05width\x12\x1d\n\nis_primary\x18\x08\x20\
  3495. \x01(\x08R\tisPrimary\"'\n\nFieldOrder\x12\x19\n\x08field_id\x18\x01\x20\
  3496. \x01(\tR\x07fieldId\"\xc6\x01\n\x12GridFieldChangeset\x12\x17\n\x07grid_\
  3497. id\x18\x01\x20\x01(\tR\x06gridId\x124\n\x0finserted_fields\x18\x02\x20\
  3498. \x03(\x0b2\x0b.IndexFieldR\x0einsertedFields\x122\n\x0edeleted_fields\
  3499. \x18\x03\x20\x03(\x0b2\x0b.FieldOrderR\rdeletedFields\x12-\n\x0eupdated_\
  3500. fields\x18\x04\x20\x03(\x0b2\x06.FieldR\rupdatedFields\"@\n\nIndexField\
  3501. \x12\x1c\n\x05field\x18\x01\x20\x01(\x0b2\x06.FieldR\x05field\x12\x14\n\
  3502. \x05index\x18\x02\x20\x01(\x05R\x05index\"\x90\x01\n\x1aGetEditFieldCont\
  3503. extPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x1b\n\
  3504. \x08field_id\x18\x02\x20\x01(\tH\0R\x07fieldId\x12)\n\nfield_type\x18\
  3505. \x03\x20\x01(\x0e2\n.FieldTypeR\tfieldTypeB\x11\n\x0fone_of_field_id\"\
  3506. \xa0\x01\n\x10EditFieldPayload\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\
  3507. \x06gridId\x12\x19\n\x08field_id\x18\x02\x20\x01(\tR\x07fieldId\x12)\n\n\
  3508. field_type\x18\x03\x20\x01(\x0e2\n.FieldTypeR\tfieldType\x12-\n\x13creat\
  3509. e_if_not_exist\x18\x04\x20\x01(\x08R\x10createIfNotExist\"\x82\x01\n\x16\
  3510. FieldTypeOptionContext\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridI\
  3511. d\x12%\n\ngrid_field\x18\x02\x20\x01(\x0b2\x06.FieldR\tgridField\x12(\n\
  3512. \x10type_option_data\x18\x03\x20\x01(\x0cR\x0etypeOptionData\"v\n\x13Fie\
  3513. ldTypeOptionData\x12\x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\
  3514. \x1c\n\x05field\x18\x02\x20\x01(\x0b2\x06.FieldR\x05field\x12(\n\x10type\
  3515. _option_data\x18\x03\x20\x01(\x0cR\x0etypeOptionData\"-\n\rRepeatedField\
  3516. \x12\x1c\n\x05items\x18\x01\x20\x03(\x0b2\x06.FieldR\x05items\"7\n\x12Re\
  3517. peatedFieldOrder\x12!\n\x05items\x18\x01\x20\x03(\x0b2\x0b.FieldOrderR\
  3518. \x05items\"\xb6\x01\n\x12InsertFieldPayload\x12\x17\n\x07grid_id\x18\x01\
  3519. \x20\x01(\tR\x06gridId\x12\x1c\n\x05field\x18\x02\x20\x01(\x0b2\x06.Fiel\
  3520. dR\x05field\x12(\n\x10type_option_data\x18\x03\x20\x01(\x0cR\x0etypeOpti\
  3521. onData\x12&\n\x0estart_field_id\x18\x04\x20\x01(\tH\0R\x0cstartFieldIdB\
  3522. \x17\n\x15one_of_start_field_id\"|\n\x1cUpdateFieldTypeOptionPayload\x12\
  3523. \x17\n\x07grid_id\x18\x01\x20\x01(\tR\x06gridId\x12\x19\n\x08field_id\
  3524. \x18\x02\x20\x01(\tR\x07fieldId\x12(\n\x10type_option_data\x18\x03\x20\
  3525. \x01(\x0cR\x0etypeOptionData\"d\n\x11QueryFieldPayload\x12\x17\n\x07grid\
  3526. _id\x18\x01\x20\x01(\tR\x06gridId\x126\n\x0cfield_orders\x18\x02\x20\x01\
  3527. (\x0b2\x13.RepeatedFieldOrderR\x0bfieldOrders\"\xa8\x03\n\x15FieldChange\
  3528. setPayload\x12\x19\n\x08field_id\x18\x01\x20\x01(\tR\x07fieldId\x12\x17\
  3529. \n\x07grid_id\x18\x02\x20\x01(\tR\x06gridId\x12\x14\n\x04name\x18\x03\
  3530. \x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\x04\x20\x01(\tH\x01R\x04de\
  3531. sc\x12+\n\nfield_type\x18\x05\x20\x01(\x0e2\n.FieldTypeH\x02R\tfieldType\
  3532. \x12\x18\n\x06frozen\x18\x06\x20\x01(\x08H\x03R\x06frozen\x12\x20\n\nvis\
  3533. ibility\x18\x07\x20\x01(\x08H\x04R\nvisibility\x12\x16\n\x05width\x18\
  3534. \x08\x20\x01(\x05H\x05R\x05width\x12*\n\x10type_option_data\x18\t\x20\
  3535. \x01(\x0cH\x06R\x0etypeOptionDataB\r\n\x0bone_of_nameB\r\n\x0bone_of_des\
  3536. cB\x13\n\x11one_of_field_typeB\x0f\n\rone_of_frozenB\x13\n\x11one_of_vis\
  3537. ibilityB\x0e\n\x0cone_of_widthB\x19\n\x17one_of_type_option_data*m\n\tFi\
  3538. eldType\x12\x0c\n\x08RichText\x10\0\x12\n\n\x06Number\x10\x01\x12\x0c\n\
  3539. \x08DateTime\x10\x02\x12\x10\n\x0cSingleSelect\x10\x03\x12\x0f\n\x0bMult\
  3540. iSelect\x10\x04\x12\x0c\n\x08Checkbox\x10\x05\x12\x07\n\x03URL\x10\x06b\
  3541. \x06proto3\
  3542. ";
  3543. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  3544. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  3545. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  3546. }
  3547. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  3548. file_descriptor_proto_lazy.get(|| {
  3549. parse_descriptor_proto()
  3550. })
  3551. }