trash_create.rs 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  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 `trash_create.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 TrashIdentifiers {
  23. // message fields
  24. pub items: ::protobuf::RepeatedField<TrashIdentifier>,
  25. // special fields
  26. pub unknown_fields: ::protobuf::UnknownFields,
  27. pub cached_size: ::protobuf::CachedSize,
  28. }
  29. impl<'a> ::std::default::Default for &'a TrashIdentifiers {
  30. fn default() -> &'a TrashIdentifiers {
  31. <TrashIdentifiers as ::protobuf::Message>::default_instance()
  32. }
  33. }
  34. impl TrashIdentifiers {
  35. pub fn new() -> TrashIdentifiers {
  36. ::std::default::Default::default()
  37. }
  38. // repeated .TrashIdentifier items = 1;
  39. pub fn get_items(&self) -> &[TrashIdentifier] {
  40. &self.items
  41. }
  42. pub fn clear_items(&mut self) {
  43. self.items.clear();
  44. }
  45. // Param is passed by value, moved
  46. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<TrashIdentifier>) {
  47. self.items = v;
  48. }
  49. // Mutable pointer to the field.
  50. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<TrashIdentifier> {
  51. &mut self.items
  52. }
  53. // Take field
  54. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<TrashIdentifier> {
  55. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  56. }
  57. }
  58. impl ::protobuf::Message for TrashIdentifiers {
  59. fn is_initialized(&self) -> bool {
  60. for v in &self.items {
  61. if !v.is_initialized() {
  62. return false;
  63. }
  64. };
  65. true
  66. }
  67. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  68. while !is.eof()? {
  69. let (field_number, wire_type) = is.read_tag_unpack()?;
  70. match field_number {
  71. 1 => {
  72. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  73. },
  74. _ => {
  75. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  76. },
  77. };
  78. }
  79. ::std::result::Result::Ok(())
  80. }
  81. // Compute sizes of nested messages
  82. #[allow(unused_variables)]
  83. fn compute_size(&self) -> u32 {
  84. let mut my_size = 0;
  85. for value in &self.items {
  86. let len = value.compute_size();
  87. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  88. };
  89. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  90. self.cached_size.set(my_size);
  91. my_size
  92. }
  93. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  94. for v in &self.items {
  95. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  96. os.write_raw_varint32(v.get_cached_size())?;
  97. v.write_to_with_cached_sizes(os)?;
  98. };
  99. os.write_unknown_fields(self.get_unknown_fields())?;
  100. ::std::result::Result::Ok(())
  101. }
  102. fn get_cached_size(&self) -> u32 {
  103. self.cached_size.get()
  104. }
  105. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  106. &self.unknown_fields
  107. }
  108. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  109. &mut self.unknown_fields
  110. }
  111. fn as_any(&self) -> &dyn (::std::any::Any) {
  112. self as &dyn (::std::any::Any)
  113. }
  114. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  115. self as &mut dyn (::std::any::Any)
  116. }
  117. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  118. self
  119. }
  120. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  121. Self::descriptor_static()
  122. }
  123. fn new() -> TrashIdentifiers {
  124. TrashIdentifiers::new()
  125. }
  126. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  127. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  128. descriptor.get(|| {
  129. let mut fields = ::std::vec::Vec::new();
  130. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<TrashIdentifier>>(
  131. "items",
  132. |m: &TrashIdentifiers| { &m.items },
  133. |m: &mut TrashIdentifiers| { &mut m.items },
  134. ));
  135. ::protobuf::reflect::MessageDescriptor::new_pb_name::<TrashIdentifiers>(
  136. "TrashIdentifiers",
  137. fields,
  138. file_descriptor_proto()
  139. )
  140. })
  141. }
  142. fn default_instance() -> &'static TrashIdentifiers {
  143. static instance: ::protobuf::rt::LazyV2<TrashIdentifiers> = ::protobuf::rt::LazyV2::INIT;
  144. instance.get(TrashIdentifiers::new)
  145. }
  146. }
  147. impl ::protobuf::Clear for TrashIdentifiers {
  148. fn clear(&mut self) {
  149. self.items.clear();
  150. self.unknown_fields.clear();
  151. }
  152. }
  153. impl ::std::fmt::Debug for TrashIdentifiers {
  154. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  155. ::protobuf::text_format::fmt(self, f)
  156. }
  157. }
  158. impl ::protobuf::reflect::ProtobufValue for TrashIdentifiers {
  159. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  160. ::protobuf::reflect::ReflectValueRef::Message(self)
  161. }
  162. }
  163. #[derive(PartialEq,Clone,Default)]
  164. pub struct TrashIdentifier {
  165. // message fields
  166. pub id: ::std::string::String,
  167. pub ty: TrashType,
  168. // special fields
  169. pub unknown_fields: ::protobuf::UnknownFields,
  170. pub cached_size: ::protobuf::CachedSize,
  171. }
  172. impl<'a> ::std::default::Default for &'a TrashIdentifier {
  173. fn default() -> &'a TrashIdentifier {
  174. <TrashIdentifier as ::protobuf::Message>::default_instance()
  175. }
  176. }
  177. impl TrashIdentifier {
  178. pub fn new() -> TrashIdentifier {
  179. ::std::default::Default::default()
  180. }
  181. // string id = 1;
  182. pub fn get_id(&self) -> &str {
  183. &self.id
  184. }
  185. pub fn clear_id(&mut self) {
  186. self.id.clear();
  187. }
  188. // Param is passed by value, moved
  189. pub fn set_id(&mut self, v: ::std::string::String) {
  190. self.id = v;
  191. }
  192. // Mutable pointer to the field.
  193. // If field is not initialized, it is initialized with default value first.
  194. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  195. &mut self.id
  196. }
  197. // Take field
  198. pub fn take_id(&mut self) -> ::std::string::String {
  199. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  200. }
  201. // .TrashType ty = 2;
  202. pub fn get_ty(&self) -> TrashType {
  203. self.ty
  204. }
  205. pub fn clear_ty(&mut self) {
  206. self.ty = TrashType::Unknown;
  207. }
  208. // Param is passed by value, moved
  209. pub fn set_ty(&mut self, v: TrashType) {
  210. self.ty = v;
  211. }
  212. }
  213. impl ::protobuf::Message for TrashIdentifier {
  214. fn is_initialized(&self) -> bool {
  215. true
  216. }
  217. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  218. while !is.eof()? {
  219. let (field_number, wire_type) = is.read_tag_unpack()?;
  220. match field_number {
  221. 1 => {
  222. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  223. },
  224. 2 => {
  225. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 2, &mut self.unknown_fields)?
  226. },
  227. _ => {
  228. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  229. },
  230. };
  231. }
  232. ::std::result::Result::Ok(())
  233. }
  234. // Compute sizes of nested messages
  235. #[allow(unused_variables)]
  236. fn compute_size(&self) -> u32 {
  237. let mut my_size = 0;
  238. if !self.id.is_empty() {
  239. my_size += ::protobuf::rt::string_size(1, &self.id);
  240. }
  241. if self.ty != TrashType::Unknown {
  242. my_size += ::protobuf::rt::enum_size(2, self.ty);
  243. }
  244. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  245. self.cached_size.set(my_size);
  246. my_size
  247. }
  248. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  249. if !self.id.is_empty() {
  250. os.write_string(1, &self.id)?;
  251. }
  252. if self.ty != TrashType::Unknown {
  253. os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.ty))?;
  254. }
  255. os.write_unknown_fields(self.get_unknown_fields())?;
  256. ::std::result::Result::Ok(())
  257. }
  258. fn get_cached_size(&self) -> u32 {
  259. self.cached_size.get()
  260. }
  261. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  262. &self.unknown_fields
  263. }
  264. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  265. &mut self.unknown_fields
  266. }
  267. fn as_any(&self) -> &dyn (::std::any::Any) {
  268. self as &dyn (::std::any::Any)
  269. }
  270. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  271. self as &mut dyn (::std::any::Any)
  272. }
  273. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  274. self
  275. }
  276. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  277. Self::descriptor_static()
  278. }
  279. fn new() -> TrashIdentifier {
  280. TrashIdentifier::new()
  281. }
  282. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  283. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  284. descriptor.get(|| {
  285. let mut fields = ::std::vec::Vec::new();
  286. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  287. "id",
  288. |m: &TrashIdentifier| { &m.id },
  289. |m: &mut TrashIdentifier| { &mut m.id },
  290. ));
  291. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TrashType>>(
  292. "ty",
  293. |m: &TrashIdentifier| { &m.ty },
  294. |m: &mut TrashIdentifier| { &mut m.ty },
  295. ));
  296. ::protobuf::reflect::MessageDescriptor::new_pb_name::<TrashIdentifier>(
  297. "TrashIdentifier",
  298. fields,
  299. file_descriptor_proto()
  300. )
  301. })
  302. }
  303. fn default_instance() -> &'static TrashIdentifier {
  304. static instance: ::protobuf::rt::LazyV2<TrashIdentifier> = ::protobuf::rt::LazyV2::INIT;
  305. instance.get(TrashIdentifier::new)
  306. }
  307. }
  308. impl ::protobuf::Clear for TrashIdentifier {
  309. fn clear(&mut self) {
  310. self.id.clear();
  311. self.ty = TrashType::Unknown;
  312. self.unknown_fields.clear();
  313. }
  314. }
  315. impl ::std::fmt::Debug for TrashIdentifier {
  316. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  317. ::protobuf::text_format::fmt(self, f)
  318. }
  319. }
  320. impl ::protobuf::reflect::ProtobufValue for TrashIdentifier {
  321. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  322. ::protobuf::reflect::ReflectValueRef::Message(self)
  323. }
  324. }
  325. #[derive(PartialEq,Clone,Default)]
  326. pub struct Trash {
  327. // message fields
  328. pub id: ::std::string::String,
  329. pub name: ::std::string::String,
  330. pub modified_time: i64,
  331. pub create_time: i64,
  332. pub ty: TrashType,
  333. // special fields
  334. pub unknown_fields: ::protobuf::UnknownFields,
  335. pub cached_size: ::protobuf::CachedSize,
  336. }
  337. impl<'a> ::std::default::Default for &'a Trash {
  338. fn default() -> &'a Trash {
  339. <Trash as ::protobuf::Message>::default_instance()
  340. }
  341. }
  342. impl Trash {
  343. pub fn new() -> Trash {
  344. ::std::default::Default::default()
  345. }
  346. // string id = 1;
  347. pub fn get_id(&self) -> &str {
  348. &self.id
  349. }
  350. pub fn clear_id(&mut self) {
  351. self.id.clear();
  352. }
  353. // Param is passed by value, moved
  354. pub fn set_id(&mut self, v: ::std::string::String) {
  355. self.id = v;
  356. }
  357. // Mutable pointer to the field.
  358. // If field is not initialized, it is initialized with default value first.
  359. pub fn mut_id(&mut self) -> &mut ::std::string::String {
  360. &mut self.id
  361. }
  362. // Take field
  363. pub fn take_id(&mut self) -> ::std::string::String {
  364. ::std::mem::replace(&mut self.id, ::std::string::String::new())
  365. }
  366. // string name = 2;
  367. pub fn get_name(&self) -> &str {
  368. &self.name
  369. }
  370. pub fn clear_name(&mut self) {
  371. self.name.clear();
  372. }
  373. // Param is passed by value, moved
  374. pub fn set_name(&mut self, v: ::std::string::String) {
  375. self.name = v;
  376. }
  377. // Mutable pointer to the field.
  378. // If field is not initialized, it is initialized with default value first.
  379. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  380. &mut self.name
  381. }
  382. // Take field
  383. pub fn take_name(&mut self) -> ::std::string::String {
  384. ::std::mem::replace(&mut self.name, ::std::string::String::new())
  385. }
  386. // int64 modified_time = 3;
  387. pub fn get_modified_time(&self) -> i64 {
  388. self.modified_time
  389. }
  390. pub fn clear_modified_time(&mut self) {
  391. self.modified_time = 0;
  392. }
  393. // Param is passed by value, moved
  394. pub fn set_modified_time(&mut self, v: i64) {
  395. self.modified_time = v;
  396. }
  397. // int64 create_time = 4;
  398. pub fn get_create_time(&self) -> i64 {
  399. self.create_time
  400. }
  401. pub fn clear_create_time(&mut self) {
  402. self.create_time = 0;
  403. }
  404. // Param is passed by value, moved
  405. pub fn set_create_time(&mut self, v: i64) {
  406. self.create_time = v;
  407. }
  408. // .TrashType ty = 5;
  409. pub fn get_ty(&self) -> TrashType {
  410. self.ty
  411. }
  412. pub fn clear_ty(&mut self) {
  413. self.ty = TrashType::Unknown;
  414. }
  415. // Param is passed by value, moved
  416. pub fn set_ty(&mut self, v: TrashType) {
  417. self.ty = v;
  418. }
  419. }
  420. impl ::protobuf::Message for Trash {
  421. fn is_initialized(&self) -> bool {
  422. true
  423. }
  424. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  425. while !is.eof()? {
  426. let (field_number, wire_type) = is.read_tag_unpack()?;
  427. match field_number {
  428. 1 => {
  429. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?;
  430. },
  431. 2 => {
  432. ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?;
  433. },
  434. 3 => {
  435. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  436. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  437. }
  438. let tmp = is.read_int64()?;
  439. self.modified_time = tmp;
  440. },
  441. 4 => {
  442. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  443. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  444. }
  445. let tmp = is.read_int64()?;
  446. self.create_time = tmp;
  447. },
  448. 5 => {
  449. ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.ty, 5, &mut self.unknown_fields)?
  450. },
  451. _ => {
  452. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  453. },
  454. };
  455. }
  456. ::std::result::Result::Ok(())
  457. }
  458. // Compute sizes of nested messages
  459. #[allow(unused_variables)]
  460. fn compute_size(&self) -> u32 {
  461. let mut my_size = 0;
  462. if !self.id.is_empty() {
  463. my_size += ::protobuf::rt::string_size(1, &self.id);
  464. }
  465. if !self.name.is_empty() {
  466. my_size += ::protobuf::rt::string_size(2, &self.name);
  467. }
  468. if self.modified_time != 0 {
  469. my_size += ::protobuf::rt::value_size(3, self.modified_time, ::protobuf::wire_format::WireTypeVarint);
  470. }
  471. if self.create_time != 0 {
  472. my_size += ::protobuf::rt::value_size(4, self.create_time, ::protobuf::wire_format::WireTypeVarint);
  473. }
  474. if self.ty != TrashType::Unknown {
  475. my_size += ::protobuf::rt::enum_size(5, self.ty);
  476. }
  477. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  478. self.cached_size.set(my_size);
  479. my_size
  480. }
  481. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  482. if !self.id.is_empty() {
  483. os.write_string(1, &self.id)?;
  484. }
  485. if !self.name.is_empty() {
  486. os.write_string(2, &self.name)?;
  487. }
  488. if self.modified_time != 0 {
  489. os.write_int64(3, self.modified_time)?;
  490. }
  491. if self.create_time != 0 {
  492. os.write_int64(4, self.create_time)?;
  493. }
  494. if self.ty != TrashType::Unknown {
  495. os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.ty))?;
  496. }
  497. os.write_unknown_fields(self.get_unknown_fields())?;
  498. ::std::result::Result::Ok(())
  499. }
  500. fn get_cached_size(&self) -> u32 {
  501. self.cached_size.get()
  502. }
  503. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  504. &self.unknown_fields
  505. }
  506. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  507. &mut self.unknown_fields
  508. }
  509. fn as_any(&self) -> &dyn (::std::any::Any) {
  510. self as &dyn (::std::any::Any)
  511. }
  512. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  513. self as &mut dyn (::std::any::Any)
  514. }
  515. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  516. self
  517. }
  518. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  519. Self::descriptor_static()
  520. }
  521. fn new() -> Trash {
  522. Trash::new()
  523. }
  524. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  525. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  526. descriptor.get(|| {
  527. let mut fields = ::std::vec::Vec::new();
  528. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  529. "id",
  530. |m: &Trash| { &m.id },
  531. |m: &mut Trash| { &mut m.id },
  532. ));
  533. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  534. "name",
  535. |m: &Trash| { &m.name },
  536. |m: &mut Trash| { &mut m.name },
  537. ));
  538. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  539. "modified_time",
  540. |m: &Trash| { &m.modified_time },
  541. |m: &mut Trash| { &mut m.modified_time },
  542. ));
  543. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  544. "create_time",
  545. |m: &Trash| { &m.create_time },
  546. |m: &mut Trash| { &mut m.create_time },
  547. ));
  548. fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<TrashType>>(
  549. "ty",
  550. |m: &Trash| { &m.ty },
  551. |m: &mut Trash| { &mut m.ty },
  552. ));
  553. ::protobuf::reflect::MessageDescriptor::new_pb_name::<Trash>(
  554. "Trash",
  555. fields,
  556. file_descriptor_proto()
  557. )
  558. })
  559. }
  560. fn default_instance() -> &'static Trash {
  561. static instance: ::protobuf::rt::LazyV2<Trash> = ::protobuf::rt::LazyV2::INIT;
  562. instance.get(Trash::new)
  563. }
  564. }
  565. impl ::protobuf::Clear for Trash {
  566. fn clear(&mut self) {
  567. self.id.clear();
  568. self.name.clear();
  569. self.modified_time = 0;
  570. self.create_time = 0;
  571. self.ty = TrashType::Unknown;
  572. self.unknown_fields.clear();
  573. }
  574. }
  575. impl ::std::fmt::Debug for Trash {
  576. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  577. ::protobuf::text_format::fmt(self, f)
  578. }
  579. }
  580. impl ::protobuf::reflect::ProtobufValue for Trash {
  581. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  582. ::protobuf::reflect::ReflectValueRef::Message(self)
  583. }
  584. }
  585. #[derive(PartialEq,Clone,Default)]
  586. pub struct RepeatedTrash {
  587. // message fields
  588. pub items: ::protobuf::RepeatedField<Trash>,
  589. // special fields
  590. pub unknown_fields: ::protobuf::UnknownFields,
  591. pub cached_size: ::protobuf::CachedSize,
  592. }
  593. impl<'a> ::std::default::Default for &'a RepeatedTrash {
  594. fn default() -> &'a RepeatedTrash {
  595. <RepeatedTrash as ::protobuf::Message>::default_instance()
  596. }
  597. }
  598. impl RepeatedTrash {
  599. pub fn new() -> RepeatedTrash {
  600. ::std::default::Default::default()
  601. }
  602. // repeated .Trash items = 1;
  603. pub fn get_items(&self) -> &[Trash] {
  604. &self.items
  605. }
  606. pub fn clear_items(&mut self) {
  607. self.items.clear();
  608. }
  609. // Param is passed by value, moved
  610. pub fn set_items(&mut self, v: ::protobuf::RepeatedField<Trash>) {
  611. self.items = v;
  612. }
  613. // Mutable pointer to the field.
  614. pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField<Trash> {
  615. &mut self.items
  616. }
  617. // Take field
  618. pub fn take_items(&mut self) -> ::protobuf::RepeatedField<Trash> {
  619. ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new())
  620. }
  621. }
  622. impl ::protobuf::Message for RepeatedTrash {
  623. fn is_initialized(&self) -> bool {
  624. for v in &self.items {
  625. if !v.is_initialized() {
  626. return false;
  627. }
  628. };
  629. true
  630. }
  631. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  632. while !is.eof()? {
  633. let (field_number, wire_type) = is.read_tag_unpack()?;
  634. match field_number {
  635. 1 => {
  636. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.items)?;
  637. },
  638. _ => {
  639. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  640. },
  641. };
  642. }
  643. ::std::result::Result::Ok(())
  644. }
  645. // Compute sizes of nested messages
  646. #[allow(unused_variables)]
  647. fn compute_size(&self) -> u32 {
  648. let mut my_size = 0;
  649. for value in &self.items {
  650. let len = value.compute_size();
  651. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  652. };
  653. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  654. self.cached_size.set(my_size);
  655. my_size
  656. }
  657. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  658. for v in &self.items {
  659. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  660. os.write_raw_varint32(v.get_cached_size())?;
  661. v.write_to_with_cached_sizes(os)?;
  662. };
  663. os.write_unknown_fields(self.get_unknown_fields())?;
  664. ::std::result::Result::Ok(())
  665. }
  666. fn get_cached_size(&self) -> u32 {
  667. self.cached_size.get()
  668. }
  669. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  670. &self.unknown_fields
  671. }
  672. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  673. &mut self.unknown_fields
  674. }
  675. fn as_any(&self) -> &dyn (::std::any::Any) {
  676. self as &dyn (::std::any::Any)
  677. }
  678. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  679. self as &mut dyn (::std::any::Any)
  680. }
  681. fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  682. self
  683. }
  684. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  685. Self::descriptor_static()
  686. }
  687. fn new() -> RepeatedTrash {
  688. RepeatedTrash::new()
  689. }
  690. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  691. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
  692. descriptor.get(|| {
  693. let mut fields = ::std::vec::Vec::new();
  694. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Trash>>(
  695. "items",
  696. |m: &RepeatedTrash| { &m.items },
  697. |m: &mut RepeatedTrash| { &mut m.items },
  698. ));
  699. ::protobuf::reflect::MessageDescriptor::new_pb_name::<RepeatedTrash>(
  700. "RepeatedTrash",
  701. fields,
  702. file_descriptor_proto()
  703. )
  704. })
  705. }
  706. fn default_instance() -> &'static RepeatedTrash {
  707. static instance: ::protobuf::rt::LazyV2<RepeatedTrash> = ::protobuf::rt::LazyV2::INIT;
  708. instance.get(RepeatedTrash::new)
  709. }
  710. }
  711. impl ::protobuf::Clear for RepeatedTrash {
  712. fn clear(&mut self) {
  713. self.items.clear();
  714. self.unknown_fields.clear();
  715. }
  716. }
  717. impl ::std::fmt::Debug for RepeatedTrash {
  718. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  719. ::protobuf::text_format::fmt(self, f)
  720. }
  721. }
  722. impl ::protobuf::reflect::ProtobufValue for RepeatedTrash {
  723. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  724. ::protobuf::reflect::ReflectValueRef::Message(self)
  725. }
  726. }
  727. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  728. pub enum TrashType {
  729. Unknown = 0,
  730. View = 1,
  731. }
  732. impl ::protobuf::ProtobufEnum for TrashType {
  733. fn value(&self) -> i32 {
  734. *self as i32
  735. }
  736. fn from_i32(value: i32) -> ::std::option::Option<TrashType> {
  737. match value {
  738. 0 => ::std::option::Option::Some(TrashType::Unknown),
  739. 1 => ::std::option::Option::Some(TrashType::View),
  740. _ => ::std::option::Option::None
  741. }
  742. }
  743. fn values() -> &'static [Self] {
  744. static values: &'static [TrashType] = &[
  745. TrashType::Unknown,
  746. TrashType::View,
  747. ];
  748. values
  749. }
  750. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  751. static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
  752. descriptor.get(|| {
  753. ::protobuf::reflect::EnumDescriptor::new_pb_name::<TrashType>("TrashType", file_descriptor_proto())
  754. })
  755. }
  756. }
  757. impl ::std::marker::Copy for TrashType {
  758. }
  759. impl ::std::default::Default for TrashType {
  760. fn default() -> Self {
  761. TrashType::Unknown
  762. }
  763. }
  764. impl ::protobuf::reflect::ProtobufValue for TrashType {
  765. fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
  766. ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
  767. }
  768. }
  769. static file_descriptor_proto_data: &'static [u8] = b"\
  770. \n\x12trash_create.proto\":\n\x10TrashIdentifiers\x12&\n\x05items\x18\
  771. \x01\x20\x03(\x0b2\x10.TrashIdentifierR\x05items\"=\n\x0fTrashIdentifier\
  772. \x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x1a\n\x02ty\x18\x02\x20\
  773. \x01(\x0e2\n.TrashTypeR\x02ty\"\x8d\x01\n\x05Trash\x12\x0e\n\x02id\x18\
  774. \x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\
  775. #\n\rmodified_time\x18\x03\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcr\
  776. eate_time\x18\x04\x20\x01(\x03R\ncreateTime\x12\x1a\n\x02ty\x18\x05\x20\
  777. \x01(\x0e2\n.TrashTypeR\x02ty\"-\n\rRepeatedTrash\x12\x1c\n\x05items\x18\
  778. \x01\x20\x03(\x0b2\x06.TrashR\x05items*\"\n\tTrashType\x12\x0b\n\x07Unkn\
  779. own\x10\0\x12\x08\n\x04View\x10\x01J\xe7\x05\n\x06\x12\x04\0\0\x16\x01\n\
  780. \x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\
  781. \n\x03\x04\0\x01\x12\x03\x02\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\
  782. \x04'\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x03\x04\x0c\n\x0c\n\x05\x04\0\
  783. \x02\0\x06\x12\x03\x03\r\x1c\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x1d\
  784. \"\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03%&\n\n\n\x02\x04\x01\x12\x04\
  785. \x05\0\x08\x01\n\n\n\x03\x04\x01\x01\x12\x03\x05\x08\x17\n\x0b\n\x04\x04\
  786. \x01\x02\0\x12\x03\x06\x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x06\
  787. \x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x06\x0b\r\n\x0c\n\x05\x04\
  788. \x01\x02\0\x03\x12\x03\x06\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\
  789. \x07\x04\x15\n\x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\x07\x04\r\n\x0c\n\
  790. \x05\x04\x01\x02\x01\x01\x12\x03\x07\x0e\x10\n\x0c\n\x05\x04\x01\x02\x01\
  791. \x03\x12\x03\x07\x13\x14\n\n\n\x02\x04\x02\x12\x04\t\0\x0f\x01\n\n\n\x03\
  792. \x04\x02\x01\x12\x03\t\x08\r\n\x0b\n\x04\x04\x02\x02\0\x12\x03\n\x04\x12\
  793. \n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\x02\x02\0\
  794. \x01\x12\x03\n\x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\n\x10\x11\n\
  795. \x0b\n\x04\x04\x02\x02\x01\x12\x03\x0b\x04\x14\n\x0c\n\x05\x04\x02\x02\
  796. \x01\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0b\
  797. \x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x0b\x12\x13\n\x0b\n\x04\
  798. \x04\x02\x02\x02\x12\x03\x0c\x04\x1c\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\
  799. \x03\x0c\x04\t\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0c\n\x17\n\x0c\n\
  800. \x05\x04\x02\x02\x02\x03\x12\x03\x0c\x1a\x1b\n\x0b\n\x04\x04\x02\x02\x03\
  801. \x12\x03\r\x04\x1a\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\r\x04\t\n\x0c\
  802. \n\x05\x04\x02\x02\x03\x01\x12\x03\r\n\x15\n\x0c\n\x05\x04\x02\x02\x03\
  803. \x03\x12\x03\r\x18\x19\n\x0b\n\x04\x04\x02\x02\x04\x12\x03\x0e\x04\x15\n\
  804. \x0c\n\x05\x04\x02\x02\x04\x06\x12\x03\x0e\x04\r\n\x0c\n\x05\x04\x02\x02\
  805. \x04\x01\x12\x03\x0e\x0e\x10\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\x0e\
  806. \x13\x14\n\n\n\x02\x04\x03\x12\x04\x10\0\x12\x01\n\n\n\x03\x04\x03\x01\
  807. \x12\x03\x10\x08\x15\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x11\x04\x1d\n\x0c\
  808. \n\x05\x04\x03\x02\0\x04\x12\x03\x11\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\
  809. \x06\x12\x03\x11\r\x12\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x11\x13\x18\
  810. \n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x11\x1b\x1c\n\n\n\x02\x05\0\x12\
  811. \x04\x13\0\x16\x01\n\n\n\x03\x05\0\x01\x12\x03\x13\x05\x0e\n\x0b\n\x04\
  812. \x05\0\x02\0\x12\x03\x14\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x14\
  813. \x04\x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x14\x0e\x0f\n\x0b\n\x04\x05\
  814. \0\x02\x01\x12\x03\x15\x04\r\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x15\
  815. \x04\x08\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x15\x0b\x0cb\x06proto3\
  816. ";
  817. static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
  818. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  819. ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
  820. }
  821. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  822. file_descriptor_proto_lazy.get(|| {
  823. parse_descriptor_proto()
  824. })
  825. }