playlist4meta.rs 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074
  1. // This file is generated by rust-protobuf 2.8.1. Do not edit
  2. // @generated
  3. // https://github.com/Manishearth/rust-clippy/issues/702
  4. #![allow(unknown_lints)]
  5. #![allow(clippy::all)]
  6. #![cfg_attr(rustfmt, rustfmt_skip)]
  7. #![allow(box_pointers)]
  8. #![allow(dead_code)]
  9. #![allow(missing_docs)]
  10. #![allow(non_camel_case_types)]
  11. #![allow(non_snake_case)]
  12. #![allow(non_upper_case_globals)]
  13. #![allow(trivial_casts)]
  14. #![allow(unsafe_code)]
  15. #![allow(unused_imports)]
  16. #![allow(unused_results)]
  17. //! Generated file from `playlist4meta.proto`
  18. use protobuf::Message as Message_imported_for_functions;
  19. use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
  20. /// Generated files are compatible only with the same version
  21. /// of protobuf runtime.
  22. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1;
  23. #[derive(PartialEq,Clone,Default)]
  24. pub struct ListChecksum {
  25. // message fields
  26. version: ::std::option::Option<i32>,
  27. sha1: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  28. // special fields
  29. pub unknown_fields: ::protobuf::UnknownFields,
  30. pub cached_size: ::protobuf::CachedSize,
  31. }
  32. impl<'a> ::std::default::Default for &'a ListChecksum {
  33. fn default() -> &'a ListChecksum {
  34. <ListChecksum as ::protobuf::Message>::default_instance()
  35. }
  36. }
  37. impl ListChecksum {
  38. pub fn new() -> ListChecksum {
  39. ::std::default::Default::default()
  40. }
  41. // optional int32 version = 1;
  42. pub fn get_version(&self) -> i32 {
  43. self.version.unwrap_or(0)
  44. }
  45. pub fn clear_version(&mut self) {
  46. self.version = ::std::option::Option::None;
  47. }
  48. pub fn has_version(&self) -> bool {
  49. self.version.is_some()
  50. }
  51. // Param is passed by value, moved
  52. pub fn set_version(&mut self, v: i32) {
  53. self.version = ::std::option::Option::Some(v);
  54. }
  55. // optional bytes sha1 = 4;
  56. pub fn get_sha1(&self) -> &[u8] {
  57. match self.sha1.as_ref() {
  58. Some(v) => &v,
  59. None => &[],
  60. }
  61. }
  62. pub fn clear_sha1(&mut self) {
  63. self.sha1.clear();
  64. }
  65. pub fn has_sha1(&self) -> bool {
  66. self.sha1.is_some()
  67. }
  68. // Param is passed by value, moved
  69. pub fn set_sha1(&mut self, v: ::std::vec::Vec<u8>) {
  70. self.sha1 = ::protobuf::SingularField::some(v);
  71. }
  72. // Mutable pointer to the field.
  73. // If field is not initialized, it is initialized with default value first.
  74. pub fn mut_sha1(&mut self) -> &mut ::std::vec::Vec<u8> {
  75. if self.sha1.is_none() {
  76. self.sha1.set_default();
  77. }
  78. self.sha1.as_mut().unwrap()
  79. }
  80. // Take field
  81. pub fn take_sha1(&mut self) -> ::std::vec::Vec<u8> {
  82. self.sha1.take().unwrap_or_else(|| ::std::vec::Vec::new())
  83. }
  84. }
  85. impl ::protobuf::Message for ListChecksum {
  86. fn is_initialized(&self) -> bool {
  87. true
  88. }
  89. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  90. while !is.eof()? {
  91. let (field_number, wire_type) = is.read_tag_unpack()?;
  92. match field_number {
  93. 1 => {
  94. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  95. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  96. }
  97. let tmp = is.read_int32()?;
  98. self.version = ::std::option::Option::Some(tmp);
  99. },
  100. 4 => {
  101. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.sha1)?;
  102. },
  103. _ => {
  104. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  105. },
  106. };
  107. }
  108. ::std::result::Result::Ok(())
  109. }
  110. // Compute sizes of nested messages
  111. #[allow(unused_variables)]
  112. fn compute_size(&self) -> u32 {
  113. let mut my_size = 0;
  114. if let Some(v) = self.version {
  115. my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
  116. }
  117. if let Some(ref v) = self.sha1.as_ref() {
  118. my_size += ::protobuf::rt::bytes_size(4, &v);
  119. }
  120. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  121. self.cached_size.set(my_size);
  122. my_size
  123. }
  124. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  125. if let Some(v) = self.version {
  126. os.write_int32(1, v)?;
  127. }
  128. if let Some(ref v) = self.sha1.as_ref() {
  129. os.write_bytes(4, &v)?;
  130. }
  131. os.write_unknown_fields(self.get_unknown_fields())?;
  132. ::std::result::Result::Ok(())
  133. }
  134. fn get_cached_size(&self) -> u32 {
  135. self.cached_size.get()
  136. }
  137. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  138. &self.unknown_fields
  139. }
  140. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  141. &mut self.unknown_fields
  142. }
  143. fn as_any(&self) -> &dyn (::std::any::Any) {
  144. self as &dyn (::std::any::Any)
  145. }
  146. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  147. self as &mut dyn (::std::any::Any)
  148. }
  149. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  150. self
  151. }
  152. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  153. Self::descriptor_static()
  154. }
  155. fn new() -> ListChecksum {
  156. ListChecksum::new()
  157. }
  158. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  159. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  160. lock: ::protobuf::lazy::ONCE_INIT,
  161. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  162. };
  163. unsafe {
  164. descriptor.get(|| {
  165. let mut fields = ::std::vec::Vec::new();
  166. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
  167. "version",
  168. |m: &ListChecksum| { &m.version },
  169. |m: &mut ListChecksum| { &mut m.version },
  170. ));
  171. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  172. "sha1",
  173. |m: &ListChecksum| { &m.sha1 },
  174. |m: &mut ListChecksum| { &mut m.sha1 },
  175. ));
  176. ::protobuf::reflect::MessageDescriptor::new::<ListChecksum>(
  177. "ListChecksum",
  178. fields,
  179. file_descriptor_proto()
  180. )
  181. })
  182. }
  183. }
  184. fn default_instance() -> &'static ListChecksum {
  185. static mut instance: ::protobuf::lazy::Lazy<ListChecksum> = ::protobuf::lazy::Lazy {
  186. lock: ::protobuf::lazy::ONCE_INIT,
  187. ptr: 0 as *const ListChecksum,
  188. };
  189. unsafe {
  190. instance.get(ListChecksum::new)
  191. }
  192. }
  193. }
  194. impl ::protobuf::Clear for ListChecksum {
  195. fn clear(&mut self) {
  196. self.version = ::std::option::Option::None;
  197. self.sha1.clear();
  198. self.unknown_fields.clear();
  199. }
  200. }
  201. impl ::std::fmt::Debug for ListChecksum {
  202. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  203. ::protobuf::text_format::fmt(self, f)
  204. }
  205. }
  206. impl ::protobuf::reflect::ProtobufValue for ListChecksum {
  207. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  208. ::protobuf::reflect::ProtobufValueRef::Message(self)
  209. }
  210. }
  211. #[derive(PartialEq,Clone,Default)]
  212. pub struct DownloadFormat {
  213. // message fields
  214. codec: ::std::option::Option<DownloadFormat_Codec>,
  215. // special fields
  216. pub unknown_fields: ::protobuf::UnknownFields,
  217. pub cached_size: ::protobuf::CachedSize,
  218. }
  219. impl<'a> ::std::default::Default for &'a DownloadFormat {
  220. fn default() -> &'a DownloadFormat {
  221. <DownloadFormat as ::protobuf::Message>::default_instance()
  222. }
  223. }
  224. impl DownloadFormat {
  225. pub fn new() -> DownloadFormat {
  226. ::std::default::Default::default()
  227. }
  228. // optional .DownloadFormat.Codec codec = 1;
  229. pub fn get_codec(&self) -> DownloadFormat_Codec {
  230. self.codec.unwrap_or(DownloadFormat_Codec::CODEC_UNKNOWN)
  231. }
  232. pub fn clear_codec(&mut self) {
  233. self.codec = ::std::option::Option::None;
  234. }
  235. pub fn has_codec(&self) -> bool {
  236. self.codec.is_some()
  237. }
  238. // Param is passed by value, moved
  239. pub fn set_codec(&mut self, v: DownloadFormat_Codec) {
  240. self.codec = ::std::option::Option::Some(v);
  241. }
  242. }
  243. impl ::protobuf::Message for DownloadFormat {
  244. fn is_initialized(&self) -> bool {
  245. true
  246. }
  247. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  248. while !is.eof()? {
  249. let (field_number, wire_type) = is.read_tag_unpack()?;
  250. match field_number {
  251. 1 => {
  252. ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.codec, 1, &mut self.unknown_fields)?
  253. },
  254. _ => {
  255. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  256. },
  257. };
  258. }
  259. ::std::result::Result::Ok(())
  260. }
  261. // Compute sizes of nested messages
  262. #[allow(unused_variables)]
  263. fn compute_size(&self) -> u32 {
  264. let mut my_size = 0;
  265. if let Some(v) = self.codec {
  266. my_size += ::protobuf::rt::enum_size(1, v);
  267. }
  268. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  269. self.cached_size.set(my_size);
  270. my_size
  271. }
  272. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  273. if let Some(v) = self.codec {
  274. os.write_enum(1, v.value())?;
  275. }
  276. os.write_unknown_fields(self.get_unknown_fields())?;
  277. ::std::result::Result::Ok(())
  278. }
  279. fn get_cached_size(&self) -> u32 {
  280. self.cached_size.get()
  281. }
  282. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  283. &self.unknown_fields
  284. }
  285. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  286. &mut self.unknown_fields
  287. }
  288. fn as_any(&self) -> &dyn (::std::any::Any) {
  289. self as &dyn (::std::any::Any)
  290. }
  291. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  292. self as &mut dyn (::std::any::Any)
  293. }
  294. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  295. self
  296. }
  297. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  298. Self::descriptor_static()
  299. }
  300. fn new() -> DownloadFormat {
  301. DownloadFormat::new()
  302. }
  303. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  304. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  305. lock: ::protobuf::lazy::ONCE_INIT,
  306. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  307. };
  308. unsafe {
  309. descriptor.get(|| {
  310. let mut fields = ::std::vec::Vec::new();
  311. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<DownloadFormat_Codec>>(
  312. "codec",
  313. |m: &DownloadFormat| { &m.codec },
  314. |m: &mut DownloadFormat| { &mut m.codec },
  315. ));
  316. ::protobuf::reflect::MessageDescriptor::new::<DownloadFormat>(
  317. "DownloadFormat",
  318. fields,
  319. file_descriptor_proto()
  320. )
  321. })
  322. }
  323. }
  324. fn default_instance() -> &'static DownloadFormat {
  325. static mut instance: ::protobuf::lazy::Lazy<DownloadFormat> = ::protobuf::lazy::Lazy {
  326. lock: ::protobuf::lazy::ONCE_INIT,
  327. ptr: 0 as *const DownloadFormat,
  328. };
  329. unsafe {
  330. instance.get(DownloadFormat::new)
  331. }
  332. }
  333. }
  334. impl ::protobuf::Clear for DownloadFormat {
  335. fn clear(&mut self) {
  336. self.codec = ::std::option::Option::None;
  337. self.unknown_fields.clear();
  338. }
  339. }
  340. impl ::std::fmt::Debug for DownloadFormat {
  341. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  342. ::protobuf::text_format::fmt(self, f)
  343. }
  344. }
  345. impl ::protobuf::reflect::ProtobufValue for DownloadFormat {
  346. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  347. ::protobuf::reflect::ProtobufValueRef::Message(self)
  348. }
  349. }
  350. #[derive(Clone,PartialEq,Eq,Debug,Hash)]
  351. pub enum DownloadFormat_Codec {
  352. CODEC_UNKNOWN = 0,
  353. OGG_VORBIS = 1,
  354. FLAC = 2,
  355. MPEG_1_LAYER_3 = 3,
  356. }
  357. impl ::protobuf::ProtobufEnum for DownloadFormat_Codec {
  358. fn value(&self) -> i32 {
  359. *self as i32
  360. }
  361. fn from_i32(value: i32) -> ::std::option::Option<DownloadFormat_Codec> {
  362. match value {
  363. 0 => ::std::option::Option::Some(DownloadFormat_Codec::CODEC_UNKNOWN),
  364. 1 => ::std::option::Option::Some(DownloadFormat_Codec::OGG_VORBIS),
  365. 2 => ::std::option::Option::Some(DownloadFormat_Codec::FLAC),
  366. 3 => ::std::option::Option::Some(DownloadFormat_Codec::MPEG_1_LAYER_3),
  367. _ => ::std::option::Option::None
  368. }
  369. }
  370. fn values() -> &'static [Self] {
  371. static values: &'static [DownloadFormat_Codec] = &[
  372. DownloadFormat_Codec::CODEC_UNKNOWN,
  373. DownloadFormat_Codec::OGG_VORBIS,
  374. DownloadFormat_Codec::FLAC,
  375. DownloadFormat_Codec::MPEG_1_LAYER_3,
  376. ];
  377. values
  378. }
  379. fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
  380. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
  381. lock: ::protobuf::lazy::ONCE_INIT,
  382. ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
  383. };
  384. unsafe {
  385. descriptor.get(|| {
  386. ::protobuf::reflect::EnumDescriptor::new("DownloadFormat_Codec", file_descriptor_proto())
  387. })
  388. }
  389. }
  390. }
  391. impl ::std::marker::Copy for DownloadFormat_Codec {
  392. }
  393. impl ::std::default::Default for DownloadFormat_Codec {
  394. fn default() -> Self {
  395. DownloadFormat_Codec::CODEC_UNKNOWN
  396. }
  397. }
  398. impl ::protobuf::reflect::ProtobufValue for DownloadFormat_Codec {
  399. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  400. ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
  401. }
  402. }
  403. #[derive(PartialEq,Clone,Default)]
  404. pub struct ListAttributes {
  405. // message fields
  406. name: ::protobuf::SingularField<::std::string::String>,
  407. description: ::protobuf::SingularField<::std::string::String>,
  408. picture: ::protobuf::SingularField<::std::vec::Vec<u8>>,
  409. collaborative: ::std::option::Option<bool>,
  410. pl3_version: ::protobuf::SingularField<::std::string::String>,
  411. deleted_by_owner: ::std::option::Option<bool>,
  412. restricted_collaborative: ::std::option::Option<bool>,
  413. deprecated_client_id: ::std::option::Option<i64>,
  414. public_starred: ::std::option::Option<bool>,
  415. client_id: ::protobuf::SingularField<::std::string::String>,
  416. // special fields
  417. pub unknown_fields: ::protobuf::UnknownFields,
  418. pub cached_size: ::protobuf::CachedSize,
  419. }
  420. impl<'a> ::std::default::Default for &'a ListAttributes {
  421. fn default() -> &'a ListAttributes {
  422. <ListAttributes as ::protobuf::Message>::default_instance()
  423. }
  424. }
  425. impl ListAttributes {
  426. pub fn new() -> ListAttributes {
  427. ::std::default::Default::default()
  428. }
  429. // optional string name = 1;
  430. pub fn get_name(&self) -> &str {
  431. match self.name.as_ref() {
  432. Some(v) => &v,
  433. None => "",
  434. }
  435. }
  436. pub fn clear_name(&mut self) {
  437. self.name.clear();
  438. }
  439. pub fn has_name(&self) -> bool {
  440. self.name.is_some()
  441. }
  442. // Param is passed by value, moved
  443. pub fn set_name(&mut self, v: ::std::string::String) {
  444. self.name = ::protobuf::SingularField::some(v);
  445. }
  446. // Mutable pointer to the field.
  447. // If field is not initialized, it is initialized with default value first.
  448. pub fn mut_name(&mut self) -> &mut ::std::string::String {
  449. if self.name.is_none() {
  450. self.name.set_default();
  451. }
  452. self.name.as_mut().unwrap()
  453. }
  454. // Take field
  455. pub fn take_name(&mut self) -> ::std::string::String {
  456. self.name.take().unwrap_or_else(|| ::std::string::String::new())
  457. }
  458. // optional string description = 2;
  459. pub fn get_description(&self) -> &str {
  460. match self.description.as_ref() {
  461. Some(v) => &v,
  462. None => "",
  463. }
  464. }
  465. pub fn clear_description(&mut self) {
  466. self.description.clear();
  467. }
  468. pub fn has_description(&self) -> bool {
  469. self.description.is_some()
  470. }
  471. // Param is passed by value, moved
  472. pub fn set_description(&mut self, v: ::std::string::String) {
  473. self.description = ::protobuf::SingularField::some(v);
  474. }
  475. // Mutable pointer to the field.
  476. // If field is not initialized, it is initialized with default value first.
  477. pub fn mut_description(&mut self) -> &mut ::std::string::String {
  478. if self.description.is_none() {
  479. self.description.set_default();
  480. }
  481. self.description.as_mut().unwrap()
  482. }
  483. // Take field
  484. pub fn take_description(&mut self) -> ::std::string::String {
  485. self.description.take().unwrap_or_else(|| ::std::string::String::new())
  486. }
  487. // optional bytes picture = 3;
  488. pub fn get_picture(&self) -> &[u8] {
  489. match self.picture.as_ref() {
  490. Some(v) => &v,
  491. None => &[],
  492. }
  493. }
  494. pub fn clear_picture(&mut self) {
  495. self.picture.clear();
  496. }
  497. pub fn has_picture(&self) -> bool {
  498. self.picture.is_some()
  499. }
  500. // Param is passed by value, moved
  501. pub fn set_picture(&mut self, v: ::std::vec::Vec<u8>) {
  502. self.picture = ::protobuf::SingularField::some(v);
  503. }
  504. // Mutable pointer to the field.
  505. // If field is not initialized, it is initialized with default value first.
  506. pub fn mut_picture(&mut self) -> &mut ::std::vec::Vec<u8> {
  507. if self.picture.is_none() {
  508. self.picture.set_default();
  509. }
  510. self.picture.as_mut().unwrap()
  511. }
  512. // Take field
  513. pub fn take_picture(&mut self) -> ::std::vec::Vec<u8> {
  514. self.picture.take().unwrap_or_else(|| ::std::vec::Vec::new())
  515. }
  516. // optional bool collaborative = 4;
  517. pub fn get_collaborative(&self) -> bool {
  518. self.collaborative.unwrap_or(false)
  519. }
  520. pub fn clear_collaborative(&mut self) {
  521. self.collaborative = ::std::option::Option::None;
  522. }
  523. pub fn has_collaborative(&self) -> bool {
  524. self.collaborative.is_some()
  525. }
  526. // Param is passed by value, moved
  527. pub fn set_collaborative(&mut self, v: bool) {
  528. self.collaborative = ::std::option::Option::Some(v);
  529. }
  530. // optional string pl3_version = 5;
  531. pub fn get_pl3_version(&self) -> &str {
  532. match self.pl3_version.as_ref() {
  533. Some(v) => &v,
  534. None => "",
  535. }
  536. }
  537. pub fn clear_pl3_version(&mut self) {
  538. self.pl3_version.clear();
  539. }
  540. pub fn has_pl3_version(&self) -> bool {
  541. self.pl3_version.is_some()
  542. }
  543. // Param is passed by value, moved
  544. pub fn set_pl3_version(&mut self, v: ::std::string::String) {
  545. self.pl3_version = ::protobuf::SingularField::some(v);
  546. }
  547. // Mutable pointer to the field.
  548. // If field is not initialized, it is initialized with default value first.
  549. pub fn mut_pl3_version(&mut self) -> &mut ::std::string::String {
  550. if self.pl3_version.is_none() {
  551. self.pl3_version.set_default();
  552. }
  553. self.pl3_version.as_mut().unwrap()
  554. }
  555. // Take field
  556. pub fn take_pl3_version(&mut self) -> ::std::string::String {
  557. self.pl3_version.take().unwrap_or_else(|| ::std::string::String::new())
  558. }
  559. // optional bool deleted_by_owner = 6;
  560. pub fn get_deleted_by_owner(&self) -> bool {
  561. self.deleted_by_owner.unwrap_or(false)
  562. }
  563. pub fn clear_deleted_by_owner(&mut self) {
  564. self.deleted_by_owner = ::std::option::Option::None;
  565. }
  566. pub fn has_deleted_by_owner(&self) -> bool {
  567. self.deleted_by_owner.is_some()
  568. }
  569. // Param is passed by value, moved
  570. pub fn set_deleted_by_owner(&mut self, v: bool) {
  571. self.deleted_by_owner = ::std::option::Option::Some(v);
  572. }
  573. // optional bool restricted_collaborative = 7;
  574. pub fn get_restricted_collaborative(&self) -> bool {
  575. self.restricted_collaborative.unwrap_or(false)
  576. }
  577. pub fn clear_restricted_collaborative(&mut self) {
  578. self.restricted_collaborative = ::std::option::Option::None;
  579. }
  580. pub fn has_restricted_collaborative(&self) -> bool {
  581. self.restricted_collaborative.is_some()
  582. }
  583. // Param is passed by value, moved
  584. pub fn set_restricted_collaborative(&mut self, v: bool) {
  585. self.restricted_collaborative = ::std::option::Option::Some(v);
  586. }
  587. // optional int64 deprecated_client_id = 8;
  588. pub fn get_deprecated_client_id(&self) -> i64 {
  589. self.deprecated_client_id.unwrap_or(0)
  590. }
  591. pub fn clear_deprecated_client_id(&mut self) {
  592. self.deprecated_client_id = ::std::option::Option::None;
  593. }
  594. pub fn has_deprecated_client_id(&self) -> bool {
  595. self.deprecated_client_id.is_some()
  596. }
  597. // Param is passed by value, moved
  598. pub fn set_deprecated_client_id(&mut self, v: i64) {
  599. self.deprecated_client_id = ::std::option::Option::Some(v);
  600. }
  601. // optional bool public_starred = 9;
  602. pub fn get_public_starred(&self) -> bool {
  603. self.public_starred.unwrap_or(false)
  604. }
  605. pub fn clear_public_starred(&mut self) {
  606. self.public_starred = ::std::option::Option::None;
  607. }
  608. pub fn has_public_starred(&self) -> bool {
  609. self.public_starred.is_some()
  610. }
  611. // Param is passed by value, moved
  612. pub fn set_public_starred(&mut self, v: bool) {
  613. self.public_starred = ::std::option::Option::Some(v);
  614. }
  615. // optional string client_id = 10;
  616. pub fn get_client_id(&self) -> &str {
  617. match self.client_id.as_ref() {
  618. Some(v) => &v,
  619. None => "",
  620. }
  621. }
  622. pub fn clear_client_id(&mut self) {
  623. self.client_id.clear();
  624. }
  625. pub fn has_client_id(&self) -> bool {
  626. self.client_id.is_some()
  627. }
  628. // Param is passed by value, moved
  629. pub fn set_client_id(&mut self, v: ::std::string::String) {
  630. self.client_id = ::protobuf::SingularField::some(v);
  631. }
  632. // Mutable pointer to the field.
  633. // If field is not initialized, it is initialized with default value first.
  634. pub fn mut_client_id(&mut self) -> &mut ::std::string::String {
  635. if self.client_id.is_none() {
  636. self.client_id.set_default();
  637. }
  638. self.client_id.as_mut().unwrap()
  639. }
  640. // Take field
  641. pub fn take_client_id(&mut self) -> ::std::string::String {
  642. self.client_id.take().unwrap_or_else(|| ::std::string::String::new())
  643. }
  644. }
  645. impl ::protobuf::Message for ListAttributes {
  646. fn is_initialized(&self) -> bool {
  647. true
  648. }
  649. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  650. while !is.eof()? {
  651. let (field_number, wire_type) = is.read_tag_unpack()?;
  652. match field_number {
  653. 1 => {
  654. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
  655. },
  656. 2 => {
  657. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.description)?;
  658. },
  659. 3 => {
  660. ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.picture)?;
  661. },
  662. 4 => {
  663. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  664. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  665. }
  666. let tmp = is.read_bool()?;
  667. self.collaborative = ::std::option::Option::Some(tmp);
  668. },
  669. 5 => {
  670. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.pl3_version)?;
  671. },
  672. 6 => {
  673. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  674. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  675. }
  676. let tmp = is.read_bool()?;
  677. self.deleted_by_owner = ::std::option::Option::Some(tmp);
  678. },
  679. 7 => {
  680. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  681. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  682. }
  683. let tmp = is.read_bool()?;
  684. self.restricted_collaborative = ::std::option::Option::Some(tmp);
  685. },
  686. 8 => {
  687. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  688. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  689. }
  690. let tmp = is.read_int64()?;
  691. self.deprecated_client_id = ::std::option::Option::Some(tmp);
  692. },
  693. 9 => {
  694. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  695. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  696. }
  697. let tmp = is.read_bool()?;
  698. self.public_starred = ::std::option::Option::Some(tmp);
  699. },
  700. 10 => {
  701. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.client_id)?;
  702. },
  703. _ => {
  704. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  705. },
  706. };
  707. }
  708. ::std::result::Result::Ok(())
  709. }
  710. // Compute sizes of nested messages
  711. #[allow(unused_variables)]
  712. fn compute_size(&self) -> u32 {
  713. let mut my_size = 0;
  714. if let Some(ref v) = self.name.as_ref() {
  715. my_size += ::protobuf::rt::string_size(1, &v);
  716. }
  717. if let Some(ref v) = self.description.as_ref() {
  718. my_size += ::protobuf::rt::string_size(2, &v);
  719. }
  720. if let Some(ref v) = self.picture.as_ref() {
  721. my_size += ::protobuf::rt::bytes_size(3, &v);
  722. }
  723. if let Some(v) = self.collaborative {
  724. my_size += 2;
  725. }
  726. if let Some(ref v) = self.pl3_version.as_ref() {
  727. my_size += ::protobuf::rt::string_size(5, &v);
  728. }
  729. if let Some(v) = self.deleted_by_owner {
  730. my_size += 2;
  731. }
  732. if let Some(v) = self.restricted_collaborative {
  733. my_size += 2;
  734. }
  735. if let Some(v) = self.deprecated_client_id {
  736. my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
  737. }
  738. if let Some(v) = self.public_starred {
  739. my_size += 2;
  740. }
  741. if let Some(ref v) = self.client_id.as_ref() {
  742. my_size += ::protobuf::rt::string_size(10, &v);
  743. }
  744. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  745. self.cached_size.set(my_size);
  746. my_size
  747. }
  748. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  749. if let Some(ref v) = self.name.as_ref() {
  750. os.write_string(1, &v)?;
  751. }
  752. if let Some(ref v) = self.description.as_ref() {
  753. os.write_string(2, &v)?;
  754. }
  755. if let Some(ref v) = self.picture.as_ref() {
  756. os.write_bytes(3, &v)?;
  757. }
  758. if let Some(v) = self.collaborative {
  759. os.write_bool(4, v)?;
  760. }
  761. if let Some(ref v) = self.pl3_version.as_ref() {
  762. os.write_string(5, &v)?;
  763. }
  764. if let Some(v) = self.deleted_by_owner {
  765. os.write_bool(6, v)?;
  766. }
  767. if let Some(v) = self.restricted_collaborative {
  768. os.write_bool(7, v)?;
  769. }
  770. if let Some(v) = self.deprecated_client_id {
  771. os.write_int64(8, v)?;
  772. }
  773. if let Some(v) = self.public_starred {
  774. os.write_bool(9, v)?;
  775. }
  776. if let Some(ref v) = self.client_id.as_ref() {
  777. os.write_string(10, &v)?;
  778. }
  779. os.write_unknown_fields(self.get_unknown_fields())?;
  780. ::std::result::Result::Ok(())
  781. }
  782. fn get_cached_size(&self) -> u32 {
  783. self.cached_size.get()
  784. }
  785. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  786. &self.unknown_fields
  787. }
  788. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  789. &mut self.unknown_fields
  790. }
  791. fn as_any(&self) -> &dyn (::std::any::Any) {
  792. self as &dyn (::std::any::Any)
  793. }
  794. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  795. self as &mut dyn (::std::any::Any)
  796. }
  797. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  798. self
  799. }
  800. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  801. Self::descriptor_static()
  802. }
  803. fn new() -> ListAttributes {
  804. ListAttributes::new()
  805. }
  806. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  807. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  808. lock: ::protobuf::lazy::ONCE_INIT,
  809. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  810. };
  811. unsafe {
  812. descriptor.get(|| {
  813. let mut fields = ::std::vec::Vec::new();
  814. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  815. "name",
  816. |m: &ListAttributes| { &m.name },
  817. |m: &mut ListAttributes| { &mut m.name },
  818. ));
  819. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  820. "description",
  821. |m: &ListAttributes| { &m.description },
  822. |m: &mut ListAttributes| { &mut m.description },
  823. ));
  824. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
  825. "picture",
  826. |m: &ListAttributes| { &m.picture },
  827. |m: &mut ListAttributes| { &mut m.picture },
  828. ));
  829. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  830. "collaborative",
  831. |m: &ListAttributes| { &m.collaborative },
  832. |m: &mut ListAttributes| { &mut m.collaborative },
  833. ));
  834. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  835. "pl3_version",
  836. |m: &ListAttributes| { &m.pl3_version },
  837. |m: &mut ListAttributes| { &mut m.pl3_version },
  838. ));
  839. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  840. "deleted_by_owner",
  841. |m: &ListAttributes| { &m.deleted_by_owner },
  842. |m: &mut ListAttributes| { &mut m.deleted_by_owner },
  843. ));
  844. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  845. "restricted_collaborative",
  846. |m: &ListAttributes| { &m.restricted_collaborative },
  847. |m: &mut ListAttributes| { &mut m.restricted_collaborative },
  848. ));
  849. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  850. "deprecated_client_id",
  851. |m: &ListAttributes| { &m.deprecated_client_id },
  852. |m: &mut ListAttributes| { &mut m.deprecated_client_id },
  853. ));
  854. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  855. "public_starred",
  856. |m: &ListAttributes| { &m.public_starred },
  857. |m: &mut ListAttributes| { &mut m.public_starred },
  858. ));
  859. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  860. "client_id",
  861. |m: &ListAttributes| { &m.client_id },
  862. |m: &mut ListAttributes| { &mut m.client_id },
  863. ));
  864. ::protobuf::reflect::MessageDescriptor::new::<ListAttributes>(
  865. "ListAttributes",
  866. fields,
  867. file_descriptor_proto()
  868. )
  869. })
  870. }
  871. }
  872. fn default_instance() -> &'static ListAttributes {
  873. static mut instance: ::protobuf::lazy::Lazy<ListAttributes> = ::protobuf::lazy::Lazy {
  874. lock: ::protobuf::lazy::ONCE_INIT,
  875. ptr: 0 as *const ListAttributes,
  876. };
  877. unsafe {
  878. instance.get(ListAttributes::new)
  879. }
  880. }
  881. }
  882. impl ::protobuf::Clear for ListAttributes {
  883. fn clear(&mut self) {
  884. self.name.clear();
  885. self.description.clear();
  886. self.picture.clear();
  887. self.collaborative = ::std::option::Option::None;
  888. self.pl3_version.clear();
  889. self.deleted_by_owner = ::std::option::Option::None;
  890. self.restricted_collaborative = ::std::option::Option::None;
  891. self.deprecated_client_id = ::std::option::Option::None;
  892. self.public_starred = ::std::option::Option::None;
  893. self.client_id.clear();
  894. self.unknown_fields.clear();
  895. }
  896. }
  897. impl ::std::fmt::Debug for ListAttributes {
  898. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  899. ::protobuf::text_format::fmt(self, f)
  900. }
  901. }
  902. impl ::protobuf::reflect::ProtobufValue for ListAttributes {
  903. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  904. ::protobuf::reflect::ProtobufValueRef::Message(self)
  905. }
  906. }
  907. #[derive(PartialEq,Clone,Default)]
  908. pub struct ItemAttributes {
  909. // message fields
  910. added_by: ::protobuf::SingularField<::std::string::String>,
  911. timestamp: ::std::option::Option<i64>,
  912. message: ::protobuf::SingularField<::std::string::String>,
  913. seen: ::std::option::Option<bool>,
  914. download_count: ::std::option::Option<i64>,
  915. download_format: ::protobuf::SingularPtrField<DownloadFormat>,
  916. sevendigital_id: ::protobuf::SingularField<::std::string::String>,
  917. sevendigital_left: ::std::option::Option<i64>,
  918. seen_at: ::std::option::Option<i64>,
  919. public: ::std::option::Option<bool>,
  920. // special fields
  921. pub unknown_fields: ::protobuf::UnknownFields,
  922. pub cached_size: ::protobuf::CachedSize,
  923. }
  924. impl<'a> ::std::default::Default for &'a ItemAttributes {
  925. fn default() -> &'a ItemAttributes {
  926. <ItemAttributes as ::protobuf::Message>::default_instance()
  927. }
  928. }
  929. impl ItemAttributes {
  930. pub fn new() -> ItemAttributes {
  931. ::std::default::Default::default()
  932. }
  933. // optional string added_by = 1;
  934. pub fn get_added_by(&self) -> &str {
  935. match self.added_by.as_ref() {
  936. Some(v) => &v,
  937. None => "",
  938. }
  939. }
  940. pub fn clear_added_by(&mut self) {
  941. self.added_by.clear();
  942. }
  943. pub fn has_added_by(&self) -> bool {
  944. self.added_by.is_some()
  945. }
  946. // Param is passed by value, moved
  947. pub fn set_added_by(&mut self, v: ::std::string::String) {
  948. self.added_by = ::protobuf::SingularField::some(v);
  949. }
  950. // Mutable pointer to the field.
  951. // If field is not initialized, it is initialized with default value first.
  952. pub fn mut_added_by(&mut self) -> &mut ::std::string::String {
  953. if self.added_by.is_none() {
  954. self.added_by.set_default();
  955. }
  956. self.added_by.as_mut().unwrap()
  957. }
  958. // Take field
  959. pub fn take_added_by(&mut self) -> ::std::string::String {
  960. self.added_by.take().unwrap_or_else(|| ::std::string::String::new())
  961. }
  962. // optional int64 timestamp = 2;
  963. pub fn get_timestamp(&self) -> i64 {
  964. self.timestamp.unwrap_or(0)
  965. }
  966. pub fn clear_timestamp(&mut self) {
  967. self.timestamp = ::std::option::Option::None;
  968. }
  969. pub fn has_timestamp(&self) -> bool {
  970. self.timestamp.is_some()
  971. }
  972. // Param is passed by value, moved
  973. pub fn set_timestamp(&mut self, v: i64) {
  974. self.timestamp = ::std::option::Option::Some(v);
  975. }
  976. // optional string message = 3;
  977. pub fn get_message(&self) -> &str {
  978. match self.message.as_ref() {
  979. Some(v) => &v,
  980. None => "",
  981. }
  982. }
  983. pub fn clear_message(&mut self) {
  984. self.message.clear();
  985. }
  986. pub fn has_message(&self) -> bool {
  987. self.message.is_some()
  988. }
  989. // Param is passed by value, moved
  990. pub fn set_message(&mut self, v: ::std::string::String) {
  991. self.message = ::protobuf::SingularField::some(v);
  992. }
  993. // Mutable pointer to the field.
  994. // If field is not initialized, it is initialized with default value first.
  995. pub fn mut_message(&mut self) -> &mut ::std::string::String {
  996. if self.message.is_none() {
  997. self.message.set_default();
  998. }
  999. self.message.as_mut().unwrap()
  1000. }
  1001. // Take field
  1002. pub fn take_message(&mut self) -> ::std::string::String {
  1003. self.message.take().unwrap_or_else(|| ::std::string::String::new())
  1004. }
  1005. // optional bool seen = 4;
  1006. pub fn get_seen(&self) -> bool {
  1007. self.seen.unwrap_or(false)
  1008. }
  1009. pub fn clear_seen(&mut self) {
  1010. self.seen = ::std::option::Option::None;
  1011. }
  1012. pub fn has_seen(&self) -> bool {
  1013. self.seen.is_some()
  1014. }
  1015. // Param is passed by value, moved
  1016. pub fn set_seen(&mut self, v: bool) {
  1017. self.seen = ::std::option::Option::Some(v);
  1018. }
  1019. // optional int64 download_count = 5;
  1020. pub fn get_download_count(&self) -> i64 {
  1021. self.download_count.unwrap_or(0)
  1022. }
  1023. pub fn clear_download_count(&mut self) {
  1024. self.download_count = ::std::option::Option::None;
  1025. }
  1026. pub fn has_download_count(&self) -> bool {
  1027. self.download_count.is_some()
  1028. }
  1029. // Param is passed by value, moved
  1030. pub fn set_download_count(&mut self, v: i64) {
  1031. self.download_count = ::std::option::Option::Some(v);
  1032. }
  1033. // optional .DownloadFormat download_format = 6;
  1034. pub fn get_download_format(&self) -> &DownloadFormat {
  1035. self.download_format.as_ref().unwrap_or_else(|| DownloadFormat::default_instance())
  1036. }
  1037. pub fn clear_download_format(&mut self) {
  1038. self.download_format.clear();
  1039. }
  1040. pub fn has_download_format(&self) -> bool {
  1041. self.download_format.is_some()
  1042. }
  1043. // Param is passed by value, moved
  1044. pub fn set_download_format(&mut self, v: DownloadFormat) {
  1045. self.download_format = ::protobuf::SingularPtrField::some(v);
  1046. }
  1047. // Mutable pointer to the field.
  1048. // If field is not initialized, it is initialized with default value first.
  1049. pub fn mut_download_format(&mut self) -> &mut DownloadFormat {
  1050. if self.download_format.is_none() {
  1051. self.download_format.set_default();
  1052. }
  1053. self.download_format.as_mut().unwrap()
  1054. }
  1055. // Take field
  1056. pub fn take_download_format(&mut self) -> DownloadFormat {
  1057. self.download_format.take().unwrap_or_else(|| DownloadFormat::new())
  1058. }
  1059. // optional string sevendigital_id = 7;
  1060. pub fn get_sevendigital_id(&self) -> &str {
  1061. match self.sevendigital_id.as_ref() {
  1062. Some(v) => &v,
  1063. None => "",
  1064. }
  1065. }
  1066. pub fn clear_sevendigital_id(&mut self) {
  1067. self.sevendigital_id.clear();
  1068. }
  1069. pub fn has_sevendigital_id(&self) -> bool {
  1070. self.sevendigital_id.is_some()
  1071. }
  1072. // Param is passed by value, moved
  1073. pub fn set_sevendigital_id(&mut self, v: ::std::string::String) {
  1074. self.sevendigital_id = ::protobuf::SingularField::some(v);
  1075. }
  1076. // Mutable pointer to the field.
  1077. // If field is not initialized, it is initialized with default value first.
  1078. pub fn mut_sevendigital_id(&mut self) -> &mut ::std::string::String {
  1079. if self.sevendigital_id.is_none() {
  1080. self.sevendigital_id.set_default();
  1081. }
  1082. self.sevendigital_id.as_mut().unwrap()
  1083. }
  1084. // Take field
  1085. pub fn take_sevendigital_id(&mut self) -> ::std::string::String {
  1086. self.sevendigital_id.take().unwrap_or_else(|| ::std::string::String::new())
  1087. }
  1088. // optional int64 sevendigital_left = 8;
  1089. pub fn get_sevendigital_left(&self) -> i64 {
  1090. self.sevendigital_left.unwrap_or(0)
  1091. }
  1092. pub fn clear_sevendigital_left(&mut self) {
  1093. self.sevendigital_left = ::std::option::Option::None;
  1094. }
  1095. pub fn has_sevendigital_left(&self) -> bool {
  1096. self.sevendigital_left.is_some()
  1097. }
  1098. // Param is passed by value, moved
  1099. pub fn set_sevendigital_left(&mut self, v: i64) {
  1100. self.sevendigital_left = ::std::option::Option::Some(v);
  1101. }
  1102. // optional int64 seen_at = 9;
  1103. pub fn get_seen_at(&self) -> i64 {
  1104. self.seen_at.unwrap_or(0)
  1105. }
  1106. pub fn clear_seen_at(&mut self) {
  1107. self.seen_at = ::std::option::Option::None;
  1108. }
  1109. pub fn has_seen_at(&self) -> bool {
  1110. self.seen_at.is_some()
  1111. }
  1112. // Param is passed by value, moved
  1113. pub fn set_seen_at(&mut self, v: i64) {
  1114. self.seen_at = ::std::option::Option::Some(v);
  1115. }
  1116. // optional bool public = 10;
  1117. pub fn get_public(&self) -> bool {
  1118. self.public.unwrap_or(false)
  1119. }
  1120. pub fn clear_public(&mut self) {
  1121. self.public = ::std::option::Option::None;
  1122. }
  1123. pub fn has_public(&self) -> bool {
  1124. self.public.is_some()
  1125. }
  1126. // Param is passed by value, moved
  1127. pub fn set_public(&mut self, v: bool) {
  1128. self.public = ::std::option::Option::Some(v);
  1129. }
  1130. }
  1131. impl ::protobuf::Message for ItemAttributes {
  1132. fn is_initialized(&self) -> bool {
  1133. for v in &self.download_format {
  1134. if !v.is_initialized() {
  1135. return false;
  1136. }
  1137. };
  1138. true
  1139. }
  1140. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1141. while !is.eof()? {
  1142. let (field_number, wire_type) = is.read_tag_unpack()?;
  1143. match field_number {
  1144. 1 => {
  1145. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.added_by)?;
  1146. },
  1147. 2 => {
  1148. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1149. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1150. }
  1151. let tmp = is.read_int64()?;
  1152. self.timestamp = ::std::option::Option::Some(tmp);
  1153. },
  1154. 3 => {
  1155. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.message)?;
  1156. },
  1157. 4 => {
  1158. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1159. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1160. }
  1161. let tmp = is.read_bool()?;
  1162. self.seen = ::std::option::Option::Some(tmp);
  1163. },
  1164. 5 => {
  1165. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1166. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1167. }
  1168. let tmp = is.read_int64()?;
  1169. self.download_count = ::std::option::Option::Some(tmp);
  1170. },
  1171. 6 => {
  1172. ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.download_format)?;
  1173. },
  1174. 7 => {
  1175. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.sevendigital_id)?;
  1176. },
  1177. 8 => {
  1178. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1179. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1180. }
  1181. let tmp = is.read_int64()?;
  1182. self.sevendigital_left = ::std::option::Option::Some(tmp);
  1183. },
  1184. 9 => {
  1185. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1186. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1187. }
  1188. let tmp = is.read_int64()?;
  1189. self.seen_at = ::std::option::Option::Some(tmp);
  1190. },
  1191. 10 => {
  1192. if wire_type != ::protobuf::wire_format::WireTypeVarint {
  1193. return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
  1194. }
  1195. let tmp = is.read_bool()?;
  1196. self.public = ::std::option::Option::Some(tmp);
  1197. },
  1198. _ => {
  1199. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1200. },
  1201. };
  1202. }
  1203. ::std::result::Result::Ok(())
  1204. }
  1205. // Compute sizes of nested messages
  1206. #[allow(unused_variables)]
  1207. fn compute_size(&self) -> u32 {
  1208. let mut my_size = 0;
  1209. if let Some(ref v) = self.added_by.as_ref() {
  1210. my_size += ::protobuf::rt::string_size(1, &v);
  1211. }
  1212. if let Some(v) = self.timestamp {
  1213. my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
  1214. }
  1215. if let Some(ref v) = self.message.as_ref() {
  1216. my_size += ::protobuf::rt::string_size(3, &v);
  1217. }
  1218. if let Some(v) = self.seen {
  1219. my_size += 2;
  1220. }
  1221. if let Some(v) = self.download_count {
  1222. my_size += ::protobuf::rt::value_size(5, v, ::protobuf::wire_format::WireTypeVarint);
  1223. }
  1224. if let Some(ref v) = self.download_format.as_ref() {
  1225. let len = v.compute_size();
  1226. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1227. }
  1228. if let Some(ref v) = self.sevendigital_id.as_ref() {
  1229. my_size += ::protobuf::rt::string_size(7, &v);
  1230. }
  1231. if let Some(v) = self.sevendigital_left {
  1232. my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
  1233. }
  1234. if let Some(v) = self.seen_at {
  1235. my_size += ::protobuf::rt::value_size(9, v, ::protobuf::wire_format::WireTypeVarint);
  1236. }
  1237. if let Some(v) = self.public {
  1238. my_size += 2;
  1239. }
  1240. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1241. self.cached_size.set(my_size);
  1242. my_size
  1243. }
  1244. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1245. if let Some(ref v) = self.added_by.as_ref() {
  1246. os.write_string(1, &v)?;
  1247. }
  1248. if let Some(v) = self.timestamp {
  1249. os.write_int64(2, v)?;
  1250. }
  1251. if let Some(ref v) = self.message.as_ref() {
  1252. os.write_string(3, &v)?;
  1253. }
  1254. if let Some(v) = self.seen {
  1255. os.write_bool(4, v)?;
  1256. }
  1257. if let Some(v) = self.download_count {
  1258. os.write_int64(5, v)?;
  1259. }
  1260. if let Some(ref v) = self.download_format.as_ref() {
  1261. os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1262. os.write_raw_varint32(v.get_cached_size())?;
  1263. v.write_to_with_cached_sizes(os)?;
  1264. }
  1265. if let Some(ref v) = self.sevendigital_id.as_ref() {
  1266. os.write_string(7, &v)?;
  1267. }
  1268. if let Some(v) = self.sevendigital_left {
  1269. os.write_int64(8, v)?;
  1270. }
  1271. if let Some(v) = self.seen_at {
  1272. os.write_int64(9, v)?;
  1273. }
  1274. if let Some(v) = self.public {
  1275. os.write_bool(10, v)?;
  1276. }
  1277. os.write_unknown_fields(self.get_unknown_fields())?;
  1278. ::std::result::Result::Ok(())
  1279. }
  1280. fn get_cached_size(&self) -> u32 {
  1281. self.cached_size.get()
  1282. }
  1283. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1284. &self.unknown_fields
  1285. }
  1286. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1287. &mut self.unknown_fields
  1288. }
  1289. fn as_any(&self) -> &dyn (::std::any::Any) {
  1290. self as &dyn (::std::any::Any)
  1291. }
  1292. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1293. self as &mut dyn (::std::any::Any)
  1294. }
  1295. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1296. self
  1297. }
  1298. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1299. Self::descriptor_static()
  1300. }
  1301. fn new() -> ItemAttributes {
  1302. ItemAttributes::new()
  1303. }
  1304. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1305. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1306. lock: ::protobuf::lazy::ONCE_INIT,
  1307. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1308. };
  1309. unsafe {
  1310. descriptor.get(|| {
  1311. let mut fields = ::std::vec::Vec::new();
  1312. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1313. "added_by",
  1314. |m: &ItemAttributes| { &m.added_by },
  1315. |m: &mut ItemAttributes| { &mut m.added_by },
  1316. ));
  1317. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  1318. "timestamp",
  1319. |m: &ItemAttributes| { &m.timestamp },
  1320. |m: &mut ItemAttributes| { &mut m.timestamp },
  1321. ));
  1322. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1323. "message",
  1324. |m: &ItemAttributes| { &m.message },
  1325. |m: &mut ItemAttributes| { &mut m.message },
  1326. ));
  1327. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1328. "seen",
  1329. |m: &ItemAttributes| { &m.seen },
  1330. |m: &mut ItemAttributes| { &mut m.seen },
  1331. ));
  1332. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  1333. "download_count",
  1334. |m: &ItemAttributes| { &m.download_count },
  1335. |m: &mut ItemAttributes| { &mut m.download_count },
  1336. ));
  1337. fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<DownloadFormat>>(
  1338. "download_format",
  1339. |m: &ItemAttributes| { &m.download_format },
  1340. |m: &mut ItemAttributes| { &mut m.download_format },
  1341. ));
  1342. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1343. "sevendigital_id",
  1344. |m: &ItemAttributes| { &m.sevendigital_id },
  1345. |m: &mut ItemAttributes| { &mut m.sevendigital_id },
  1346. ));
  1347. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  1348. "sevendigital_left",
  1349. |m: &ItemAttributes| { &m.sevendigital_left },
  1350. |m: &mut ItemAttributes| { &mut m.sevendigital_left },
  1351. ));
  1352. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
  1353. "seen_at",
  1354. |m: &ItemAttributes| { &m.seen_at },
  1355. |m: &mut ItemAttributes| { &mut m.seen_at },
  1356. ));
  1357. fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
  1358. "public",
  1359. |m: &ItemAttributes| { &m.public },
  1360. |m: &mut ItemAttributes| { &mut m.public },
  1361. ));
  1362. ::protobuf::reflect::MessageDescriptor::new::<ItemAttributes>(
  1363. "ItemAttributes",
  1364. fields,
  1365. file_descriptor_proto()
  1366. )
  1367. })
  1368. }
  1369. }
  1370. fn default_instance() -> &'static ItemAttributes {
  1371. static mut instance: ::protobuf::lazy::Lazy<ItemAttributes> = ::protobuf::lazy::Lazy {
  1372. lock: ::protobuf::lazy::ONCE_INIT,
  1373. ptr: 0 as *const ItemAttributes,
  1374. };
  1375. unsafe {
  1376. instance.get(ItemAttributes::new)
  1377. }
  1378. }
  1379. }
  1380. impl ::protobuf::Clear for ItemAttributes {
  1381. fn clear(&mut self) {
  1382. self.added_by.clear();
  1383. self.timestamp = ::std::option::Option::None;
  1384. self.message.clear();
  1385. self.seen = ::std::option::Option::None;
  1386. self.download_count = ::std::option::Option::None;
  1387. self.download_format.clear();
  1388. self.sevendigital_id.clear();
  1389. self.sevendigital_left = ::std::option::Option::None;
  1390. self.seen_at = ::std::option::Option::None;
  1391. self.public = ::std::option::Option::None;
  1392. self.unknown_fields.clear();
  1393. }
  1394. }
  1395. impl ::std::fmt::Debug for ItemAttributes {
  1396. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1397. ::protobuf::text_format::fmt(self, f)
  1398. }
  1399. }
  1400. impl ::protobuf::reflect::ProtobufValue for ItemAttributes {
  1401. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1402. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1403. }
  1404. }
  1405. #[derive(PartialEq,Clone,Default)]
  1406. pub struct StringAttribute {
  1407. // message fields
  1408. key: ::protobuf::SingularField<::std::string::String>,
  1409. value: ::protobuf::SingularField<::std::string::String>,
  1410. // special fields
  1411. pub unknown_fields: ::protobuf::UnknownFields,
  1412. pub cached_size: ::protobuf::CachedSize,
  1413. }
  1414. impl<'a> ::std::default::Default for &'a StringAttribute {
  1415. fn default() -> &'a StringAttribute {
  1416. <StringAttribute as ::protobuf::Message>::default_instance()
  1417. }
  1418. }
  1419. impl StringAttribute {
  1420. pub fn new() -> StringAttribute {
  1421. ::std::default::Default::default()
  1422. }
  1423. // optional string key = 1;
  1424. pub fn get_key(&self) -> &str {
  1425. match self.key.as_ref() {
  1426. Some(v) => &v,
  1427. None => "",
  1428. }
  1429. }
  1430. pub fn clear_key(&mut self) {
  1431. self.key.clear();
  1432. }
  1433. pub fn has_key(&self) -> bool {
  1434. self.key.is_some()
  1435. }
  1436. // Param is passed by value, moved
  1437. pub fn set_key(&mut self, v: ::std::string::String) {
  1438. self.key = ::protobuf::SingularField::some(v);
  1439. }
  1440. // Mutable pointer to the field.
  1441. // If field is not initialized, it is initialized with default value first.
  1442. pub fn mut_key(&mut self) -> &mut ::std::string::String {
  1443. if self.key.is_none() {
  1444. self.key.set_default();
  1445. }
  1446. self.key.as_mut().unwrap()
  1447. }
  1448. // Take field
  1449. pub fn take_key(&mut self) -> ::std::string::String {
  1450. self.key.take().unwrap_or_else(|| ::std::string::String::new())
  1451. }
  1452. // optional string value = 2;
  1453. pub fn get_value(&self) -> &str {
  1454. match self.value.as_ref() {
  1455. Some(v) => &v,
  1456. None => "",
  1457. }
  1458. }
  1459. pub fn clear_value(&mut self) {
  1460. self.value.clear();
  1461. }
  1462. pub fn has_value(&self) -> bool {
  1463. self.value.is_some()
  1464. }
  1465. // Param is passed by value, moved
  1466. pub fn set_value(&mut self, v: ::std::string::String) {
  1467. self.value = ::protobuf::SingularField::some(v);
  1468. }
  1469. // Mutable pointer to the field.
  1470. // If field is not initialized, it is initialized with default value first.
  1471. pub fn mut_value(&mut self) -> &mut ::std::string::String {
  1472. if self.value.is_none() {
  1473. self.value.set_default();
  1474. }
  1475. self.value.as_mut().unwrap()
  1476. }
  1477. // Take field
  1478. pub fn take_value(&mut self) -> ::std::string::String {
  1479. self.value.take().unwrap_or_else(|| ::std::string::String::new())
  1480. }
  1481. }
  1482. impl ::protobuf::Message for StringAttribute {
  1483. fn is_initialized(&self) -> bool {
  1484. true
  1485. }
  1486. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1487. while !is.eof()? {
  1488. let (field_number, wire_type) = is.read_tag_unpack()?;
  1489. match field_number {
  1490. 1 => {
  1491. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?;
  1492. },
  1493. 2 => {
  1494. ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.value)?;
  1495. },
  1496. _ => {
  1497. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1498. },
  1499. };
  1500. }
  1501. ::std::result::Result::Ok(())
  1502. }
  1503. // Compute sizes of nested messages
  1504. #[allow(unused_variables)]
  1505. fn compute_size(&self) -> u32 {
  1506. let mut my_size = 0;
  1507. if let Some(ref v) = self.key.as_ref() {
  1508. my_size += ::protobuf::rt::string_size(1, &v);
  1509. }
  1510. if let Some(ref v) = self.value.as_ref() {
  1511. my_size += ::protobuf::rt::string_size(2, &v);
  1512. }
  1513. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1514. self.cached_size.set(my_size);
  1515. my_size
  1516. }
  1517. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1518. if let Some(ref v) = self.key.as_ref() {
  1519. os.write_string(1, &v)?;
  1520. }
  1521. if let Some(ref v) = self.value.as_ref() {
  1522. os.write_string(2, &v)?;
  1523. }
  1524. os.write_unknown_fields(self.get_unknown_fields())?;
  1525. ::std::result::Result::Ok(())
  1526. }
  1527. fn get_cached_size(&self) -> u32 {
  1528. self.cached_size.get()
  1529. }
  1530. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1531. &self.unknown_fields
  1532. }
  1533. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1534. &mut self.unknown_fields
  1535. }
  1536. fn as_any(&self) -> &dyn (::std::any::Any) {
  1537. self as &dyn (::std::any::Any)
  1538. }
  1539. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1540. self as &mut dyn (::std::any::Any)
  1541. }
  1542. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1543. self
  1544. }
  1545. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1546. Self::descriptor_static()
  1547. }
  1548. fn new() -> StringAttribute {
  1549. StringAttribute::new()
  1550. }
  1551. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1552. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1553. lock: ::protobuf::lazy::ONCE_INIT,
  1554. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1555. };
  1556. unsafe {
  1557. descriptor.get(|| {
  1558. let mut fields = ::std::vec::Vec::new();
  1559. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1560. "key",
  1561. |m: &StringAttribute| { &m.key },
  1562. |m: &mut StringAttribute| { &mut m.key },
  1563. ));
  1564. fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
  1565. "value",
  1566. |m: &StringAttribute| { &m.value },
  1567. |m: &mut StringAttribute| { &mut m.value },
  1568. ));
  1569. ::protobuf::reflect::MessageDescriptor::new::<StringAttribute>(
  1570. "StringAttribute",
  1571. fields,
  1572. file_descriptor_proto()
  1573. )
  1574. })
  1575. }
  1576. }
  1577. fn default_instance() -> &'static StringAttribute {
  1578. static mut instance: ::protobuf::lazy::Lazy<StringAttribute> = ::protobuf::lazy::Lazy {
  1579. lock: ::protobuf::lazy::ONCE_INIT,
  1580. ptr: 0 as *const StringAttribute,
  1581. };
  1582. unsafe {
  1583. instance.get(StringAttribute::new)
  1584. }
  1585. }
  1586. }
  1587. impl ::protobuf::Clear for StringAttribute {
  1588. fn clear(&mut self) {
  1589. self.key.clear();
  1590. self.value.clear();
  1591. self.unknown_fields.clear();
  1592. }
  1593. }
  1594. impl ::std::fmt::Debug for StringAttribute {
  1595. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1596. ::protobuf::text_format::fmt(self, f)
  1597. }
  1598. }
  1599. impl ::protobuf::reflect::ProtobufValue for StringAttribute {
  1600. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1601. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1602. }
  1603. }
  1604. #[derive(PartialEq,Clone,Default)]
  1605. pub struct StringAttributes {
  1606. // message fields
  1607. attribute: ::protobuf::RepeatedField<StringAttribute>,
  1608. // special fields
  1609. pub unknown_fields: ::protobuf::UnknownFields,
  1610. pub cached_size: ::protobuf::CachedSize,
  1611. }
  1612. impl<'a> ::std::default::Default for &'a StringAttributes {
  1613. fn default() -> &'a StringAttributes {
  1614. <StringAttributes as ::protobuf::Message>::default_instance()
  1615. }
  1616. }
  1617. impl StringAttributes {
  1618. pub fn new() -> StringAttributes {
  1619. ::std::default::Default::default()
  1620. }
  1621. // repeated .StringAttribute attribute = 1;
  1622. pub fn get_attribute(&self) -> &[StringAttribute] {
  1623. &self.attribute
  1624. }
  1625. pub fn clear_attribute(&mut self) {
  1626. self.attribute.clear();
  1627. }
  1628. // Param is passed by value, moved
  1629. pub fn set_attribute(&mut self, v: ::protobuf::RepeatedField<StringAttribute>) {
  1630. self.attribute = v;
  1631. }
  1632. // Mutable pointer to the field.
  1633. pub fn mut_attribute(&mut self) -> &mut ::protobuf::RepeatedField<StringAttribute> {
  1634. &mut self.attribute
  1635. }
  1636. // Take field
  1637. pub fn take_attribute(&mut self) -> ::protobuf::RepeatedField<StringAttribute> {
  1638. ::std::mem::replace(&mut self.attribute, ::protobuf::RepeatedField::new())
  1639. }
  1640. }
  1641. impl ::protobuf::Message for StringAttributes {
  1642. fn is_initialized(&self) -> bool {
  1643. for v in &self.attribute {
  1644. if !v.is_initialized() {
  1645. return false;
  1646. }
  1647. };
  1648. true
  1649. }
  1650. fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1651. while !is.eof()? {
  1652. let (field_number, wire_type) = is.read_tag_unpack()?;
  1653. match field_number {
  1654. 1 => {
  1655. ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attribute)?;
  1656. },
  1657. _ => {
  1658. ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
  1659. },
  1660. };
  1661. }
  1662. ::std::result::Result::Ok(())
  1663. }
  1664. // Compute sizes of nested messages
  1665. #[allow(unused_variables)]
  1666. fn compute_size(&self) -> u32 {
  1667. let mut my_size = 0;
  1668. for value in &self.attribute {
  1669. let len = value.compute_size();
  1670. my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
  1671. };
  1672. my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
  1673. self.cached_size.set(my_size);
  1674. my_size
  1675. }
  1676. fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
  1677. for v in &self.attribute {
  1678. os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
  1679. os.write_raw_varint32(v.get_cached_size())?;
  1680. v.write_to_with_cached_sizes(os)?;
  1681. };
  1682. os.write_unknown_fields(self.get_unknown_fields())?;
  1683. ::std::result::Result::Ok(())
  1684. }
  1685. fn get_cached_size(&self) -> u32 {
  1686. self.cached_size.get()
  1687. }
  1688. fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
  1689. &self.unknown_fields
  1690. }
  1691. fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
  1692. &mut self.unknown_fields
  1693. }
  1694. fn as_any(&self) -> &dyn (::std::any::Any) {
  1695. self as &dyn (::std::any::Any)
  1696. }
  1697. fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
  1698. self as &mut dyn (::std::any::Any)
  1699. }
  1700. fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
  1701. self
  1702. }
  1703. fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
  1704. Self::descriptor_static()
  1705. }
  1706. fn new() -> StringAttributes {
  1707. StringAttributes::new()
  1708. }
  1709. fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
  1710. static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
  1711. lock: ::protobuf::lazy::ONCE_INIT,
  1712. ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
  1713. };
  1714. unsafe {
  1715. descriptor.get(|| {
  1716. let mut fields = ::std::vec::Vec::new();
  1717. fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<StringAttribute>>(
  1718. "attribute",
  1719. |m: &StringAttributes| { &m.attribute },
  1720. |m: &mut StringAttributes| { &mut m.attribute },
  1721. ));
  1722. ::protobuf::reflect::MessageDescriptor::new::<StringAttributes>(
  1723. "StringAttributes",
  1724. fields,
  1725. file_descriptor_proto()
  1726. )
  1727. })
  1728. }
  1729. }
  1730. fn default_instance() -> &'static StringAttributes {
  1731. static mut instance: ::protobuf::lazy::Lazy<StringAttributes> = ::protobuf::lazy::Lazy {
  1732. lock: ::protobuf::lazy::ONCE_INIT,
  1733. ptr: 0 as *const StringAttributes,
  1734. };
  1735. unsafe {
  1736. instance.get(StringAttributes::new)
  1737. }
  1738. }
  1739. }
  1740. impl ::protobuf::Clear for StringAttributes {
  1741. fn clear(&mut self) {
  1742. self.attribute.clear();
  1743. self.unknown_fields.clear();
  1744. }
  1745. }
  1746. impl ::std::fmt::Debug for StringAttributes {
  1747. fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  1748. ::protobuf::text_format::fmt(self, f)
  1749. }
  1750. }
  1751. impl ::protobuf::reflect::ProtobufValue for StringAttributes {
  1752. fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
  1753. ::protobuf::reflect::ProtobufValueRef::Message(self)
  1754. }
  1755. }
  1756. static file_descriptor_proto_data: &'static [u8] = b"\
  1757. \n\x13playlist4meta.proto\x12\0\"3\n\x0cListChecksum\x12\x11\n\x07versio\
  1758. n\x18\x01\x20\x01(\x05B\0\x12\x0e\n\x04sha1\x18\x04\x20\x01(\x0cB\0:\0\"\
  1759. \x86\x01\n\x0eDownloadFormat\x12&\n\x05codec\x18\x01\x20\x01(\x0e2\x15.D\
  1760. ownloadFormat.CodecB\0\"J\n\x05Codec\x12\x11\n\rCODEC_UNKNOWN\x10\0\x12\
  1761. \x0e\n\nOGG_VORBIS\x10\x01\x12\x08\n\x04FLAC\x10\x02\x12\x12\n\x0eMPEG_1\
  1762. _LAYER_3\x10\x03\x1a\0:\0\"\x8b\x02\n\x0eListAttributes\x12\x0e\n\x04nam\
  1763. e\x18\x01\x20\x01(\tB\0\x12\x15\n\x0bdescription\x18\x02\x20\x01(\tB\0\
  1764. \x12\x11\n\x07picture\x18\x03\x20\x01(\x0cB\0\x12\x17\n\rcollaborative\
  1765. \x18\x04\x20\x01(\x08B\0\x12\x15\n\x0bpl3_version\x18\x05\x20\x01(\tB\0\
  1766. \x12\x1a\n\x10deleted_by_owner\x18\x06\x20\x01(\x08B\0\x12\"\n\x18restri\
  1767. cted_collaborative\x18\x07\x20\x01(\x08B\0\x12\x1e\n\x14deprecated_clien\
  1768. t_id\x18\x08\x20\x01(\x03B\0\x12\x18\n\x0epublic_starred\x18\t\x20\x01(\
  1769. \x08B\0\x12\x13\n\tclient_id\x18\n\x20\x01(\tB\0:\0\"\x81\x02\n\x0eItemA\
  1770. ttributes\x12\x12\n\x08added_by\x18\x01\x20\x01(\tB\0\x12\x13\n\ttimesta\
  1771. mp\x18\x02\x20\x01(\x03B\0\x12\x11\n\x07message\x18\x03\x20\x01(\tB\0\
  1772. \x12\x0e\n\x04seen\x18\x04\x20\x01(\x08B\0\x12\x18\n\x0edownload_count\
  1773. \x18\x05\x20\x01(\x03B\0\x12*\n\x0fdownload_format\x18\x06\x20\x01(\x0b2\
  1774. \x0f.DownloadFormatB\0\x12\x19\n\x0fsevendigital_id\x18\x07\x20\x01(\tB\
  1775. \0\x12\x1b\n\x11sevendigital_left\x18\x08\x20\x01(\x03B\0\x12\x11\n\x07s\
  1776. een_at\x18\t\x20\x01(\x03B\0\x12\x10\n\x06public\x18\n\x20\x01(\x08B\0:\
  1777. \0\"3\n\x0fStringAttribute\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\x12\x0f\
  1778. \n\x05value\x18\x02\x20\x01(\tB\0:\0\";\n\x10StringAttributes\x12%\n\tat\
  1779. tribute\x18\x01\x20\x03(\x0b2\x10.StringAttributeB\0:\0B\0b\x06proto2\
  1780. ";
  1781. static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
  1782. lock: ::protobuf::lazy::ONCE_INIT,
  1783. ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
  1784. };
  1785. fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
  1786. ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
  1787. }
  1788. pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
  1789. unsafe {
  1790. file_descriptor_proto_lazy.get(|| {
  1791. parse_descriptor_proto()
  1792. })
  1793. }
  1794. }