view.rs 97 KB

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