view_update.rs 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011
  1. // This file is generated by rust-protobuf 2.22.1. 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_update.proto`
  18. /// Generated files are compatible only with the same version
  19. /// of protobuf runtime.
  20. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1;
  21. #[derive(PartialEq,Clone,Default)]
  22. pub struct UpdateViewRequest {
  23. // message fields
  24. pub view_id: ::std::string::String,
  25. // message oneof groups
  26. pub one_of_name: ::std::option::Option<UpdateViewRequest_oneof_one_of_name>,
  27. pub one_of_desc: ::std::option::Option<UpdateViewRequest_oneof_one_of_desc>,
  28. pub one_of_thumbnail: ::std::option::Option<UpdateViewRequest_oneof_one_of_thumbnail>,
  29. pub one_of_is_trash: ::std::option::Option<UpdateViewRequest_oneof_one_of_is_trash>,
  30. // special fields
  31. pub unknown_fields: ::protobuf::UnknownFields,
  32. pub cached_size: ::protobuf::CachedSize,
  33. }
  34. impl<'a> ::std::default::Default for &'a UpdateViewRequest {
  35. fn default() -> &'a UpdateViewRequest {
  36. <UpdateViewRequest as ::protobuf::Message>::default_instance()
  37. }
  38. }
  39. #[derive(Clone,PartialEq,Debug)]
  40. pub enum UpdateViewRequest_oneof_one_of_name {
  41. name(::std::string::String),
  42. }
  43. #[derive(Clone,PartialEq,Debug)]
  44. pub enum UpdateViewRequest_oneof_one_of_desc {
  45. desc(::std::string::String),
  46. }
  47. #[derive(Clone,PartialEq,Debug)]
  48. pub enum UpdateViewRequest_oneof_one_of_thumbnail {
  49. thumbnail(::std::string::String),
  50. }
  51. #[derive(Clone,PartialEq,Debug)]
  52. pub enum UpdateViewRequest_oneof_one_of_is_trash {
  53. is_trash(bool),
  54. }
  55. impl UpdateViewRequest {
  56. pub fn new() -> UpdateViewRequest {
  57. ::std::default::Default::default()
  58. }
  59. // string view_id = 1;
  60. pub fn get_view_id(&self) -> &str {
  61. &self.view_id
  62. }
  63. pub fn clear_view_id(&mut self) {
  64. self.view_id.clear();
  65. }
  66. // Param is passed by value, moved
  67. pub fn set_view_id(&mut self, v: ::std::string::String) {
  68. self.view_id = v;
  69. }
  70. // Mutable pointer to the field.
  71. // If field is not initialized, it is initialized with default value first.
  72. pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
  73. &mut self.view_id
  74. }
  75. // Take field
  76. pub fn take_view_id(&mut self) -> ::std::string::String {
  77. ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
  78. }
  79. // string name = 2;
  80. pub fn get_name(&self) -> &str {
  81. match self.one_of_name {
  82. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref v)) => v,
  83. _ => "",
  84. }
  85. }
  86. pub fn clear_name(&mut self) {
  87. self.one_of_name = ::std::option::Option::None;
  88. }
  89. pub fn has_name(&self) -> bool {
  90. match self.one_of_name {
  91. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(..)) => true,
  92. _ => false,
  93. }
  94. }
  95. // Param is passed by value, moved
  96. pub fn set_name(&mut self, v: ::std::string::String) {
  97. self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(v))
  98. }
  99. // Mutable pointer to the field.
  100. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  101. if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(_)) = self.one_of_name {
  102. } else {
  103. self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(::std::string::String::new()));
  104. }
  105. match self.one_of_name {
  106. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref mut v)) => v,
  107. _ => panic!(),
  108. }
  109. }
  110. // Take field
  111. pub fn take_name(&mut self) -> ::std::string::String {
  112. if self.has_name() {
  113. match self.one_of_name.take() {
  114. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(v)) => v,
  115. _ => panic!(),
  116. }
  117. } else {
  118. ::std::string::String::new()
  119. }
  120. }
  121. // string desc = 3;
  122. pub fn get_desc(&self) -> &str {
  123. match self.one_of_desc {
  124. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref v)) => v,
  125. _ => "",
  126. }
  127. }
  128. pub fn clear_desc(&mut self) {
  129. self.one_of_desc = ::std::option::Option::None;
  130. }
  131. pub fn has_desc(&self) -> bool {
  132. match self.one_of_desc {
  133. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(..)) => true,
  134. _ => false,
  135. }
  136. }
  137. // Param is passed by value, moved
  138. pub fn set_desc(&mut self, v: ::std::string::String) {
  139. self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(v))
  140. }
  141. // Mutable pointer to the field.
  142. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  143. if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc {
  144. } else {
  145. self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(::std::string::String::new()));
  146. }
  147. match self.one_of_desc {
  148. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref mut v)) => v,
  149. _ => panic!(),
  150. }
  151. }
  152. // Take field
  153. pub fn take_desc(&mut self) -> ::std::string::String {
  154. if self.has_desc() {
  155. match self.one_of_desc.take() {
  156. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(v)) => v,
  157. _ => panic!(),
  158. }
  159. } else {
  160. ::std::string::String::new()
  161. }
  162. }
  163. // string thumbnail = 4;
  164. pub fn get_thumbnail(&self) -> &str {
  165. match self.one_of_thumbnail {
  166. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
  167. _ => "",
  168. }
  169. }
  170. pub fn clear_thumbnail(&mut self) {
  171. self.one_of_thumbnail = ::std::option::Option::None;
  172. }
  173. pub fn has_thumbnail(&self) -> bool {
  174. match self.one_of_thumbnail {
  175. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true,
  176. _ => false,
  177. }
  178. }
  179. // Param is passed by value, moved
  180. pub fn set_thumbnail(&mut self, v: ::std::string::String) {
  181. self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(v))
  182. }
  183. // Mutable pointer to the field.
  184. pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String {
  185. if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail {
  186. } else {
  187. self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(::std::string::String::new()));
  188. }
  189. match self.one_of_thumbnail {
  190. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
  191. _ => panic!(),
  192. }
  193. }
  194. // Take field
  195. pub fn take_thumbnail(&mut self) -> ::std::string::String {
  196. if self.has_thumbnail() {
  197. match self.one_of_thumbnail.take() {
  198. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) => v,
  199. _ => panic!(),
  200. }
  201. } else {
  202. ::std::string::String::new()
  203. }
  204. }
  205. // bool is_trash = 5;
  206. pub fn get_is_trash(&self) -> bool {
  207. match self.one_of_is_trash {
  208. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_is_trash::is_trash(v)) => v,
  209. _ => false,
  210. }
  211. }
  212. pub fn clear_is_trash(&mut self) {
  213. self.one_of_is_trash = ::std::option::Option::None;
  214. }
  215. pub fn has_is_trash(&self) -> bool {
  216. match self.one_of_is_trash {
  217. ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_is_trash::is_trash(..)) => true,
  218. _ => false,
  219. }
  220. }
  221. // Param is passed by value, moved
  222. pub fn set_is_trash(&mut self, v: bool) {
  223. self.one_of_is_trash = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_is_trash::is_trash(v))
  224. }
  225. }
  226. impl ::protobuf::Message for UpdateViewRequest {
  227. fn is_initialized(&self) -> bool {
  228. true
  229. }
  230. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  231. while !is.eof()? {
  232. let (field_number, wire_type) = is.read_tag_unpack()?;
  233. match field_number {
  234. 1 => {
  235. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_id)?;
  236. },
  237. 2 => {
  238. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  239. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  240. }
  241. self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(is.read_string()?));
  242. },
  243. 3 => {
  244. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  245. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  246. }
  247. self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(is.read_string()?));
  248. },
  249. 4 => {
  250. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  251. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  252. }
  253. self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(is.read_string()?));
  254. },
  255. 5 => {
  256. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  257. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  258. }
  259. self.one_of_is_trash = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_is_trash::is_trash(is.read_bool()?));
  260. },
  261. _ => {
  262. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  263. },
  264. };
  265. }
  266. ::std::result::Result::Ok(())
  267. }
  268. // Compute sizes of nested messages
  269. #[allow(unused_variables)]
  270. fn compute_size(&self) -> u32 {
  271. let mut my_size = 0;
  272. if !self.view_id.is_empty() {
  273. my_size += ::protobuf::rt::string_size(1, &self.view_id);
  274. }
  275. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  276. match v {
  277. &UpdateViewRequest_oneof_one_of_name::name(ref v) => {
  278. my_size += ::protobuf::rt::string_size(2, &v);
  279. },
  280. };
  281. }
  282. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  283. match v {
  284. &UpdateViewRequest_oneof_one_of_desc::desc(ref v) => {
  285. my_size += ::protobuf::rt::string_size(3, &v);
  286. },
  287. };
  288. }
  289. if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
  290. match v {
  291. &UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => {
  292. my_size += ::protobuf::rt::string_size(4, &v);
  293. },
  294. };
  295. }
  296. if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
  297. match v {
  298. &UpdateViewRequest_oneof_one_of_is_trash::is_trash(v) => {
  299. my_size += 2;
  300. },
  301. };
  302. }
  303. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  304. self.cached_size.set(my_size);
  305. my_size
  306. }
  307. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  308. if !self.view_id.is_empty() {
  309. os.write_string(1, &self.view_id)?;
  310. }
  311. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  312. match v {
  313. &UpdateViewRequest_oneof_one_of_name::name(ref v) => {
  314. os.write_string(2, v)?;
  315. },
  316. };
  317. }
  318. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  319. match v {
  320. &UpdateViewRequest_oneof_one_of_desc::desc(ref v) => {
  321. os.write_string(3, v)?;
  322. },
  323. };
  324. }
  325. if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
  326. match v {
  327. &UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => {
  328. os.write_string(4, v)?;
  329. },
  330. };
  331. }
  332. if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
  333. match v {
  334. &UpdateViewRequest_oneof_one_of_is_trash::is_trash(v) => {
  335. os.write_bool(5, v)?;
  336. },
  337. };
  338. }
  339. os.write_unknown_fields(self.get_unknown_fields())?;
  340. ::std::result::Result::Ok(())
  341. }
  342. fn get_cached_size(&self) -> u32 {
  343. self.cached_size.get()
  344. }
  345. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  346. &self.unknown_fields
  347. }
  348. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  349. &mut self.unknown_fields
  350. }
  351. fn as_any(&self) -> &dyn (::std::any::Any) {
  352. self as &dyn (::std::any::Any)
  353. }
  354. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  355. self as &mut dyn (::std::any::Any)
  356. }
  357. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  358. self
  359. }
  360. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  361. Self::descriptor_static()
  362. }
  363. fn new() -> UpdateViewRequest {
  364. UpdateViewRequest::new()
  365. }
  366. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  367. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  368. descriptor.get(|| {
  369. let mut fields = ::std::vec::Vec::new();
  370. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  371. "view_id",
  372. |m: &UpdateViewRequest| { &m.view_id },
  373. |m: &mut UpdateViewRequest| { &mut m.view_id },
  374. ));
  375. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  376. "name",
  377. UpdateViewRequest::has_name,
  378. UpdateViewRequest::get_name,
  379. ));
  380. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  381. "desc",
  382. UpdateViewRequest::has_desc,
  383. UpdateViewRequest::get_desc,
  384. ));
  385. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  386. "thumbnail",
  387. UpdateViewRequest::has_thumbnail,
  388. UpdateViewRequest::get_thumbnail,
  389. ));
  390. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  391. "is_trash",
  392. UpdateViewRequest::has_is_trash,
  393. UpdateViewRequest::get_is_trash,
  394. ));
  395. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateViewRequest>(
  396. "UpdateViewRequest",
  397. fields,
  398. file_descriptor_proto()
  399. )
  400. })
  401. }
  402. fn default_instance() -> &'static UpdateViewRequest {
  403. static instance: ::protobuf::rt::LazyV2<UpdateViewRequest> = ::protobuf::rt::LazyV2::INIT;
  404. instance.get(UpdateViewRequest::new)
  405. }
  406. }
  407. impl ::protobuf::Clear for UpdateViewRequest {
  408. fn clear(&mut self) {
  409. self.view_id.clear();
  410. self.one_of_name = ::std::option::Option::None;
  411. self.one_of_desc = ::std::option::Option::None;
  412. self.one_of_thumbnail = ::std::option::Option::None;
  413. self.one_of_is_trash = ::std::option::Option::None;
  414. self.unknown_fields.clear();
  415. }
  416. }
  417. impl ::std::fmt::Debug for UpdateViewRequest {
  418. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  419. ::protobuf::text_format::fmt(self, f)
  420. }
  421. }
  422. impl ::protobuf::reflect::ProtobufValue for UpdateViewRequest {
  423. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  424. ::protobuf::reflect::ReflectValueRef::Message(self)
  425. }
  426. }
  427. #[derive(PartialEq,Clone,Default)]
  428. pub struct UpdateViewParams {
  429. // message fields
  430. pub view_id: ::std::string::String,
  431. // message oneof groups
  432. pub one_of_name: ::std::option::Option<UpdateViewParams_oneof_one_of_name>,
  433. pub one_of_desc: ::std::option::Option<UpdateViewParams_oneof_one_of_desc>,
  434. pub one_of_thumbnail: ::std::option::Option<UpdateViewParams_oneof_one_of_thumbnail>,
  435. pub one_of_is_trash: ::std::option::Option<UpdateViewParams_oneof_one_of_is_trash>,
  436. // special fields
  437. pub unknown_fields: ::protobuf::UnknownFields,
  438. pub cached_size: ::protobuf::CachedSize,
  439. }
  440. impl<'a> ::std::default::Default for &'a UpdateViewParams {
  441. fn default() -> &'a UpdateViewParams {
  442. <UpdateViewParams as ::protobuf::Message>::default_instance()
  443. }
  444. }
  445. #[derive(Clone,PartialEq,Debug)]
  446. pub enum UpdateViewParams_oneof_one_of_name {
  447. name(::std::string::String),
  448. }
  449. #[derive(Clone,PartialEq,Debug)]
  450. pub enum UpdateViewParams_oneof_one_of_desc {
  451. desc(::std::string::String),
  452. }
  453. #[derive(Clone,PartialEq,Debug)]
  454. pub enum UpdateViewParams_oneof_one_of_thumbnail {
  455. thumbnail(::std::string::String),
  456. }
  457. #[derive(Clone,PartialEq,Debug)]
  458. pub enum UpdateViewParams_oneof_one_of_is_trash {
  459. is_trash(bool),
  460. }
  461. impl UpdateViewParams {
  462. pub fn new() -> UpdateViewParams {
  463. ::std::default::Default::default()
  464. }
  465. // string view_id = 1;
  466. pub fn get_view_id(&self) -> &str {
  467. &self.view_id
  468. }
  469. pub fn clear_view_id(&mut self) {
  470. self.view_id.clear();
  471. }
  472. // Param is passed by value, moved
  473. pub fn set_view_id(&mut self, v: ::std::string::String) {
  474. self.view_id = v;
  475. }
  476. // Mutable pointer to the field.
  477. // If field is not initialized, it is initialized with default value first.
  478. pub fn mut_view_id(&mut self) -> &mut ::std::string::String {
  479. &mut self.view_id
  480. }
  481. // Take field
  482. pub fn take_view_id(&mut self) -> ::std::string::String {
  483. ::std::mem::replace(&mut self.view_id, ::std::string::String::new())
  484. }
  485. // string name = 2;
  486. pub fn get_name(&self) -> &str {
  487. match self.one_of_name {
  488. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref v)) => v,
  489. _ => "",
  490. }
  491. }
  492. pub fn clear_name(&mut self) {
  493. self.one_of_name = ::std::option::Option::None;
  494. }
  495. pub fn has_name(&self) -> bool {
  496. match self.one_of_name {
  497. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(..)) => true,
  498. _ => false,
  499. }
  500. }
  501. // Param is passed by value, moved
  502. pub fn set_name(&mut self, v: ::std::string::String) {
  503. self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v))
  504. }
  505. // Mutable pointer to the field.
  506. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  507. if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(_)) = self.one_of_name {
  508. } else {
  509. self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(::std::string::String::new()));
  510. }
  511. match self.one_of_name {
  512. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref mut v)) => v,
  513. _ => panic!(),
  514. }
  515. }
  516. // Take field
  517. pub fn take_name(&mut self) -> ::std::string::String {
  518. if self.has_name() {
  519. match self.one_of_name.take() {
  520. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v)) => v,
  521. _ => panic!(),
  522. }
  523. } else {
  524. ::std::string::String::new()
  525. }
  526. }
  527. // string desc = 3;
  528. pub fn get_desc(&self) -> &str {
  529. match self.one_of_desc {
  530. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref v)) => v,
  531. _ => "",
  532. }
  533. }
  534. pub fn clear_desc(&mut self) {
  535. self.one_of_desc = ::std::option::Option::None;
  536. }
  537. pub fn has_desc(&self) -> bool {
  538. match self.one_of_desc {
  539. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(..)) => true,
  540. _ => false,
  541. }
  542. }
  543. // Param is passed by value, moved
  544. pub fn set_desc(&mut self, v: ::std::string::String) {
  545. self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v))
  546. }
  547. // Mutable pointer to the field.
  548. pub fn mut_desc(&mut self) -> &mut ::std::string::String {
  549. if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(_)) = self.one_of_desc {
  550. } else {
  551. self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(::std::string::String::new()));
  552. }
  553. match self.one_of_desc {
  554. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref mut v)) => v,
  555. _ => panic!(),
  556. }
  557. }
  558. // Take field
  559. pub fn take_desc(&mut self) -> ::std::string::String {
  560. if self.has_desc() {
  561. match self.one_of_desc.take() {
  562. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v)) => v,
  563. _ => panic!(),
  564. }
  565. } else {
  566. ::std::string::String::new()
  567. }
  568. }
  569. // string thumbnail = 4;
  570. pub fn get_thumbnail(&self) -> &str {
  571. match self.one_of_thumbnail {
  572. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
  573. _ => "",
  574. }
  575. }
  576. pub fn clear_thumbnail(&mut self) {
  577. self.one_of_thumbnail = ::std::option::Option::None;
  578. }
  579. pub fn has_thumbnail(&self) -> bool {
  580. match self.one_of_thumbnail {
  581. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(..)) => true,
  582. _ => false,
  583. }
  584. }
  585. // Param is passed by value, moved
  586. pub fn set_thumbnail(&mut self, v: ::std::string::String) {
  587. self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v))
  588. }
  589. // Mutable pointer to the field.
  590. pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String {
  591. if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail {
  592. } else {
  593. self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(::std::string::String::new()));
  594. }
  595. match self.one_of_thumbnail {
  596. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
  597. _ => panic!(),
  598. }
  599. }
  600. // Take field
  601. pub fn take_thumbnail(&mut self) -> ::std::string::String {
  602. if self.has_thumbnail() {
  603. match self.one_of_thumbnail.take() {
  604. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v)) => v,
  605. _ => panic!(),
  606. }
  607. } else {
  608. ::std::string::String::new()
  609. }
  610. }
  611. // bool is_trash = 5;
  612. pub fn get_is_trash(&self) -> bool {
  613. match self.one_of_is_trash {
  614. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_is_trash::is_trash(v)) => v,
  615. _ => false,
  616. }
  617. }
  618. pub fn clear_is_trash(&mut self) {
  619. self.one_of_is_trash = ::std::option::Option::None;
  620. }
  621. pub fn has_is_trash(&self) -> bool {
  622. match self.one_of_is_trash {
  623. ::std::option::Option::Some(UpdateViewParams_oneof_one_of_is_trash::is_trash(..)) => true,
  624. _ => false,
  625. }
  626. }
  627. // Param is passed by value, moved
  628. pub fn set_is_trash(&mut self, v: bool) {
  629. self.one_of_is_trash = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_is_trash::is_trash(v))
  630. }
  631. }
  632. impl ::protobuf::Message for UpdateViewParams {
  633. fn is_initialized(&self) -> bool {
  634. true
  635. }
  636. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  637. while !is.eof()? {
  638. let (field_number, wire_type) = is.read_tag_unpack()?;
  639. match field_number {
  640. 1 => {
  641. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_id)?;
  642. },
  643. 2 => {
  644. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  645. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  646. }
  647. self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(is.read_string()?));
  648. },
  649. 3 => {
  650. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  651. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  652. }
  653. self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(is.read_string()?));
  654. },
  655. 4 => {
  656. if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
  657. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  658. }
  659. self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(is.read_string()?));
  660. },
  661. 5 => {
  662. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  663. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  664. }
  665. self.one_of_is_trash = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_is_trash::is_trash(is.read_bool()?));
  666. },
  667. _ => {
  668. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  669. },
  670. };
  671. }
  672. ::std::result::Result::Ok(())
  673. }
  674. // Compute sizes of nested messages
  675. #[allow(unused_variables)]
  676. fn compute_size(&self) -> u32 {
  677. let mut my_size = 0;
  678. if !self.view_id.is_empty() {
  679. my_size += ::protobuf::rt::string_size(1, &self.view_id);
  680. }
  681. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  682. match v {
  683. &UpdateViewParams_oneof_one_of_name::name(ref v) => {
  684. my_size += ::protobuf::rt::string_size(2, &v);
  685. },
  686. };
  687. }
  688. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  689. match v {
  690. &UpdateViewParams_oneof_one_of_desc::desc(ref v) => {
  691. my_size += ::protobuf::rt::string_size(3, &v);
  692. },
  693. };
  694. }
  695. if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
  696. match v {
  697. &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => {
  698. my_size += ::protobuf::rt::string_size(4, &v);
  699. },
  700. };
  701. }
  702. if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
  703. match v {
  704. &UpdateViewParams_oneof_one_of_is_trash::is_trash(v) => {
  705. my_size += 2;
  706. },
  707. };
  708. }
  709. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  710. self.cached_size.set(my_size);
  711. my_size
  712. }
  713. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  714. if !self.view_id.is_empty() {
  715. os.write_string(1, &self.view_id)?;
  716. }
  717. if let ::std::option::Option::Some(ref v) = self.one_of_name {
  718. match v {
  719. &UpdateViewParams_oneof_one_of_name::name(ref v) => {
  720. os.write_string(2, v)?;
  721. },
  722. };
  723. }
  724. if let ::std::option::Option::Some(ref v) = self.one_of_desc {
  725. match v {
  726. &UpdateViewParams_oneof_one_of_desc::desc(ref v) => {
  727. os.write_string(3, v)?;
  728. },
  729. };
  730. }
  731. if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
  732. match v {
  733. &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => {
  734. os.write_string(4, v)?;
  735. },
  736. };
  737. }
  738. if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
  739. match v {
  740. &UpdateViewParams_oneof_one_of_is_trash::is_trash(v) => {
  741. os.write_bool(5, v)?;
  742. },
  743. };
  744. }
  745. os.write_unknown_fields(self.get_unknown_fields())?;
  746. ::std::result::Result::Ok(())
  747. }
  748. fn get_cached_size(&self) -> u32 {
  749. self.cached_size.get()
  750. }
  751. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  752. &self.unknown_fields
  753. }
  754. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  755. &mut self.unknown_fields
  756. }
  757. fn as_any(&self) -> &dyn (::std::any::Any) {
  758. self as &dyn (::std::any::Any)
  759. }
  760. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  761. self as &mut dyn (::std::any::Any)
  762. }
  763. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  764. self
  765. }
  766. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  767. Self::descriptor_static()
  768. }
  769. fn new() -> UpdateViewParams {
  770. UpdateViewParams::new()
  771. }
  772. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  773. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  774. descriptor.get(|| {
  775. let mut fields = ::std::vec::Vec::new();
  776. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  777. "view_id",
  778. |m: &UpdateViewParams| { &m.view_id },
  779. |m: &mut UpdateViewParams| { &mut m.view_id },
  780. ));
  781. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  782. "name",
  783. UpdateViewParams::has_name,
  784. UpdateViewParams::get_name,
  785. ));
  786. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  787. "desc",
  788. UpdateViewParams::has_desc,
  789. UpdateViewParams::get_desc,
  790. ));
  791. fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
  792. "thumbnail",
  793. UpdateViewParams::has_thumbnail,
  794. UpdateViewParams::get_thumbnail,
  795. ));
  796. fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
  797. "is_trash",
  798. UpdateViewParams::has_is_trash,
  799. UpdateViewParams::get_is_trash,
  800. ));
  801. ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateViewParams>(
  802. "UpdateViewParams",
  803. fields,
  804. file_descriptor_proto()
  805. )
  806. })
  807. }
  808. fn default_instance() -> &'static UpdateViewParams {
  809. static instance: ::protobuf::rt::LazyV2<UpdateViewParams> = ::protobuf::rt::LazyV2::INIT;
  810. instance.get(UpdateViewParams::new)
  811. }
  812. }
  813. impl ::protobuf::Clear for UpdateViewParams {
  814. fn clear(&mut self) {
  815. self.view_id.clear();
  816. self.one_of_name = ::std::option::Option::None;
  817. self.one_of_desc = ::std::option::Option::None;
  818. self.one_of_thumbnail = ::std::option::Option::None;
  819. self.one_of_is_trash = ::std::option::Option::None;
  820. self.unknown_fields.clear();
  821. }
  822. }
  823. impl ::std::fmt::Debug for UpdateViewParams {
  824. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  825. ::protobuf::text_format::fmt(self, f)
  826. }
  827. }
  828. impl ::protobuf::reflect::ProtobufValue for UpdateViewParams {
  829. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  830. ::protobuf::reflect::ReflectValueRef::Message(self)
  831. }
  832. }
  833. static file_descriptor_proto_data: &'static [u8] = b"\
  834. \n\x11view_update.proto\"\xda\x01\n\x11UpdateViewRequest\x12\x17\n\x07vi\
  835. ew_id\x18\x01\x20\x01(\tR\x06viewId\x12\x14\n\x04name\x18\x02\x20\x01(\t\
  836. H\0R\x04name\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12\x1e\
  837. \n\tthumbnail\x18\x04\x20\x01(\tH\x02R\tthumbnail\x12\x1b\n\x08is_trash\
  838. \x18\x05\x20\x01(\x08H\x03R\x07isTrashB\r\n\x0bone_of_nameB\r\n\x0bone_o\
  839. f_descB\x12\n\x10one_of_thumbnailB\x11\n\x0fone_of_is_trash\"\xd9\x01\n\
  840. \x10UpdateViewParams\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\
  841. \x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\
  842. \x03\x20\x01(\tH\x01R\x04desc\x12\x1e\n\tthumbnail\x18\x04\x20\x01(\tH\
  843. \x02R\tthumbnail\x12\x1b\n\x08is_trash\x18\x05\x20\x01(\x08H\x03R\x07isT\
  844. rashB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x12\n\x10one_of_thumbnailB\
  845. \x11\n\x0fone_of_is_trashJ\xc0\x06\n\x06\x12\x04\0\0\x0f\x01\n\x08\n\x01\
  846. \x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x08\x01\n\n\n\x03\x04\
  847. \0\x01\x12\x03\x02\x08\x19\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x17\n\
  848. \x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\
  849. \x12\x03\x03\x0b\x12\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x15\x16\n\
  850. \x0b\n\x04\x04\0\x08\0\x12\x03\x04\x04*\n\x0c\n\x05\x04\0\x08\0\x01\x12\
  851. \x03\x04\n\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x18(\n\x0c\n\x05\
  852. \x04\0\x02\x01\x05\x12\x03\x04\x18\x1e\n\x0c\n\x05\x04\0\x02\x01\x01\x12\
  853. \x03\x04\x1f#\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04&'\n\x0b\n\x04\
  854. \x04\0\x08\x01\x12\x03\x05\x04*\n\x0c\n\x05\x04\0\x08\x01\x01\x12\x03\
  855. \x05\n\x15\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x18(\n\x0c\n\x05\x04\0\
  856. \x02\x02\x05\x12\x03\x05\x18\x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\
  857. \x05\x1f#\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05&'\n\x0b\n\x04\x04\0\
  858. \x08\x02\x12\x03\x06\x044\n\x0c\n\x05\x04\0\x08\x02\x01\x12\x03\x06\n\
  859. \x1a\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x1d2\n\x0c\n\x05\x04\0\x02\
  860. \x03\x05\x12\x03\x06\x1d#\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x06$-\n\
  861. \x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x0601\n\x0b\n\x04\x04\0\x08\x03\x12\
  862. \x03\x07\x040\n\x0c\n\x05\x04\0\x08\x03\x01\x12\x03\x07\n\x19\n\x0b\n\
  863. \x04\x04\0\x02\x04\x12\x03\x07\x1c.\n\x0c\n\x05\x04\0\x02\x04\x05\x12\
  864. \x03\x07\x1c\x20\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07!)\n\x0c\n\x05\
  865. \x04\0\x02\x04\x03\x12\x03\x07,-\n\n\n\x02\x04\x01\x12\x04\t\0\x0f\x01\n\
  866. \n\n\x03\x04\x01\x01\x12\x03\t\x08\x18\n\x0b\n\x04\x04\x01\x02\0\x12\x03\
  867. \n\x04\x17\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\
  868. \x01\x02\0\x01\x12\x03\n\x0b\x12\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\n\
  869. \x15\x16\n\x0b\n\x04\x04\x01\x08\0\x12\x03\x0b\x04*\n\x0c\n\x05\x04\x01\
  870. \x08\0\x01\x12\x03\x0b\n\x15\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0b\x18\
  871. (\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x03\x0b\x18\x1e\n\x0c\n\x05\x04\
  872. \x01\x02\x01\x01\x12\x03\x0b\x1f#\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\
  873. \x03\x0b&'\n\x0b\n\x04\x04\x01\x08\x01\x12\x03\x0c\x04*\n\x0c\n\x05\x04\
  874. \x01\x08\x01\x01\x12\x03\x0c\n\x15\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\
  875. \x0c\x18(\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\x0c\x18\x1e\n\x0c\n\
  876. \x05\x04\x01\x02\x02\x01\x12\x03\x0c\x1f#\n\x0c\n\x05\x04\x01\x02\x02\
  877. \x03\x12\x03\x0c&'\n\x0b\n\x04\x04\x01\x08\x02\x12\x03\r\x044\n\x0c\n\
  878. \x05\x04\x01\x08\x02\x01\x12\x03\r\n\x1a\n\x0b\n\x04\x04\x01\x02\x03\x12\
  879. \x03\r\x1d2\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03\r\x1d#\n\x0c\n\x05\
  880. \x04\x01\x02\x03\x01\x12\x03\r$-\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\
  881. \r01\n\x0b\n\x04\x04\x01\x08\x03\x12\x03\x0e\x040\n\x0c\n\x05\x04\x01\
  882. \x08\x03\x01\x12\x03\x0e\n\x19\n\x0b\n\x04\x04\x01\x02\x04\x12\x03\x0e\
  883. \x1c.\n\x0c\n\x05\x04\x01\x02\x04\x05\x12\x03\x0e\x1c\x20\n\x0c\n\x05\
  884. \x04\x01\x02\x04\x01\x12\x03\x0e!)\n\x0c\n\x05\x04\x01\x02\x04\x03\x12\
  885. \x03\x0e,-b\x06proto3\
  886. ";
  887. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  888. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  889. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  890. }
  891. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  892. file_descriptor_proto_lazy.get(|| {
  893. parse_descriptor_proto()
  894. })
  895. }