// This file is generated by rust-protobuf 2.8.1. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] //! Generated file from `playlist4meta.proto` use protobuf::Message as Message_imported_for_functions; use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1; #[derive(PartialEq,Clone,Default)] pub struct ListChecksum { // message fields version: ::std::option::Option, sha1: ::protobuf::SingularField<::std::vec::Vec>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a ListChecksum { fn default() -> &'a ListChecksum { ::default_instance() } } impl ListChecksum { pub fn new() -> ListChecksum { ::std::default::Default::default() } // optional int32 version = 1; pub fn get_version(&self) -> i32 { self.version.unwrap_or(0) } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } pub fn has_version(&self) -> bool { self.version.is_some() } // Param is passed by value, moved pub fn set_version(&mut self, v: i32) { self.version = ::std::option::Option::Some(v); } // optional bytes sha1 = 4; pub fn get_sha1(&self) -> &[u8] { match self.sha1.as_ref() { Some(v) => &v, None => &[], } } pub fn clear_sha1(&mut self) { self.sha1.clear(); } pub fn has_sha1(&self) -> bool { self.sha1.is_some() } // Param is passed by value, moved pub fn set_sha1(&mut self, v: ::std::vec::Vec) { self.sha1 = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_sha1(&mut self) -> &mut ::std::vec::Vec { if self.sha1.is_none() { self.sha1.set_default(); } self.sha1.as_mut().unwrap() } // Take field pub fn take_sha1(&mut self) -> ::std::vec::Vec { self.sha1.take().unwrap_or_else(|| ::std::vec::Vec::new()) } } impl ::protobuf::Message for ListChecksum { fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_int32()?; self.version = ::std::option::Option::Some(tmp); }, 4 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.sha1)?; }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(v) = self.version { my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint); } if let Some(ref v) = self.sha1.as_ref() { my_size += ::protobuf::rt::bytes_size(4, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.version { os.write_int32(1, v)?; } if let Some(ref v) = self.sha1.as_ref() { os.write_bytes(4, &v)?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } fn get_cached_size(&self) -> u32 { self.cached_size.get() } fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { &self.unknown_fields } fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { &mut self.unknown_fields } fn as_any(&self) -> &dyn (::std::any::Any) { self as &dyn (::std::any::Any) } fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { self as &mut dyn (::std::any::Any) } fn into_any(self: Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> ListChecksum { ListChecksum::new() } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, }; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt32>( "version", |m: &ListChecksum| { &m.version }, |m: &mut ListChecksum| { &mut m.version }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( "sha1", |m: &ListChecksum| { &m.sha1 }, |m: &mut ListChecksum| { &mut m.sha1 }, )); ::protobuf::reflect::MessageDescriptor::new::( "ListChecksum", fields, file_descriptor_proto() ) }) } } fn default_instance() -> &'static ListChecksum { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ListChecksum, }; unsafe { instance.get(ListChecksum::new) } } } impl ::protobuf::Clear for ListChecksum { fn clear(&mut self) { self.version = ::std::option::Option::None; self.sha1.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ListChecksum { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ListChecksum { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct DownloadFormat { // message fields codec: ::std::option::Option, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a DownloadFormat { fn default() -> &'a DownloadFormat { ::default_instance() } } impl DownloadFormat { pub fn new() -> DownloadFormat { ::std::default::Default::default() } // optional .DownloadFormat.Codec codec = 1; pub fn get_codec(&self) -> DownloadFormat_Codec { self.codec.unwrap_or(DownloadFormat_Codec::CODEC_UNKNOWN) } pub fn clear_codec(&mut self) { self.codec = ::std::option::Option::None; } pub fn has_codec(&self) -> bool { self.codec.is_some() } // Param is passed by value, moved pub fn set_codec(&mut self, v: DownloadFormat_Codec) { self.codec = ::std::option::Option::Some(v); } } impl ::protobuf::Message for DownloadFormat { fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.codec, 1, &mut self.unknown_fields)? }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(v) = self.codec { my_size += ::protobuf::rt::enum_size(1, v); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.codec { os.write_enum(1, v.value())?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } fn get_cached_size(&self) -> u32 { self.cached_size.get() } fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { &self.unknown_fields } fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { &mut self.unknown_fields } fn as_any(&self) -> &dyn (::std::any::Any) { self as &dyn (::std::any::Any) } fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { self as &mut dyn (::std::any::Any) } fn into_any(self: Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> DownloadFormat { DownloadFormat::new() } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, }; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( "codec", |m: &DownloadFormat| { &m.codec }, |m: &mut DownloadFormat| { &mut m.codec }, )); ::protobuf::reflect::MessageDescriptor::new::( "DownloadFormat", fields, file_descriptor_proto() ) }) } } fn default_instance() -> &'static DownloadFormat { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const DownloadFormat, }; unsafe { instance.get(DownloadFormat::new) } } } impl ::protobuf::Clear for DownloadFormat { fn clear(&mut self) { self.codec = ::std::option::Option::None; self.unknown_fields.clear(); } } impl ::std::fmt::Debug for DownloadFormat { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for DownloadFormat { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Message(self) } } #[derive(Clone,PartialEq,Eq,Debug,Hash)] pub enum DownloadFormat_Codec { CODEC_UNKNOWN = 0, OGG_VORBIS = 1, FLAC = 2, MPEG_1_LAYER_3 = 3, } impl ::protobuf::ProtobufEnum for DownloadFormat_Codec { fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(DownloadFormat_Codec::CODEC_UNKNOWN), 1 => ::std::option::Option::Some(DownloadFormat_Codec::OGG_VORBIS), 2 => ::std::option::Option::Some(DownloadFormat_Codec::FLAC), 3 => ::std::option::Option::Some(DownloadFormat_Codec::MPEG_1_LAYER_3), _ => ::std::option::Option::None } } fn values() -> &'static [Self] { static values: &'static [DownloadFormat_Codec] = &[ DownloadFormat_Codec::CODEC_UNKNOWN, DownloadFormat_Codec::OGG_VORBIS, DownloadFormat_Codec::FLAC, DownloadFormat_Codec::MPEG_1_LAYER_3, ]; values } fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, }; unsafe { descriptor.get(|| { ::protobuf::reflect::EnumDescriptor::new("DownloadFormat_Codec", file_descriptor_proto()) }) } } } impl ::std::marker::Copy for DownloadFormat_Codec { } impl ::std::default::Default for DownloadFormat_Codec { fn default() -> Self { DownloadFormat_Codec::CODEC_UNKNOWN } } impl ::protobuf::reflect::ProtobufValue for DownloadFormat_Codec { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) } } #[derive(PartialEq,Clone,Default)] pub struct ListAttributes { // message fields name: ::protobuf::SingularField<::std::string::String>, description: ::protobuf::SingularField<::std::string::String>, picture: ::protobuf::SingularField<::std::vec::Vec>, collaborative: ::std::option::Option, pl3_version: ::protobuf::SingularField<::std::string::String>, deleted_by_owner: ::std::option::Option, restricted_collaborative: ::std::option::Option, deprecated_client_id: ::std::option::Option, public_starred: ::std::option::Option, client_id: ::protobuf::SingularField<::std::string::String>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a ListAttributes { fn default() -> &'a ListAttributes { ::default_instance() } } impl ListAttributes { pub fn new() -> ListAttributes { ::std::default::Default::default() } // optional string name = 1; pub fn get_name(&self) -> &str { match self.name.as_ref() { Some(v) => &v, None => "", } } pub fn clear_name(&mut self) { self.name.clear(); } pub fn has_name(&self) -> bool { self.name.is_some() } // Param is passed by value, moved pub fn set_name(&mut self, v: ::std::string::String) { self.name = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_name(&mut self) -> &mut ::std::string::String { if self.name.is_none() { self.name.set_default(); } self.name.as_mut().unwrap() } // Take field pub fn take_name(&mut self) -> ::std::string::String { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string description = 2; pub fn get_description(&self) -> &str { match self.description.as_ref() { Some(v) => &v, None => "", } } pub fn clear_description(&mut self) { self.description.clear(); } pub fn has_description(&self) -> bool { self.description.is_some() } // Param is passed by value, moved pub fn set_description(&mut self, v: ::std::string::String) { self.description = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_description(&mut self) -> &mut ::std::string::String { if self.description.is_none() { self.description.set_default(); } self.description.as_mut().unwrap() } // Take field pub fn take_description(&mut self) -> ::std::string::String { self.description.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bytes picture = 3; pub fn get_picture(&self) -> &[u8] { match self.picture.as_ref() { Some(v) => &v, None => &[], } } pub fn clear_picture(&mut self) { self.picture.clear(); } pub fn has_picture(&self) -> bool { self.picture.is_some() } // Param is passed by value, moved pub fn set_picture(&mut self, v: ::std::vec::Vec) { self.picture = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_picture(&mut self) -> &mut ::std::vec::Vec { if self.picture.is_none() { self.picture.set_default(); } self.picture.as_mut().unwrap() } // Take field pub fn take_picture(&mut self) -> ::std::vec::Vec { self.picture.take().unwrap_or_else(|| ::std::vec::Vec::new()) } // optional bool collaborative = 4; pub fn get_collaborative(&self) -> bool { self.collaborative.unwrap_or(false) } pub fn clear_collaborative(&mut self) { self.collaborative = ::std::option::Option::None; } pub fn has_collaborative(&self) -> bool { self.collaborative.is_some() } // Param is passed by value, moved pub fn set_collaborative(&mut self, v: bool) { self.collaborative = ::std::option::Option::Some(v); } // optional string pl3_version = 5; pub fn get_pl3_version(&self) -> &str { match self.pl3_version.as_ref() { Some(v) => &v, None => "", } } pub fn clear_pl3_version(&mut self) { self.pl3_version.clear(); } pub fn has_pl3_version(&self) -> bool { self.pl3_version.is_some() } // Param is passed by value, moved pub fn set_pl3_version(&mut self, v: ::std::string::String) { self.pl3_version = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_pl3_version(&mut self) -> &mut ::std::string::String { if self.pl3_version.is_none() { self.pl3_version.set_default(); } self.pl3_version.as_mut().unwrap() } // Take field pub fn take_pl3_version(&mut self) -> ::std::string::String { self.pl3_version.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bool deleted_by_owner = 6; pub fn get_deleted_by_owner(&self) -> bool { self.deleted_by_owner.unwrap_or(false) } pub fn clear_deleted_by_owner(&mut self) { self.deleted_by_owner = ::std::option::Option::None; } pub fn has_deleted_by_owner(&self) -> bool { self.deleted_by_owner.is_some() } // Param is passed by value, moved pub fn set_deleted_by_owner(&mut self, v: bool) { self.deleted_by_owner = ::std::option::Option::Some(v); } // optional bool restricted_collaborative = 7; pub fn get_restricted_collaborative(&self) -> bool { self.restricted_collaborative.unwrap_or(false) } pub fn clear_restricted_collaborative(&mut self) { self.restricted_collaborative = ::std::option::Option::None; } pub fn has_restricted_collaborative(&self) -> bool { self.restricted_collaborative.is_some() } // Param is passed by value, moved pub fn set_restricted_collaborative(&mut self, v: bool) { self.restricted_collaborative = ::std::option::Option::Some(v); } // optional int64 deprecated_client_id = 8; pub fn get_deprecated_client_id(&self) -> i64 { self.deprecated_client_id.unwrap_or(0) } pub fn clear_deprecated_client_id(&mut self) { self.deprecated_client_id = ::std::option::Option::None; } pub fn has_deprecated_client_id(&self) -> bool { self.deprecated_client_id.is_some() } // Param is passed by value, moved pub fn set_deprecated_client_id(&mut self, v: i64) { self.deprecated_client_id = ::std::option::Option::Some(v); } // optional bool public_starred = 9; pub fn get_public_starred(&self) -> bool { self.public_starred.unwrap_or(false) } pub fn clear_public_starred(&mut self) { self.public_starred = ::std::option::Option::None; } pub fn has_public_starred(&self) -> bool { self.public_starred.is_some() } // Param is passed by value, moved pub fn set_public_starred(&mut self, v: bool) { self.public_starred = ::std::option::Option::Some(v); } // optional string client_id = 10; pub fn get_client_id(&self) -> &str { match self.client_id.as_ref() { Some(v) => &v, None => "", } } pub fn clear_client_id(&mut self) { self.client_id.clear(); } pub fn has_client_id(&self) -> bool { self.client_id.is_some() } // Param is passed by value, moved pub fn set_client_id(&mut self, v: ::std::string::String) { self.client_id = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_client_id(&mut self) -> &mut ::std::string::String { if self.client_id.is_none() { self.client_id.set_default(); } self.client_id.as_mut().unwrap() } // Take field pub fn take_client_id(&mut self) -> ::std::string::String { self.client_id.take().unwrap_or_else(|| ::std::string::String::new()) } } impl ::protobuf::Message for ListAttributes { fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; }, 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.description)?; }, 3 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.picture)?; }, 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_bool()?; self.collaborative = ::std::option::Option::Some(tmp); }, 5 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.pl3_version)?; }, 6 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_bool()?; self.deleted_by_owner = ::std::option::Option::Some(tmp); }, 7 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_bool()?; self.restricted_collaborative = ::std::option::Option::Some(tmp); }, 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_int64()?; self.deprecated_client_id = ::std::option::Option::Some(tmp); }, 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_bool()?; self.public_starred = ::std::option::Option::Some(tmp); }, 10 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.client_id)?; }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(ref v) = self.name.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(ref v) = self.description.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(ref v) = self.picture.as_ref() { my_size += ::protobuf::rt::bytes_size(3, &v); } if let Some(v) = self.collaborative { my_size += 2; } if let Some(ref v) = self.pl3_version.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.deleted_by_owner { my_size += 2; } if let Some(v) = self.restricted_collaborative { my_size += 2; } if let Some(v) = self.deprecated_client_id { my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint); } if let Some(v) = self.public_starred { my_size += 2; } if let Some(ref v) = self.client_id.as_ref() { my_size += ::protobuf::rt::string_size(10, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.name.as_ref() { os.write_string(1, &v)?; } if let Some(ref v) = self.description.as_ref() { os.write_string(2, &v)?; } if let Some(ref v) = self.picture.as_ref() { os.write_bytes(3, &v)?; } if let Some(v) = self.collaborative { os.write_bool(4, v)?; } if let Some(ref v) = self.pl3_version.as_ref() { os.write_string(5, &v)?; } if let Some(v) = self.deleted_by_owner { os.write_bool(6, v)?; } if let Some(v) = self.restricted_collaborative { os.write_bool(7, v)?; } if let Some(v) = self.deprecated_client_id { os.write_int64(8, v)?; } if let Some(v) = self.public_starred { os.write_bool(9, v)?; } if let Some(ref v) = self.client_id.as_ref() { os.write_string(10, &v)?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } fn get_cached_size(&self) -> u32 { self.cached_size.get() } fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { &self.unknown_fields } fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { &mut self.unknown_fields } fn as_any(&self) -> &dyn (::std::any::Any) { self as &dyn (::std::any::Any) } fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { self as &mut dyn (::std::any::Any) } fn into_any(self: Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> ListAttributes { ListAttributes::new() } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, }; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "name", |m: &ListAttributes| { &m.name }, |m: &mut ListAttributes| { &mut m.name }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "description", |m: &ListAttributes| { &m.description }, |m: &mut ListAttributes| { &mut m.description }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>( "picture", |m: &ListAttributes| { &m.picture }, |m: &mut ListAttributes| { &mut m.picture }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( "collaborative", |m: &ListAttributes| { &m.collaborative }, |m: &mut ListAttributes| { &mut m.collaborative }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "pl3_version", |m: &ListAttributes| { &m.pl3_version }, |m: &mut ListAttributes| { &mut m.pl3_version }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( "deleted_by_owner", |m: &ListAttributes| { &m.deleted_by_owner }, |m: &mut ListAttributes| { &mut m.deleted_by_owner }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( "restricted_collaborative", |m: &ListAttributes| { &m.restricted_collaborative }, |m: &mut ListAttributes| { &mut m.restricted_collaborative }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( "deprecated_client_id", |m: &ListAttributes| { &m.deprecated_client_id }, |m: &mut ListAttributes| { &mut m.deprecated_client_id }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( "public_starred", |m: &ListAttributes| { &m.public_starred }, |m: &mut ListAttributes| { &mut m.public_starred }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "client_id", |m: &ListAttributes| { &m.client_id }, |m: &mut ListAttributes| { &mut m.client_id }, )); ::protobuf::reflect::MessageDescriptor::new::( "ListAttributes", fields, file_descriptor_proto() ) }) } } fn default_instance() -> &'static ListAttributes { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ListAttributes, }; unsafe { instance.get(ListAttributes::new) } } } impl ::protobuf::Clear for ListAttributes { fn clear(&mut self) { self.name.clear(); self.description.clear(); self.picture.clear(); self.collaborative = ::std::option::Option::None; self.pl3_version.clear(); self.deleted_by_owner = ::std::option::Option::None; self.restricted_collaborative = ::std::option::Option::None; self.deprecated_client_id = ::std::option::Option::None; self.public_starred = ::std::option::Option::None; self.client_id.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ListAttributes { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ListAttributes { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct ItemAttributes { // message fields added_by: ::protobuf::SingularField<::std::string::String>, timestamp: ::std::option::Option, message: ::protobuf::SingularField<::std::string::String>, seen: ::std::option::Option, download_count: ::std::option::Option, download_format: ::protobuf::SingularPtrField, sevendigital_id: ::protobuf::SingularField<::std::string::String>, sevendigital_left: ::std::option::Option, seen_at: ::std::option::Option, public: ::std::option::Option, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a ItemAttributes { fn default() -> &'a ItemAttributes { ::default_instance() } } impl ItemAttributes { pub fn new() -> ItemAttributes { ::std::default::Default::default() } // optional string added_by = 1; pub fn get_added_by(&self) -> &str { match self.added_by.as_ref() { Some(v) => &v, None => "", } } pub fn clear_added_by(&mut self) { self.added_by.clear(); } pub fn has_added_by(&self) -> bool { self.added_by.is_some() } // Param is passed by value, moved pub fn set_added_by(&mut self, v: ::std::string::String) { self.added_by = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_added_by(&mut self) -> &mut ::std::string::String { if self.added_by.is_none() { self.added_by.set_default(); } self.added_by.as_mut().unwrap() } // Take field pub fn take_added_by(&mut self) -> ::std::string::String { self.added_by.take().unwrap_or_else(|| ::std::string::String::new()) } // optional int64 timestamp = 2; pub fn get_timestamp(&self) -> i64 { self.timestamp.unwrap_or(0) } pub fn clear_timestamp(&mut self) { self.timestamp = ::std::option::Option::None; } pub fn has_timestamp(&self) -> bool { self.timestamp.is_some() } // Param is passed by value, moved pub fn set_timestamp(&mut self, v: i64) { self.timestamp = ::std::option::Option::Some(v); } // optional string message = 3; pub fn get_message(&self) -> &str { match self.message.as_ref() { Some(v) => &v, None => "", } } pub fn clear_message(&mut self) { self.message.clear(); } pub fn has_message(&self) -> bool { self.message.is_some() } // Param is passed by value, moved pub fn set_message(&mut self, v: ::std::string::String) { self.message = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_message(&mut self) -> &mut ::std::string::String { if self.message.is_none() { self.message.set_default(); } self.message.as_mut().unwrap() } // Take field pub fn take_message(&mut self) -> ::std::string::String { self.message.take().unwrap_or_else(|| ::std::string::String::new()) } // optional bool seen = 4; pub fn get_seen(&self) -> bool { self.seen.unwrap_or(false) } pub fn clear_seen(&mut self) { self.seen = ::std::option::Option::None; } pub fn has_seen(&self) -> bool { self.seen.is_some() } // Param is passed by value, moved pub fn set_seen(&mut self, v: bool) { self.seen = ::std::option::Option::Some(v); } // optional int64 download_count = 5; pub fn get_download_count(&self) -> i64 { self.download_count.unwrap_or(0) } pub fn clear_download_count(&mut self) { self.download_count = ::std::option::Option::None; } pub fn has_download_count(&self) -> bool { self.download_count.is_some() } // Param is passed by value, moved pub fn set_download_count(&mut self, v: i64) { self.download_count = ::std::option::Option::Some(v); } // optional .DownloadFormat download_format = 6; pub fn get_download_format(&self) -> &DownloadFormat { self.download_format.as_ref().unwrap_or_else(|| DownloadFormat::default_instance()) } pub fn clear_download_format(&mut self) { self.download_format.clear(); } pub fn has_download_format(&self) -> bool { self.download_format.is_some() } // Param is passed by value, moved pub fn set_download_format(&mut self, v: DownloadFormat) { self.download_format = ::protobuf::SingularPtrField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_download_format(&mut self) -> &mut DownloadFormat { if self.download_format.is_none() { self.download_format.set_default(); } self.download_format.as_mut().unwrap() } // Take field pub fn take_download_format(&mut self) -> DownloadFormat { self.download_format.take().unwrap_or_else(|| DownloadFormat::new()) } // optional string sevendigital_id = 7; pub fn get_sevendigital_id(&self) -> &str { match self.sevendigital_id.as_ref() { Some(v) => &v, None => "", } } pub fn clear_sevendigital_id(&mut self) { self.sevendigital_id.clear(); } pub fn has_sevendigital_id(&self) -> bool { self.sevendigital_id.is_some() } // Param is passed by value, moved pub fn set_sevendigital_id(&mut self, v: ::std::string::String) { self.sevendigital_id = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_sevendigital_id(&mut self) -> &mut ::std::string::String { if self.sevendigital_id.is_none() { self.sevendigital_id.set_default(); } self.sevendigital_id.as_mut().unwrap() } // Take field pub fn take_sevendigital_id(&mut self) -> ::std::string::String { self.sevendigital_id.take().unwrap_or_else(|| ::std::string::String::new()) } // optional int64 sevendigital_left = 8; pub fn get_sevendigital_left(&self) -> i64 { self.sevendigital_left.unwrap_or(0) } pub fn clear_sevendigital_left(&mut self) { self.sevendigital_left = ::std::option::Option::None; } pub fn has_sevendigital_left(&self) -> bool { self.sevendigital_left.is_some() } // Param is passed by value, moved pub fn set_sevendigital_left(&mut self, v: i64) { self.sevendigital_left = ::std::option::Option::Some(v); } // optional int64 seen_at = 9; pub fn get_seen_at(&self) -> i64 { self.seen_at.unwrap_or(0) } pub fn clear_seen_at(&mut self) { self.seen_at = ::std::option::Option::None; } pub fn has_seen_at(&self) -> bool { self.seen_at.is_some() } // Param is passed by value, moved pub fn set_seen_at(&mut self, v: i64) { self.seen_at = ::std::option::Option::Some(v); } // optional bool public = 10; pub fn get_public(&self) -> bool { self.public.unwrap_or(false) } pub fn clear_public(&mut self) { self.public = ::std::option::Option::None; } pub fn has_public(&self) -> bool { self.public.is_some() } // Param is passed by value, moved pub fn set_public(&mut self, v: bool) { self.public = ::std::option::Option::Some(v); } } impl ::protobuf::Message for ItemAttributes { fn is_initialized(&self) -> bool { for v in &self.download_format { if !v.is_initialized() { return false; } }; true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.added_by)?; }, 2 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_int64()?; self.timestamp = ::std::option::Option::Some(tmp); }, 3 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.message)?; }, 4 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_bool()?; self.seen = ::std::option::Option::Some(tmp); }, 5 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_int64()?; self.download_count = ::std::option::Option::Some(tmp); }, 6 => { ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.download_format)?; }, 7 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.sevendigital_id)?; }, 8 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_int64()?; self.sevendigital_left = ::std::option::Option::Some(tmp); }, 9 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_int64()?; self.seen_at = ::std::option::Option::Some(tmp); }, 10 => { if wire_type != ::protobuf::wire_format::WireTypeVarint { return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); } let tmp = is.read_bool()?; self.public = ::std::option::Option::Some(tmp); }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(ref v) = self.added_by.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.timestamp { my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint); } if let Some(ref v) = self.message.as_ref() { my_size += ::protobuf::rt::string_size(3, &v); } if let Some(v) = self.seen { my_size += 2; } if let Some(v) = self.download_count { my_size += ::protobuf::rt::value_size(5, v, ::protobuf::wire_format::WireTypeVarint); } if let Some(ref v) = self.download_format.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; } if let Some(ref v) = self.sevendigital_id.as_ref() { my_size += ::protobuf::rt::string_size(7, &v); } if let Some(v) = self.sevendigital_left { my_size += ::protobuf::rt::value_size(8, v, ::protobuf::wire_format::WireTypeVarint); } if let Some(v) = self.seen_at { my_size += ::protobuf::rt::value_size(9, v, ::protobuf::wire_format::WireTypeVarint); } if let Some(v) = self.public { my_size += 2; } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.added_by.as_ref() { os.write_string(1, &v)?; } if let Some(v) = self.timestamp { os.write_int64(2, v)?; } if let Some(ref v) = self.message.as_ref() { os.write_string(3, &v)?; } if let Some(v) = self.seen { os.write_bool(4, v)?; } if let Some(v) = self.download_count { os.write_int64(5, v)?; } if let Some(ref v) = self.download_format.as_ref() { os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; } if let Some(ref v) = self.sevendigital_id.as_ref() { os.write_string(7, &v)?; } if let Some(v) = self.sevendigital_left { os.write_int64(8, v)?; } if let Some(v) = self.seen_at { os.write_int64(9, v)?; } if let Some(v) = self.public { os.write_bool(10, v)?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } fn get_cached_size(&self) -> u32 { self.cached_size.get() } fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { &self.unknown_fields } fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { &mut self.unknown_fields } fn as_any(&self) -> &dyn (::std::any::Any) { self as &dyn (::std::any::Any) } fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { self as &mut dyn (::std::any::Any) } fn into_any(self: Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> ItemAttributes { ItemAttributes::new() } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, }; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "added_by", |m: &ItemAttributes| { &m.added_by }, |m: &mut ItemAttributes| { &mut m.added_by }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( "timestamp", |m: &ItemAttributes| { &m.timestamp }, |m: &mut ItemAttributes| { &mut m.timestamp }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "message", |m: &ItemAttributes| { &m.message }, |m: &mut ItemAttributes| { &mut m.message }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( "seen", |m: &ItemAttributes| { &m.seen }, |m: &mut ItemAttributes| { &mut m.seen }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( "download_count", |m: &ItemAttributes| { &m.download_count }, |m: &mut ItemAttributes| { &mut m.download_count }, )); fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( "download_format", |m: &ItemAttributes| { &m.download_format }, |m: &mut ItemAttributes| { &mut m.download_format }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "sevendigital_id", |m: &ItemAttributes| { &m.sevendigital_id }, |m: &mut ItemAttributes| { &mut m.sevendigital_id }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( "sevendigital_left", |m: &ItemAttributes| { &m.sevendigital_left }, |m: &mut ItemAttributes| { &mut m.sevendigital_left }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( "seen_at", |m: &ItemAttributes| { &m.seen_at }, |m: &mut ItemAttributes| { &mut m.seen_at }, )); fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>( "public", |m: &ItemAttributes| { &m.public }, |m: &mut ItemAttributes| { &mut m.public }, )); ::protobuf::reflect::MessageDescriptor::new::( "ItemAttributes", fields, file_descriptor_proto() ) }) } } fn default_instance() -> &'static ItemAttributes { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ItemAttributes, }; unsafe { instance.get(ItemAttributes::new) } } } impl ::protobuf::Clear for ItemAttributes { fn clear(&mut self) { self.added_by.clear(); self.timestamp = ::std::option::Option::None; self.message.clear(); self.seen = ::std::option::Option::None; self.download_count = ::std::option::Option::None; self.download_format.clear(); self.sevendigital_id.clear(); self.sevendigital_left = ::std::option::Option::None; self.seen_at = ::std::option::Option::None; self.public = ::std::option::Option::None; self.unknown_fields.clear(); } } impl ::std::fmt::Debug for ItemAttributes { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ItemAttributes { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct StringAttribute { // message fields key: ::protobuf::SingularField<::std::string::String>, value: ::protobuf::SingularField<::std::string::String>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a StringAttribute { fn default() -> &'a StringAttribute { ::default_instance() } } impl StringAttribute { pub fn new() -> StringAttribute { ::std::default::Default::default() } // optional string key = 1; pub fn get_key(&self) -> &str { match self.key.as_ref() { Some(v) => &v, None => "", } } pub fn clear_key(&mut self) { self.key.clear(); } pub fn has_key(&self) -> bool { self.key.is_some() } // Param is passed by value, moved pub fn set_key(&mut self, v: ::std::string::String) { self.key = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_key(&mut self) -> &mut ::std::string::String { if self.key.is_none() { self.key.set_default(); } self.key.as_mut().unwrap() } // Take field pub fn take_key(&mut self) -> ::std::string::String { self.key.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string value = 2; pub fn get_value(&self) -> &str { match self.value.as_ref() { Some(v) => &v, None => "", } } pub fn clear_value(&mut self) { self.value.clear(); } pub fn has_value(&self) -> bool { self.value.is_some() } // Param is passed by value, moved pub fn set_value(&mut self, v: ::std::string::String) { self.value = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_value(&mut self) -> &mut ::std::string::String { if self.value.is_none() { self.value.set_default(); } self.value.as_mut().unwrap() } // Take field pub fn take_value(&mut self) -> ::std::string::String { self.value.take().unwrap_or_else(|| ::std::string::String::new()) } } impl ::protobuf::Message for StringAttribute { fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.key)?; }, 2 => { ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.value)?; }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(ref v) = self.key.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(ref v) = self.value.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.key.as_ref() { os.write_string(1, &v)?; } if let Some(ref v) = self.value.as_ref() { os.write_string(2, &v)?; } os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } fn get_cached_size(&self) -> u32 { self.cached_size.get() } fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { &self.unknown_fields } fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { &mut self.unknown_fields } fn as_any(&self) -> &dyn (::std::any::Any) { self as &dyn (::std::any::Any) } fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { self as &mut dyn (::std::any::Any) } fn into_any(self: Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> StringAttribute { StringAttribute::new() } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, }; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "key", |m: &StringAttribute| { &m.key }, |m: &mut StringAttribute| { &mut m.key }, )); fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( "value", |m: &StringAttribute| { &m.value }, |m: &mut StringAttribute| { &mut m.value }, )); ::protobuf::reflect::MessageDescriptor::new::( "StringAttribute", fields, file_descriptor_proto() ) }) } } fn default_instance() -> &'static StringAttribute { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const StringAttribute, }; unsafe { instance.get(StringAttribute::new) } } } impl ::protobuf::Clear for StringAttribute { fn clear(&mut self) { self.key.clear(); self.value.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for StringAttribute { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for StringAttribute { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Message(self) } } #[derive(PartialEq,Clone,Default)] pub struct StringAttributes { // message fields attribute: ::protobuf::RepeatedField, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a StringAttributes { fn default() -> &'a StringAttributes { ::default_instance() } } impl StringAttributes { pub fn new() -> StringAttributes { ::std::default::Default::default() } // repeated .StringAttribute attribute = 1; pub fn get_attribute(&self) -> &[StringAttribute] { &self.attribute } pub fn clear_attribute(&mut self) { self.attribute.clear(); } // Param is passed by value, moved pub fn set_attribute(&mut self, v: ::protobuf::RepeatedField) { self.attribute = v; } // Mutable pointer to the field. pub fn mut_attribute(&mut self) -> &mut ::protobuf::RepeatedField { &mut self.attribute } // Take field pub fn take_attribute(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.attribute, ::protobuf::RepeatedField::new()) } } impl ::protobuf::Message for StringAttributes { fn is_initialized(&self) -> bool { for v in &self.attribute { if !v.is_initialized() { return false; } }; true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { 1 => { ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.attribute)?; }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; for value in &self.attribute { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); self.cached_size.set(my_size); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.attribute { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; v.write_to_with_cached_sizes(os)?; }; os.write_unknown_fields(self.get_unknown_fields())?; ::std::result::Result::Ok(()) } fn get_cached_size(&self) -> u32 { self.cached_size.get() } fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { &self.unknown_fields } fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { &mut self.unknown_fields } fn as_any(&self) -> &dyn (::std::any::Any) { self as &dyn (::std::any::Any) } fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { self as &mut dyn (::std::any::Any) } fn into_any(self: Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> StringAttributes { StringAttributes::new() } fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, }; unsafe { descriptor.get(|| { let mut fields = ::std::vec::Vec::new(); fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( "attribute", |m: &StringAttributes| { &m.attribute }, |m: &mut StringAttributes| { &mut m.attribute }, )); ::protobuf::reflect::MessageDescriptor::new::( "StringAttributes", fields, file_descriptor_proto() ) }) } } fn default_instance() -> &'static StringAttributes { static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const StringAttributes, }; unsafe { instance.get(StringAttributes::new) } } } impl ::protobuf::Clear for StringAttributes { fn clear(&mut self) { self.attribute.clear(); self.unknown_fields.clear(); } } impl ::std::fmt::Debug for StringAttributes { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for StringAttributes { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Message(self) } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x13playlist4meta.proto\x12\0\"3\n\x0cListChecksum\x12\x11\n\x07versio\ n\x18\x01\x20\x01(\x05B\0\x12\x0e\n\x04sha1\x18\x04\x20\x01(\x0cB\0:\0\"\ \x86\x01\n\x0eDownloadFormat\x12&\n\x05codec\x18\x01\x20\x01(\x0e2\x15.D\ ownloadFormat.CodecB\0\"J\n\x05Codec\x12\x11\n\rCODEC_UNKNOWN\x10\0\x12\ \x0e\n\nOGG_VORBIS\x10\x01\x12\x08\n\x04FLAC\x10\x02\x12\x12\n\x0eMPEG_1\ _LAYER_3\x10\x03\x1a\0:\0\"\x8b\x02\n\x0eListAttributes\x12\x0e\n\x04nam\ e\x18\x01\x20\x01(\tB\0\x12\x15\n\x0bdescription\x18\x02\x20\x01(\tB\0\ \x12\x11\n\x07picture\x18\x03\x20\x01(\x0cB\0\x12\x17\n\rcollaborative\ \x18\x04\x20\x01(\x08B\0\x12\x15\n\x0bpl3_version\x18\x05\x20\x01(\tB\0\ \x12\x1a\n\x10deleted_by_owner\x18\x06\x20\x01(\x08B\0\x12\"\n\x18restri\ cted_collaborative\x18\x07\x20\x01(\x08B\0\x12\x1e\n\x14deprecated_clien\ t_id\x18\x08\x20\x01(\x03B\0\x12\x18\n\x0epublic_starred\x18\t\x20\x01(\ \x08B\0\x12\x13\n\tclient_id\x18\n\x20\x01(\tB\0:\0\"\x81\x02\n\x0eItemA\ ttributes\x12\x12\n\x08added_by\x18\x01\x20\x01(\tB\0\x12\x13\n\ttimesta\ mp\x18\x02\x20\x01(\x03B\0\x12\x11\n\x07message\x18\x03\x20\x01(\tB\0\ \x12\x0e\n\x04seen\x18\x04\x20\x01(\x08B\0\x12\x18\n\x0edownload_count\ \x18\x05\x20\x01(\x03B\0\x12*\n\x0fdownload_format\x18\x06\x20\x01(\x0b2\ \x0f.DownloadFormatB\0\x12\x19\n\x0fsevendigital_id\x18\x07\x20\x01(\tB\ \0\x12\x1b\n\x11sevendigital_left\x18\x08\x20\x01(\x03B\0\x12\x11\n\x07s\ een_at\x18\t\x20\x01(\x03B\0\x12\x10\n\x06public\x18\n\x20\x01(\x08B\0:\ \0\"3\n\x0fStringAttribute\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\x12\x0f\ \n\x05value\x18\x02\x20\x01(\tB\0:\0\";\n\x10StringAttributes\x12%\n\tat\ tribute\x18\x01\x20\x03(\x0b2\x10.StringAttributeB\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { lock: ::protobuf::lazy::ONCE_INIT, ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto, }; fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() } pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { unsafe { file_descriptor_proto_lazy.get(|| { parse_descriptor_proto() }) } }