1 // This file is generated by rust-protobuf 2.14.0. Do not edit
2 // @generated
3
4 // https://github.com/rust-lang/rust-clippy/issues/702
5 #![allow(unknown_lints)]
6 #![allow(clippy::all)]
7
8 #![cfg_attr(rustfmt, rustfmt_skip)]
9
10 #![allow(box_pointers)]
11 #![allow(dead_code)]
12 #![allow(missing_docs)]
13 #![allow(non_camel_case_types)]
14 #![allow(non_snake_case)]
15 #![allow(non_upper_case_globals)]
16 #![allow(trivial_casts)]
17 #![allow(unsafe_code)]
18 #![allow(unused_imports)]
19 #![allow(unused_results)]
20 //! Generated file from `playlist4meta.proto`
21
22 use protobuf::Message as Message_imported_for_functions;
23 use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24
25 /// Generated files are compatible only with the same version
26 /// of protobuf runtime.
27 // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0;
28
29 #[derive(PartialEq, Clone, Default)]
30 pub struct ListChecksum {
31 // message fields
32 version: ::std::option::Option<i32>,
33 sha1: ::protobuf::SingularField<::std::vec::Vec<u8>>,
34 // special fields
35 pub unknown_fields: ::protobuf::UnknownFields,
36 pub cached_size: ::protobuf::CachedSize,
37 }
38
39 impl<'a> ::std::default::Default for &'a ListChecksum {
default() -> &'a ListChecksum40 fn default() -> &'a ListChecksum {
41 <ListChecksum as ::protobuf::Message>::default_instance()
42 }
43 }
44
45 impl ListChecksum {
new() -> ListChecksum46 pub fn new() -> ListChecksum {
47 ::std::default::Default::default()
48 }
49
50 // optional int32 version = 1;
51
get_version(&self) -> i3252 pub fn get_version(&self) -> i32 {
53 self.version.unwrap_or(0)
54 }
clear_version(&mut self)55 pub fn clear_version(&mut self) {
56 self.version = ::std::option::Option::None;
57 }
58
has_version(&self) -> bool59 pub fn has_version(&self) -> bool {
60 self.version.is_some()
61 }
62
63 // Param is passed by value, moved
set_version(&mut self, v: i32)64 pub fn set_version(&mut self, v: i32) {
65 self.version = ::std::option::Option::Some(v);
66 }
67
68 // optional bytes sha1 = 4;
69
get_sha1(&self) -> &[u8]70 pub fn get_sha1(&self) -> &[u8] {
71 match self.sha1.as_ref() {
72 Some(v) => &v,
73 None => &[],
74 }
75 }
clear_sha1(&mut self)76 pub fn clear_sha1(&mut self) {
77 self.sha1.clear();
78 }
79
has_sha1(&self) -> bool80 pub fn has_sha1(&self) -> bool {
81 self.sha1.is_some()
82 }
83
84 // Param is passed by value, moved
set_sha1(&mut self, v: ::std::vec::Vec<u8>)85 pub fn set_sha1(&mut self, v: ::std::vec::Vec<u8>) {
86 self.sha1 = ::protobuf::SingularField::some(v);
87 }
88
89 // Mutable pointer to the field.
90 // If field is not initialized, it is initialized with default value first.
mut_sha1(&mut self) -> &mut ::std::vec::Vec<u8>91 pub fn mut_sha1(&mut self) -> &mut ::std::vec::Vec<u8> {
92 if self.sha1.is_none() {
93 self.sha1.set_default();
94 }
95 self.sha1.as_mut().unwrap()
96 }
97
98 // Take field
take_sha1(&mut self) -> ::std::vec::Vec<u8>99 pub fn take_sha1(&mut self) -> ::std::vec::Vec<u8> {
100 self.sha1.take().unwrap_or_else(|| ::std::vec::Vec::new())
101 }
102 }
103
104 impl ::protobuf::Message for ListChecksum {
is_initialized(&self) -> bool105 fn is_initialized(&self) -> bool {
106 true
107 }
108
merge_from( &mut self, is: &mut ::protobuf::CodedInputStream<'_>, ) -> ::protobuf::ProtobufResult<()>109 fn merge_from(
110 &mut self,
111 is: &mut ::protobuf::CodedInputStream<'_>,
112 ) -> ::protobuf::ProtobufResult<()> {
113 while !is.eof()? {
114 let (field_number, wire_type) = is.read_tag_unpack()?;
115 match field_number {
116 1 => {
117 if wire_type != ::protobuf::wire_format::WireTypeVarint {
118 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
119 wire_type,
120 ));
121 }
122 let tmp = is.read_int32()?;
123 self.version = ::std::option::Option::Some(tmp);
124 }
125 4 => {
126 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.sha1)?;
127 }
128 _ => {
129 ::protobuf::rt::read_unknown_or_skip_group(
130 field_number,
131 wire_type,
132 is,
133 self.mut_unknown_fields(),
134 )?;
135 }
136 };
137 }
138 ::std::result::Result::Ok(())
139 }
140
141 // Compute sizes of nested messages
142 #[allow(unused_variables)]
compute_size(&self) -> u32143 fn compute_size(&self) -> u32 {
144 let mut my_size = 0;
145 if let Some(v) = self.version {
146 my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
147 }
148 if let Some(ref v) = self.sha1.as_ref() {
149 my_size += ::protobuf::rt::bytes_size(4, &v);
150 }
151 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
152 self.cached_size.set(my_size);
153 my_size
154 }
155
write_to_with_cached_sizes( &self, os: &mut ::protobuf::CodedOutputStream<'_>, ) -> ::protobuf::ProtobufResult<()>156 fn write_to_with_cached_sizes(
157 &self,
158 os: &mut ::protobuf::CodedOutputStream<'_>,
159 ) -> ::protobuf::ProtobufResult<()> {
160 if let Some(v) = self.version {
161 os.write_int32(1, v)?;
162 }
163 if let Some(ref v) = self.sha1.as_ref() {
164 os.write_bytes(4, &v)?;
165 }
166 os.write_unknown_fields(self.get_unknown_fields())?;
167 ::std::result::Result::Ok(())
168 }
169
get_cached_size(&self) -> u32170 fn get_cached_size(&self) -> u32 {
171 self.cached_size.get()
172 }
173
get_unknown_fields(&self) -> &::protobuf::UnknownFields174 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
175 &self.unknown_fields
176 }
177
mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields178 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
179 &mut self.unknown_fields
180 }
181
as_any(&self) -> &dyn (::std::any::Any)182 fn as_any(&self) -> &dyn (::std::any::Any) {
183 self as &dyn (::std::any::Any)
184 }
as_any_mut(&mut self) -> &mut dyn (::std::any::Any)185 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
186 self as &mut dyn (::std::any::Any)
187 }
into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>188 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
189 self
190 }
191
descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor192 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
193 Self::descriptor_static()
194 }
195
new() -> ListChecksum196 fn new() -> ListChecksum {
197 ListChecksum::new()
198 }
199
descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor200 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
201 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
202 ::protobuf::lazy::Lazy::INIT;
203 unsafe {
204 descriptor.get(|| {
205 let mut fields = ::std::vec::Vec::new();
206 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
207 _,
208 ::protobuf::types::ProtobufTypeInt32,
209 >(
210 "version",
211 |m: &ListChecksum| &m.version,
212 |m: &mut ListChecksum| &mut m.version,
213 ));
214 fields.push(
215 ::protobuf::reflect::accessor::make_singular_field_accessor::<
216 _,
217 ::protobuf::types::ProtobufTypeBytes,
218 >(
219 "sha1",
220 |m: &ListChecksum| &m.sha1,
221 |m: &mut ListChecksum| &mut m.sha1,
222 ),
223 );
224 ::protobuf::reflect::MessageDescriptor::new_pb_name::<ListChecksum>(
225 "ListChecksum",
226 fields,
227 file_descriptor_proto(),
228 )
229 })
230 }
231 }
232
default_instance() -> &'static ListChecksum233 fn default_instance() -> &'static ListChecksum {
234 static mut instance: ::protobuf::lazy::Lazy<ListChecksum> = ::protobuf::lazy::Lazy::INIT;
235 unsafe { instance.get(ListChecksum::new) }
236 }
237 }
238
239 impl ::protobuf::Clear for ListChecksum {
clear(&mut self)240 fn clear(&mut self) {
241 self.version = ::std::option::Option::None;
242 self.sha1.clear();
243 self.unknown_fields.clear();
244 }
245 }
246
247 impl ::std::fmt::Debug for ListChecksum {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result248 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
249 ::protobuf::text_format::fmt(self, f)
250 }
251 }
252
253 impl ::protobuf::reflect::ProtobufValue for ListChecksum {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef254 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
255 ::protobuf::reflect::ReflectValueRef::Message(self)
256 }
257 }
258
259 #[derive(PartialEq, Clone, Default)]
260 pub struct DownloadFormat {
261 // message fields
262 codec: ::std::option::Option<DownloadFormat_Codec>,
263 // special fields
264 pub unknown_fields: ::protobuf::UnknownFields,
265 pub cached_size: ::protobuf::CachedSize,
266 }
267
268 impl<'a> ::std::default::Default for &'a DownloadFormat {
default() -> &'a DownloadFormat269 fn default() -> &'a DownloadFormat {
270 <DownloadFormat as ::protobuf::Message>::default_instance()
271 }
272 }
273
274 impl DownloadFormat {
new() -> DownloadFormat275 pub fn new() -> DownloadFormat {
276 ::std::default::Default::default()
277 }
278
279 // optional .DownloadFormat.Codec codec = 1;
280
get_codec(&self) -> DownloadFormat_Codec281 pub fn get_codec(&self) -> DownloadFormat_Codec {
282 self.codec.unwrap_or(DownloadFormat_Codec::CODEC_UNKNOWN)
283 }
clear_codec(&mut self)284 pub fn clear_codec(&mut self) {
285 self.codec = ::std::option::Option::None;
286 }
287
has_codec(&self) -> bool288 pub fn has_codec(&self) -> bool {
289 self.codec.is_some()
290 }
291
292 // Param is passed by value, moved
set_codec(&mut self, v: DownloadFormat_Codec)293 pub fn set_codec(&mut self, v: DownloadFormat_Codec) {
294 self.codec = ::std::option::Option::Some(v);
295 }
296 }
297
298 impl ::protobuf::Message for DownloadFormat {
is_initialized(&self) -> bool299 fn is_initialized(&self) -> bool {
300 true
301 }
302
merge_from( &mut self, is: &mut ::protobuf::CodedInputStream<'_>, ) -> ::protobuf::ProtobufResult<()>303 fn merge_from(
304 &mut self,
305 is: &mut ::protobuf::CodedInputStream<'_>,
306 ) -> ::protobuf::ProtobufResult<()> {
307 while !is.eof()? {
308 let (field_number, wire_type) = is.read_tag_unpack()?;
309 match field_number {
310 1 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
311 wire_type,
312 is,
313 &mut self.codec,
314 1,
315 &mut self.unknown_fields,
316 )?,
317 _ => {
318 ::protobuf::rt::read_unknown_or_skip_group(
319 field_number,
320 wire_type,
321 is,
322 self.mut_unknown_fields(),
323 )?;
324 }
325 };
326 }
327 ::std::result::Result::Ok(())
328 }
329
330 // Compute sizes of nested messages
331 #[allow(unused_variables)]
compute_size(&self) -> u32332 fn compute_size(&self) -> u32 {
333 let mut my_size = 0;
334 if let Some(v) = self.codec {
335 my_size += ::protobuf::rt::enum_size(1, v);
336 }
337 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
338 self.cached_size.set(my_size);
339 my_size
340 }
341
write_to_with_cached_sizes( &self, os: &mut ::protobuf::CodedOutputStream<'_>, ) -> ::protobuf::ProtobufResult<()>342 fn write_to_with_cached_sizes(
343 &self,
344 os: &mut ::protobuf::CodedOutputStream<'_>,
345 ) -> ::protobuf::ProtobufResult<()> {
346 if let Some(v) = self.codec {
347 os.write_enum(1, v.value())?;
348 }
349 os.write_unknown_fields(self.get_unknown_fields())?;
350 ::std::result::Result::Ok(())
351 }
352
get_cached_size(&self) -> u32353 fn get_cached_size(&self) -> u32 {
354 self.cached_size.get()
355 }
356
get_unknown_fields(&self) -> &::protobuf::UnknownFields357 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
358 &self.unknown_fields
359 }
360
mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields361 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
362 &mut self.unknown_fields
363 }
364
as_any(&self) -> &dyn (::std::any::Any)365 fn as_any(&self) -> &dyn (::std::any::Any) {
366 self as &dyn (::std::any::Any)
367 }
as_any_mut(&mut self) -> &mut dyn (::std::any::Any)368 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
369 self as &mut dyn (::std::any::Any)
370 }
into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>371 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
372 self
373 }
374
descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor375 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
376 Self::descriptor_static()
377 }
378
new() -> DownloadFormat379 fn new() -> DownloadFormat {
380 DownloadFormat::new()
381 }
382
descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor383 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
384 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
385 ::protobuf::lazy::Lazy::INIT;
386 unsafe {
387 descriptor.get(|| {
388 let mut fields = ::std::vec::Vec::new();
389 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
390 _,
391 ::protobuf::types::ProtobufTypeEnum<DownloadFormat_Codec>,
392 >(
393 "codec",
394 |m: &DownloadFormat| &m.codec,
395 |m: &mut DownloadFormat| &mut m.codec,
396 ));
397 ::protobuf::reflect::MessageDescriptor::new_pb_name::<DownloadFormat>(
398 "DownloadFormat",
399 fields,
400 file_descriptor_proto(),
401 )
402 })
403 }
404 }
405
default_instance() -> &'static DownloadFormat406 fn default_instance() -> &'static DownloadFormat {
407 static mut instance: ::protobuf::lazy::Lazy<DownloadFormat> = ::protobuf::lazy::Lazy::INIT;
408 unsafe { instance.get(DownloadFormat::new) }
409 }
410 }
411
412 impl ::protobuf::Clear for DownloadFormat {
clear(&mut self)413 fn clear(&mut self) {
414 self.codec = ::std::option::Option::None;
415 self.unknown_fields.clear();
416 }
417 }
418
419 impl ::std::fmt::Debug for DownloadFormat {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result420 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
421 ::protobuf::text_format::fmt(self, f)
422 }
423 }
424
425 impl ::protobuf::reflect::ProtobufValue for DownloadFormat {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef426 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
427 ::protobuf::reflect::ReflectValueRef::Message(self)
428 }
429 }
430
431 #[derive(Clone, PartialEq, Eq, Debug, Hash)]
432 pub enum DownloadFormat_Codec {
433 CODEC_UNKNOWN = 0,
434 OGG_VORBIS = 1,
435 FLAC = 2,
436 MPEG_1_LAYER_3 = 3,
437 }
438
439 impl ::protobuf::ProtobufEnum for DownloadFormat_Codec {
value(&self) -> i32440 fn value(&self) -> i32 {
441 *self as i32
442 }
443
from_i32(value: i32) -> ::std::option::Option<DownloadFormat_Codec>444 fn from_i32(value: i32) -> ::std::option::Option<DownloadFormat_Codec> {
445 match value {
446 0 => ::std::option::Option::Some(DownloadFormat_Codec::CODEC_UNKNOWN),
447 1 => ::std::option::Option::Some(DownloadFormat_Codec::OGG_VORBIS),
448 2 => ::std::option::Option::Some(DownloadFormat_Codec::FLAC),
449 3 => ::std::option::Option::Some(DownloadFormat_Codec::MPEG_1_LAYER_3),
450 _ => ::std::option::Option::None,
451 }
452 }
453
values() -> &'static [Self]454 fn values() -> &'static [Self] {
455 static values: &'static [DownloadFormat_Codec] = &[
456 DownloadFormat_Codec::CODEC_UNKNOWN,
457 DownloadFormat_Codec::OGG_VORBIS,
458 DownloadFormat_Codec::FLAC,
459 DownloadFormat_Codec::MPEG_1_LAYER_3,
460 ];
461 values
462 }
463
enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor464 fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
465 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
466 ::protobuf::lazy::Lazy::INIT;
467 unsafe {
468 descriptor.get(|| {
469 ::protobuf::reflect::EnumDescriptor::new_pb_name::<DownloadFormat_Codec>(
470 "DownloadFormat.Codec",
471 file_descriptor_proto(),
472 )
473 })
474 }
475 }
476 }
477
478 impl ::std::marker::Copy for DownloadFormat_Codec {}
479
480 impl ::std::default::Default for DownloadFormat_Codec {
default() -> Self481 fn default() -> Self {
482 DownloadFormat_Codec::CODEC_UNKNOWN
483 }
484 }
485
486 impl ::protobuf::reflect::ProtobufValue for DownloadFormat_Codec {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef487 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
488 ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
489 }
490 }
491
492 #[derive(PartialEq, Clone, Default)]
493 pub struct ListAttributes {
494 // message fields
495 name: ::protobuf::SingularField<::std::string::String>,
496 description: ::protobuf::SingularField<::std::string::String>,
497 picture: ::protobuf::SingularField<::std::vec::Vec<u8>>,
498 collaborative: ::std::option::Option<bool>,
499 pl3_version: ::protobuf::SingularField<::std::string::String>,
500 deleted_by_owner: ::std::option::Option<bool>,
501 restricted_collaborative: ::std::option::Option<bool>,
502 deprecated_client_id: ::std::option::Option<i64>,
503 public_starred: ::std::option::Option<bool>,
504 client_id: ::protobuf::SingularField<::std::string::String>,
505 // special fields
506 pub unknown_fields: ::protobuf::UnknownFields,
507 pub cached_size: ::protobuf::CachedSize,
508 }
509
510 impl<'a> ::std::default::Default for &'a ListAttributes {
default() -> &'a ListAttributes511 fn default() -> &'a ListAttributes {
512 <ListAttributes as ::protobuf::Message>::default_instance()
513 }
514 }
515
516 impl ListAttributes {
new() -> ListAttributes517 pub fn new() -> ListAttributes {
518 ::std::default::Default::default()
519 }
520
521 // optional string name = 1;
522
get_name(&self) -> &str523 pub fn get_name(&self) -> &str {
524 match self.name.as_ref() {
525 Some(v) => &v,
526 None => "",
527 }
528 }
clear_name(&mut self)529 pub fn clear_name(&mut self) {
530 self.name.clear();
531 }
532
has_name(&self) -> bool533 pub fn has_name(&self) -> bool {
534 self.name.is_some()
535 }
536
537 // Param is passed by value, moved
set_name(&mut self, v: ::std::string::String)538 pub fn set_name(&mut self, v: ::std::string::String) {
539 self.name = ::protobuf::SingularField::some(v);
540 }
541
542 // Mutable pointer to the field.
543 // If field is not initialized, it is initialized with default value first.
mut_name(&mut self) -> &mut ::std::string::String544 pub fn mut_name(&mut self) -> &mut ::std::string::String {
545 if self.name.is_none() {
546 self.name.set_default();
547 }
548 self.name.as_mut().unwrap()
549 }
550
551 // Take field
take_name(&mut self) -> ::std::string::String552 pub fn take_name(&mut self) -> ::std::string::String {
553 self.name
554 .take()
555 .unwrap_or_else(|| ::std::string::String::new())
556 }
557
558 // optional string description = 2;
559
get_description(&self) -> &str560 pub fn get_description(&self) -> &str {
561 match self.description.as_ref() {
562 Some(v) => &v,
563 None => "",
564 }
565 }
clear_description(&mut self)566 pub fn clear_description(&mut self) {
567 self.description.clear();
568 }
569
has_description(&self) -> bool570 pub fn has_description(&self) -> bool {
571 self.description.is_some()
572 }
573
574 // Param is passed by value, moved
set_description(&mut self, v: ::std::string::String)575 pub fn set_description(&mut self, v: ::std::string::String) {
576 self.description = ::protobuf::SingularField::some(v);
577 }
578
579 // Mutable pointer to the field.
580 // If field is not initialized, it is initialized with default value first.
mut_description(&mut self) -> &mut ::std::string::String581 pub fn mut_description(&mut self) -> &mut ::std::string::String {
582 if self.description.is_none() {
583 self.description.set_default();
584 }
585 self.description.as_mut().unwrap()
586 }
587
588 // Take field
take_description(&mut self) -> ::std::string::String589 pub fn take_description(&mut self) -> ::std::string::String {
590 self.description
591 .take()
592 .unwrap_or_else(|| ::std::string::String::new())
593 }
594
595 // optional bytes picture = 3;
596
get_picture(&self) -> &[u8]597 pub fn get_picture(&self) -> &[u8] {
598 match self.picture.as_ref() {
599 Some(v) => &v,
600 None => &[],
601 }
602 }
clear_picture(&mut self)603 pub fn clear_picture(&mut self) {
604 self.picture.clear();
605 }
606
has_picture(&self) -> bool607 pub fn has_picture(&self) -> bool {
608 self.picture.is_some()
609 }
610
611 // Param is passed by value, moved
set_picture(&mut self, v: ::std::vec::Vec<u8>)612 pub fn set_picture(&mut self, v: ::std::vec::Vec<u8>) {
613 self.picture = ::protobuf::SingularField::some(v);
614 }
615
616 // Mutable pointer to the field.
617 // If field is not initialized, it is initialized with default value first.
mut_picture(&mut self) -> &mut ::std::vec::Vec<u8>618 pub fn mut_picture(&mut self) -> &mut ::std::vec::Vec<u8> {
619 if self.picture.is_none() {
620 self.picture.set_default();
621 }
622 self.picture.as_mut().unwrap()
623 }
624
625 // Take field
take_picture(&mut self) -> ::std::vec::Vec<u8>626 pub fn take_picture(&mut self) -> ::std::vec::Vec<u8> {
627 self.picture
628 .take()
629 .unwrap_or_else(|| ::std::vec::Vec::new())
630 }
631
632 // optional bool collaborative = 4;
633
get_collaborative(&self) -> bool634 pub fn get_collaborative(&self) -> bool {
635 self.collaborative.unwrap_or(false)
636 }
clear_collaborative(&mut self)637 pub fn clear_collaborative(&mut self) {
638 self.collaborative = ::std::option::Option::None;
639 }
640
has_collaborative(&self) -> bool641 pub fn has_collaborative(&self) -> bool {
642 self.collaborative.is_some()
643 }
644
645 // Param is passed by value, moved
set_collaborative(&mut self, v: bool)646 pub fn set_collaborative(&mut self, v: bool) {
647 self.collaborative = ::std::option::Option::Some(v);
648 }
649
650 // optional string pl3_version = 5;
651
get_pl3_version(&self) -> &str652 pub fn get_pl3_version(&self) -> &str {
653 match self.pl3_version.as_ref() {
654 Some(v) => &v,
655 None => "",
656 }
657 }
clear_pl3_version(&mut self)658 pub fn clear_pl3_version(&mut self) {
659 self.pl3_version.clear();
660 }
661
has_pl3_version(&self) -> bool662 pub fn has_pl3_version(&self) -> bool {
663 self.pl3_version.is_some()
664 }
665
666 // Param is passed by value, moved
set_pl3_version(&mut self, v: ::std::string::String)667 pub fn set_pl3_version(&mut self, v: ::std::string::String) {
668 self.pl3_version = ::protobuf::SingularField::some(v);
669 }
670
671 // Mutable pointer to the field.
672 // If field is not initialized, it is initialized with default value first.
mut_pl3_version(&mut self) -> &mut ::std::string::String673 pub fn mut_pl3_version(&mut self) -> &mut ::std::string::String {
674 if self.pl3_version.is_none() {
675 self.pl3_version.set_default();
676 }
677 self.pl3_version.as_mut().unwrap()
678 }
679
680 // Take field
take_pl3_version(&mut self) -> ::std::string::String681 pub fn take_pl3_version(&mut self) -> ::std::string::String {
682 self.pl3_version
683 .take()
684 .unwrap_or_else(|| ::std::string::String::new())
685 }
686
687 // optional bool deleted_by_owner = 6;
688
get_deleted_by_owner(&self) -> bool689 pub fn get_deleted_by_owner(&self) -> bool {
690 self.deleted_by_owner.unwrap_or(false)
691 }
clear_deleted_by_owner(&mut self)692 pub fn clear_deleted_by_owner(&mut self) {
693 self.deleted_by_owner = ::std::option::Option::None;
694 }
695
has_deleted_by_owner(&self) -> bool696 pub fn has_deleted_by_owner(&self) -> bool {
697 self.deleted_by_owner.is_some()
698 }
699
700 // Param is passed by value, moved
set_deleted_by_owner(&mut self, v: bool)701 pub fn set_deleted_by_owner(&mut self, v: bool) {
702 self.deleted_by_owner = ::std::option::Option::Some(v);
703 }
704
705 // optional bool restricted_collaborative = 7;
706
get_restricted_collaborative(&self) -> bool707 pub fn get_restricted_collaborative(&self) -> bool {
708 self.restricted_collaborative.unwrap_or(false)
709 }
clear_restricted_collaborative(&mut self)710 pub fn clear_restricted_collaborative(&mut self) {
711 self.restricted_collaborative = ::std::option::Option::None;
712 }
713
has_restricted_collaborative(&self) -> bool714 pub fn has_restricted_collaborative(&self) -> bool {
715 self.restricted_collaborative.is_some()
716 }
717
718 // Param is passed by value, moved
set_restricted_collaborative(&mut self, v: bool)719 pub fn set_restricted_collaborative(&mut self, v: bool) {
720 self.restricted_collaborative = ::std::option::Option::Some(v);
721 }
722
723 // optional int64 deprecated_client_id = 8;
724
get_deprecated_client_id(&self) -> i64725 pub fn get_deprecated_client_id(&self) -> i64 {
726 self.deprecated_client_id.unwrap_or(0)
727 }
clear_deprecated_client_id(&mut self)728 pub fn clear_deprecated_client_id(&mut self) {
729 self.deprecated_client_id = ::std::option::Option::None;
730 }
731
has_deprecated_client_id(&self) -> bool732 pub fn has_deprecated_client_id(&self) -> bool {
733 self.deprecated_client_id.is_some()
734 }
735
736 // Param is passed by value, moved
set_deprecated_client_id(&mut self, v: i64)737 pub fn set_deprecated_client_id(&mut self, v: i64) {
738 self.deprecated_client_id = ::std::option::Option::Some(v);
739 }
740
741 // optional bool public_starred = 9;
742
get_public_starred(&self) -> bool743 pub fn get_public_starred(&self) -> bool {
744 self.public_starred.unwrap_or(false)
745 }
clear_public_starred(&mut self)746 pub fn clear_public_starred(&mut self) {
747 self.public_starred = ::std::option::Option::None;
748 }
749
has_public_starred(&self) -> bool750 pub fn has_public_starred(&self) -> bool {
751 self.public_starred.is_some()
752 }
753
754 // Param is passed by value, moved
set_public_starred(&mut self, v: bool)755 pub fn set_public_starred(&mut self, v: bool) {
756 self.public_starred = ::std::option::Option::Some(v);
757 }
758
759 // optional string client_id = 10;
760
get_client_id(&self) -> &str761 pub fn get_client_id(&self) -> &str {
762 match self.client_id.as_ref() {
763 Some(v) => &v,
764 None => "",
765 }
766 }
clear_client_id(&mut self)767 pub fn clear_client_id(&mut self) {
768 self.client_id.clear();
769 }
770
has_client_id(&self) -> bool771 pub fn has_client_id(&self) -> bool {
772 self.client_id.is_some()
773 }
774
775 // Param is passed by value, moved
set_client_id(&mut self, v: ::std::string::String)776 pub fn set_client_id(&mut self, v: ::std::string::String) {
777 self.client_id = ::protobuf::SingularField::some(v);
778 }
779
780 // Mutable pointer to the field.
781 // If field is not initialized, it is initialized with default value first.
mut_client_id(&mut self) -> &mut ::std::string::String782 pub fn mut_client_id(&mut self) -> &mut ::std::string::String {
783 if self.client_id.is_none() {
784 self.client_id.set_default();
785 }
786 self.client_id.as_mut().unwrap()
787 }
788
789 // Take field
take_client_id(&mut self) -> ::std::string::String790 pub fn take_client_id(&mut self) -> ::std::string::String {
791 self.client_id
792 .take()
793 .unwrap_or_else(|| ::std::string::String::new())
794 }
795 }
796
797 impl ::protobuf::Message for ListAttributes {
is_initialized(&self) -> bool798 fn is_initialized(&self) -> bool {
799 true
800 }
801
merge_from( &mut self, is: &mut ::protobuf::CodedInputStream<'_>, ) -> ::protobuf::ProtobufResult<()>802 fn merge_from(
803 &mut self,
804 is: &mut ::protobuf::CodedInputStream<'_>,
805 ) -> ::protobuf::ProtobufResult<()> {
806 while !is.eof()? {
807 let (field_number, wire_type) = is.read_tag_unpack()?;
808 match field_number {
809 1 => {
810 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
811 }
812 2 => {
813 ::protobuf::rt::read_singular_string_into(
814 wire_type,
815 is,
816 &mut self.description,
817 )?;
818 }
819 3 => {
820 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.picture)?;
821 }
822 4 => {
823 if wire_type != ::protobuf::wire_format::WireTypeVarint {
824 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
825 wire_type,
826 ));
827 }
828 let tmp = is.read_bool()?;
829 self.collaborative = ::std::option::Option::Some(tmp);
830 }
831 5 => {
832 ::protobuf::rt::read_singular_string_into(
833 wire_type,
834 is,
835 &mut self.pl3_version,
836 )?;
837 }
838 6 => {
839 if wire_type != ::protobuf::wire_format::WireTypeVarint {
840 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
841 wire_type,
842 ));
843 }
844 let tmp = is.read_bool()?;
845 self.deleted_by_owner = ::std::option::Option::Some(tmp);
846 }
847 7 => {
848 if wire_type != ::protobuf::wire_format::WireTypeVarint {
849 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
850 wire_type,
851 ));
852 }
853 let tmp = is.read_bool()?;
854 self.restricted_collaborative = ::std::option::Option::Some(tmp);
855 }
856 8 => {
857 if wire_type != ::protobuf::wire_format::WireTypeVarint {
858 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
859 wire_type,
860 ));
861 }
862 let tmp = is.read_int64()?;
863 self.deprecated_client_id = ::std::option::Option::Some(tmp);
864 }
865 9 => {
866 if wire_type != ::protobuf::wire_format::WireTypeVarint {
867 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
868 wire_type,
869 ));
870 }
871 let tmp = is.read_bool()?;
872 self.public_starred = ::std::option::Option::Some(tmp);
873 }
874 10 => {
875 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.client_id)?;
876 }
877 _ => {
878 ::protobuf::rt::read_unknown_or_skip_group(
879 field_number,
880 wire_type,
881 is,
882 self.mut_unknown_fields(),
883 )?;
884 }
885 };
886 }
887 ::std::result::Result::Ok(())
888 }
889
890 // Compute sizes of nested messages
891 #[allow(unused_variables)]
compute_size(&self) -> u32892 fn compute_size(&self) -> u32 {
893 let mut my_size = 0;
894 if let Some(ref v) = self.name.as_ref() {
895 my_size += ::protobuf::rt::string_size(1, &v);
896 }
897 if let Some(ref v) = self.description.as_ref() {
898 my_size += ::protobuf::rt::string_size(2, &v);
899 }
900 if let Some(ref v) = self.picture.as_ref() {
901 my_size += ::protobuf::rt::bytes_size(3, &v);
902 }
903 if let Some(v) = self.collaborative {
904 my_size += 2;
905 }
906 if let Some(ref v) = self.pl3_version.as_ref() {
907 my_size += ::protobuf::rt::string_size(5, &v);
908 }
909 if let Some(v) = self.deleted_by_owner {
910 my_size += 2;
911 }
912 if let Some(v) = self.restricted_collaborative {
913 my_size += 2;
914 }
915 if let Some(v) = self.deprecated_client_id {
916 my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
917 }
918 if let Some(v) = self.public_starred {
919 my_size += 2;
920 }
921 if let Some(ref v) = self.client_id.as_ref() {
922 my_size += ::protobuf::rt::string_size(10, &v);
923 }
924 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
925 self.cached_size.set(my_size);
926 my_size
927 }
928
write_to_with_cached_sizes( &self, os: &mut ::protobuf::CodedOutputStream<'_>, ) -> ::protobuf::ProtobufResult<()>929 fn write_to_with_cached_sizes(
930 &self,
931 os: &mut ::protobuf::CodedOutputStream<'_>,
932 ) -> ::protobuf::ProtobufResult<()> {
933 if let Some(ref v) = self.name.as_ref() {
934 os.write_string(1, &v)?;
935 }
936 if let Some(ref v) = self.description.as_ref() {
937 os.write_string(2, &v)?;
938 }
939 if let Some(ref v) = self.picture.as_ref() {
940 os.write_bytes(3, &v)?;
941 }
942 if let Some(v) = self.collaborative {
943 os.write_bool(4, v)?;
944 }
945 if let Some(ref v) = self.pl3_version.as_ref() {
946 os.write_string(5, &v)?;
947 }
948 if let Some(v) = self.deleted_by_owner {
949 os.write_bool(6, v)?;
950 }
951 if let Some(v) = self.restricted_collaborative {
952 os.write_bool(7, v)?;
953 }
954 if let Some(v) = self.deprecated_client_id {
955 os.write_int64(8, v)?;
956 }
957 if let Some(v) = self.public_starred {
958 os.write_bool(9, v)?;
959 }
960 if let Some(ref v) = self.client_id.as_ref() {
961 os.write_string(10, &v)?;
962 }
963 os.write_unknown_fields(self.get_unknown_fields())?;
964 ::std::result::Result::Ok(())
965 }
966
get_cached_size(&self) -> u32967 fn get_cached_size(&self) -> u32 {
968 self.cached_size.get()
969 }
970
get_unknown_fields(&self) -> &::protobuf::UnknownFields971 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
972 &self.unknown_fields
973 }
974
mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields975 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
976 &mut self.unknown_fields
977 }
978
as_any(&self) -> &dyn (::std::any::Any)979 fn as_any(&self) -> &dyn (::std::any::Any) {
980 self as &dyn (::std::any::Any)
981 }
as_any_mut(&mut self) -> &mut dyn (::std::any::Any)982 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
983 self as &mut dyn (::std::any::Any)
984 }
into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>985 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
986 self
987 }
988
descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor989 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
990 Self::descriptor_static()
991 }
992
new() -> ListAttributes993 fn new() -> ListAttributes {
994 ListAttributes::new()
995 }
996
descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor997 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
998 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
999 ::protobuf::lazy::Lazy::INIT;
1000 unsafe {
1001 descriptor.get(|| {
1002 let mut fields = ::std::vec::Vec::new();
1003 fields.push(
1004 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1005 _,
1006 ::protobuf::types::ProtobufTypeString,
1007 >(
1008 "name",
1009 |m: &ListAttributes| &m.name,
1010 |m: &mut ListAttributes| &mut m.name,
1011 ),
1012 );
1013 fields.push(
1014 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1015 _,
1016 ::protobuf::types::ProtobufTypeString,
1017 >(
1018 "description",
1019 |m: &ListAttributes| &m.description,
1020 |m: &mut ListAttributes| &mut m.description,
1021 ),
1022 );
1023 fields.push(
1024 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1025 _,
1026 ::protobuf::types::ProtobufTypeBytes,
1027 >(
1028 "picture",
1029 |m: &ListAttributes| &m.picture,
1030 |m: &mut ListAttributes| &mut m.picture,
1031 ),
1032 );
1033 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1034 _,
1035 ::protobuf::types::ProtobufTypeBool,
1036 >(
1037 "collaborative",
1038 |m: &ListAttributes| &m.collaborative,
1039 |m: &mut ListAttributes| &mut m.collaborative,
1040 ));
1041 fields.push(
1042 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1043 _,
1044 ::protobuf::types::ProtobufTypeString,
1045 >(
1046 "pl3_version",
1047 |m: &ListAttributes| &m.pl3_version,
1048 |m: &mut ListAttributes| &mut m.pl3_version,
1049 ),
1050 );
1051 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1052 _,
1053 ::protobuf::types::ProtobufTypeBool,
1054 >(
1055 "deleted_by_owner",
1056 |m: &ListAttributes| &m.deleted_by_owner,
1057 |m: &mut ListAttributes| &mut m.deleted_by_owner,
1058 ));
1059 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1060 _,
1061 ::protobuf::types::ProtobufTypeBool,
1062 >(
1063 "restricted_collaborative",
1064 |m: &ListAttributes| &m.restricted_collaborative,
1065 |m: &mut ListAttributes| &mut m.restricted_collaborative,
1066 ));
1067 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1068 _,
1069 ::protobuf::types::ProtobufTypeInt64,
1070 >(
1071 "deprecated_client_id",
1072 |m: &ListAttributes| &m.deprecated_client_id,
1073 |m: &mut ListAttributes| &mut m.deprecated_client_id,
1074 ));
1075 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1076 _,
1077 ::protobuf::types::ProtobufTypeBool,
1078 >(
1079 "public_starred",
1080 |m: &ListAttributes| &m.public_starred,
1081 |m: &mut ListAttributes| &mut m.public_starred,
1082 ));
1083 fields.push(
1084 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1085 _,
1086 ::protobuf::types::ProtobufTypeString,
1087 >(
1088 "client_id",
1089 |m: &ListAttributes| &m.client_id,
1090 |m: &mut ListAttributes| &mut m.client_id,
1091 ),
1092 );
1093 ::protobuf::reflect::MessageDescriptor::new_pb_name::<ListAttributes>(
1094 "ListAttributes",
1095 fields,
1096 file_descriptor_proto(),
1097 )
1098 })
1099 }
1100 }
1101
default_instance() -> &'static ListAttributes1102 fn default_instance() -> &'static ListAttributes {
1103 static mut instance: ::protobuf::lazy::Lazy<ListAttributes> = ::protobuf::lazy::Lazy::INIT;
1104 unsafe { instance.get(ListAttributes::new) }
1105 }
1106 }
1107
1108 impl ::protobuf::Clear for ListAttributes {
clear(&mut self)1109 fn clear(&mut self) {
1110 self.name.clear();
1111 self.description.clear();
1112 self.picture.clear();
1113 self.collaborative = ::std::option::Option::None;
1114 self.pl3_version.clear();
1115 self.deleted_by_owner = ::std::option::Option::None;
1116 self.restricted_collaborative = ::std::option::Option::None;
1117 self.deprecated_client_id = ::std::option::Option::None;
1118 self.public_starred = ::std::option::Option::None;
1119 self.client_id.clear();
1120 self.unknown_fields.clear();
1121 }
1122 }
1123
1124 impl ::std::fmt::Debug for ListAttributes {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result1125 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1126 ::protobuf::text_format::fmt(self, f)
1127 }
1128 }
1129
1130 impl ::protobuf::reflect::ProtobufValue for ListAttributes {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef1131 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1132 ::protobuf::reflect::ReflectValueRef::Message(self)
1133 }
1134 }
1135
1136 #[derive(PartialEq, Clone, Default)]
1137 pub struct ItemAttributes {
1138 // message fields
1139 added_by: ::protobuf::SingularField<::std::string::String>,
1140 timestamp: ::std::option::Option<i64>,
1141 message: ::protobuf::SingularField<::std::string::String>,
1142 seen: ::std::option::Option<bool>,
1143 download_count: ::std::option::Option<i64>,
1144 download_format: ::protobuf::SingularPtrField<DownloadFormat>,
1145 sevendigital_id: ::protobuf::SingularField<::std::string::String>,
1146 sevendigital_left: ::std::option::Option<i64>,
1147 seen_at: ::std::option::Option<i64>,
1148 public: ::std::option::Option<bool>,
1149 // special fields
1150 pub unknown_fields: ::protobuf::UnknownFields,
1151 pub cached_size: ::protobuf::CachedSize,
1152 }
1153
1154 impl<'a> ::std::default::Default for &'a ItemAttributes {
default() -> &'a ItemAttributes1155 fn default() -> &'a ItemAttributes {
1156 <ItemAttributes as ::protobuf::Message>::default_instance()
1157 }
1158 }
1159
1160 impl ItemAttributes {
new() -> ItemAttributes1161 pub fn new() -> ItemAttributes {
1162 ::std::default::Default::default()
1163 }
1164
1165 // optional string added_by = 1;
1166
get_added_by(&self) -> &str1167 pub fn get_added_by(&self) -> &str {
1168 match self.added_by.as_ref() {
1169 Some(v) => &v,
1170 None => "",
1171 }
1172 }
clear_added_by(&mut self)1173 pub fn clear_added_by(&mut self) {
1174 self.added_by.clear();
1175 }
1176
has_added_by(&self) -> bool1177 pub fn has_added_by(&self) -> bool {
1178 self.added_by.is_some()
1179 }
1180
1181 // Param is passed by value, moved
set_added_by(&mut self, v: ::std::string::String)1182 pub fn set_added_by(&mut self, v: ::std::string::String) {
1183 self.added_by = ::protobuf::SingularField::some(v);
1184 }
1185
1186 // Mutable pointer to the field.
1187 // If field is not initialized, it is initialized with default value first.
mut_added_by(&mut self) -> &mut ::std::string::String1188 pub fn mut_added_by(&mut self) -> &mut ::std::string::String {
1189 if self.added_by.is_none() {
1190 self.added_by.set_default();
1191 }
1192 self.added_by.as_mut().unwrap()
1193 }
1194
1195 // Take field
take_added_by(&mut self) -> ::std::string::String1196 pub fn take_added_by(&mut self) -> ::std::string::String {
1197 self.added_by
1198 .take()
1199 .unwrap_or_else(|| ::std::string::String::new())
1200 }
1201
1202 // optional int64 timestamp = 2;
1203
get_timestamp(&self) -> i641204 pub fn get_timestamp(&self) -> i64 {
1205 self.timestamp.unwrap_or(0)
1206 }
clear_timestamp(&mut self)1207 pub fn clear_timestamp(&mut self) {
1208 self.timestamp = ::std::option::Option::None;
1209 }
1210
has_timestamp(&self) -> bool1211 pub fn has_timestamp(&self) -> bool {
1212 self.timestamp.is_some()
1213 }
1214
1215 // Param is passed by value, moved
set_timestamp(&mut self, v: i64)1216 pub fn set_timestamp(&mut self, v: i64) {
1217 self.timestamp = ::std::option::Option::Some(v);
1218 }
1219
1220 // optional string message = 3;
1221
get_message(&self) -> &str1222 pub fn get_message(&self) -> &str {
1223 match self.message.as_ref() {
1224 Some(v) => &v,
1225 None => "",
1226 }
1227 }
clear_message(&mut self)1228 pub fn clear_message(&mut self) {
1229 self.message.clear();
1230 }
1231
has_message(&self) -> bool1232 pub fn has_message(&self) -> bool {
1233 self.message.is_some()
1234 }
1235
1236 // Param is passed by value, moved
set_message(&mut self, v: ::std::string::String)1237 pub fn set_message(&mut self, v: ::std::string::String) {
1238 self.message = ::protobuf::SingularField::some(v);
1239 }
1240
1241 // Mutable pointer to the field.
1242 // If field is not initialized, it is initialized with default value first.
mut_message(&mut self) -> &mut ::std::string::String1243 pub fn mut_message(&mut self) -> &mut ::std::string::String {
1244 if self.message.is_none() {
1245 self.message.set_default();
1246 }
1247 self.message.as_mut().unwrap()
1248 }
1249
1250 // Take field
take_message(&mut self) -> ::std::string::String1251 pub fn take_message(&mut self) -> ::std::string::String {
1252 self.message
1253 .take()
1254 .unwrap_or_else(|| ::std::string::String::new())
1255 }
1256
1257 // optional bool seen = 4;
1258
get_seen(&self) -> bool1259 pub fn get_seen(&self) -> bool {
1260 self.seen.unwrap_or(false)
1261 }
clear_seen(&mut self)1262 pub fn clear_seen(&mut self) {
1263 self.seen = ::std::option::Option::None;
1264 }
1265
has_seen(&self) -> bool1266 pub fn has_seen(&self) -> bool {
1267 self.seen.is_some()
1268 }
1269
1270 // Param is passed by value, moved
set_seen(&mut self, v: bool)1271 pub fn set_seen(&mut self, v: bool) {
1272 self.seen = ::std::option::Option::Some(v);
1273 }
1274
1275 // optional int64 download_count = 5;
1276
get_download_count(&self) -> i641277 pub fn get_download_count(&self) -> i64 {
1278 self.download_count.unwrap_or(0)
1279 }
clear_download_count(&mut self)1280 pub fn clear_download_count(&mut self) {
1281 self.download_count = ::std::option::Option::None;
1282 }
1283
has_download_count(&self) -> bool1284 pub fn has_download_count(&self) -> bool {
1285 self.download_count.is_some()
1286 }
1287
1288 // Param is passed by value, moved
set_download_count(&mut self, v: i64)1289 pub fn set_download_count(&mut self, v: i64) {
1290 self.download_count = ::std::option::Option::Some(v);
1291 }
1292
1293 // optional .DownloadFormat download_format = 6;
1294
get_download_format(&self) -> &DownloadFormat1295 pub fn get_download_format(&self) -> &DownloadFormat {
1296 self.download_format
1297 .as_ref()
1298 .unwrap_or_else(|| DownloadFormat::default_instance())
1299 }
clear_download_format(&mut self)1300 pub fn clear_download_format(&mut self) {
1301 self.download_format.clear();
1302 }
1303
has_download_format(&self) -> bool1304 pub fn has_download_format(&self) -> bool {
1305 self.download_format.is_some()
1306 }
1307
1308 // Param is passed by value, moved
set_download_format(&mut self, v: DownloadFormat)1309 pub fn set_download_format(&mut self, v: DownloadFormat) {
1310 self.download_format = ::protobuf::SingularPtrField::some(v);
1311 }
1312
1313 // Mutable pointer to the field.
1314 // If field is not initialized, it is initialized with default value first.
mut_download_format(&mut self) -> &mut DownloadFormat1315 pub fn mut_download_format(&mut self) -> &mut DownloadFormat {
1316 if self.download_format.is_none() {
1317 self.download_format.set_default();
1318 }
1319 self.download_format.as_mut().unwrap()
1320 }
1321
1322 // Take field
take_download_format(&mut self) -> DownloadFormat1323 pub fn take_download_format(&mut self) -> DownloadFormat {
1324 self.download_format
1325 .take()
1326 .unwrap_or_else(|| DownloadFormat::new())
1327 }
1328
1329 // optional string sevendigital_id = 7;
1330
get_sevendigital_id(&self) -> &str1331 pub fn get_sevendigital_id(&self) -> &str {
1332 match self.sevendigital_id.as_ref() {
1333 Some(v) => &v,
1334 None => "",
1335 }
1336 }
clear_sevendigital_id(&mut self)1337 pub fn clear_sevendigital_id(&mut self) {
1338 self.sevendigital_id.clear();
1339 }
1340
has_sevendigital_id(&self) -> bool1341 pub fn has_sevendigital_id(&self) -> bool {
1342 self.sevendigital_id.is_some()
1343 }
1344
1345 // Param is passed by value, moved
set_sevendigital_id(&mut self, v: ::std::string::String)1346 pub fn set_sevendigital_id(&mut self, v: ::std::string::String) {
1347 self.sevendigital_id = ::protobuf::SingularField::some(v);
1348 }
1349
1350 // Mutable pointer to the field.
1351 // If field is not initialized, it is initialized with default value first.
mut_sevendigital_id(&mut self) -> &mut ::std::string::String1352 pub fn mut_sevendigital_id(&mut self) -> &mut ::std::string::String {
1353 if self.sevendigital_id.is_none() {
1354 self.sevendigital_id.set_default();
1355 }
1356 self.sevendigital_id.as_mut().unwrap()
1357 }
1358
1359 // Take field
take_sevendigital_id(&mut self) -> ::std::string::String1360 pub fn take_sevendigital_id(&mut self) -> ::std::string::String {
1361 self.sevendigital_id
1362 .take()
1363 .unwrap_or_else(|| ::std::string::String::new())
1364 }
1365
1366 // optional int64 sevendigital_left = 8;
1367
get_sevendigital_left(&self) -> i641368 pub fn get_sevendigital_left(&self) -> i64 {
1369 self.sevendigital_left.unwrap_or(0)
1370 }
clear_sevendigital_left(&mut self)1371 pub fn clear_sevendigital_left(&mut self) {
1372 self.sevendigital_left = ::std::option::Option::None;
1373 }
1374
has_sevendigital_left(&self) -> bool1375 pub fn has_sevendigital_left(&self) -> bool {
1376 self.sevendigital_left.is_some()
1377 }
1378
1379 // Param is passed by value, moved
set_sevendigital_left(&mut self, v: i64)1380 pub fn set_sevendigital_left(&mut self, v: i64) {
1381 self.sevendigital_left = ::std::option::Option::Some(v);
1382 }
1383
1384 // optional int64 seen_at = 9;
1385
get_seen_at(&self) -> i641386 pub fn get_seen_at(&self) -> i64 {
1387 self.seen_at.unwrap_or(0)
1388 }
clear_seen_at(&mut self)1389 pub fn clear_seen_at(&mut self) {
1390 self.seen_at = ::std::option::Option::None;
1391 }
1392
has_seen_at(&self) -> bool1393 pub fn has_seen_at(&self) -> bool {
1394 self.seen_at.is_some()
1395 }
1396
1397 // Param is passed by value, moved
set_seen_at(&mut self, v: i64)1398 pub fn set_seen_at(&mut self, v: i64) {
1399 self.seen_at = ::std::option::Option::Some(v);
1400 }
1401
1402 // optional bool public = 10;
1403
get_public(&self) -> bool1404 pub fn get_public(&self) -> bool {
1405 self.public.unwrap_or(false)
1406 }
clear_public(&mut self)1407 pub fn clear_public(&mut self) {
1408 self.public = ::std::option::Option::None;
1409 }
1410
has_public(&self) -> bool1411 pub fn has_public(&self) -> bool {
1412 self.public.is_some()
1413 }
1414
1415 // Param is passed by value, moved
set_public(&mut self, v: bool)1416 pub fn set_public(&mut self, v: bool) {
1417 self.public = ::std::option::Option::Some(v);
1418 }
1419 }
1420
1421 impl ::protobuf::Message for ItemAttributes {
is_initialized(&self) -> bool1422 fn is_initialized(&self) -> bool {
1423 for v in &self.download_format {
1424 if !v.is_initialized() {
1425 return false;
1426 }
1427 }
1428 true
1429 }
1430
merge_from( &mut self, is: &mut ::protobuf::CodedInputStream<'_>, ) -> ::protobuf::ProtobufResult<()>1431 fn merge_from(
1432 &mut self,
1433 is: &mut ::protobuf::CodedInputStream<'_>,
1434 ) -> ::protobuf::ProtobufResult<()> {
1435 while !is.eof()? {
1436 let (field_number, wire_type) = is.read_tag_unpack()?;
1437 match field_number {
1438 1 => {
1439 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.added_by)?;
1440 }
1441 2 => {
1442 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1443 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
1444 wire_type,
1445 ));
1446 }
1447 let tmp = is.read_int64()?;
1448 self.timestamp = ::std::option::Option::Some(tmp);
1449 }
1450 3 => {
1451 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.message)?;
1452 }
1453 4 => {
1454 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1455 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
1456 wire_type,
1457 ));
1458 }
1459 let tmp = is.read_bool()?;
1460 self.seen = ::std::option::Option::Some(tmp);
1461 }
1462 5 => {
1463 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1464 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
1465 wire_type,
1466 ));
1467 }
1468 let tmp = is.read_int64()?;
1469 self.download_count = ::std::option::Option::Some(tmp);
1470 }
1471 6 => {
1472 ::protobuf::rt::read_singular_message_into(
1473 wire_type,
1474 is,
1475 &mut self.download_format,
1476 )?;
1477 }
1478 7 => {
1479 ::protobuf::rt::read_singular_string_into(
1480 wire_type,
1481 is,
1482 &mut self.sevendigital_id,
1483 )?;
1484 }
1485 8 => {
1486 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1487 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
1488 wire_type,
1489 ));
1490 }
1491 let tmp = is.read_int64()?;
1492 self.sevendigital_left = ::std::option::Option::Some(tmp);
1493 }
1494 9 => {
1495 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1496 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
1497 wire_type,
1498 ));
1499 }
1500 let tmp = is.read_int64()?;
1501 self.seen_at = ::std::option::Option::Some(tmp);
1502 }
1503 10 => {
1504 if wire_type != ::protobuf::wire_format::WireTypeVarint {
1505 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
1506 wire_type,
1507 ));
1508 }
1509 let tmp = is.read_bool()?;
1510 self.public = ::std::option::Option::Some(tmp);
1511 }
1512 _ => {
1513 ::protobuf::rt::read_unknown_or_skip_group(
1514 field_number,
1515 wire_type,
1516 is,
1517 self.mut_unknown_fields(),
1518 )?;
1519 }
1520 };
1521 }
1522 ::std::result::Result::Ok(())
1523 }
1524
1525 // Compute sizes of nested messages
1526 #[allow(unused_variables)]
compute_size(&self) -> u321527 fn compute_size(&self) -> u32 {
1528 let mut my_size = 0;
1529 if let Some(ref v) = self.added_by.as_ref() {
1530 my_size += ::protobuf::rt::string_size(1, &v);
1531 }
1532 if let Some(v) = self.timestamp {
1533 my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint);
1534 }
1535 if let Some(ref v) = self.message.as_ref() {
1536 my_size += ::protobuf::rt::string_size(3, &v);
1537 }
1538 if let Some(v) = self.seen {
1539 my_size += 2;
1540 }
1541 if let Some(v) = self.download_count {
1542 my_size += ::protobuf::rt::value_size(5, v, ::protobuf::wire_format::WireTypeVarint);
1543 }
1544 if let Some(ref v) = self.download_format.as_ref() {
1545 let len = v.compute_size();
1546 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1547 }
1548 if let Some(ref v) = self.sevendigital_id.as_ref() {
1549 my_size += ::protobuf::rt::string_size(7, &v);
1550 }
1551 if let Some(v) = self.sevendigital_left {
1552 my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint);
1553 }
1554 if let Some(v) = self.seen_at {
1555 my_size += ::protobuf::rt::value_size(9, v, ::protobuf::wire_format::WireTypeVarint);
1556 }
1557 if let Some(v) = self.public {
1558 my_size += 2;
1559 }
1560 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1561 self.cached_size.set(my_size);
1562 my_size
1563 }
1564
write_to_with_cached_sizes( &self, os: &mut ::protobuf::CodedOutputStream<'_>, ) -> ::protobuf::ProtobufResult<()>1565 fn write_to_with_cached_sizes(
1566 &self,
1567 os: &mut ::protobuf::CodedOutputStream<'_>,
1568 ) -> ::protobuf::ProtobufResult<()> {
1569 if let Some(ref v) = self.added_by.as_ref() {
1570 os.write_string(1, &v)?;
1571 }
1572 if let Some(v) = self.timestamp {
1573 os.write_int64(2, v)?;
1574 }
1575 if let Some(ref v) = self.message.as_ref() {
1576 os.write_string(3, &v)?;
1577 }
1578 if let Some(v) = self.seen {
1579 os.write_bool(4, v)?;
1580 }
1581 if let Some(v) = self.download_count {
1582 os.write_int64(5, v)?;
1583 }
1584 if let Some(ref v) = self.download_format.as_ref() {
1585 os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1586 os.write_raw_varint32(v.get_cached_size())?;
1587 v.write_to_with_cached_sizes(os)?;
1588 }
1589 if let Some(ref v) = self.sevendigital_id.as_ref() {
1590 os.write_string(7, &v)?;
1591 }
1592 if let Some(v) = self.sevendigital_left {
1593 os.write_int64(8, v)?;
1594 }
1595 if let Some(v) = self.seen_at {
1596 os.write_int64(9, v)?;
1597 }
1598 if let Some(v) = self.public {
1599 os.write_bool(10, v)?;
1600 }
1601 os.write_unknown_fields(self.get_unknown_fields())?;
1602 ::std::result::Result::Ok(())
1603 }
1604
get_cached_size(&self) -> u321605 fn get_cached_size(&self) -> u32 {
1606 self.cached_size.get()
1607 }
1608
get_unknown_fields(&self) -> &::protobuf::UnknownFields1609 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1610 &self.unknown_fields
1611 }
1612
mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields1613 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1614 &mut self.unknown_fields
1615 }
1616
as_any(&self) -> &dyn (::std::any::Any)1617 fn as_any(&self) -> &dyn (::std::any::Any) {
1618 self as &dyn (::std::any::Any)
1619 }
as_any_mut(&mut self) -> &mut dyn (::std::any::Any)1620 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1621 self as &mut dyn (::std::any::Any)
1622 }
into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>1623 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1624 self
1625 }
1626
descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor1627 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1628 Self::descriptor_static()
1629 }
1630
new() -> ItemAttributes1631 fn new() -> ItemAttributes {
1632 ItemAttributes::new()
1633 }
1634
descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor1635 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1636 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
1637 ::protobuf::lazy::Lazy::INIT;
1638 unsafe {
1639 descriptor.get(|| {
1640 let mut fields = ::std::vec::Vec::new();
1641 fields.push(
1642 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1643 _,
1644 ::protobuf::types::ProtobufTypeString,
1645 >(
1646 "added_by",
1647 |m: &ItemAttributes| &m.added_by,
1648 |m: &mut ItemAttributes| &mut m.added_by,
1649 ),
1650 );
1651 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1652 _,
1653 ::protobuf::types::ProtobufTypeInt64,
1654 >(
1655 "timestamp",
1656 |m: &ItemAttributes| &m.timestamp,
1657 |m: &mut ItemAttributes| &mut m.timestamp,
1658 ));
1659 fields.push(
1660 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1661 _,
1662 ::protobuf::types::ProtobufTypeString,
1663 >(
1664 "message",
1665 |m: &ItemAttributes| &m.message,
1666 |m: &mut ItemAttributes| &mut m.message,
1667 ),
1668 );
1669 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1670 _,
1671 ::protobuf::types::ProtobufTypeBool,
1672 >(
1673 "seen",
1674 |m: &ItemAttributes| &m.seen,
1675 |m: &mut ItemAttributes| &mut m.seen,
1676 ));
1677 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1678 _,
1679 ::protobuf::types::ProtobufTypeInt64,
1680 >(
1681 "download_count",
1682 |m: &ItemAttributes| &m.download_count,
1683 |m: &mut ItemAttributes| &mut m.download_count,
1684 ));
1685 fields.push(
1686 ::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
1687 _,
1688 ::protobuf::types::ProtobufTypeMessage<DownloadFormat>,
1689 >(
1690 "download_format",
1691 |m: &ItemAttributes| &m.download_format,
1692 |m: &mut ItemAttributes| &mut m.download_format,
1693 ),
1694 );
1695 fields.push(
1696 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1697 _,
1698 ::protobuf::types::ProtobufTypeString,
1699 >(
1700 "sevendigital_id",
1701 |m: &ItemAttributes| &m.sevendigital_id,
1702 |m: &mut ItemAttributes| &mut m.sevendigital_id,
1703 ),
1704 );
1705 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1706 _,
1707 ::protobuf::types::ProtobufTypeInt64,
1708 >(
1709 "sevendigital_left",
1710 |m: &ItemAttributes| &m.sevendigital_left,
1711 |m: &mut ItemAttributes| &mut m.sevendigital_left,
1712 ));
1713 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1714 _,
1715 ::protobuf::types::ProtobufTypeInt64,
1716 >(
1717 "seen_at",
1718 |m: &ItemAttributes| &m.seen_at,
1719 |m: &mut ItemAttributes| &mut m.seen_at,
1720 ));
1721 fields.push(::protobuf::reflect::accessor::make_option_accessor::<
1722 _,
1723 ::protobuf::types::ProtobufTypeBool,
1724 >(
1725 "public",
1726 |m: &ItemAttributes| &m.public,
1727 |m: &mut ItemAttributes| &mut m.public,
1728 ));
1729 ::protobuf::reflect::MessageDescriptor::new_pb_name::<ItemAttributes>(
1730 "ItemAttributes",
1731 fields,
1732 file_descriptor_proto(),
1733 )
1734 })
1735 }
1736 }
1737
default_instance() -> &'static ItemAttributes1738 fn default_instance() -> &'static ItemAttributes {
1739 static mut instance: ::protobuf::lazy::Lazy<ItemAttributes> = ::protobuf::lazy::Lazy::INIT;
1740 unsafe { instance.get(ItemAttributes::new) }
1741 }
1742 }
1743
1744 impl ::protobuf::Clear for ItemAttributes {
clear(&mut self)1745 fn clear(&mut self) {
1746 self.added_by.clear();
1747 self.timestamp = ::std::option::Option::None;
1748 self.message.clear();
1749 self.seen = ::std::option::Option::None;
1750 self.download_count = ::std::option::Option::None;
1751 self.download_format.clear();
1752 self.sevendigital_id.clear();
1753 self.sevendigital_left = ::std::option::Option::None;
1754 self.seen_at = ::std::option::Option::None;
1755 self.public = ::std::option::Option::None;
1756 self.unknown_fields.clear();
1757 }
1758 }
1759
1760 impl ::std::fmt::Debug for ItemAttributes {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result1761 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1762 ::protobuf::text_format::fmt(self, f)
1763 }
1764 }
1765
1766 impl ::protobuf::reflect::ProtobufValue for ItemAttributes {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef1767 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1768 ::protobuf::reflect::ReflectValueRef::Message(self)
1769 }
1770 }
1771
1772 #[derive(PartialEq, Clone, Default)]
1773 pub struct StringAttribute {
1774 // message fields
1775 key: ::protobuf::SingularField<::std::string::String>,
1776 value: ::protobuf::SingularField<::std::string::String>,
1777 // special fields
1778 pub unknown_fields: ::protobuf::UnknownFields,
1779 pub cached_size: ::protobuf::CachedSize,
1780 }
1781
1782 impl<'a> ::std::default::Default for &'a StringAttribute {
default() -> &'a StringAttribute1783 fn default() -> &'a StringAttribute {
1784 <StringAttribute as ::protobuf::Message>::default_instance()
1785 }
1786 }
1787
1788 impl StringAttribute {
new() -> StringAttribute1789 pub fn new() -> StringAttribute {
1790 ::std::default::Default::default()
1791 }
1792
1793 // optional string key = 1;
1794
get_key(&self) -> &str1795 pub fn get_key(&self) -> &str {
1796 match self.key.as_ref() {
1797 Some(v) => &v,
1798 None => "",
1799 }
1800 }
clear_key(&mut self)1801 pub fn clear_key(&mut self) {
1802 self.key.clear();
1803 }
1804
has_key(&self) -> bool1805 pub fn has_key(&self) -> bool {
1806 self.key.is_some()
1807 }
1808
1809 // Param is passed by value, moved
set_key(&mut self, v: ::std::string::String)1810 pub fn set_key(&mut self, v: ::std::string::String) {
1811 self.key = ::protobuf::SingularField::some(v);
1812 }
1813
1814 // Mutable pointer to the field.
1815 // If field is not initialized, it is initialized with default value first.
mut_key(&mut self) -> &mut ::std::string::String1816 pub fn mut_key(&mut self) -> &mut ::std::string::String {
1817 if self.key.is_none() {
1818 self.key.set_default();
1819 }
1820 self.key.as_mut().unwrap()
1821 }
1822
1823 // Take field
take_key(&mut self) -> ::std::string::String1824 pub fn take_key(&mut self) -> ::std::string::String {
1825 self.key
1826 .take()
1827 .unwrap_or_else(|| ::std::string::String::new())
1828 }
1829
1830 // optional string value = 2;
1831
get_value(&self) -> &str1832 pub fn get_value(&self) -> &str {
1833 match self.value.as_ref() {
1834 Some(v) => &v,
1835 None => "",
1836 }
1837 }
clear_value(&mut self)1838 pub fn clear_value(&mut self) {
1839 self.value.clear();
1840 }
1841
has_value(&self) -> bool1842 pub fn has_value(&self) -> bool {
1843 self.value.is_some()
1844 }
1845
1846 // Param is passed by value, moved
set_value(&mut self, v: ::std::string::String)1847 pub fn set_value(&mut self, v: ::std::string::String) {
1848 self.value = ::protobuf::SingularField::some(v);
1849 }
1850
1851 // Mutable pointer to the field.
1852 // If field is not initialized, it is initialized with default value first.
mut_value(&mut self) -> &mut ::std::string::String1853 pub fn mut_value(&mut self) -> &mut ::std::string::String {
1854 if self.value.is_none() {
1855 self.value.set_default();
1856 }
1857 self.value.as_mut().unwrap()
1858 }
1859
1860 // Take field
take_value(&mut self) -> ::std::string::String1861 pub fn take_value(&mut self) -> ::std::string::String {
1862 self.value
1863 .take()
1864 .unwrap_or_else(|| ::std::string::String::new())
1865 }
1866 }
1867
1868 impl ::protobuf::Message for StringAttribute {
is_initialized(&self) -> bool1869 fn is_initialized(&self) -> bool {
1870 true
1871 }
1872
merge_from( &mut self, is: &mut ::protobuf::CodedInputStream<'_>, ) -> ::protobuf::ProtobufResult<()>1873 fn merge_from(
1874 &mut self,
1875 is: &mut ::protobuf::CodedInputStream<'_>,
1876 ) -> ::protobuf::ProtobufResult<()> {
1877 while !is.eof()? {
1878 let (field_number, wire_type) = is.read_tag_unpack()?;
1879 match field_number {
1880 1 => {
1881 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?;
1882 }
1883 2 => {
1884 ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.value)?;
1885 }
1886 _ => {
1887 ::protobuf::rt::read_unknown_or_skip_group(
1888 field_number,
1889 wire_type,
1890 is,
1891 self.mut_unknown_fields(),
1892 )?;
1893 }
1894 };
1895 }
1896 ::std::result::Result::Ok(())
1897 }
1898
1899 // Compute sizes of nested messages
1900 #[allow(unused_variables)]
compute_size(&self) -> u321901 fn compute_size(&self) -> u32 {
1902 let mut my_size = 0;
1903 if let Some(ref v) = self.key.as_ref() {
1904 my_size += ::protobuf::rt::string_size(1, &v);
1905 }
1906 if let Some(ref v) = self.value.as_ref() {
1907 my_size += ::protobuf::rt::string_size(2, &v);
1908 }
1909 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1910 self.cached_size.set(my_size);
1911 my_size
1912 }
1913
write_to_with_cached_sizes( &self, os: &mut ::protobuf::CodedOutputStream<'_>, ) -> ::protobuf::ProtobufResult<()>1914 fn write_to_with_cached_sizes(
1915 &self,
1916 os: &mut ::protobuf::CodedOutputStream<'_>,
1917 ) -> ::protobuf::ProtobufResult<()> {
1918 if let Some(ref v) = self.key.as_ref() {
1919 os.write_string(1, &v)?;
1920 }
1921 if let Some(ref v) = self.value.as_ref() {
1922 os.write_string(2, &v)?;
1923 }
1924 os.write_unknown_fields(self.get_unknown_fields())?;
1925 ::std::result::Result::Ok(())
1926 }
1927
get_cached_size(&self) -> u321928 fn get_cached_size(&self) -> u32 {
1929 self.cached_size.get()
1930 }
1931
get_unknown_fields(&self) -> &::protobuf::UnknownFields1932 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1933 &self.unknown_fields
1934 }
1935
mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields1936 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1937 &mut self.unknown_fields
1938 }
1939
as_any(&self) -> &dyn (::std::any::Any)1940 fn as_any(&self) -> &dyn (::std::any::Any) {
1941 self as &dyn (::std::any::Any)
1942 }
as_any_mut(&mut self) -> &mut dyn (::std::any::Any)1943 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
1944 self as &mut dyn (::std::any::Any)
1945 }
into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>1946 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
1947 self
1948 }
1949
descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor1950 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1951 Self::descriptor_static()
1952 }
1953
new() -> StringAttribute1954 fn new() -> StringAttribute {
1955 StringAttribute::new()
1956 }
1957
descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor1958 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1959 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
1960 ::protobuf::lazy::Lazy::INIT;
1961 unsafe {
1962 descriptor.get(|| {
1963 let mut fields = ::std::vec::Vec::new();
1964 fields.push(
1965 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1966 _,
1967 ::protobuf::types::ProtobufTypeString,
1968 >(
1969 "key",
1970 |m: &StringAttribute| &m.key,
1971 |m: &mut StringAttribute| &mut m.key,
1972 ),
1973 );
1974 fields.push(
1975 ::protobuf::reflect::accessor::make_singular_field_accessor::<
1976 _,
1977 ::protobuf::types::ProtobufTypeString,
1978 >(
1979 "value",
1980 |m: &StringAttribute| &m.value,
1981 |m: &mut StringAttribute| &mut m.value,
1982 ),
1983 );
1984 ::protobuf::reflect::MessageDescriptor::new_pb_name::<StringAttribute>(
1985 "StringAttribute",
1986 fields,
1987 file_descriptor_proto(),
1988 )
1989 })
1990 }
1991 }
1992
default_instance() -> &'static StringAttribute1993 fn default_instance() -> &'static StringAttribute {
1994 static mut instance: ::protobuf::lazy::Lazy<StringAttribute> = ::protobuf::lazy::Lazy::INIT;
1995 unsafe { instance.get(StringAttribute::new) }
1996 }
1997 }
1998
1999 impl ::protobuf::Clear for StringAttribute {
clear(&mut self)2000 fn clear(&mut self) {
2001 self.key.clear();
2002 self.value.clear();
2003 self.unknown_fields.clear();
2004 }
2005 }
2006
2007 impl ::std::fmt::Debug for StringAttribute {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result2008 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2009 ::protobuf::text_format::fmt(self, f)
2010 }
2011 }
2012
2013 impl ::protobuf::reflect::ProtobufValue for StringAttribute {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2014 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2015 ::protobuf::reflect::ReflectValueRef::Message(self)
2016 }
2017 }
2018
2019 #[derive(PartialEq, Clone, Default)]
2020 pub struct StringAttributes {
2021 // message fields
2022 attribute: ::protobuf::RepeatedField<StringAttribute>,
2023 // special fields
2024 pub unknown_fields: ::protobuf::UnknownFields,
2025 pub cached_size: ::protobuf::CachedSize,
2026 }
2027
2028 impl<'a> ::std::default::Default for &'a StringAttributes {
default() -> &'a StringAttributes2029 fn default() -> &'a StringAttributes {
2030 <StringAttributes as ::protobuf::Message>::default_instance()
2031 }
2032 }
2033
2034 impl StringAttributes {
new() -> StringAttributes2035 pub fn new() -> StringAttributes {
2036 ::std::default::Default::default()
2037 }
2038
2039 // repeated .StringAttribute attribute = 1;
2040
get_attribute(&self) -> &[StringAttribute]2041 pub fn get_attribute(&self) -> &[StringAttribute] {
2042 &self.attribute
2043 }
clear_attribute(&mut self)2044 pub fn clear_attribute(&mut self) {
2045 self.attribute.clear();
2046 }
2047
2048 // Param is passed by value, moved
set_attribute(&mut self, v: ::protobuf::RepeatedField<StringAttribute>)2049 pub fn set_attribute(&mut self, v: ::protobuf::RepeatedField<StringAttribute>) {
2050 self.attribute = v;
2051 }
2052
2053 // Mutable pointer to the field.
mut_attribute(&mut self) -> &mut ::protobuf::RepeatedField<StringAttribute>2054 pub fn mut_attribute(&mut self) -> &mut ::protobuf::RepeatedField<StringAttribute> {
2055 &mut self.attribute
2056 }
2057
2058 // Take field
take_attribute(&mut self) -> ::protobuf::RepeatedField<StringAttribute>2059 pub fn take_attribute(&mut self) -> ::protobuf::RepeatedField<StringAttribute> {
2060 ::std::mem::replace(&mut self.attribute, ::protobuf::RepeatedField::new())
2061 }
2062 }
2063
2064 impl ::protobuf::Message for StringAttributes {
is_initialized(&self) -> bool2065 fn is_initialized(&self) -> bool {
2066 for v in &self.attribute {
2067 if !v.is_initialized() {
2068 return false;
2069 }
2070 }
2071 true
2072 }
2073
merge_from( &mut self, is: &mut ::protobuf::CodedInputStream<'_>, ) -> ::protobuf::ProtobufResult<()>2074 fn merge_from(
2075 &mut self,
2076 is: &mut ::protobuf::CodedInputStream<'_>,
2077 ) -> ::protobuf::ProtobufResult<()> {
2078 while !is.eof()? {
2079 let (field_number, wire_type) = is.read_tag_unpack()?;
2080 match field_number {
2081 1 => {
2082 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attribute)?;
2083 }
2084 _ => {
2085 ::protobuf::rt::read_unknown_or_skip_group(
2086 field_number,
2087 wire_type,
2088 is,
2089 self.mut_unknown_fields(),
2090 )?;
2091 }
2092 };
2093 }
2094 ::std::result::Result::Ok(())
2095 }
2096
2097 // Compute sizes of nested messages
2098 #[allow(unused_variables)]
compute_size(&self) -> u322099 fn compute_size(&self) -> u32 {
2100 let mut my_size = 0;
2101 for value in &self.attribute {
2102 let len = value.compute_size();
2103 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2104 }
2105 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2106 self.cached_size.set(my_size);
2107 my_size
2108 }
2109
write_to_with_cached_sizes( &self, os: &mut ::protobuf::CodedOutputStream<'_>, ) -> ::protobuf::ProtobufResult<()>2110 fn write_to_with_cached_sizes(
2111 &self,
2112 os: &mut ::protobuf::CodedOutputStream<'_>,
2113 ) -> ::protobuf::ProtobufResult<()> {
2114 for v in &self.attribute {
2115 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2116 os.write_raw_varint32(v.get_cached_size())?;
2117 v.write_to_with_cached_sizes(os)?;
2118 }
2119 os.write_unknown_fields(self.get_unknown_fields())?;
2120 ::std::result::Result::Ok(())
2121 }
2122
get_cached_size(&self) -> u322123 fn get_cached_size(&self) -> u32 {
2124 self.cached_size.get()
2125 }
2126
get_unknown_fields(&self) -> &::protobuf::UnknownFields2127 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2128 &self.unknown_fields
2129 }
2130
mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields2131 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2132 &mut self.unknown_fields
2133 }
2134
as_any(&self) -> &dyn (::std::any::Any)2135 fn as_any(&self) -> &dyn (::std::any::Any) {
2136 self as &dyn (::std::any::Any)
2137 }
as_any_mut(&mut self) -> &mut dyn (::std::any::Any)2138 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
2139 self as &mut dyn (::std::any::Any)
2140 }
into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>2141 fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
2142 self
2143 }
2144
descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor2145 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2146 Self::descriptor_static()
2147 }
2148
new() -> StringAttributes2149 fn new() -> StringAttributes {
2150 StringAttributes::new()
2151 }
2152
descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor2153 fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2154 static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
2155 ::protobuf::lazy::Lazy::INIT;
2156 unsafe {
2157 descriptor.get(|| {
2158 let mut fields = ::std::vec::Vec::new();
2159 fields.push(
2160 ::protobuf::reflect::accessor::make_repeated_field_accessor::<
2161 _,
2162 ::protobuf::types::ProtobufTypeMessage<StringAttribute>,
2163 >(
2164 "attribute",
2165 |m: &StringAttributes| &m.attribute,
2166 |m: &mut StringAttributes| &mut m.attribute,
2167 ),
2168 );
2169 ::protobuf::reflect::MessageDescriptor::new_pb_name::<StringAttributes>(
2170 "StringAttributes",
2171 fields,
2172 file_descriptor_proto(),
2173 )
2174 })
2175 }
2176 }
2177
default_instance() -> &'static StringAttributes2178 fn default_instance() -> &'static StringAttributes {
2179 static mut instance: ::protobuf::lazy::Lazy<StringAttributes> =
2180 ::protobuf::lazy::Lazy::INIT;
2181 unsafe { instance.get(StringAttributes::new) }
2182 }
2183 }
2184
2185 impl ::protobuf::Clear for StringAttributes {
clear(&mut self)2186 fn clear(&mut self) {
2187 self.attribute.clear();
2188 self.unknown_fields.clear();
2189 }
2190 }
2191
2192 impl ::std::fmt::Debug for StringAttributes {
fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result2193 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2194 ::protobuf::text_format::fmt(self, f)
2195 }
2196 }
2197
2198 impl ::protobuf::reflect::ProtobufValue for StringAttributes {
as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2199 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2200 ::protobuf::reflect::ReflectValueRef::Message(self)
2201 }
2202 }
2203
2204 static file_descriptor_proto_data: &'static [u8] = b"\
2205 \n\x13playlist4meta.proto\x12\0\"3\n\x0cListChecksum\x12\x11\n\x07versio\
2206 n\x18\x01\x20\x01(\x05B\0\x12\x0e\n\x04sha1\x18\x04\x20\x01(\x0cB\0:\0\"\
2207 \x86\x01\n\x0eDownloadFormat\x12&\n\x05codec\x18\x01\x20\x01(\x0e2\x15.D\
2208 ownloadFormat.CodecB\0\"J\n\x05Codec\x12\x11\n\rCODEC_UNKNOWN\x10\0\x12\
2209 \x0e\n\nOGG_VORBIS\x10\x01\x12\x08\n\x04FLAC\x10\x02\x12\x12\n\x0eMPEG_1\
2210 _LAYER_3\x10\x03\x1a\0:\0\"\x8b\x02\n\x0eListAttributes\x12\x0e\n\x04nam\
2211 e\x18\x01\x20\x01(\tB\0\x12\x15\n\x0bdescription\x18\x02\x20\x01(\tB\0\
2212 \x12\x11\n\x07picture\x18\x03\x20\x01(\x0cB\0\x12\x17\n\rcollaborative\
2213 \x18\x04\x20\x01(\x08B\0\x12\x15\n\x0bpl3_version\x18\x05\x20\x01(\tB\0\
2214 \x12\x1a\n\x10deleted_by_owner\x18\x06\x20\x01(\x08B\0\x12\"\n\x18restri\
2215 cted_collaborative\x18\x07\x20\x01(\x08B\0\x12\x1e\n\x14deprecated_clien\
2216 t_id\x18\x08\x20\x01(\x03B\0\x12\x18\n\x0epublic_starred\x18\t\x20\x01(\
2217 \x08B\0\x12\x13\n\tclient_id\x18\n\x20\x01(\tB\0:\0\"\x81\x02\n\x0eItemA\
2218 ttributes\x12\x12\n\x08added_by\x18\x01\x20\x01(\tB\0\x12\x13\n\ttimesta\
2219 mp\x18\x02\x20\x01(\x03B\0\x12\x11\n\x07message\x18\x03\x20\x01(\tB\0\
2220 \x12\x0e\n\x04seen\x18\x04\x20\x01(\x08B\0\x12\x18\n\x0edownload_count\
2221 \x18\x05\x20\x01(\x03B\0\x12*\n\x0fdownload_format\x18\x06\x20\x01(\x0b2\
2222 \x0f.DownloadFormatB\0\x12\x19\n\x0fsevendigital_id\x18\x07\x20\x01(\tB\
2223 \0\x12\x1b\n\x11sevendigital_left\x18\x08\x20\x01(\x03B\0\x12\x11\n\x07s\
2224 een_at\x18\t\x20\x01(\x03B\0\x12\x10\n\x06public\x18\n\x20\x01(\x08B\0:\
2225 \0\"3\n\x0fStringAttribute\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\x12\x0f\
2226 \n\x05value\x18\x02\x20\x01(\tB\0:\0\";\n\x10StringAttributes\x12%\n\tat\
2227 tribute\x18\x01\x20\x03(\x0b2\x10.StringAttributeB\0:\0B\0b\x06proto2\
2228 ";
2229
2230 static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<
2231 ::protobuf::descriptor::FileDescriptorProto,
2232 > = ::protobuf::lazy::Lazy::INIT;
2233
parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto2234 fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
2235 ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
2236 }
2237
file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto2238 pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
2239 unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) }
2240 }
2241