From 0bf96ec6c50d9cb50306c86137c631a617ac4e44 Mon Sep 17 00:00:00 2001 From: George Hahn Date: Wed, 17 Jul 2019 22:07:27 -0500 Subject: [PATCH] Regenerate protobufs with rust-protobuf 2.7.0 --- protocol/src/authentication.rs | 982 +++++++++++++----------- protocol/src/keyexchange.rs | 1169 +++++++++++++++++------------ protocol/src/mercury.rs | 377 +++++----- protocol/src/metadata.rs | 1277 +++++++++++++++++--------------- protocol/src/pubsub.rs | 62 +- protocol/src/spirc.rs | 968 +++++++++++++----------- 6 files changed, 2707 insertions(+), 2128 deletions(-) diff --git a/protocol/src/authentication.rs b/protocol/src/authentication.rs index 88dd8abf..d6ec9dad 100644 --- a/protocol/src/authentication.rs +++ b/protocol/src/authentication.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.7.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `authentication.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_7_0; + #[derive(PartialEq,Clone,Default)] pub struct ClientResponseEncrypted { // message fields @@ -34,8 +39,14 @@ pub struct ClientResponseEncrypted { appkey: ::protobuf::SingularPtrField, client_info: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientResponseEncrypted { + fn default() -> &'a ClientResponseEncrypted { + ::default_instance() + } } impl ClientResponseEncrypted { @@ -45,6 +56,10 @@ impl ClientResponseEncrypted { // required .LoginCredentials login_credentials = 10; + + pub fn get_login_credentials(&self) -> &LoginCredentials { + self.login_credentials.as_ref().unwrap_or_else(|| LoginCredentials::default_instance()) + } pub fn clear_login_credentials(&mut self) { self.login_credentials.clear(); } @@ -72,12 +87,12 @@ impl ClientResponseEncrypted { self.login_credentials.take().unwrap_or_else(|| LoginCredentials::new()) } - pub fn get_login_credentials(&self) -> &LoginCredentials { - self.login_credentials.as_ref().unwrap_or_else(|| LoginCredentials::default_instance()) - } - // optional .AccountCreation account_creation = 20; + + pub fn get_account_creation(&self) -> AccountCreation { + self.account_creation.unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT) + } pub fn clear_account_creation(&mut self) { self.account_creation = ::std::option::Option::None; } @@ -91,12 +106,12 @@ impl ClientResponseEncrypted { self.account_creation = ::std::option::Option::Some(v); } - pub fn get_account_creation(&self) -> AccountCreation { - self.account_creation.unwrap_or(AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT) - } - // optional .FingerprintResponseUnion fingerprint_response = 30; + + pub fn get_fingerprint_response(&self) -> &FingerprintResponseUnion { + self.fingerprint_response.as_ref().unwrap_or_else(|| FingerprintResponseUnion::default_instance()) + } pub fn clear_fingerprint_response(&mut self) { self.fingerprint_response.clear(); } @@ -124,12 +139,12 @@ impl ClientResponseEncrypted { self.fingerprint_response.take().unwrap_or_else(|| FingerprintResponseUnion::new()) } - pub fn get_fingerprint_response(&self) -> &FingerprintResponseUnion { - self.fingerprint_response.as_ref().unwrap_or_else(|| FingerprintResponseUnion::default_instance()) - } - // optional .PeerTicketUnion peer_ticket = 40; + + pub fn get_peer_ticket(&self) -> &PeerTicketUnion { + self.peer_ticket.as_ref().unwrap_or_else(|| PeerTicketUnion::default_instance()) + } pub fn clear_peer_ticket(&mut self) { self.peer_ticket.clear(); } @@ -157,12 +172,12 @@ impl ClientResponseEncrypted { self.peer_ticket.take().unwrap_or_else(|| PeerTicketUnion::new()) } - pub fn get_peer_ticket(&self) -> &PeerTicketUnion { - self.peer_ticket.as_ref().unwrap_or_else(|| PeerTicketUnion::default_instance()) - } - // required .SystemInfo system_info = 50; + + pub fn get_system_info(&self) -> &SystemInfo { + self.system_info.as_ref().unwrap_or_else(|| SystemInfo::default_instance()) + } pub fn clear_system_info(&mut self) { self.system_info.clear(); } @@ -190,12 +205,15 @@ impl ClientResponseEncrypted { self.system_info.take().unwrap_or_else(|| SystemInfo::new()) } - pub fn get_system_info(&self) -> &SystemInfo { - self.system_info.as_ref().unwrap_or_else(|| SystemInfo::default_instance()) - } - // optional string platform_model = 60; + + pub fn get_platform_model(&self) -> &str { + match self.platform_model.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_platform_model(&mut self) { self.platform_model.clear(); } @@ -223,15 +241,15 @@ impl ClientResponseEncrypted { self.platform_model.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_platform_model(&self) -> &str { - match self.platform_model.as_ref() { + // optional string version_string = 70; + + + pub fn get_version_string(&self) -> &str { + match self.version_string.as_ref() { Some(v) => &v, None => "", } } - - // optional string version_string = 70; - pub fn clear_version_string(&mut self) { self.version_string.clear(); } @@ -259,15 +277,12 @@ impl ClientResponseEncrypted { self.version_string.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_version_string(&self) -> &str { - match self.version_string.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .LibspotifyAppKey appkey = 80; + + pub fn get_appkey(&self) -> &LibspotifyAppKey { + self.appkey.as_ref().unwrap_or_else(|| LibspotifyAppKey::default_instance()) + } pub fn clear_appkey(&mut self) { self.appkey.clear(); } @@ -295,12 +310,12 @@ impl ClientResponseEncrypted { self.appkey.take().unwrap_or_else(|| LibspotifyAppKey::new()) } - pub fn get_appkey(&self) -> &LibspotifyAppKey { - self.appkey.as_ref().unwrap_or_else(|| LibspotifyAppKey::default_instance()) - } - // optional .ClientInfo client_info = 90; + + pub fn get_client_info(&self) -> &ClientInfo { + self.client_info.as_ref().unwrap_or_else(|| ClientInfo::default_instance()) + } pub fn clear_client_info(&mut self) { self.client_info.clear(); } @@ -327,10 +342,6 @@ impl ClientResponseEncrypted { pub fn take_client_info(&mut self) -> ClientInfo { self.client_info.take().unwrap_or_else(|| ClientInfo::new()) } - - pub fn get_client_info(&self) -> &ClientInfo { - self.client_info.as_ref().unwrap_or_else(|| ClientInfo::default_instance()) - } } impl ::protobuf::Message for ClientResponseEncrypted { @@ -604,15 +615,15 @@ impl ::protobuf::Message for ClientResponseEncrypted { impl ::protobuf::Clear for ClientResponseEncrypted { fn clear(&mut self) { - self.clear_login_credentials(); - self.clear_account_creation(); - self.clear_fingerprint_response(); - self.clear_peer_ticket(); - self.clear_system_info(); - self.clear_platform_model(); - self.clear_version_string(); - self.clear_appkey(); - self.clear_client_info(); + self.login_credentials.clear(); + self.account_creation = ::std::option::Option::None; + self.fingerprint_response.clear(); + self.peer_ticket.clear(); + self.system_info.clear(); + self.platform_model.clear(); + self.version_string.clear(); + self.appkey.clear(); + self.client_info.clear(); self.unknown_fields.clear(); } } @@ -636,8 +647,14 @@ pub struct LoginCredentials { typ: ::std::option::Option, auth_data: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCredentials { + fn default() -> &'a LoginCredentials { + ::default_instance() + } } impl LoginCredentials { @@ -647,6 +664,13 @@ impl LoginCredentials { // optional string username = 10; + + pub fn get_username(&self) -> &str { + match self.username.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_username(&mut self) { self.username.clear(); } @@ -674,15 +698,12 @@ impl LoginCredentials { self.username.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_username(&self) -> &str { - match self.username.as_ref() { - Some(v) => &v, - None => "", - } - } - // required .AuthenticationType typ = 20; + + pub fn get_typ(&self) -> AuthenticationType { + self.typ.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -696,12 +717,15 @@ impl LoginCredentials { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> AuthenticationType { - self.typ.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) - } - // optional bytes auth_data = 30; + + pub fn get_auth_data(&self) -> &[u8] { + match self.auth_data.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_auth_data(&mut self) { self.auth_data.clear(); } @@ -728,13 +752,6 @@ impl LoginCredentials { pub fn take_auth_data(&mut self) -> ::std::vec::Vec { self.auth_data.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_auth_data(&self) -> &[u8] { - match self.auth_data.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LoginCredentials { @@ -873,9 +890,9 @@ impl ::protobuf::Message for LoginCredentials { impl ::protobuf::Clear for LoginCredentials { fn clear(&mut self) { - self.clear_username(); - self.clear_typ(); - self.clear_auth_data(); + self.username.clear(); + self.typ = ::std::option::Option::None; + self.auth_data.clear(); self.unknown_fields.clear(); } } @@ -898,8 +915,14 @@ pub struct FingerprintResponseUnion { grain: ::protobuf::SingularPtrField, hmac_ripemd: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintResponseUnion { + fn default() -> &'a FingerprintResponseUnion { + ::default_instance() + } } impl FingerprintResponseUnion { @@ -909,6 +932,10 @@ impl FingerprintResponseUnion { // optional .FingerprintGrainResponse grain = 10; + + pub fn get_grain(&self) -> &FingerprintGrainResponse { + self.grain.as_ref().unwrap_or_else(|| FingerprintGrainResponse::default_instance()) + } pub fn clear_grain(&mut self) { self.grain.clear(); } @@ -936,12 +963,12 @@ impl FingerprintResponseUnion { self.grain.take().unwrap_or_else(|| FingerprintGrainResponse::new()) } - pub fn get_grain(&self) -> &FingerprintGrainResponse { - self.grain.as_ref().unwrap_or_else(|| FingerprintGrainResponse::default_instance()) - } - // optional .FingerprintHmacRipemdResponse hmac_ripemd = 20; + + pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdResponse { + self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance()) + } pub fn clear_hmac_ripemd(&mut self) { self.hmac_ripemd.clear(); } @@ -968,10 +995,6 @@ impl FingerprintResponseUnion { pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdResponse { self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdResponse::new()) } - - pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdResponse { - self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdResponse::default_instance()) - } } impl ::protobuf::Message for FingerprintResponseUnion { @@ -1109,8 +1132,8 @@ impl ::protobuf::Message for FingerprintResponseUnion { impl ::protobuf::Clear for FingerprintResponseUnion { fn clear(&mut self) { - self.clear_grain(); - self.clear_hmac_ripemd(); + self.grain.clear(); + self.hmac_ripemd.clear(); self.unknown_fields.clear(); } } @@ -1132,8 +1155,14 @@ pub struct FingerprintGrainResponse { // message fields encrypted_key: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintGrainResponse { + fn default() -> &'a FingerprintGrainResponse { + ::default_instance() + } } impl FingerprintGrainResponse { @@ -1143,6 +1172,13 @@ impl FingerprintGrainResponse { // required bytes encrypted_key = 10; + + pub fn get_encrypted_key(&self) -> &[u8] { + match self.encrypted_key.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_encrypted_key(&mut self) { self.encrypted_key.clear(); } @@ -1169,13 +1205,6 @@ impl FingerprintGrainResponse { pub fn take_encrypted_key(&mut self) -> ::std::vec::Vec { self.encrypted_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_encrypted_key(&self) -> &[u8] { - match self.encrypted_key.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintGrainResponse { @@ -1286,7 +1315,7 @@ impl ::protobuf::Message for FingerprintGrainResponse { impl ::protobuf::Clear for FingerprintGrainResponse { fn clear(&mut self) { - self.clear_encrypted_key(); + self.encrypted_key.clear(); self.unknown_fields.clear(); } } @@ -1308,8 +1337,14 @@ pub struct FingerprintHmacRipemdResponse { // message fields hmac: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdResponse { + fn default() -> &'a FingerprintHmacRipemdResponse { + ::default_instance() + } } impl FingerprintHmacRipemdResponse { @@ -1319,6 +1354,13 @@ impl FingerprintHmacRipemdResponse { // required bytes hmac = 10; + + pub fn get_hmac(&self) -> &[u8] { + match self.hmac.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_hmac(&mut self) { self.hmac.clear(); } @@ -1345,13 +1387,6 @@ impl FingerprintHmacRipemdResponse { pub fn take_hmac(&mut self) -> ::std::vec::Vec { self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_hmac(&self) -> &[u8] { - match self.hmac.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintHmacRipemdResponse { @@ -1462,7 +1497,7 @@ impl ::protobuf::Message for FingerprintHmacRipemdResponse { impl ::protobuf::Clear for FingerprintHmacRipemdResponse { fn clear(&mut self) { - self.clear_hmac(); + self.hmac.clear(); self.unknown_fields.clear(); } } @@ -1485,8 +1520,14 @@ pub struct PeerTicketUnion { public_key: ::protobuf::SingularPtrField, old_ticket: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PeerTicketUnion { + fn default() -> &'a PeerTicketUnion { + ::default_instance() + } } impl PeerTicketUnion { @@ -1496,6 +1537,10 @@ impl PeerTicketUnion { // optional .PeerTicketPublicKey public_key = 10; + + pub fn get_public_key(&self) -> &PeerTicketPublicKey { + self.public_key.as_ref().unwrap_or_else(|| PeerTicketPublicKey::default_instance()) + } pub fn clear_public_key(&mut self) { self.public_key.clear(); } @@ -1523,12 +1568,12 @@ impl PeerTicketUnion { self.public_key.take().unwrap_or_else(|| PeerTicketPublicKey::new()) } - pub fn get_public_key(&self) -> &PeerTicketPublicKey { - self.public_key.as_ref().unwrap_or_else(|| PeerTicketPublicKey::default_instance()) - } - // optional .PeerTicketOld old_ticket = 20; + + pub fn get_old_ticket(&self) -> &PeerTicketOld { + self.old_ticket.as_ref().unwrap_or_else(|| PeerTicketOld::default_instance()) + } pub fn clear_old_ticket(&mut self) { self.old_ticket.clear(); } @@ -1555,10 +1600,6 @@ impl PeerTicketUnion { pub fn take_old_ticket(&mut self) -> PeerTicketOld { self.old_ticket.take().unwrap_or_else(|| PeerTicketOld::new()) } - - pub fn get_old_ticket(&self) -> &PeerTicketOld { - self.old_ticket.as_ref().unwrap_or_else(|| PeerTicketOld::default_instance()) - } } impl ::protobuf::Message for PeerTicketUnion { @@ -1696,8 +1737,8 @@ impl ::protobuf::Message for PeerTicketUnion { impl ::protobuf::Clear for PeerTicketUnion { fn clear(&mut self) { - self.clear_public_key(); - self.clear_old_ticket(); + self.public_key.clear(); + self.old_ticket.clear(); self.unknown_fields.clear(); } } @@ -1719,8 +1760,14 @@ pub struct PeerTicketPublicKey { // message fields public_key: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PeerTicketPublicKey { + fn default() -> &'a PeerTicketPublicKey { + ::default_instance() + } } impl PeerTicketPublicKey { @@ -1730,6 +1777,13 @@ impl PeerTicketPublicKey { // required bytes public_key = 10; + + pub fn get_public_key(&self) -> &[u8] { + match self.public_key.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_public_key(&mut self) { self.public_key.clear(); } @@ -1756,13 +1810,6 @@ impl PeerTicketPublicKey { pub fn take_public_key(&mut self) -> ::std::vec::Vec { self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_public_key(&self) -> &[u8] { - match self.public_key.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for PeerTicketPublicKey { @@ -1873,7 +1920,7 @@ impl ::protobuf::Message for PeerTicketPublicKey { impl ::protobuf::Clear for PeerTicketPublicKey { fn clear(&mut self) { - self.clear_public_key(); + self.public_key.clear(); self.unknown_fields.clear(); } } @@ -1896,8 +1943,14 @@ pub struct PeerTicketOld { peer_ticket: ::protobuf::SingularField<::std::vec::Vec>, peer_ticket_signature: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PeerTicketOld { + fn default() -> &'a PeerTicketOld { + ::default_instance() + } } impl PeerTicketOld { @@ -1907,6 +1960,13 @@ impl PeerTicketOld { // required bytes peer_ticket = 10; + + pub fn get_peer_ticket(&self) -> &[u8] { + match self.peer_ticket.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_peer_ticket(&mut self) { self.peer_ticket.clear(); } @@ -1934,15 +1994,15 @@ impl PeerTicketOld { self.peer_ticket.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_peer_ticket(&self) -> &[u8] { - match self.peer_ticket.as_ref() { + // required bytes peer_ticket_signature = 20; + + + pub fn get_peer_ticket_signature(&self) -> &[u8] { + match self.peer_ticket_signature.as_ref() { Some(v) => &v, None => &[], } } - - // required bytes peer_ticket_signature = 20; - pub fn clear_peer_ticket_signature(&mut self) { self.peer_ticket_signature.clear(); } @@ -1969,13 +2029,6 @@ impl PeerTicketOld { pub fn take_peer_ticket_signature(&mut self) -> ::std::vec::Vec { self.peer_ticket_signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_peer_ticket_signature(&self) -> &[u8] { - match self.peer_ticket_signature.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for PeerTicketOld { @@ -2103,8 +2156,8 @@ impl ::protobuf::Message for PeerTicketOld { impl ::protobuf::Clear for PeerTicketOld { fn clear(&mut self) { - self.clear_peer_ticket(); - self.clear_peer_ticket_signature(); + self.peer_ticket.clear(); + self.peer_ticket_signature.clear(); self.unknown_fields.clear(); } } @@ -2135,8 +2188,14 @@ pub struct SystemInfo { system_information_string: ::protobuf::SingularField<::std::string::String>, device_id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SystemInfo { + fn default() -> &'a SystemInfo { + ::default_instance() + } } impl SystemInfo { @@ -2146,6 +2205,10 @@ impl SystemInfo { // required .CpuFamily cpu_family = 10; + + pub fn get_cpu_family(&self) -> CpuFamily { + self.cpu_family.unwrap_or(CpuFamily::CPU_UNKNOWN) + } pub fn clear_cpu_family(&mut self) { self.cpu_family = ::std::option::Option::None; } @@ -2159,12 +2222,12 @@ impl SystemInfo { self.cpu_family = ::std::option::Option::Some(v); } - pub fn get_cpu_family(&self) -> CpuFamily { - self.cpu_family.unwrap_or(CpuFamily::CPU_UNKNOWN) - } - // optional uint32 cpu_subtype = 20; + + pub fn get_cpu_subtype(&self) -> u32 { + self.cpu_subtype.unwrap_or(0) + } pub fn clear_cpu_subtype(&mut self) { self.cpu_subtype = ::std::option::Option::None; } @@ -2178,12 +2241,12 @@ impl SystemInfo { self.cpu_subtype = ::std::option::Option::Some(v); } - pub fn get_cpu_subtype(&self) -> u32 { - self.cpu_subtype.unwrap_or(0) - } - // optional uint32 cpu_ext = 30; + + pub fn get_cpu_ext(&self) -> u32 { + self.cpu_ext.unwrap_or(0) + } pub fn clear_cpu_ext(&mut self) { self.cpu_ext = ::std::option::Option::None; } @@ -2197,12 +2260,12 @@ impl SystemInfo { self.cpu_ext = ::std::option::Option::Some(v); } - pub fn get_cpu_ext(&self) -> u32 { - self.cpu_ext.unwrap_or(0) - } - // optional .Brand brand = 40; + + pub fn get_brand(&self) -> Brand { + self.brand.unwrap_or(Brand::BRAND_UNBRANDED) + } pub fn clear_brand(&mut self) { self.brand = ::std::option::Option::None; } @@ -2216,12 +2279,12 @@ impl SystemInfo { self.brand = ::std::option::Option::Some(v); } - pub fn get_brand(&self) -> Brand { - self.brand.unwrap_or(Brand::BRAND_UNBRANDED) - } - // optional uint32 brand_flags = 50; + + pub fn get_brand_flags(&self) -> u32 { + self.brand_flags.unwrap_or(0) + } pub fn clear_brand_flags(&mut self) { self.brand_flags = ::std::option::Option::None; } @@ -2235,12 +2298,12 @@ impl SystemInfo { self.brand_flags = ::std::option::Option::Some(v); } - pub fn get_brand_flags(&self) -> u32 { - self.brand_flags.unwrap_or(0) - } - // required .Os os = 60; + + pub fn get_os(&self) -> Os { + self.os.unwrap_or(Os::OS_UNKNOWN) + } pub fn clear_os(&mut self) { self.os = ::std::option::Option::None; } @@ -2254,12 +2317,12 @@ impl SystemInfo { self.os = ::std::option::Option::Some(v); } - pub fn get_os(&self) -> Os { - self.os.unwrap_or(Os::OS_UNKNOWN) - } - // optional uint32 os_version = 70; + + pub fn get_os_version(&self) -> u32 { + self.os_version.unwrap_or(0) + } pub fn clear_os_version(&mut self) { self.os_version = ::std::option::Option::None; } @@ -2273,12 +2336,12 @@ impl SystemInfo { self.os_version = ::std::option::Option::Some(v); } - pub fn get_os_version(&self) -> u32 { - self.os_version.unwrap_or(0) - } - // optional uint32 os_ext = 80; + + pub fn get_os_ext(&self) -> u32 { + self.os_ext.unwrap_or(0) + } pub fn clear_os_ext(&mut self) { self.os_ext = ::std::option::Option::None; } @@ -2292,12 +2355,15 @@ impl SystemInfo { self.os_ext = ::std::option::Option::Some(v); } - pub fn get_os_ext(&self) -> u32 { - self.os_ext.unwrap_or(0) - } - // optional string system_information_string = 90; + + pub fn get_system_information_string(&self) -> &str { + match self.system_information_string.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_system_information_string(&mut self) { self.system_information_string.clear(); } @@ -2325,15 +2391,15 @@ impl SystemInfo { self.system_information_string.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_system_information_string(&self) -> &str { - match self.system_information_string.as_ref() { + // optional string device_id = 100; + + + pub fn get_device_id(&self) -> &str { + match self.device_id.as_ref() { Some(v) => &v, None => "", } } - - // optional string device_id = 100; - pub fn clear_device_id(&mut self) { self.device_id.clear(); } @@ -2360,13 +2426,6 @@ impl SystemInfo { pub fn take_device_id(&mut self) -> ::std::string::String { self.device_id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_device_id(&self) -> &str { - match self.device_id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for SystemInfo { @@ -2626,16 +2685,16 @@ impl ::protobuf::Message for SystemInfo { impl ::protobuf::Clear for SystemInfo { fn clear(&mut self) { - self.clear_cpu_family(); - self.clear_cpu_subtype(); - self.clear_cpu_ext(); - self.clear_brand(); - self.clear_brand_flags(); - self.clear_os(); - self.clear_os_version(); - self.clear_os_ext(); - self.clear_system_information_string(); - self.clear_device_id(); + self.cpu_family = ::std::option::Option::None; + self.cpu_subtype = ::std::option::Option::None; + self.cpu_ext = ::std::option::Option::None; + self.brand = ::std::option::Option::None; + self.brand_flags = ::std::option::Option::None; + self.os = ::std::option::Option::None; + self.os_version = ::std::option::Option::None; + self.os_ext = ::std::option::Option::None; + self.system_information_string.clear(); + self.device_id.clear(); self.unknown_fields.clear(); } } @@ -2661,8 +2720,14 @@ pub struct LibspotifyAppKey { useragent: ::protobuf::SingularField<::std::string::String>, callback_hash: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LibspotifyAppKey { + fn default() -> &'a LibspotifyAppKey { + ::default_instance() + } } impl LibspotifyAppKey { @@ -2672,6 +2737,10 @@ impl LibspotifyAppKey { // required uint32 version = 1; + + pub fn get_version(&self) -> u32 { + self.version.unwrap_or(0) + } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } @@ -2685,12 +2754,15 @@ impl LibspotifyAppKey { self.version = ::std::option::Option::Some(v); } - pub fn get_version(&self) -> u32 { - self.version.unwrap_or(0) - } - // required bytes devkey = 2; + + pub fn get_devkey(&self) -> &[u8] { + match self.devkey.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_devkey(&mut self) { self.devkey.clear(); } @@ -2718,15 +2790,15 @@ impl LibspotifyAppKey { self.devkey.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_devkey(&self) -> &[u8] { - match self.devkey.as_ref() { + // required bytes signature = 3; + + + pub fn get_signature(&self) -> &[u8] { + match self.signature.as_ref() { Some(v) => &v, None => &[], } } - - // required bytes signature = 3; - pub fn clear_signature(&mut self) { self.signature.clear(); } @@ -2754,15 +2826,15 @@ impl LibspotifyAppKey { self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_signature(&self) -> &[u8] { - match self.signature.as_ref() { - Some(v) => &v, - None => &[], - } - } - // required string useragent = 4; + + pub fn get_useragent(&self) -> &str { + match self.useragent.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_useragent(&mut self) { self.useragent.clear(); } @@ -2790,15 +2862,15 @@ impl LibspotifyAppKey { self.useragent.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_useragent(&self) -> &str { - match self.useragent.as_ref() { - Some(v) => &v, - None => "", - } - } - // required bytes callback_hash = 5; + + pub fn get_callback_hash(&self) -> &[u8] { + match self.callback_hash.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_callback_hash(&mut self) { self.callback_hash.clear(); } @@ -2825,13 +2897,6 @@ impl LibspotifyAppKey { pub fn take_callback_hash(&mut self) -> ::std::vec::Vec { self.callback_hash.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_callback_hash(&self) -> &[u8] { - match self.callback_hash.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LibspotifyAppKey { @@ -3014,11 +3079,11 @@ impl ::protobuf::Message for LibspotifyAppKey { impl ::protobuf::Clear for LibspotifyAppKey { fn clear(&mut self) { - self.clear_version(); - self.clear_devkey(); - self.clear_signature(); - self.clear_useragent(); - self.clear_callback_hash(); + self.version = ::std::option::Option::None; + self.devkey.clear(); + self.signature.clear(); + self.useragent.clear(); + self.callback_hash.clear(); self.unknown_fields.clear(); } } @@ -3042,8 +3107,14 @@ pub struct ClientInfo { fb: ::protobuf::SingularPtrField, language: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientInfo { + fn default() -> &'a ClientInfo { + ::default_instance() + } } impl ClientInfo { @@ -3053,6 +3124,10 @@ impl ClientInfo { // optional bool limited = 1; + + pub fn get_limited(&self) -> bool { + self.limited.unwrap_or(false) + } pub fn clear_limited(&mut self) { self.limited = ::std::option::Option::None; } @@ -3066,12 +3141,12 @@ impl ClientInfo { self.limited = ::std::option::Option::Some(v); } - pub fn get_limited(&self) -> bool { - self.limited.unwrap_or(false) - } - // optional .ClientInfoFacebook fb = 2; + + pub fn get_fb(&self) -> &ClientInfoFacebook { + self.fb.as_ref().unwrap_or_else(|| ClientInfoFacebook::default_instance()) + } pub fn clear_fb(&mut self) { self.fb.clear(); } @@ -3099,12 +3174,15 @@ impl ClientInfo { self.fb.take().unwrap_or_else(|| ClientInfoFacebook::new()) } - pub fn get_fb(&self) -> &ClientInfoFacebook { - self.fb.as_ref().unwrap_or_else(|| ClientInfoFacebook::default_instance()) - } - // optional string language = 3; + + pub fn get_language(&self) -> &str { + match self.language.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_language(&mut self) { self.language.clear(); } @@ -3131,13 +3209,6 @@ impl ClientInfo { pub fn take_language(&mut self) -> ::std::string::String { self.language.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_language(&self) -> &str { - match self.language.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for ClientInfo { @@ -3285,9 +3356,9 @@ impl ::protobuf::Message for ClientInfo { impl ::protobuf::Clear for ClientInfo { fn clear(&mut self) { - self.clear_limited(); - self.clear_fb(); - self.clear_language(); + self.limited = ::std::option::Option::None; + self.fb.clear(); + self.language.clear(); self.unknown_fields.clear(); } } @@ -3309,8 +3380,14 @@ pub struct ClientInfoFacebook { // message fields machine_id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientInfoFacebook { + fn default() -> &'a ClientInfoFacebook { + ::default_instance() + } } impl ClientInfoFacebook { @@ -3320,6 +3397,13 @@ impl ClientInfoFacebook { // optional string machine_id = 1; + + pub fn get_machine_id(&self) -> &str { + match self.machine_id.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_machine_id(&mut self) { self.machine_id.clear(); } @@ -3346,13 +3430,6 @@ impl ClientInfoFacebook { pub fn take_machine_id(&mut self) -> ::std::string::String { self.machine_id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_machine_id(&self) -> &str { - match self.machine_id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for ClientInfoFacebook { @@ -3460,7 +3537,7 @@ impl ::protobuf::Message for ClientInfoFacebook { impl ::protobuf::Clear for ClientInfoFacebook { fn clear(&mut self) { - self.clear_machine_id(); + self.machine_id.clear(); self.unknown_fields.clear(); } } @@ -3489,8 +3566,14 @@ pub struct APWelcome { account_info: ::protobuf::SingularPtrField, fb: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APWelcome { + fn default() -> &'a APWelcome { + ::default_instance() + } } impl APWelcome { @@ -3500,6 +3583,13 @@ impl APWelcome { // required string canonical_username = 10; + + pub fn get_canonical_username(&self) -> &str { + match self.canonical_username.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_canonical_username(&mut self) { self.canonical_username.clear(); } @@ -3527,15 +3617,12 @@ impl APWelcome { self.canonical_username.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_canonical_username(&self) -> &str { - match self.canonical_username.as_ref() { - Some(v) => &v, - None => "", - } - } - // required .AccountType account_type_logged_in = 20; + + pub fn get_account_type_logged_in(&self) -> AccountType { + self.account_type_logged_in.unwrap_or(AccountType::Spotify) + } pub fn clear_account_type_logged_in(&mut self) { self.account_type_logged_in = ::std::option::Option::None; } @@ -3549,12 +3636,12 @@ impl APWelcome { self.account_type_logged_in = ::std::option::Option::Some(v); } - pub fn get_account_type_logged_in(&self) -> AccountType { - self.account_type_logged_in.unwrap_or(AccountType::Spotify) - } - // required .AccountType credentials_type_logged_in = 25; + + pub fn get_credentials_type_logged_in(&self) -> AccountType { + self.credentials_type_logged_in.unwrap_or(AccountType::Spotify) + } pub fn clear_credentials_type_logged_in(&mut self) { self.credentials_type_logged_in = ::std::option::Option::None; } @@ -3568,12 +3655,12 @@ impl APWelcome { self.credentials_type_logged_in = ::std::option::Option::Some(v); } - pub fn get_credentials_type_logged_in(&self) -> AccountType { - self.credentials_type_logged_in.unwrap_or(AccountType::Spotify) - } - // required .AuthenticationType reusable_auth_credentials_type = 30; + + pub fn get_reusable_auth_credentials_type(&self) -> AuthenticationType { + self.reusable_auth_credentials_type.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) + } pub fn clear_reusable_auth_credentials_type(&mut self) { self.reusable_auth_credentials_type = ::std::option::Option::None; } @@ -3587,12 +3674,15 @@ impl APWelcome { self.reusable_auth_credentials_type = ::std::option::Option::Some(v); } - pub fn get_reusable_auth_credentials_type(&self) -> AuthenticationType { - self.reusable_auth_credentials_type.unwrap_or(AuthenticationType::AUTHENTICATION_USER_PASS) - } - // required bytes reusable_auth_credentials = 40; + + pub fn get_reusable_auth_credentials(&self) -> &[u8] { + match self.reusable_auth_credentials.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_reusable_auth_credentials(&mut self) { self.reusable_auth_credentials.clear(); } @@ -3620,15 +3710,15 @@ impl APWelcome { self.reusable_auth_credentials.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_reusable_auth_credentials(&self) -> &[u8] { - match self.reusable_auth_credentials.as_ref() { + // optional bytes lfs_secret = 50; + + + pub fn get_lfs_secret(&self) -> &[u8] { + match self.lfs_secret.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes lfs_secret = 50; - pub fn clear_lfs_secret(&mut self) { self.lfs_secret.clear(); } @@ -3656,15 +3746,12 @@ impl APWelcome { self.lfs_secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_lfs_secret(&self) -> &[u8] { - match self.lfs_secret.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .AccountInfo account_info = 60; + + pub fn get_account_info(&self) -> &AccountInfo { + self.account_info.as_ref().unwrap_or_else(|| AccountInfo::default_instance()) + } pub fn clear_account_info(&mut self) { self.account_info.clear(); } @@ -3692,12 +3779,12 @@ impl APWelcome { self.account_info.take().unwrap_or_else(|| AccountInfo::new()) } - pub fn get_account_info(&self) -> &AccountInfo { - self.account_info.as_ref().unwrap_or_else(|| AccountInfo::default_instance()) - } - // optional .AccountInfoFacebook fb = 70; + + pub fn get_fb(&self) -> &AccountInfoFacebook { + self.fb.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) + } pub fn clear_fb(&mut self) { self.fb.clear(); } @@ -3724,10 +3811,6 @@ impl APWelcome { pub fn take_fb(&mut self) -> AccountInfoFacebook { self.fb.take().unwrap_or_else(|| AccountInfoFacebook::new()) } - - pub fn get_fb(&self) -> &AccountInfoFacebook { - self.fb.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) - } } impl ::protobuf::Message for APWelcome { @@ -3964,14 +4047,14 @@ impl ::protobuf::Message for APWelcome { impl ::protobuf::Clear for APWelcome { fn clear(&mut self) { - self.clear_canonical_username(); - self.clear_account_type_logged_in(); - self.clear_credentials_type_logged_in(); - self.clear_reusable_auth_credentials_type(); - self.clear_reusable_auth_credentials(); - self.clear_lfs_secret(); - self.clear_account_info(); - self.clear_fb(); + self.canonical_username.clear(); + self.account_type_logged_in = ::std::option::Option::None; + self.credentials_type_logged_in = ::std::option::Option::None; + self.reusable_auth_credentials_type = ::std::option::Option::None; + self.reusable_auth_credentials.clear(); + self.lfs_secret.clear(); + self.account_info.clear(); + self.fb.clear(); self.unknown_fields.clear(); } } @@ -3994,8 +4077,14 @@ pub struct AccountInfo { spotify: ::protobuf::SingularPtrField, facebook: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AccountInfo { + fn default() -> &'a AccountInfo { + ::default_instance() + } } impl AccountInfo { @@ -4005,6 +4094,10 @@ impl AccountInfo { // optional .AccountInfoSpotify spotify = 1; + + pub fn get_spotify(&self) -> &AccountInfoSpotify { + self.spotify.as_ref().unwrap_or_else(|| AccountInfoSpotify::default_instance()) + } pub fn clear_spotify(&mut self) { self.spotify.clear(); } @@ -4032,12 +4125,12 @@ impl AccountInfo { self.spotify.take().unwrap_or_else(|| AccountInfoSpotify::new()) } - pub fn get_spotify(&self) -> &AccountInfoSpotify { - self.spotify.as_ref().unwrap_or_else(|| AccountInfoSpotify::default_instance()) - } - // optional .AccountInfoFacebook facebook = 2; + + pub fn get_facebook(&self) -> &AccountInfoFacebook { + self.facebook.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) + } pub fn clear_facebook(&mut self) { self.facebook.clear(); } @@ -4064,10 +4157,6 @@ impl AccountInfo { pub fn take_facebook(&mut self) -> AccountInfoFacebook { self.facebook.take().unwrap_or_else(|| AccountInfoFacebook::new()) } - - pub fn get_facebook(&self) -> &AccountInfoFacebook { - self.facebook.as_ref().unwrap_or_else(|| AccountInfoFacebook::default_instance()) - } } impl ::protobuf::Message for AccountInfo { @@ -4205,8 +4294,8 @@ impl ::protobuf::Message for AccountInfo { impl ::protobuf::Clear for AccountInfo { fn clear(&mut self) { - self.clear_spotify(); - self.clear_facebook(); + self.spotify.clear(); + self.facebook.clear(); self.unknown_fields.clear(); } } @@ -4226,8 +4315,14 @@ impl ::protobuf::reflect::ProtobufValue for AccountInfo { #[derive(PartialEq,Clone,Default)] pub struct AccountInfoSpotify { // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AccountInfoSpotify { + fn default() -> &'a AccountInfoSpotify { + ::default_instance() + } } impl AccountInfoSpotify { @@ -4349,8 +4444,14 @@ pub struct AccountInfoFacebook { access_token: ::protobuf::SingularField<::std::string::String>, machine_id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AccountInfoFacebook { + fn default() -> &'a AccountInfoFacebook { + ::default_instance() + } } impl AccountInfoFacebook { @@ -4360,6 +4461,13 @@ impl AccountInfoFacebook { // optional string access_token = 1; + + pub fn get_access_token(&self) -> &str { + match self.access_token.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_access_token(&mut self) { self.access_token.clear(); } @@ -4387,15 +4495,15 @@ impl AccountInfoFacebook { self.access_token.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_access_token(&self) -> &str { - match self.access_token.as_ref() { + // optional string machine_id = 2; + + + pub fn get_machine_id(&self) -> &str { + match self.machine_id.as_ref() { Some(v) => &v, None => "", } } - - // optional string machine_id = 2; - pub fn clear_machine_id(&mut self) { self.machine_id.clear(); } @@ -4422,13 +4530,6 @@ impl AccountInfoFacebook { pub fn take_machine_id(&mut self) -> ::std::string::String { self.machine_id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_machine_id(&self) -> &str { - match self.machine_id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for AccountInfoFacebook { @@ -4550,8 +4651,8 @@ impl ::protobuf::Message for AccountInfoFacebook { impl ::protobuf::Clear for AccountInfoFacebook { fn clear(&mut self) { - self.clear_access_token(); - self.clear_machine_id(); + self.access_token.clear(); + self.machine_id.clear(); self.unknown_fields.clear(); } } @@ -4620,6 +4721,12 @@ impl ::protobuf::ProtobufEnum for AuthenticationType { impl ::std::marker::Copy for AuthenticationType { } +impl ::std::default::Default for AuthenticationType { + fn default() -> Self { + AuthenticationType::AUTHENTICATION_USER_PASS + } +} + impl ::protobuf::reflect::ProtobufValue for AuthenticationType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4669,6 +4776,13 @@ impl ::protobuf::ProtobufEnum for AccountCreation { impl ::std::marker::Copy for AccountCreation { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for AccountCreation { + fn default() -> Self { + AccountCreation::ACCOUNT_CREATION_ALWAYS_PROMPT + } +} + impl ::protobuf::reflect::ProtobufValue for AccountCreation { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4742,6 +4856,12 @@ impl ::protobuf::ProtobufEnum for CpuFamily { impl ::std::marker::Copy for CpuFamily { } +impl ::std::default::Default for CpuFamily { + fn default() -> Self { + CpuFamily::CPU_UNKNOWN + } +} + impl ::protobuf::reflect::ProtobufValue for CpuFamily { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4797,6 +4917,12 @@ impl ::protobuf::ProtobufEnum for Brand { impl ::std::marker::Copy for Brand { } +impl ::std::default::Default for Brand { + fn default() -> Self { + Brand::BRAND_UNBRANDED + } +} + impl ::protobuf::reflect::ProtobufValue for Brand { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4909,6 +5035,12 @@ impl ::protobuf::ProtobufEnum for Os { impl ::std::marker::Copy for Os { } +impl ::std::default::Default for Os { + fn default() -> Self { + Os::OS_UNKNOWN + } +} + impl ::protobuf::reflect::ProtobufValue for Os { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4958,6 +5090,12 @@ impl ::protobuf::ProtobufEnum for AccountType { impl ::std::marker::Copy for AccountType { } +impl ::std::default::Default for AccountType { + fn default() -> Self { + AccountType::Spotify + } +} + impl ::protobuf::reflect::ProtobufValue for AccountType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4965,83 +5103,77 @@ impl ::protobuf::reflect::ProtobufValue for AccountType { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x14authentication.proto\x12\0\"\x8e\x03\n\x17ClientResponseEncrypted\ - \x120\n\x11login_credentials\x18\n\x20\x02(\x0b2\x11.LoginCredentialsB\ - \x02\x18\0\x12.\n\x10account_creation\x18\x14\x20\x01(\x0e2\x10.AccountC\ - reationB\x02\x18\0\x12;\n\x14fingerprint_response\x18\x1e\x20\x01(\x0b2\ - \x19.FingerprintResponseUnionB\x02\x18\0\x12)\n\x0bpeer_ticket\x18(\x20\ - \x01(\x0b2\x10.PeerTicketUnionB\x02\x18\0\x12$\n\x0bsystem_info\x182\x20\ - \x02(\x0b2\x0b.SystemInfoB\x02\x18\0\x12\x1a\n\x0eplatform_model\x18<\ - \x20\x01(\tB\x02\x18\0\x12\x1a\n\x0eversion_string\x18F\x20\x01(\tB\x02\ - \x18\0\x12%\n\x06appkey\x18P\x20\x01(\x0b2\x11.LibspotifyAppKeyB\x02\x18\ - \0\x12$\n\x0bclient_info\x18Z\x20\x01(\x0b2\x0b.ClientInfoB\x02\x18\0\"e\ - \n\x10LoginCredentials\x12\x14\n\x08username\x18\n\x20\x01(\tB\x02\x18\0\ - \x12$\n\x03typ\x18\x14\x20\x02(\x0e2\x13.AuthenticationTypeB\x02\x18\0\ - \x12\x15\n\tauth_data\x18\x1e\x20\x01(\x0cB\x02\x18\0\"\x81\x01\n\x18Fin\ - gerprintResponseUnion\x12,\n\x05grain\x18\n\x20\x01(\x0b2\x19.Fingerprin\ - tGrainResponseB\x02\x18\0\x127\n\x0bhmac_ripemd\x18\x14\x20\x01(\x0b2\ - \x1e.FingerprintHmacRipemdResponseB\x02\x18\0\"5\n\x18FingerprintGrainRe\ - sponse\x12\x19\n\rencrypted_key\x18\n\x20\x02(\x0cB\x02\x18\0\"1\n\x1dFi\ - ngerprintHmacRipemdResponse\x12\x10\n\x04hmac\x18\n\x20\x02(\x0cB\x02\ - \x18\0\"g\n\x0fPeerTicketUnion\x12,\n\npublic_key\x18\n\x20\x01(\x0b2\ - \x14.PeerTicketPublicKeyB\x02\x18\0\x12&\n\nold_ticket\x18\x14\x20\x01(\ - \x0b2\x0e.PeerTicketOldB\x02\x18\0\"-\n\x13PeerTicketPublicKey\x12\x16\n\ - \npublic_key\x18\n\x20\x02(\x0cB\x02\x18\0\"K\n\rPeerTicketOld\x12\x17\n\ - \x0bpeer_ticket\x18\n\x20\x02(\x0cB\x02\x18\0\x12!\n\x15peer_ticket_sign\ - ature\x18\x14\x20\x02(\x0cB\x02\x18\0\"\x91\x02\n\nSystemInfo\x12\"\n\nc\ - pu_family\x18\n\x20\x02(\x0e2\n.CpuFamilyB\x02\x18\0\x12\x17\n\x0bcpu_su\ - btype\x18\x14\x20\x01(\rB\x02\x18\0\x12\x13\n\x07cpu_ext\x18\x1e\x20\x01\ - (\rB\x02\x18\0\x12\x19\n\x05brand\x18(\x20\x01(\x0e2\x06.BrandB\x02\x18\ - \0\x12\x17\n\x0bbrand_flags\x182\x20\x01(\rB\x02\x18\0\x12\x13\n\x02os\ - \x18<\x20\x02(\x0e2\x03.OsB\x02\x18\0\x12\x16\n\nos_version\x18F\x20\x01\ - (\rB\x02\x18\0\x12\x12\n\x06os_ext\x18P\x20\x01(\rB\x02\x18\0\x12%\n\x19\ - system_information_string\x18Z\x20\x01(\tB\x02\x18\0\x12\x15\n\tdevice_i\ - d\x18d\x20\x01(\tB\x02\x18\0\"\x84\x01\n\x10LibspotifyAppKey\x12\x13\n\ - \x07version\x18\x01\x20\x02(\rB\x02\x18\0\x12\x12\n\x06devkey\x18\x02\ - \x20\x02(\x0cB\x02\x18\0\x12\x15\n\tsignature\x18\x03\x20\x02(\x0cB\x02\ - \x18\0\x12\x15\n\tuseragent\x18\x04\x20\x02(\tB\x02\x18\0\x12\x19\n\rcal\ - lback_hash\x18\x05\x20\x02(\x0cB\x02\x18\0\"\\\n\nClientInfo\x12\x13\n\ - \x07limited\x18\x01\x20\x01(\x08B\x02\x18\0\x12#\n\x02fb\x18\x02\x20\x01\ - (\x0b2\x13.ClientInfoFacebookB\x02\x18\0\x12\x14\n\x08language\x18\x03\ - \x20\x01(\tB\x02\x18\0\",\n\x12ClientInfoFacebook\x12\x16\n\nmachine_id\ - \x18\x01\x20\x01(\tB\x02\x18\0\"\xe1\x02\n\tAPWelcome\x12\x1e\n\x12canon\ - ical_username\x18\n\x20\x02(\tB\x02\x18\0\x120\n\x16account_type_logged_\ - in\x18\x14\x20\x02(\x0e2\x0c.AccountTypeB\x02\x18\0\x124\n\x1acredential\ - s_type_logged_in\x18\x19\x20\x02(\x0e2\x0c.AccountTypeB\x02\x18\0\x12?\n\ - \x1ereusable_auth_credentials_type\x18\x1e\x20\x02(\x0e2\x13.Authenticat\ - ionTypeB\x02\x18\0\x12%\n\x19reusable_auth_credentials\x18(\x20\x02(\x0c\ - B\x02\x18\0\x12\x16\n\nlfs_secret\x182\x20\x01(\x0cB\x02\x18\0\x12&\n\ - \x0caccount_info\x18<\x20\x01(\x0b2\x0c.AccountInfoB\x02\x18\0\x12$\n\ - \x02fb\x18F\x20\x01(\x0b2\x14.AccountInfoFacebookB\x02\x18\0\"c\n\x0bAcc\ - ountInfo\x12(\n\x07spotify\x18\x01\x20\x01(\x0b2\x13.AccountInfoSpotifyB\ - \x02\x18\0\x12*\n\x08facebook\x18\x02\x20\x01(\x0b2\x14.AccountInfoFaceb\ - ookB\x02\x18\0\"\x14\n\x12AccountInfoSpotify\"G\n\x13AccountInfoFacebook\ - \x12\x18\n\x0caccess_token\x18\x01\x20\x01(\tB\x02\x18\0\x12\x16\n\nmach\ - ine_id\x18\x02\x20\x01(\tB\x02\x18\0*\xda\x01\n\x12AuthenticationType\ - \x12\x1c\n\x18AUTHENTICATION_USER_PASS\x10\0\x12-\n)AUTHENTICATION_STORE\ - D_SPOTIFY_CREDENTIALS\x10\x01\x12.\n*AUTHENTICATION_STORED_FACEBOOK_CRED\ - ENTIALS\x10\x02\x12\x20\n\x1cAUTHENTICATION_SPOTIFY_TOKEN\x10\x03\x12!\n\ - \x1dAUTHENTICATION_FACEBOOK_TOKEN\x10\x04\x1a\x02\x10\0*]\n\x0fAccountCr\ - eation\x12\"\n\x1eACCOUNT_CREATION_ALWAYS_PROMPT\x10\x01\x12\"\n\x1eACCO\ - UNT_CREATION_ALWAYS_CREATE\x10\x03\x1a\x02\x10\0*\xa1\x01\n\tCpuFamily\ - \x12\x0f\n\x0bCPU_UNKNOWN\x10\0\x12\x0b\n\x07CPU_X86\x10\x01\x12\x0e\n\n\ - CPU_X86_64\x10\x02\x12\x0b\n\x07CPU_PPC\x10\x03\x12\x0e\n\nCPU_PPC_64\ - \x10\x04\x12\x0b\n\x07CPU_ARM\x10\x05\x12\x0c\n\x08CPU_IA64\x10\x06\x12\ - \n\n\x06CPU_SH\x10\x07\x12\x0c\n\x08CPU_MIPS\x10\x08\x12\x10\n\x0cCPU_BL\ - ACKFIN\x10\t\x1a\x02\x10\0*O\n\x05Brand\x12\x13\n\x0fBRAND_UNBRANDED\x10\ - \0\x12\r\n\tBRAND_INQ\x10\x01\x12\r\n\tBRAND_HTC\x10\x02\x12\x0f\n\x0bBR\ - AND_NOKIA\x10\x03\x1a\x02\x10\0*\xd5\x02\n\x02Os\x12\x0e\n\nOS_UNKNOWN\ - \x10\0\x12\x0e\n\nOS_WINDOWS\x10\x01\x12\n\n\x06OS_OSX\x10\x02\x12\r\n\t\ - OS_IPHONE\x10\x03\x12\n\n\x06OS_S60\x10\x04\x12\x0c\n\x08OS_LINUX\x10\ - \x05\x12\x11\n\rOS_WINDOWS_CE\x10\x06\x12\x0e\n\nOS_ANDROID\x10\x07\x12\ - \x0b\n\x07OS_PALM\x10\x08\x12\x0e\n\nOS_FREEBSD\x10\t\x12\x11\n\rOS_BLAC\ - KBERRY\x10\n\x12\x0c\n\x08OS_SONOS\x10\x0b\x12\x0f\n\x0bOS_LOGITECH\x10\ - \x0c\x12\n\n\x06OS_WP7\x10\r\x12\x0c\n\x08OS_ONKYO\x10\x0e\x12\x0e\n\nOS\ - _PHILIPS\x10\x0f\x12\t\n\x05OS_WD\x10\x10\x12\x0c\n\x08OS_VOLVO\x10\x11\ - \x12\x0b\n\x07OS_TIVO\x10\x12\x12\x0b\n\x07OS_AWOX\x10\x13\x12\x0c\n\x08\ - OS_MEEGO\x10\x14\x12\r\n\tOS_QNXNTO\x10\x15\x12\n\n\x06OS_BCO\x10\x16\ - \x1a\x02\x10\0*,\n\x0bAccountType\x12\x0b\n\x07Spotify\x10\0\x12\x0c\n\ - \x08Facebook\x10\x01\x1a\x02\x10\0B\0b\x06proto2\ + \n\x14authentication.proto\x12\0\"\xfe\x02\n\x17ClientResponseEncrypted\ + \x12.\n\x11login_credentials\x18\n\x20\x02(\x0b2\x11.LoginCredentialsB\0\ + \x12,\n\x10account_creation\x18\x14\x20\x01(\x0e2\x10.AccountCreationB\0\ + \x129\n\x14fingerprint_response\x18\x1e\x20\x01(\x0b2\x19.FingerprintRes\ + ponseUnionB\0\x12'\n\x0bpeer_ticket\x18(\x20\x01(\x0b2\x10.PeerTicketUni\ + onB\0\x12\"\n\x0bsystem_info\x182\x20\x02(\x0b2\x0b.SystemInfoB\0\x12\ + \x18\n\x0eplatform_model\x18<\x20\x01(\tB\0\x12\x18\n\x0eversion_string\ + \x18F\x20\x01(\tB\0\x12#\n\x06appkey\x18P\x20\x01(\x0b2\x11.LibspotifyAp\ + pKeyB\0\x12\"\n\x0bclient_info\x18Z\x20\x01(\x0b2\x0b.ClientInfoB\0:\0\"\ + a\n\x10LoginCredentials\x12\x12\n\x08username\x18\n\x20\x01(\tB\0\x12\"\ + \n\x03typ\x18\x14\x20\x02(\x0e2\x13.AuthenticationTypeB\0\x12\x13\n\taut\ + h_data\x18\x1e\x20\x01(\x0cB\0:\0\"\x7f\n\x18FingerprintResponseUnion\ + \x12*\n\x05grain\x18\n\x20\x01(\x0b2\x19.FingerprintGrainResponseB\0\x12\ + 5\n\x0bhmac_ripemd\x18\x14\x20\x01(\x0b2\x1e.FingerprintHmacRipemdRespon\ + seB\0:\0\"5\n\x18FingerprintGrainResponse\x12\x17\n\rencrypted_key\x18\n\ + \x20\x02(\x0cB\0:\0\"1\n\x1dFingerprintHmacRipemdResponse\x12\x0e\n\x04h\ + mac\x18\n\x20\x02(\x0cB\0:\0\"e\n\x0fPeerTicketUnion\x12*\n\npublic_key\ + \x18\n\x20\x01(\x0b2\x14.PeerTicketPublicKeyB\0\x12$\n\nold_ticket\x18\ + \x14\x20\x01(\x0b2\x0e.PeerTicketOldB\0:\0\"-\n\x13PeerTicketPublicKey\ + \x12\x14\n\npublic_key\x18\n\x20\x02(\x0cB\0:\0\"I\n\rPeerTicketOld\x12\ + \x15\n\x0bpeer_ticket\x18\n\x20\x02(\x0cB\0\x12\x1f\n\x15peer_ticket_sig\ + nature\x18\x14\x20\x02(\x0cB\0:\0\"\xff\x01\n\nSystemInfo\x12\x20\n\ncpu\ + _family\x18\n\x20\x02(\x0e2\n.CpuFamilyB\0\x12\x15\n\x0bcpu_subtype\x18\ + \x14\x20\x01(\rB\0\x12\x11\n\x07cpu_ext\x18\x1e\x20\x01(\rB\0\x12\x17\n\ + \x05brand\x18(\x20\x01(\x0e2\x06.BrandB\0\x12\x15\n\x0bbrand_flags\x182\ + \x20\x01(\rB\0\x12\x11\n\x02os\x18<\x20\x02(\x0e2\x03.OsB\0\x12\x14\n\no\ + s_version\x18F\x20\x01(\rB\0\x12\x10\n\x06os_ext\x18P\x20\x01(\rB\0\x12#\ + \n\x19system_information_string\x18Z\x20\x01(\tB\0\x12\x13\n\tdevice_id\ + \x18d\x20\x01(\tB\0:\0\"|\n\x10LibspotifyAppKey\x12\x11\n\x07version\x18\ + \x01\x20\x02(\rB\0\x12\x10\n\x06devkey\x18\x02\x20\x02(\x0cB\0\x12\x13\n\ + \tsignature\x18\x03\x20\x02(\x0cB\0\x12\x13\n\tuseragent\x18\x04\x20\x02\ + (\tB\0\x12\x17\n\rcallback_hash\x18\x05\x20\x02(\x0cB\0:\0\"X\n\nClientI\ + nfo\x12\x11\n\x07limited\x18\x01\x20\x01(\x08B\0\x12!\n\x02fb\x18\x02\ + \x20\x01(\x0b2\x13.ClientInfoFacebookB\0\x12\x12\n\x08language\x18\x03\ + \x20\x01(\tB\0:\0\",\n\x12ClientInfoFacebook\x12\x14\n\nmachine_id\x18\ + \x01\x20\x01(\tB\0:\0\"\xd3\x02\n\tAPWelcome\x12\x1c\n\x12canonical_user\ + name\x18\n\x20\x02(\tB\0\x12.\n\x16account_type_logged_in\x18\x14\x20\ + \x02(\x0e2\x0c.AccountTypeB\0\x122\n\x1acredentials_type_logged_in\x18\ + \x19\x20\x02(\x0e2\x0c.AccountTypeB\0\x12=\n\x1ereusable_auth_credential\ + s_type\x18\x1e\x20\x02(\x0e2\x13.AuthenticationTypeB\0\x12#\n\x19reusabl\ + e_auth_credentials\x18(\x20\x02(\x0cB\0\x12\x14\n\nlfs_secret\x182\x20\ + \x01(\x0cB\0\x12$\n\x0caccount_info\x18<\x20\x01(\x0b2\x0c.AccountInfoB\ + \0\x12\"\n\x02fb\x18F\x20\x01(\x0b2\x14.AccountInfoFacebookB\0:\0\"a\n\ + \x0bAccountInfo\x12&\n\x07spotify\x18\x01\x20\x01(\x0b2\x13.AccountInfoS\ + potifyB\0\x12(\n\x08facebook\x18\x02\x20\x01(\x0b2\x14.AccountInfoFacebo\ + okB\0:\0\"\x16\n\x12AccountInfoSpotify:\0\"E\n\x13AccountInfoFacebook\ + \x12\x16\n\x0caccess_token\x18\x01\x20\x01(\tB\0\x12\x14\n\nmachine_id\ + \x18\x02\x20\x01(\tB\0:\0*\xd8\x01\n\x12AuthenticationType\x12\x1c\n\x18\ + AUTHENTICATION_USER_PASS\x10\0\x12-\n)AUTHENTICATION_STORED_SPOTIFY_CRED\ + ENTIALS\x10\x01\x12.\n*AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS\x10\ + \x02\x12\x20\n\x1cAUTHENTICATION_SPOTIFY_TOKEN\x10\x03\x12!\n\x1dAUTHENT\ + ICATION_FACEBOOK_TOKEN\x10\x04\x1a\0*[\n\x0fAccountCreation\x12\"\n\x1eA\ + CCOUNT_CREATION_ALWAYS_PROMPT\x10\x01\x12\"\n\x1eACCOUNT_CREATION_ALWAYS\ + _CREATE\x10\x03\x1a\0*\x9f\x01\n\tCpuFamily\x12\x0f\n\x0bCPU_UNKNOWN\x10\ + \0\x12\x0b\n\x07CPU_X86\x10\x01\x12\x0e\n\nCPU_X86_64\x10\x02\x12\x0b\n\ + \x07CPU_PPC\x10\x03\x12\x0e\n\nCPU_PPC_64\x10\x04\x12\x0b\n\x07CPU_ARM\ + \x10\x05\x12\x0c\n\x08CPU_IA64\x10\x06\x12\n\n\x06CPU_SH\x10\x07\x12\x0c\ + \n\x08CPU_MIPS\x10\x08\x12\x10\n\x0cCPU_BLACKFIN\x10\t\x1a\0*M\n\x05Bran\ + d\x12\x13\n\x0fBRAND_UNBRANDED\x10\0\x12\r\n\tBRAND_INQ\x10\x01\x12\r\n\ + \tBRAND_HTC\x10\x02\x12\x0f\n\x0bBRAND_NOKIA\x10\x03\x1a\0*\xd3\x02\n\ + \x02Os\x12\x0e\n\nOS_UNKNOWN\x10\0\x12\x0e\n\nOS_WINDOWS\x10\x01\x12\n\n\ + \x06OS_OSX\x10\x02\x12\r\n\tOS_IPHONE\x10\x03\x12\n\n\x06OS_S60\x10\x04\ + \x12\x0c\n\x08OS_LINUX\x10\x05\x12\x11\n\rOS_WINDOWS_CE\x10\x06\x12\x0e\ + \n\nOS_ANDROID\x10\x07\x12\x0b\n\x07OS_PALM\x10\x08\x12\x0e\n\nOS_FREEBS\ + D\x10\t\x12\x11\n\rOS_BLACKBERRY\x10\n\x12\x0c\n\x08OS_SONOS\x10\x0b\x12\ + \x0f\n\x0bOS_LOGITECH\x10\x0c\x12\n\n\x06OS_WP7\x10\r\x12\x0c\n\x08OS_ON\ + KYO\x10\x0e\x12\x0e\n\nOS_PHILIPS\x10\x0f\x12\t\n\x05OS_WD\x10\x10\x12\ + \x0c\n\x08OS_VOLVO\x10\x11\x12\x0b\n\x07OS_TIVO\x10\x12\x12\x0b\n\x07OS_\ + AWOX\x10\x13\x12\x0c\n\x08OS_MEEGO\x10\x14\x12\r\n\tOS_QNXNTO\x10\x15\ + \x12\n\n\x06OS_BCO\x10\x16\x1a\0**\n\x0bAccountType\x12\x0b\n\x07Spotify\ + \x10\0\x12\x0c\n\x08Facebook\x10\x01\x1a\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/keyexchange.rs b/protocol/src/keyexchange.rs index 47dff5ee..9dcd06ee 100644 --- a/protocol/src/keyexchange.rs +++ b/protocol/src/keyexchange.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.7.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `keyexchange.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_7_0; + #[derive(PartialEq,Clone,Default)] pub struct ClientHello { // message fields @@ -33,8 +38,14 @@ pub struct ClientHello { padding: ::protobuf::SingularField<::std::vec::Vec>, feature_set: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientHello { + fn default() -> &'a ClientHello { + ::default_instance() + } } impl ClientHello { @@ -44,6 +55,10 @@ impl ClientHello { // required .BuildInfo build_info = 10; + + pub fn get_build_info(&self) -> &BuildInfo { + self.build_info.as_ref().unwrap_or_else(|| BuildInfo::default_instance()) + } pub fn clear_build_info(&mut self) { self.build_info.clear(); } @@ -71,12 +86,12 @@ impl ClientHello { self.build_info.take().unwrap_or_else(|| BuildInfo::new()) } - pub fn get_build_info(&self) -> &BuildInfo { - self.build_info.as_ref().unwrap_or_else(|| BuildInfo::default_instance()) - } - // repeated .Fingerprint fingerprints_supported = 20; + + pub fn get_fingerprints_supported(&self) -> &[Fingerprint] { + &self.fingerprints_supported + } pub fn clear_fingerprints_supported(&mut self) { self.fingerprints_supported.clear(); } @@ -96,12 +111,12 @@ impl ClientHello { ::std::mem::replace(&mut self.fingerprints_supported, ::std::vec::Vec::new()) } - pub fn get_fingerprints_supported(&self) -> &[Fingerprint] { - &self.fingerprints_supported - } - // repeated .Cryptosuite cryptosuites_supported = 30; + + pub fn get_cryptosuites_supported(&self) -> &[Cryptosuite] { + &self.cryptosuites_supported + } pub fn clear_cryptosuites_supported(&mut self) { self.cryptosuites_supported.clear(); } @@ -121,12 +136,12 @@ impl ClientHello { ::std::mem::replace(&mut self.cryptosuites_supported, ::std::vec::Vec::new()) } - pub fn get_cryptosuites_supported(&self) -> &[Cryptosuite] { - &self.cryptosuites_supported - } - // repeated .Powscheme powschemes_supported = 40; + + pub fn get_powschemes_supported(&self) -> &[Powscheme] { + &self.powschemes_supported + } pub fn clear_powschemes_supported(&mut self) { self.powschemes_supported.clear(); } @@ -146,12 +161,12 @@ impl ClientHello { ::std::mem::replace(&mut self.powschemes_supported, ::std::vec::Vec::new()) } - pub fn get_powschemes_supported(&self) -> &[Powscheme] { - &self.powschemes_supported - } - // required .LoginCryptoHelloUnion login_crypto_hello = 50; + + pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion { + self.login_crypto_hello.as_ref().unwrap_or_else(|| LoginCryptoHelloUnion::default_instance()) + } pub fn clear_login_crypto_hello(&mut self) { self.login_crypto_hello.clear(); } @@ -179,12 +194,15 @@ impl ClientHello { self.login_crypto_hello.take().unwrap_or_else(|| LoginCryptoHelloUnion::new()) } - pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion { - self.login_crypto_hello.as_ref().unwrap_or_else(|| LoginCryptoHelloUnion::default_instance()) - } - // required bytes client_nonce = 60; + + pub fn get_client_nonce(&self) -> &[u8] { + match self.client_nonce.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_client_nonce(&mut self) { self.client_nonce.clear(); } @@ -212,15 +230,15 @@ impl ClientHello { self.client_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_client_nonce(&self) -> &[u8] { - match self.client_nonce.as_ref() { + // optional bytes padding = 70; + + + pub fn get_padding(&self) -> &[u8] { + match self.padding.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes padding = 70; - pub fn clear_padding(&mut self) { self.padding.clear(); } @@ -248,15 +266,12 @@ impl ClientHello { self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_padding(&self) -> &[u8] { - match self.padding.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .FeatureSet feature_set = 80; + + pub fn get_feature_set(&self) -> &FeatureSet { + self.feature_set.as_ref().unwrap_or_else(|| FeatureSet::default_instance()) + } pub fn clear_feature_set(&mut self) { self.feature_set.clear(); } @@ -283,10 +298,6 @@ impl ClientHello { pub fn take_feature_set(&mut self) -> FeatureSet { self.feature_set.take().unwrap_or_else(|| FeatureSet::new()) } - - pub fn get_feature_set(&self) -> &FeatureSet { - self.feature_set.as_ref().unwrap_or_else(|| FeatureSet::default_instance()) - } } impl ::protobuf::Message for ClientHello { @@ -525,14 +536,14 @@ impl ::protobuf::Message for ClientHello { impl ::protobuf::Clear for ClientHello { fn clear(&mut self) { - self.clear_build_info(); - self.clear_fingerprints_supported(); - self.clear_cryptosuites_supported(); - self.clear_powschemes_supported(); - self.clear_login_crypto_hello(); - self.clear_client_nonce(); - self.clear_padding(); - self.clear_feature_set(); + self.build_info.clear(); + self.fingerprints_supported.clear(); + self.cryptosuites_supported.clear(); + self.powschemes_supported.clear(); + self.login_crypto_hello.clear(); + self.client_nonce.clear(); + self.padding.clear(); + self.feature_set.clear(); self.unknown_fields.clear(); } } @@ -557,8 +568,14 @@ pub struct BuildInfo { platform: ::std::option::Option, version: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a BuildInfo { + fn default() -> &'a BuildInfo { + ::default_instance() + } } impl BuildInfo { @@ -568,6 +585,10 @@ impl BuildInfo { // required .Product product = 10; + + pub fn get_product(&self) -> Product { + self.product.unwrap_or(Product::PRODUCT_CLIENT) + } pub fn clear_product(&mut self) { self.product = ::std::option::Option::None; } @@ -581,12 +602,12 @@ impl BuildInfo { self.product = ::std::option::Option::Some(v); } - pub fn get_product(&self) -> Product { - self.product.unwrap_or(Product::PRODUCT_CLIENT) - } - // repeated .ProductFlags product_flags = 20; + + pub fn get_product_flags(&self) -> &[ProductFlags] { + &self.product_flags + } pub fn clear_product_flags(&mut self) { self.product_flags.clear(); } @@ -606,12 +627,12 @@ impl BuildInfo { ::std::mem::replace(&mut self.product_flags, ::std::vec::Vec::new()) } - pub fn get_product_flags(&self) -> &[ProductFlags] { - &self.product_flags - } - // required .Platform platform = 30; + + pub fn get_platform(&self) -> Platform { + self.platform.unwrap_or(Platform::PLATFORM_WIN32_X86) + } pub fn clear_platform(&mut self) { self.platform = ::std::option::Option::None; } @@ -625,12 +646,12 @@ impl BuildInfo { self.platform = ::std::option::Option::Some(v); } - pub fn get_platform(&self) -> Platform { - self.platform.unwrap_or(Platform::PLATFORM_WIN32_X86) - } - // required uint64 version = 40; + + pub fn get_version(&self) -> u64 { + self.version.unwrap_or(0) + } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } @@ -643,10 +664,6 @@ impl BuildInfo { pub fn set_version(&mut self, v: u64) { self.version = ::std::option::Option::Some(v); } - - pub fn get_version(&self) -> u64 { - self.version.unwrap_or(0) - } } impl ::protobuf::Message for BuildInfo { @@ -809,10 +826,10 @@ impl ::protobuf::Message for BuildInfo { impl ::protobuf::Clear for BuildInfo { fn clear(&mut self) { - self.clear_product(); - self.clear_product_flags(); - self.clear_platform(); - self.clear_version(); + self.product = ::std::option::Option::None; + self.product_flags.clear(); + self.platform = ::std::option::Option::None; + self.version = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -834,8 +851,14 @@ pub struct LoginCryptoHelloUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoHelloUnion { + fn default() -> &'a LoginCryptoHelloUnion { + ::default_instance() + } } impl LoginCryptoHelloUnion { @@ -845,6 +868,10 @@ impl LoginCryptoHelloUnion { // optional .LoginCryptoDiffieHellmanHello diffie_hellman = 10; + + pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello { + self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance()) + } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); } @@ -871,10 +898,6 @@ impl LoginCryptoHelloUnion { pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanHello { self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::new()) } - - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance()) - } } impl ::protobuf::Message for LoginCryptoHelloUnion { @@ -990,7 +1013,7 @@ impl ::protobuf::Message for LoginCryptoHelloUnion { impl ::protobuf::Clear for LoginCryptoHelloUnion { fn clear(&mut self) { - self.clear_diffie_hellman(); + self.diffie_hellman.clear(); self.unknown_fields.clear(); } } @@ -1013,8 +1036,14 @@ pub struct LoginCryptoDiffieHellmanHello { gc: ::protobuf::SingularField<::std::vec::Vec>, server_keys_known: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanHello { + fn default() -> &'a LoginCryptoDiffieHellmanHello { + ::default_instance() + } } impl LoginCryptoDiffieHellmanHello { @@ -1024,6 +1053,13 @@ impl LoginCryptoDiffieHellmanHello { // required bytes gc = 10; + + pub fn get_gc(&self) -> &[u8] { + match self.gc.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gc(&mut self) { self.gc.clear(); } @@ -1051,15 +1087,12 @@ impl LoginCryptoDiffieHellmanHello { self.gc.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gc(&self) -> &[u8] { - match self.gc.as_ref() { - Some(v) => &v, - None => &[], - } - } - // required uint32 server_keys_known = 20; + + pub fn get_server_keys_known(&self) -> u32 { + self.server_keys_known.unwrap_or(0) + } pub fn clear_server_keys_known(&mut self) { self.server_keys_known = ::std::option::Option::None; } @@ -1072,10 +1105,6 @@ impl LoginCryptoDiffieHellmanHello { pub fn set_server_keys_known(&mut self, v: u32) { self.server_keys_known = ::std::option::Option::Some(v); } - - pub fn get_server_keys_known(&self) -> u32 { - self.server_keys_known.unwrap_or(0) - } } impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { @@ -1207,8 +1236,8 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanHello { impl ::protobuf::Clear for LoginCryptoDiffieHellmanHello { fn clear(&mut self) { - self.clear_gc(); - self.clear_server_keys_known(); + self.gc.clear(); + self.server_keys_known = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -1231,8 +1260,14 @@ pub struct FeatureSet { autoupdate2: ::std::option::Option, current_location: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FeatureSet { + fn default() -> &'a FeatureSet { + ::default_instance() + } } impl FeatureSet { @@ -1242,6 +1277,10 @@ impl FeatureSet { // optional bool autoupdate2 = 1; + + pub fn get_autoupdate2(&self) -> bool { + self.autoupdate2.unwrap_or(false) + } pub fn clear_autoupdate2(&mut self) { self.autoupdate2 = ::std::option::Option::None; } @@ -1255,12 +1294,12 @@ impl FeatureSet { self.autoupdate2 = ::std::option::Option::Some(v); } - pub fn get_autoupdate2(&self) -> bool { - self.autoupdate2.unwrap_or(false) - } - // optional bool current_location = 2; + + pub fn get_current_location(&self) -> bool { + self.current_location.unwrap_or(false) + } pub fn clear_current_location(&mut self) { self.current_location = ::std::option::Option::None; } @@ -1273,10 +1312,6 @@ impl FeatureSet { pub fn set_current_location(&mut self, v: bool) { self.current_location = ::std::option::Option::Some(v); } - - pub fn get_current_location(&self) -> bool { - self.current_location.unwrap_or(false) - } } impl ::protobuf::Message for FeatureSet { @@ -1406,8 +1441,8 @@ impl ::protobuf::Message for FeatureSet { impl ::protobuf::Clear for FeatureSet { fn clear(&mut self) { - self.clear_autoupdate2(); - self.clear_current_location(); + self.autoupdate2 = ::std::option::Option::None; + self.current_location = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -1431,8 +1466,14 @@ pub struct APResponseMessage { upgrade: ::protobuf::SingularPtrField, login_failed: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APResponseMessage { + fn default() -> &'a APResponseMessage { + ::default_instance() + } } impl APResponseMessage { @@ -1442,6 +1483,10 @@ impl APResponseMessage { // optional .APChallenge challenge = 10; + + pub fn get_challenge(&self) -> &APChallenge { + self.challenge.as_ref().unwrap_or_else(|| APChallenge::default_instance()) + } pub fn clear_challenge(&mut self) { self.challenge.clear(); } @@ -1469,12 +1514,12 @@ impl APResponseMessage { self.challenge.take().unwrap_or_else(|| APChallenge::new()) } - pub fn get_challenge(&self) -> &APChallenge { - self.challenge.as_ref().unwrap_or_else(|| APChallenge::default_instance()) - } - // optional .UpgradeRequiredMessage upgrade = 20; + + pub fn get_upgrade(&self) -> &UpgradeRequiredMessage { + self.upgrade.as_ref().unwrap_or_else(|| UpgradeRequiredMessage::default_instance()) + } pub fn clear_upgrade(&mut self) { self.upgrade.clear(); } @@ -1502,12 +1547,12 @@ impl APResponseMessage { self.upgrade.take().unwrap_or_else(|| UpgradeRequiredMessage::new()) } - pub fn get_upgrade(&self) -> &UpgradeRequiredMessage { - self.upgrade.as_ref().unwrap_or_else(|| UpgradeRequiredMessage::default_instance()) - } - // optional .APLoginFailed login_failed = 30; + + pub fn get_login_failed(&self) -> &APLoginFailed { + self.login_failed.as_ref().unwrap_or_else(|| APLoginFailed::default_instance()) + } pub fn clear_login_failed(&mut self) { self.login_failed.clear(); } @@ -1534,10 +1579,6 @@ impl APResponseMessage { pub fn take_login_failed(&mut self) -> APLoginFailed { self.login_failed.take().unwrap_or_else(|| APLoginFailed::new()) } - - pub fn get_login_failed(&self) -> &APLoginFailed { - self.login_failed.as_ref().unwrap_or_else(|| APLoginFailed::default_instance()) - } } impl ::protobuf::Message for APResponseMessage { @@ -1697,9 +1738,9 @@ impl ::protobuf::Message for APResponseMessage { impl ::protobuf::Clear for APResponseMessage { fn clear(&mut self) { - self.clear_challenge(); - self.clear_upgrade(); - self.clear_login_failed(); + self.challenge.clear(); + self.upgrade.clear(); + self.login_failed.clear(); self.unknown_fields.clear(); } } @@ -1726,8 +1767,14 @@ pub struct APChallenge { server_nonce: ::protobuf::SingularField<::std::vec::Vec>, padding: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APChallenge { + fn default() -> &'a APChallenge { + ::default_instance() + } } impl APChallenge { @@ -1737,6 +1784,10 @@ impl APChallenge { // required .LoginCryptoChallengeUnion login_crypto_challenge = 10; + + pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion { + self.login_crypto_challenge.as_ref().unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance()) + } pub fn clear_login_crypto_challenge(&mut self) { self.login_crypto_challenge.clear(); } @@ -1764,12 +1815,12 @@ impl APChallenge { self.login_crypto_challenge.take().unwrap_or_else(|| LoginCryptoChallengeUnion::new()) } - pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion { - self.login_crypto_challenge.as_ref().unwrap_or_else(|| LoginCryptoChallengeUnion::default_instance()) - } - // required .FingerprintChallengeUnion fingerprint_challenge = 20; + + pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion { + self.fingerprint_challenge.as_ref().unwrap_or_else(|| FingerprintChallengeUnion::default_instance()) + } pub fn clear_fingerprint_challenge(&mut self) { self.fingerprint_challenge.clear(); } @@ -1797,12 +1848,12 @@ impl APChallenge { self.fingerprint_challenge.take().unwrap_or_else(|| FingerprintChallengeUnion::new()) } - pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion { - self.fingerprint_challenge.as_ref().unwrap_or_else(|| FingerprintChallengeUnion::default_instance()) - } - // required .PoWChallengeUnion pow_challenge = 30; + + pub fn get_pow_challenge(&self) -> &PoWChallengeUnion { + self.pow_challenge.as_ref().unwrap_or_else(|| PoWChallengeUnion::default_instance()) + } pub fn clear_pow_challenge(&mut self) { self.pow_challenge.clear(); } @@ -1830,12 +1881,12 @@ impl APChallenge { self.pow_challenge.take().unwrap_or_else(|| PoWChallengeUnion::new()) } - pub fn get_pow_challenge(&self) -> &PoWChallengeUnion { - self.pow_challenge.as_ref().unwrap_or_else(|| PoWChallengeUnion::default_instance()) - } - // required .CryptoChallengeUnion crypto_challenge = 40; + + pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion { + self.crypto_challenge.as_ref().unwrap_or_else(|| CryptoChallengeUnion::default_instance()) + } pub fn clear_crypto_challenge(&mut self) { self.crypto_challenge.clear(); } @@ -1863,12 +1914,15 @@ impl APChallenge { self.crypto_challenge.take().unwrap_or_else(|| CryptoChallengeUnion::new()) } - pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion { - self.crypto_challenge.as_ref().unwrap_or_else(|| CryptoChallengeUnion::default_instance()) - } - // required bytes server_nonce = 50; + + pub fn get_server_nonce(&self) -> &[u8] { + match self.server_nonce.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_server_nonce(&mut self) { self.server_nonce.clear(); } @@ -1896,15 +1950,15 @@ impl APChallenge { self.server_nonce.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_server_nonce(&self) -> &[u8] { - match self.server_nonce.as_ref() { + // optional bytes padding = 60; + + + pub fn get_padding(&self) -> &[u8] { + match self.padding.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes padding = 60; - pub fn clear_padding(&mut self) { self.padding.clear(); } @@ -1931,13 +1985,6 @@ impl APChallenge { pub fn take_padding(&mut self) -> ::std::vec::Vec { self.padding.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_padding(&self) -> &[u8] { - match self.padding.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for APChallenge { @@ -2162,12 +2209,12 @@ impl ::protobuf::Message for APChallenge { impl ::protobuf::Clear for APChallenge { fn clear(&mut self) { - self.clear_login_crypto_challenge(); - self.clear_fingerprint_challenge(); - self.clear_pow_challenge(); - self.clear_crypto_challenge(); - self.clear_server_nonce(); - self.clear_padding(); + self.login_crypto_challenge.clear(); + self.fingerprint_challenge.clear(); + self.pow_challenge.clear(); + self.crypto_challenge.clear(); + self.server_nonce.clear(); + self.padding.clear(); self.unknown_fields.clear(); } } @@ -2189,8 +2236,14 @@ pub struct LoginCryptoChallengeUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoChallengeUnion { + fn default() -> &'a LoginCryptoChallengeUnion { + ::default_instance() + } } impl LoginCryptoChallengeUnion { @@ -2200,6 +2253,10 @@ impl LoginCryptoChallengeUnion { // optional .LoginCryptoDiffieHellmanChallenge diffie_hellman = 10; + + pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge { + self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance()) + } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); } @@ -2226,10 +2283,6 @@ impl LoginCryptoChallengeUnion { pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanChallenge { self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::new()) } - - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance()) - } } impl ::protobuf::Message for LoginCryptoChallengeUnion { @@ -2345,7 +2398,7 @@ impl ::protobuf::Message for LoginCryptoChallengeUnion { impl ::protobuf::Clear for LoginCryptoChallengeUnion { fn clear(&mut self) { - self.clear_diffie_hellman(); + self.diffie_hellman.clear(); self.unknown_fields.clear(); } } @@ -2369,8 +2422,14 @@ pub struct LoginCryptoDiffieHellmanChallenge { server_signature_key: ::std::option::Option, gs_signature: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanChallenge { + fn default() -> &'a LoginCryptoDiffieHellmanChallenge { + ::default_instance() + } } impl LoginCryptoDiffieHellmanChallenge { @@ -2380,6 +2439,13 @@ impl LoginCryptoDiffieHellmanChallenge { // required bytes gs = 10; + + pub fn get_gs(&self) -> &[u8] { + match self.gs.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gs(&mut self) { self.gs.clear(); } @@ -2407,15 +2473,12 @@ impl LoginCryptoDiffieHellmanChallenge { self.gs.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gs(&self) -> &[u8] { - match self.gs.as_ref() { - Some(v) => &v, - None => &[], - } - } - // required int32 server_signature_key = 20; + + pub fn get_server_signature_key(&self) -> i32 { + self.server_signature_key.unwrap_or(0) + } pub fn clear_server_signature_key(&mut self) { self.server_signature_key = ::std::option::Option::None; } @@ -2429,12 +2492,15 @@ impl LoginCryptoDiffieHellmanChallenge { self.server_signature_key = ::std::option::Option::Some(v); } - pub fn get_server_signature_key(&self) -> i32 { - self.server_signature_key.unwrap_or(0) - } - // required bytes gs_signature = 30; + + pub fn get_gs_signature(&self) -> &[u8] { + match self.gs_signature.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gs_signature(&mut self) { self.gs_signature.clear(); } @@ -2461,13 +2527,6 @@ impl LoginCryptoDiffieHellmanChallenge { pub fn take_gs_signature(&mut self) -> ::std::vec::Vec { self.gs_signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_gs_signature(&self) -> &[u8] { - match self.gs_signature.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { @@ -2616,9 +2675,9 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge { impl ::protobuf::Clear for LoginCryptoDiffieHellmanChallenge { fn clear(&mut self) { - self.clear_gs(); - self.clear_server_signature_key(); - self.clear_gs_signature(); + self.gs.clear(); + self.server_signature_key = ::std::option::Option::None; + self.gs_signature.clear(); self.unknown_fields.clear(); } } @@ -2641,8 +2700,14 @@ pub struct FingerprintChallengeUnion { grain: ::protobuf::SingularPtrField, hmac_ripemd: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintChallengeUnion { + fn default() -> &'a FingerprintChallengeUnion { + ::default_instance() + } } impl FingerprintChallengeUnion { @@ -2652,6 +2717,10 @@ impl FingerprintChallengeUnion { // optional .FingerprintGrainChallenge grain = 10; + + pub fn get_grain(&self) -> &FingerprintGrainChallenge { + self.grain.as_ref().unwrap_or_else(|| FingerprintGrainChallenge::default_instance()) + } pub fn clear_grain(&mut self) { self.grain.clear(); } @@ -2679,12 +2748,12 @@ impl FingerprintChallengeUnion { self.grain.take().unwrap_or_else(|| FingerprintGrainChallenge::new()) } - pub fn get_grain(&self) -> &FingerprintGrainChallenge { - self.grain.as_ref().unwrap_or_else(|| FingerprintGrainChallenge::default_instance()) - } - // optional .FingerprintHmacRipemdChallenge hmac_ripemd = 20; + + pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge { + self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance()) + } pub fn clear_hmac_ripemd(&mut self) { self.hmac_ripemd.clear(); } @@ -2711,10 +2780,6 @@ impl FingerprintChallengeUnion { pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdChallenge { self.hmac_ripemd.take().unwrap_or_else(|| FingerprintHmacRipemdChallenge::new()) } - - pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge { - self.hmac_ripemd.as_ref().unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance()) - } } impl ::protobuf::Message for FingerprintChallengeUnion { @@ -2852,8 +2917,8 @@ impl ::protobuf::Message for FingerprintChallengeUnion { impl ::protobuf::Clear for FingerprintChallengeUnion { fn clear(&mut self) { - self.clear_grain(); - self.clear_hmac_ripemd(); + self.grain.clear(); + self.hmac_ripemd.clear(); self.unknown_fields.clear(); } } @@ -2875,8 +2940,14 @@ pub struct FingerprintGrainChallenge { // message fields kek: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintGrainChallenge { + fn default() -> &'a FingerprintGrainChallenge { + ::default_instance() + } } impl FingerprintGrainChallenge { @@ -2886,6 +2957,13 @@ impl FingerprintGrainChallenge { // required bytes kek = 10; + + pub fn get_kek(&self) -> &[u8] { + match self.kek.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_kek(&mut self) { self.kek.clear(); } @@ -2912,13 +2990,6 @@ impl FingerprintGrainChallenge { pub fn take_kek(&mut self) -> ::std::vec::Vec { self.kek.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_kek(&self) -> &[u8] { - match self.kek.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintGrainChallenge { @@ -3029,7 +3100,7 @@ impl ::protobuf::Message for FingerprintGrainChallenge { impl ::protobuf::Clear for FingerprintGrainChallenge { fn clear(&mut self) { - self.clear_kek(); + self.kek.clear(); self.unknown_fields.clear(); } } @@ -3051,8 +3122,14 @@ pub struct FingerprintHmacRipemdChallenge { // message fields challenge: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdChallenge { + fn default() -> &'a FingerprintHmacRipemdChallenge { + ::default_instance() + } } impl FingerprintHmacRipemdChallenge { @@ -3062,6 +3139,13 @@ impl FingerprintHmacRipemdChallenge { // required bytes challenge = 10; + + pub fn get_challenge(&self) -> &[u8] { + match self.challenge.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_challenge(&mut self) { self.challenge.clear(); } @@ -3088,13 +3172,6 @@ impl FingerprintHmacRipemdChallenge { pub fn take_challenge(&mut self) -> ::std::vec::Vec { self.challenge.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_challenge(&self) -> &[u8] { - match self.challenge.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for FingerprintHmacRipemdChallenge { @@ -3205,7 +3282,7 @@ impl ::protobuf::Message for FingerprintHmacRipemdChallenge { impl ::protobuf::Clear for FingerprintHmacRipemdChallenge { fn clear(&mut self) { - self.clear_challenge(); + self.challenge.clear(); self.unknown_fields.clear(); } } @@ -3227,8 +3304,14 @@ pub struct PoWChallengeUnion { // message fields hash_cash: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWChallengeUnion { + fn default() -> &'a PoWChallengeUnion { + ::default_instance() + } } impl PoWChallengeUnion { @@ -3238,6 +3321,10 @@ impl PoWChallengeUnion { // optional .PoWHashCashChallenge hash_cash = 10; + + pub fn get_hash_cash(&self) -> &PoWHashCashChallenge { + self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashChallenge::default_instance()) + } pub fn clear_hash_cash(&mut self) { self.hash_cash.clear(); } @@ -3264,10 +3351,6 @@ impl PoWChallengeUnion { pub fn take_hash_cash(&mut self) -> PoWHashCashChallenge { self.hash_cash.take().unwrap_or_else(|| PoWHashCashChallenge::new()) } - - pub fn get_hash_cash(&self) -> &PoWHashCashChallenge { - self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashChallenge::default_instance()) - } } impl ::protobuf::Message for PoWChallengeUnion { @@ -3383,7 +3466,7 @@ impl ::protobuf::Message for PoWChallengeUnion { impl ::protobuf::Clear for PoWChallengeUnion { fn clear(&mut self) { - self.clear_hash_cash(); + self.hash_cash.clear(); self.unknown_fields.clear(); } } @@ -3407,8 +3490,14 @@ pub struct PoWHashCashChallenge { length: ::std::option::Option, target: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWHashCashChallenge { + fn default() -> &'a PoWHashCashChallenge { + ::default_instance() + } } impl PoWHashCashChallenge { @@ -3418,6 +3507,13 @@ impl PoWHashCashChallenge { // optional bytes prefix = 10; + + pub fn get_prefix(&self) -> &[u8] { + match self.prefix.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_prefix(&mut self) { self.prefix.clear(); } @@ -3445,15 +3541,12 @@ impl PoWHashCashChallenge { self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_prefix(&self) -> &[u8] { - match self.prefix.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional int32 length = 20; + + pub fn get_length(&self) -> i32 { + self.length.unwrap_or(0) + } pub fn clear_length(&mut self) { self.length = ::std::option::Option::None; } @@ -3467,12 +3560,12 @@ impl PoWHashCashChallenge { self.length = ::std::option::Option::Some(v); } - pub fn get_length(&self) -> i32 { - self.length.unwrap_or(0) - } - // optional int32 target = 30; + + pub fn get_target(&self) -> i32 { + self.target.unwrap_or(0) + } pub fn clear_target(&mut self) { self.target = ::std::option::Option::None; } @@ -3485,10 +3578,6 @@ impl PoWHashCashChallenge { pub fn set_target(&mut self, v: i32) { self.target = ::std::option::Option::Some(v); } - - pub fn get_target(&self) -> i32 { - self.target.unwrap_or(0) - } } impl ::protobuf::Message for PoWHashCashChallenge { @@ -3632,9 +3721,9 @@ impl ::protobuf::Message for PoWHashCashChallenge { impl ::protobuf::Clear for PoWHashCashChallenge { fn clear(&mut self) { - self.clear_prefix(); - self.clear_length(); - self.clear_target(); + self.prefix.clear(); + self.length = ::std::option::Option::None; + self.target = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -3657,8 +3746,14 @@ pub struct CryptoChallengeUnion { shannon: ::protobuf::SingularPtrField, rc4_sha1_hmac: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoChallengeUnion { + fn default() -> &'a CryptoChallengeUnion { + ::default_instance() + } } impl CryptoChallengeUnion { @@ -3668,6 +3763,10 @@ impl CryptoChallengeUnion { // optional .CryptoShannonChallenge shannon = 10; + + pub fn get_shannon(&self) -> &CryptoShannonChallenge { + self.shannon.as_ref().unwrap_or_else(|| CryptoShannonChallenge::default_instance()) + } pub fn clear_shannon(&mut self) { self.shannon.clear(); } @@ -3695,12 +3794,12 @@ impl CryptoChallengeUnion { self.shannon.take().unwrap_or_else(|| CryptoShannonChallenge::new()) } - pub fn get_shannon(&self) -> &CryptoShannonChallenge { - self.shannon.as_ref().unwrap_or_else(|| CryptoShannonChallenge::default_instance()) - } - // optional .CryptoRc4Sha1HmacChallenge rc4_sha1_hmac = 20; + + pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge { + self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance()) + } pub fn clear_rc4_sha1_hmac(&mut self) { self.rc4_sha1_hmac.clear(); } @@ -3727,10 +3826,6 @@ impl CryptoChallengeUnion { pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacChallenge { self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::new()) } - - pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge { - self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::default_instance()) - } } impl ::protobuf::Message for CryptoChallengeUnion { @@ -3868,8 +3963,8 @@ impl ::protobuf::Message for CryptoChallengeUnion { impl ::protobuf::Clear for CryptoChallengeUnion { fn clear(&mut self) { - self.clear_shannon(); - self.clear_rc4_sha1_hmac(); + self.shannon.clear(); + self.rc4_sha1_hmac.clear(); self.unknown_fields.clear(); } } @@ -3889,8 +3984,14 @@ impl ::protobuf::reflect::ProtobufValue for CryptoChallengeUnion { #[derive(PartialEq,Clone,Default)] pub struct CryptoShannonChallenge { // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoShannonChallenge { + fn default() -> &'a CryptoShannonChallenge { + ::default_instance() + } } impl CryptoShannonChallenge { @@ -4009,8 +4110,14 @@ impl ::protobuf::reflect::ProtobufValue for CryptoShannonChallenge { #[derive(PartialEq,Clone,Default)] pub struct CryptoRc4Sha1HmacChallenge { // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacChallenge { + fn default() -> &'a CryptoRc4Sha1HmacChallenge { + ::default_instance() + } } impl CryptoRc4Sha1HmacChallenge { @@ -4133,8 +4240,14 @@ pub struct UpgradeRequiredMessage { signature: ::protobuf::SingularField<::std::vec::Vec>, http_suffix: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpgradeRequiredMessage { + fn default() -> &'a UpgradeRequiredMessage { + ::default_instance() + } } impl UpgradeRequiredMessage { @@ -4144,6 +4257,13 @@ impl UpgradeRequiredMessage { // required bytes upgrade_signed_part = 10; + + pub fn get_upgrade_signed_part(&self) -> &[u8] { + match self.upgrade_signed_part.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_upgrade_signed_part(&mut self) { self.upgrade_signed_part.clear(); } @@ -4171,15 +4291,15 @@ impl UpgradeRequiredMessage { self.upgrade_signed_part.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_upgrade_signed_part(&self) -> &[u8] { - match self.upgrade_signed_part.as_ref() { + // required bytes signature = 20; + + + pub fn get_signature(&self) -> &[u8] { + match self.signature.as_ref() { Some(v) => &v, None => &[], } } - - // required bytes signature = 20; - pub fn clear_signature(&mut self) { self.signature.clear(); } @@ -4207,15 +4327,15 @@ impl UpgradeRequiredMessage { self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_signature(&self) -> &[u8] { - match self.signature.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string http_suffix = 30; + + pub fn get_http_suffix(&self) -> &str { + match self.http_suffix.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_http_suffix(&mut self) { self.http_suffix.clear(); } @@ -4242,13 +4362,6 @@ impl UpgradeRequiredMessage { pub fn take_http_suffix(&mut self) -> ::std::string::String { self.http_suffix.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_http_suffix(&self) -> &str { - match self.http_suffix.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for UpgradeRequiredMessage { @@ -4390,9 +4503,9 @@ impl ::protobuf::Message for UpgradeRequiredMessage { impl ::protobuf::Clear for UpgradeRequiredMessage { fn clear(&mut self) { - self.clear_upgrade_signed_part(); - self.clear_signature(); - self.clear_http_suffix(); + self.upgrade_signed_part.clear(); + self.signature.clear(); + self.http_suffix.clear(); self.unknown_fields.clear(); } } @@ -4417,8 +4530,14 @@ pub struct APLoginFailed { expiry: ::std::option::Option, error_description: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a APLoginFailed { + fn default() -> &'a APLoginFailed { + ::default_instance() + } } impl APLoginFailed { @@ -4428,6 +4547,10 @@ impl APLoginFailed { // required .ErrorCode error_code = 10; + + pub fn get_error_code(&self) -> ErrorCode { + self.error_code.unwrap_or(ErrorCode::ProtocolError) + } pub fn clear_error_code(&mut self) { self.error_code = ::std::option::Option::None; } @@ -4441,12 +4564,12 @@ impl APLoginFailed { self.error_code = ::std::option::Option::Some(v); } - pub fn get_error_code(&self) -> ErrorCode { - self.error_code.unwrap_or(ErrorCode::ProtocolError) - } - // optional int32 retry_delay = 20; + + pub fn get_retry_delay(&self) -> i32 { + self.retry_delay.unwrap_or(0) + } pub fn clear_retry_delay(&mut self) { self.retry_delay = ::std::option::Option::None; } @@ -4460,12 +4583,12 @@ impl APLoginFailed { self.retry_delay = ::std::option::Option::Some(v); } - pub fn get_retry_delay(&self) -> i32 { - self.retry_delay.unwrap_or(0) - } - // optional int32 expiry = 30; + + pub fn get_expiry(&self) -> i32 { + self.expiry.unwrap_or(0) + } pub fn clear_expiry(&mut self) { self.expiry = ::std::option::Option::None; } @@ -4479,12 +4602,15 @@ impl APLoginFailed { self.expiry = ::std::option::Option::Some(v); } - pub fn get_expiry(&self) -> i32 { - self.expiry.unwrap_or(0) - } - // optional string error_description = 40; + + pub fn get_error_description(&self) -> &str { + match self.error_description.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_error_description(&mut self) { self.error_description.clear(); } @@ -4511,13 +4637,6 @@ impl APLoginFailed { pub fn take_error_description(&mut self) -> ::std::string::String { self.error_description.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_error_description(&self) -> &str { - match self.error_description.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for APLoginFailed { @@ -4678,10 +4797,10 @@ impl ::protobuf::Message for APLoginFailed { impl ::protobuf::Clear for APLoginFailed { fn clear(&mut self) { - self.clear_error_code(); - self.clear_retry_delay(); - self.clear_expiry(); - self.clear_error_description(); + self.error_code = ::std::option::Option::None; + self.retry_delay = ::std::option::Option::None; + self.expiry = ::std::option::Option::None; + self.error_description.clear(); self.unknown_fields.clear(); } } @@ -4705,8 +4824,14 @@ pub struct ClientResponsePlaintext { pow_response: ::protobuf::SingularPtrField, crypto_response: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ClientResponsePlaintext { + fn default() -> &'a ClientResponsePlaintext { + ::default_instance() + } } impl ClientResponsePlaintext { @@ -4716,6 +4841,10 @@ impl ClientResponsePlaintext { // required .LoginCryptoResponseUnion login_crypto_response = 10; + + pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion { + self.login_crypto_response.as_ref().unwrap_or_else(|| LoginCryptoResponseUnion::default_instance()) + } pub fn clear_login_crypto_response(&mut self) { self.login_crypto_response.clear(); } @@ -4743,12 +4872,12 @@ impl ClientResponsePlaintext { self.login_crypto_response.take().unwrap_or_else(|| LoginCryptoResponseUnion::new()) } - pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion { - self.login_crypto_response.as_ref().unwrap_or_else(|| LoginCryptoResponseUnion::default_instance()) - } - // required .PoWResponseUnion pow_response = 20; + + pub fn get_pow_response(&self) -> &PoWResponseUnion { + self.pow_response.as_ref().unwrap_or_else(|| PoWResponseUnion::default_instance()) + } pub fn clear_pow_response(&mut self) { self.pow_response.clear(); } @@ -4776,12 +4905,12 @@ impl ClientResponsePlaintext { self.pow_response.take().unwrap_or_else(|| PoWResponseUnion::new()) } - pub fn get_pow_response(&self) -> &PoWResponseUnion { - self.pow_response.as_ref().unwrap_or_else(|| PoWResponseUnion::default_instance()) - } - // required .CryptoResponseUnion crypto_response = 30; + + pub fn get_crypto_response(&self) -> &CryptoResponseUnion { + self.crypto_response.as_ref().unwrap_or_else(|| CryptoResponseUnion::default_instance()) + } pub fn clear_crypto_response(&mut self) { self.crypto_response.clear(); } @@ -4808,10 +4937,6 @@ impl ClientResponsePlaintext { pub fn take_crypto_response(&mut self) -> CryptoResponseUnion { self.crypto_response.take().unwrap_or_else(|| CryptoResponseUnion::new()) } - - pub fn get_crypto_response(&self) -> &CryptoResponseUnion { - self.crypto_response.as_ref().unwrap_or_else(|| CryptoResponseUnion::default_instance()) - } } impl ::protobuf::Message for ClientResponsePlaintext { @@ -4980,9 +5105,9 @@ impl ::protobuf::Message for ClientResponsePlaintext { impl ::protobuf::Clear for ClientResponsePlaintext { fn clear(&mut self) { - self.clear_login_crypto_response(); - self.clear_pow_response(); - self.clear_crypto_response(); + self.login_crypto_response.clear(); + self.pow_response.clear(); + self.crypto_response.clear(); self.unknown_fields.clear(); } } @@ -5004,8 +5129,14 @@ pub struct LoginCryptoResponseUnion { // message fields diffie_hellman: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoResponseUnion { + fn default() -> &'a LoginCryptoResponseUnion { + ::default_instance() + } } impl LoginCryptoResponseUnion { @@ -5015,6 +5146,10 @@ impl LoginCryptoResponseUnion { // optional .LoginCryptoDiffieHellmanResponse diffie_hellman = 10; + + pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse { + self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance()) + } pub fn clear_diffie_hellman(&mut self) { self.diffie_hellman.clear(); } @@ -5041,10 +5176,6 @@ impl LoginCryptoResponseUnion { pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanResponse { self.diffie_hellman.take().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::new()) } - - pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse { - self.diffie_hellman.as_ref().unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance()) - } } impl ::protobuf::Message for LoginCryptoResponseUnion { @@ -5160,7 +5291,7 @@ impl ::protobuf::Message for LoginCryptoResponseUnion { impl ::protobuf::Clear for LoginCryptoResponseUnion { fn clear(&mut self) { - self.clear_diffie_hellman(); + self.diffie_hellman.clear(); self.unknown_fields.clear(); } } @@ -5182,8 +5313,14 @@ pub struct LoginCryptoDiffieHellmanResponse { // message fields hmac: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanResponse { + fn default() -> &'a LoginCryptoDiffieHellmanResponse { + ::default_instance() + } } impl LoginCryptoDiffieHellmanResponse { @@ -5193,6 +5330,13 @@ impl LoginCryptoDiffieHellmanResponse { // required bytes hmac = 10; + + pub fn get_hmac(&self) -> &[u8] { + match self.hmac.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_hmac(&mut self) { self.hmac.clear(); } @@ -5219,13 +5363,6 @@ impl LoginCryptoDiffieHellmanResponse { pub fn take_hmac(&mut self) -> ::std::vec::Vec { self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_hmac(&self) -> &[u8] { - match self.hmac.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { @@ -5336,7 +5473,7 @@ impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse { impl ::protobuf::Clear for LoginCryptoDiffieHellmanResponse { fn clear(&mut self) { - self.clear_hmac(); + self.hmac.clear(); self.unknown_fields.clear(); } } @@ -5358,8 +5495,14 @@ pub struct PoWResponseUnion { // message fields hash_cash: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWResponseUnion { + fn default() -> &'a PoWResponseUnion { + ::default_instance() + } } impl PoWResponseUnion { @@ -5369,6 +5512,10 @@ impl PoWResponseUnion { // optional .PoWHashCashResponse hash_cash = 10; + + pub fn get_hash_cash(&self) -> &PoWHashCashResponse { + self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashResponse::default_instance()) + } pub fn clear_hash_cash(&mut self) { self.hash_cash.clear(); } @@ -5395,10 +5542,6 @@ impl PoWResponseUnion { pub fn take_hash_cash(&mut self) -> PoWHashCashResponse { self.hash_cash.take().unwrap_or_else(|| PoWHashCashResponse::new()) } - - pub fn get_hash_cash(&self) -> &PoWHashCashResponse { - self.hash_cash.as_ref().unwrap_or_else(|| PoWHashCashResponse::default_instance()) - } } impl ::protobuf::Message for PoWResponseUnion { @@ -5514,7 +5657,7 @@ impl ::protobuf::Message for PoWResponseUnion { impl ::protobuf::Clear for PoWResponseUnion { fn clear(&mut self) { - self.clear_hash_cash(); + self.hash_cash.clear(); self.unknown_fields.clear(); } } @@ -5536,8 +5679,14 @@ pub struct PoWHashCashResponse { // message fields hash_suffix: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PoWHashCashResponse { + fn default() -> &'a PoWHashCashResponse { + ::default_instance() + } } impl PoWHashCashResponse { @@ -5547,6 +5696,13 @@ impl PoWHashCashResponse { // required bytes hash_suffix = 10; + + pub fn get_hash_suffix(&self) -> &[u8] { + match self.hash_suffix.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_hash_suffix(&mut self) { self.hash_suffix.clear(); } @@ -5573,13 +5729,6 @@ impl PoWHashCashResponse { pub fn take_hash_suffix(&mut self) -> ::std::vec::Vec { self.hash_suffix.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_hash_suffix(&self) -> &[u8] { - match self.hash_suffix.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for PoWHashCashResponse { @@ -5690,7 +5839,7 @@ impl ::protobuf::Message for PoWHashCashResponse { impl ::protobuf::Clear for PoWHashCashResponse { fn clear(&mut self) { - self.clear_hash_suffix(); + self.hash_suffix.clear(); self.unknown_fields.clear(); } } @@ -5713,8 +5862,14 @@ pub struct CryptoResponseUnion { shannon: ::protobuf::SingularPtrField, rc4_sha1_hmac: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoResponseUnion { + fn default() -> &'a CryptoResponseUnion { + ::default_instance() + } } impl CryptoResponseUnion { @@ -5724,6 +5879,10 @@ impl CryptoResponseUnion { // optional .CryptoShannonResponse shannon = 10; + + pub fn get_shannon(&self) -> &CryptoShannonResponse { + self.shannon.as_ref().unwrap_or_else(|| CryptoShannonResponse::default_instance()) + } pub fn clear_shannon(&mut self) { self.shannon.clear(); } @@ -5751,12 +5910,12 @@ impl CryptoResponseUnion { self.shannon.take().unwrap_or_else(|| CryptoShannonResponse::new()) } - pub fn get_shannon(&self) -> &CryptoShannonResponse { - self.shannon.as_ref().unwrap_or_else(|| CryptoShannonResponse::default_instance()) - } - // optional .CryptoRc4Sha1HmacResponse rc4_sha1_hmac = 20; + + pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse { + self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance()) + } pub fn clear_rc4_sha1_hmac(&mut self) { self.rc4_sha1_hmac.clear(); } @@ -5783,10 +5942,6 @@ impl CryptoResponseUnion { pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacResponse { self.rc4_sha1_hmac.take().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::new()) } - - pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse { - self.rc4_sha1_hmac.as_ref().unwrap_or_else(|| CryptoRc4Sha1HmacResponse::default_instance()) - } } impl ::protobuf::Message for CryptoResponseUnion { @@ -5924,8 +6079,8 @@ impl ::protobuf::Message for CryptoResponseUnion { impl ::protobuf::Clear for CryptoResponseUnion { fn clear(&mut self) { - self.clear_shannon(); - self.clear_rc4_sha1_hmac(); + self.shannon.clear(); + self.rc4_sha1_hmac.clear(); self.unknown_fields.clear(); } } @@ -5947,8 +6102,14 @@ pub struct CryptoShannonResponse { // message fields dummy: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoShannonResponse { + fn default() -> &'a CryptoShannonResponse { + ::default_instance() + } } impl CryptoShannonResponse { @@ -5958,6 +6119,10 @@ impl CryptoShannonResponse { // optional int32 dummy = 1; + + pub fn get_dummy(&self) -> i32 { + self.dummy.unwrap_or(0) + } pub fn clear_dummy(&mut self) { self.dummy = ::std::option::Option::None; } @@ -5970,10 +6135,6 @@ impl CryptoShannonResponse { pub fn set_dummy(&mut self, v: i32) { self.dummy = ::std::option::Option::Some(v); } - - pub fn get_dummy(&self) -> i32 { - self.dummy.unwrap_or(0) - } } impl ::protobuf::Message for CryptoShannonResponse { @@ -6085,7 +6246,7 @@ impl ::protobuf::Message for CryptoShannonResponse { impl ::protobuf::Clear for CryptoShannonResponse { fn clear(&mut self) { - self.clear_dummy(); + self.dummy = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -6107,8 +6268,14 @@ pub struct CryptoRc4Sha1HmacResponse { // message fields dummy: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacResponse { + fn default() -> &'a CryptoRc4Sha1HmacResponse { + ::default_instance() + } } impl CryptoRc4Sha1HmacResponse { @@ -6118,6 +6285,10 @@ impl CryptoRc4Sha1HmacResponse { // optional int32 dummy = 1; + + pub fn get_dummy(&self) -> i32 { + self.dummy.unwrap_or(0) + } pub fn clear_dummy(&mut self) { self.dummy = ::std::option::Option::None; } @@ -6130,10 +6301,6 @@ impl CryptoRc4Sha1HmacResponse { pub fn set_dummy(&mut self, v: i32) { self.dummy = ::std::option::Option::Some(v); } - - pub fn get_dummy(&self) -> i32 { - self.dummy.unwrap_or(0) - } } impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { @@ -6245,7 +6412,7 @@ impl ::protobuf::Message for CryptoRc4Sha1HmacResponse { impl ::protobuf::Clear for CryptoRc4Sha1HmacResponse { fn clear(&mut self) { - self.clear_dummy(); + self.dummy = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -6314,6 +6481,12 @@ impl ::protobuf::ProtobufEnum for Product { impl ::std::marker::Copy for Product { } +impl ::std::default::Default for Product { + fn default() -> Self { + Product::PRODUCT_CLIENT + } +} + impl ::protobuf::reflect::ProtobufValue for Product { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6363,6 +6536,12 @@ impl ::protobuf::ProtobufEnum for ProductFlags { impl ::std::marker::Copy for ProductFlags { } +impl ::std::default::Default for ProductFlags { + fn default() -> Self { + ProductFlags::PRODUCT_FLAG_NONE + } +} + impl ::protobuf::reflect::ProtobufValue for ProductFlags { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6478,6 +6657,12 @@ impl ::protobuf::ProtobufEnum for Platform { impl ::std::marker::Copy for Platform { } +impl ::std::default::Default for Platform { + fn default() -> Self { + Platform::PLATFORM_WIN32_X86 + } +} + impl ::protobuf::reflect::ProtobufValue for Platform { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6527,6 +6712,12 @@ impl ::protobuf::ProtobufEnum for Fingerprint { impl ::std::marker::Copy for Fingerprint { } +impl ::std::default::Default for Fingerprint { + fn default() -> Self { + Fingerprint::FINGERPRINT_GRAIN + } +} + impl ::protobuf::reflect::ProtobufValue for Fingerprint { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6576,6 +6767,12 @@ impl ::protobuf::ProtobufEnum for Cryptosuite { impl ::std::marker::Copy for Cryptosuite { } +impl ::std::default::Default for Cryptosuite { + fn default() -> Self { + Cryptosuite::CRYPTO_SUITE_SHANNON + } +} + impl ::protobuf::reflect::ProtobufValue for Cryptosuite { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6622,6 +6819,12 @@ impl ::protobuf::ProtobufEnum for Powscheme { impl ::std::marker::Copy for Powscheme { } +impl ::std::default::Default for Powscheme { + fn default() -> Self { + Powscheme::POW_HASH_CASH + } +} + impl ::protobuf::reflect::ProtobufValue for Powscheme { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6698,6 +6901,12 @@ impl ::protobuf::ProtobufEnum for ErrorCode { impl ::std::marker::Copy for ErrorCode { } +impl ::std::default::Default for ErrorCode { + fn default() -> Self { + ErrorCode::ProtocolError + } +} + impl ::protobuf::reflect::ProtobufValue for ErrorCode { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6705,103 +6914,97 @@ impl ::protobuf::reflect::ProtobufValue for ErrorCode { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x11keyexchange.proto\x12\0\"\xd0\x02\n\x0bClientHello\x12\"\n\nbuild_\ - info\x18\n\x20\x02(\x0b2\n.BuildInfoB\x02\x18\0\x120\n\x16fingerprints_s\ - upported\x18\x14\x20\x03(\x0e2\x0c.FingerprintB\x02\x18\0\x120\n\x16cryp\ - tosuites_supported\x18\x1e\x20\x03(\x0e2\x0c.CryptosuiteB\x02\x18\0\x12,\ - \n\x14powschemes_supported\x18(\x20\x03(\x0e2\n.PowschemeB\x02\x18\0\x12\ - 6\n\x12login_crypto_hello\x182\x20\x02(\x0b2\x16.LoginCryptoHelloUnionB\ - \x02\x18\0\x12\x18\n\x0cclient_nonce\x18<\x20\x02(\x0cB\x02\x18\0\x12\ - \x13\n\x07padding\x18F\x20\x01(\x0cB\x02\x18\0\x12$\n\x0bfeature_set\x18\ - P\x20\x01(\x0b2\x0b.FeatureSetB\x02\x18\0\"\x8a\x01\n\tBuildInfo\x12\x1d\ - \n\x07product\x18\n\x20\x02(\x0e2\x08.ProductB\x02\x18\0\x12(\n\rproduct\ - _flags\x18\x14\x20\x03(\x0e2\r.ProductFlagsB\x02\x18\0\x12\x1f\n\x08plat\ - form\x18\x1e\x20\x02(\x0e2\t.PlatformB\x02\x18\0\x12\x13\n\x07version\ - \x18(\x20\x02(\x04B\x02\x18\0\"S\n\x15LoginCryptoHelloUnion\x12:\n\x0edi\ - ffie_hellman\x18\n\x20\x01(\x0b2\x1e.LoginCryptoDiffieHellmanHelloB\x02\ - \x18\0\"N\n\x1dLoginCryptoDiffieHellmanHello\x12\x0e\n\x02gc\x18\n\x20\ - \x02(\x0cB\x02\x18\0\x12\x1d\n\x11server_keys_known\x18\x14\x20\x02(\rB\ - \x02\x18\0\"C\n\nFeatureSet\x12\x17\n\x0bautoupdate2\x18\x01\x20\x01(\ - \x08B\x02\x18\0\x12\x1c\n\x10current_location\x18\x02\x20\x01(\x08B\x02\ - \x18\0\"\x90\x01\n\x11APResponseMessage\x12#\n\tchallenge\x18\n\x20\x01(\ - \x0b2\x0c.APChallengeB\x02\x18\0\x12,\n\x07upgrade\x18\x14\x20\x01(\x0b2\ - \x17.UpgradeRequiredMessageB\x02\x18\0\x12(\n\x0clogin_failed\x18\x1e\ - \x20\x01(\x0b2\x0e.APLoginFailedB\x02\x18\0\"\x9f\x02\n\x0bAPChallenge\ - \x12>\n\x16login_crypto_challenge\x18\n\x20\x02(\x0b2\x1a.LoginCryptoCha\ - llengeUnionB\x02\x18\0\x12=\n\x15fingerprint_challenge\x18\x14\x20\x02(\ - \x0b2\x1a.FingerprintChallengeUnionB\x02\x18\0\x12-\n\rpow_challenge\x18\ - \x1e\x20\x02(\x0b2\x12.PoWChallengeUnionB\x02\x18\0\x123\n\x10crypto_cha\ - llenge\x18(\x20\x02(\x0b2\x15.CryptoChallengeUnionB\x02\x18\0\x12\x18\n\ - \x0cserver_nonce\x182\x20\x02(\x0cB\x02\x18\0\x12\x13\n\x07padding\x18<\ - \x20\x01(\x0cB\x02\x18\0\"[\n\x19LoginCryptoChallengeUnion\x12>\n\x0edif\ - fie_hellman\x18\n\x20\x01(\x0b2\".LoginCryptoDiffieHellmanChallengeB\x02\ - \x18\0\"o\n!LoginCryptoDiffieHellmanChallenge\x12\x0e\n\x02gs\x18\n\x20\ - \x02(\x0cB\x02\x18\0\x12\x20\n\x14server_signature_key\x18\x14\x20\x02(\ - \x05B\x02\x18\0\x12\x18\n\x0cgs_signature\x18\x1e\x20\x02(\x0cB\x02\x18\ - \0\"\x84\x01\n\x19FingerprintChallengeUnion\x12-\n\x05grain\x18\n\x20\ - \x01(\x0b2\x1a.FingerprintGrainChallengeB\x02\x18\0\x128\n\x0bhmac_ripem\ - d\x18\x14\x20\x01(\x0b2\x1f.FingerprintHmacRipemdChallengeB\x02\x18\0\",\ - \n\x19FingerprintGrainChallenge\x12\x0f\n\x03kek\x18\n\x20\x02(\x0cB\x02\ - \x18\0\"7\n\x1eFingerprintHmacRipemdChallenge\x12\x15\n\tchallenge\x18\n\ - \x20\x02(\x0cB\x02\x18\0\"A\n\x11PoWChallengeUnion\x12,\n\thash_cash\x18\ - \n\x20\x01(\x0b2\x15.PoWHashCashChallengeB\x02\x18\0\"R\n\x14PoWHashCash\ - Challenge\x12\x12\n\x06prefix\x18\n\x20\x01(\x0cB\x02\x18\0\x12\x12\n\ - \x06length\x18\x14\x20\x01(\x05B\x02\x18\0\x12\x12\n\x06target\x18\x1e\ - \x20\x01(\x05B\x02\x18\0\"|\n\x14CryptoChallengeUnion\x12,\n\x07shannon\ - \x18\n\x20\x01(\x0b2\x17.CryptoShannonChallengeB\x02\x18\0\x126\n\rrc4_s\ - ha1_hmac\x18\x14\x20\x01(\x0b2\x1b.CryptoRc4Sha1HmacChallengeB\x02\x18\0\ - \"\x18\n\x16CryptoShannonChallenge\"\x1c\n\x1aCryptoRc4Sha1HmacChallenge\ - \"i\n\x16UpgradeRequiredMessage\x12\x1f\n\x13upgrade_signed_part\x18\n\ - \x20\x02(\x0cB\x02\x18\0\x12\x15\n\tsignature\x18\x14\x20\x02(\x0cB\x02\ - \x18\0\x12\x17\n\x0bhttp_suffix\x18\x1e\x20\x01(\tB\x02\x18\0\"\x7f\n\rA\ - PLoginFailed\x12\"\n\nerror_code\x18\n\x20\x02(\x0e2\n.ErrorCodeB\x02\ - \x18\0\x12\x17\n\x0bretry_delay\x18\x14\x20\x01(\x05B\x02\x18\0\x12\x12\ - \n\x06expiry\x18\x1e\x20\x01(\x05B\x02\x18\0\x12\x1d\n\x11error_descript\ - ion\x18(\x20\x01(\tB\x02\x18\0\"\xb7\x01\n\x17ClientResponsePlaintext\ - \x12<\n\x15login_crypto_response\x18\n\x20\x02(\x0b2\x19.LoginCryptoResp\ - onseUnionB\x02\x18\0\x12+\n\x0cpow_response\x18\x14\x20\x02(\x0b2\x11.Po\ - WResponseUnionB\x02\x18\0\x121\n\x0fcrypto_response\x18\x1e\x20\x02(\x0b\ - 2\x14.CryptoResponseUnionB\x02\x18\0\"Y\n\x18LoginCryptoResponseUnion\ - \x12=\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2!.LoginCryptoDiffieHellmanR\ - esponseB\x02\x18\0\"4\n\x20LoginCryptoDiffieHellmanResponse\x12\x10\n\ - \x04hmac\x18\n\x20\x02(\x0cB\x02\x18\0\"?\n\x10PoWResponseUnion\x12+\n\t\ - hash_cash\x18\n\x20\x01(\x0b2\x14.PoWHashCashResponseB\x02\x18\0\".\n\ - \x13PoWHashCashResponse\x12\x17\n\x0bhash_suffix\x18\n\x20\x02(\x0cB\x02\ - \x18\0\"y\n\x13CryptoResponseUnion\x12+\n\x07shannon\x18\n\x20\x01(\x0b2\ - \x16.CryptoShannonResponseB\x02\x18\0\x125\n\rrc4_sha1_hmac\x18\x14\x20\ - \x01(\x0b2\x1a.CryptoRc4Sha1HmacResponseB\x02\x18\0\"*\n\x15CryptoShanno\ - nResponse\x12\x11\n\x05dummy\x18\x01\x20\x01(\x05B\x02\x18\0\".\n\x19Cry\ - ptoRc4Sha1HmacResponse\x12\x11\n\x05dummy\x18\x01\x20\x01(\x05B\x02\x18\ - \0*\x83\x01\n\x07Product\x12\x12\n\x0ePRODUCT_CLIENT\x10\0\x12\x16\n\x12\ - PRODUCT_LIBSPOTIFY\x10\x01\x12\x12\n\x0ePRODUCT_MOBILE\x10\x02\x12\x13\n\ - \x0fPRODUCT_PARTNER\x10\x03\x12\x1f\n\x1bPRODUCT_LIBSPOTIFY_EMBEDDED\x10\ - \x05\x1a\x02\x10\0*E\n\x0cProductFlags\x12\x15\n\x11PRODUCT_FLAG_NONE\ - \x10\0\x12\x1a\n\x16PRODUCT_FLAG_DEV_BUILD\x10\x01\x1a\x02\x10\0*\xe0\ - \x04\n\x08Platform\x12\x16\n\x12PLATFORM_WIN32_X86\x10\0\x12\x14\n\x10PL\ - ATFORM_OSX_X86\x10\x01\x12\x16\n\x12PLATFORM_LINUX_X86\x10\x02\x12\x17\n\ - \x13PLATFORM_IPHONE_ARM\x10\x03\x12\x14\n\x10PLATFORM_S60_ARM\x10\x04\ - \x12\x14\n\x10PLATFORM_OSX_PPC\x10\x05\x12\x18\n\x14PLATFORM_ANDROID_ARM\ - \x10\x06\x12\x1b\n\x17PLATFORM_WINDOWS_CE_ARM\x10\x07\x12\x19\n\x15PLATF\ - ORM_LINUX_X86_64\x10\x08\x12\x17\n\x13PLATFORM_OSX_X86_64\x10\t\x12\x15\ - \n\x11PLATFORM_PALM_ARM\x10\n\x12\x15\n\x11PLATFORM_LINUX_SH\x10\x0b\x12\ - \x18\n\x14PLATFORM_FREEBSD_X86\x10\x0c\x12\x1b\n\x17PLATFORM_FREEBSD_X86\ - _64\x10\r\x12\x1b\n\x17PLATFORM_BLACKBERRY_ARM\x10\x0e\x12\x12\n\x0ePLAT\ - FORM_SONOS\x10\x0f\x12\x17\n\x13PLATFORM_LINUX_MIPS\x10\x10\x12\x16\n\ - \x12PLATFORM_LINUX_ARM\x10\x11\x12\x19\n\x15PLATFORM_LOGITECH_ARM\x10\ + \n\x11keyexchange.proto\x12\0\"\xc2\x02\n\x0bClientHello\x12\x20\n\nbuil\ + d_info\x18\n\x20\x02(\x0b2\n.BuildInfoB\0\x12.\n\x16fingerprints_support\ + ed\x18\x14\x20\x03(\x0e2\x0c.FingerprintB\0\x12.\n\x16cryptosuites_suppo\ + rted\x18\x1e\x20\x03(\x0e2\x0c.CryptosuiteB\0\x12*\n\x14powschemes_suppo\ + rted\x18(\x20\x03(\x0e2\n.PowschemeB\0\x124\n\x12login_crypto_hello\x182\ + \x20\x02(\x0b2\x16.LoginCryptoHelloUnionB\0\x12\x16\n\x0cclient_nonce\ + \x18<\x20\x02(\x0cB\0\x12\x11\n\x07padding\x18F\x20\x01(\x0cB\0\x12\"\n\ + \x0bfeature_set\x18P\x20\x01(\x0b2\x0b.FeatureSetB\0:\0\"\x84\x01\n\tBui\ + ldInfo\x12\x1b\n\x07product\x18\n\x20\x02(\x0e2\x08.ProductB\0\x12&\n\rp\ + roduct_flags\x18\x14\x20\x03(\x0e2\r.ProductFlagsB\0\x12\x1d\n\x08platfo\ + rm\x18\x1e\x20\x02(\x0e2\t.PlatformB\0\x12\x11\n\x07version\x18(\x20\x02\ + (\x04B\0:\0\"S\n\x15LoginCryptoHelloUnion\x128\n\x0ediffie_hellman\x18\n\ + \x20\x01(\x0b2\x1e.LoginCryptoDiffieHellmanHelloB\0:\0\"L\n\x1dLoginCryp\ + toDiffieHellmanHello\x12\x0c\n\x02gc\x18\n\x20\x02(\x0cB\0\x12\x1b\n\x11\ + server_keys_known\x18\x14\x20\x02(\rB\0:\0\"A\n\nFeatureSet\x12\x15\n\ + \x0bautoupdate2\x18\x01\x20\x01(\x08B\0\x12\x1a\n\x10current_location\ + \x18\x02\x20\x01(\x08B\0:\0\"\x8c\x01\n\x11APResponseMessage\x12!\n\tcha\ + llenge\x18\n\x20\x01(\x0b2\x0c.APChallengeB\0\x12*\n\x07upgrade\x18\x14\ + \x20\x01(\x0b2\x17.UpgradeRequiredMessageB\0\x12&\n\x0clogin_failed\x18\ + \x1e\x20\x01(\x0b2\x0e.APLoginFailedB\0:\0\"\x95\x02\n\x0bAPChallenge\ + \x12<\n\x16login_crypto_challenge\x18\n\x20\x02(\x0b2\x1a.LoginCryptoCha\ + llengeUnionB\0\x12;\n\x15fingerprint_challenge\x18\x14\x20\x02(\x0b2\x1a\ + .FingerprintChallengeUnionB\0\x12+\n\rpow_challenge\x18\x1e\x20\x02(\x0b\ + 2\x12.PoWChallengeUnionB\0\x121\n\x10crypto_challenge\x18(\x20\x02(\x0b2\ + \x15.CryptoChallengeUnionB\0\x12\x16\n\x0cserver_nonce\x182\x20\x02(\x0c\ + B\0\x12\x11\n\x07padding\x18<\x20\x01(\x0cB\0:\0\"[\n\x19LoginCryptoChal\ + lengeUnion\x12<\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2\".LoginCryptoDif\ + fieHellmanChallengeB\0:\0\"k\n!LoginCryptoDiffieHellmanChallenge\x12\x0c\ + \n\x02gs\x18\n\x20\x02(\x0cB\0\x12\x1e\n\x14server_signature_key\x18\x14\ + \x20\x02(\x05B\0\x12\x16\n\x0cgs_signature\x18\x1e\x20\x02(\x0cB\0:\0\"\ + \x82\x01\n\x19FingerprintChallengeUnion\x12+\n\x05grain\x18\n\x20\x01(\ + \x0b2\x1a.FingerprintGrainChallengeB\0\x126\n\x0bhmac_ripemd\x18\x14\x20\ + \x01(\x0b2\x1f.FingerprintHmacRipemdChallengeB\0:\0\",\n\x19FingerprintG\ + rainChallenge\x12\r\n\x03kek\x18\n\x20\x02(\x0cB\0:\0\"7\n\x1eFingerprin\ + tHmacRipemdChallenge\x12\x13\n\tchallenge\x18\n\x20\x02(\x0cB\0:\0\"A\n\ + \x11PoWChallengeUnion\x12*\n\thash_cash\x18\n\x20\x01(\x0b2\x15.PoWHashC\ + ashChallengeB\0:\0\"N\n\x14PoWHashCashChallenge\x12\x10\n\x06prefix\x18\ + \n\x20\x01(\x0cB\0\x12\x10\n\x06length\x18\x14\x20\x01(\x05B\0\x12\x10\n\ + \x06target\x18\x1e\x20\x01(\x05B\0:\0\"z\n\x14CryptoChallengeUnion\x12*\ + \n\x07shannon\x18\n\x20\x01(\x0b2\x17.CryptoShannonChallengeB\0\x124\n\r\ + rc4_sha1_hmac\x18\x14\x20\x01(\x0b2\x1b.CryptoRc4Sha1HmacChallengeB\0:\0\ + \"\x1a\n\x16CryptoShannonChallenge:\0\"\x1e\n\x1aCryptoRc4Sha1HmacChalle\ + nge:\0\"e\n\x16UpgradeRequiredMessage\x12\x1d\n\x13upgrade_signed_part\ + \x18\n\x20\x02(\x0cB\0\x12\x13\n\tsignature\x18\x14\x20\x02(\x0cB\0\x12\ + \x15\n\x0bhttp_suffix\x18\x1e\x20\x01(\tB\0:\0\"y\n\rAPLoginFailed\x12\ + \x20\n\nerror_code\x18\n\x20\x02(\x0e2\n.ErrorCodeB\0\x12\x15\n\x0bretry\ + _delay\x18\x14\x20\x01(\x05B\0\x12\x10\n\x06expiry\x18\x1e\x20\x01(\x05B\ + \0\x12\x1b\n\x11error_description\x18(\x20\x01(\tB\0:\0\"\xb3\x01\n\x17C\ + lientResponsePlaintext\x12:\n\x15login_crypto_response\x18\n\x20\x02(\ + \x0b2\x19.LoginCryptoResponseUnionB\0\x12)\n\x0cpow_response\x18\x14\x20\ + \x02(\x0b2\x11.PoWResponseUnionB\0\x12/\n\x0fcrypto_response\x18\x1e\x20\ + \x02(\x0b2\x14.CryptoResponseUnionB\0:\0\"Y\n\x18LoginCryptoResponseUnio\ + n\x12;\n\x0ediffie_hellman\x18\n\x20\x01(\x0b2!.LoginCryptoDiffieHellman\ + ResponseB\0:\0\"4\n\x20LoginCryptoDiffieHellmanResponse\x12\x0e\n\x04hma\ + c\x18\n\x20\x02(\x0cB\0:\0\"?\n\x10PoWResponseUnion\x12)\n\thash_cash\ + \x18\n\x20\x01(\x0b2\x14.PoWHashCashResponseB\0:\0\".\n\x13PoWHashCashRe\ + sponse\x12\x15\n\x0bhash_suffix\x18\n\x20\x02(\x0cB\0:\0\"w\n\x13CryptoR\ + esponseUnion\x12)\n\x07shannon\x18\n\x20\x01(\x0b2\x16.CryptoShannonResp\ + onseB\0\x123\n\rrc4_sha1_hmac\x18\x14\x20\x01(\x0b2\x1a.CryptoRc4Sha1Hma\ + cResponseB\0:\0\"*\n\x15CryptoShannonResponse\x12\x0f\n\x05dummy\x18\x01\ + \x20\x01(\x05B\0:\0\".\n\x19CryptoRc4Sha1HmacResponse\x12\x0f\n\x05dummy\ + \x18\x01\x20\x01(\x05B\0:\0*\x81\x01\n\x07Product\x12\x12\n\x0ePRODUCT_C\ + LIENT\x10\0\x12\x16\n\x12PRODUCT_LIBSPOTIFY\x10\x01\x12\x12\n\x0ePRODUCT\ + _MOBILE\x10\x02\x12\x13\n\x0fPRODUCT_PARTNER\x10\x03\x12\x1f\n\x1bPRODUC\ + T_LIBSPOTIFY_EMBEDDED\x10\x05\x1a\0*C\n\x0cProductFlags\x12\x15\n\x11PRO\ + DUCT_FLAG_NONE\x10\0\x12\x1a\n\x16PRODUCT_FLAG_DEV_BUILD\x10\x01\x1a\0*\ + \xde\x04\n\x08Platform\x12\x16\n\x12PLATFORM_WIN32_X86\x10\0\x12\x14\n\ + \x10PLATFORM_OSX_X86\x10\x01\x12\x16\n\x12PLATFORM_LINUX_X86\x10\x02\x12\ + \x17\n\x13PLATFORM_IPHONE_ARM\x10\x03\x12\x14\n\x10PLATFORM_S60_ARM\x10\ + \x04\x12\x14\n\x10PLATFORM_OSX_PPC\x10\x05\x12\x18\n\x14PLATFORM_ANDROID\ + _ARM\x10\x06\x12\x1b\n\x17PLATFORM_WINDOWS_CE_ARM\x10\x07\x12\x19\n\x15P\ + LATFORM_LINUX_X86_64\x10\x08\x12\x17\n\x13PLATFORM_OSX_X86_64\x10\t\x12\ + \x15\n\x11PLATFORM_PALM_ARM\x10\n\x12\x15\n\x11PLATFORM_LINUX_SH\x10\x0b\ + \x12\x18\n\x14PLATFORM_FREEBSD_X86\x10\x0c\x12\x1b\n\x17PLATFORM_FREEBSD\ + _X86_64\x10\r\x12\x1b\n\x17PLATFORM_BLACKBERRY_ARM\x10\x0e\x12\x12\n\x0e\ + PLATFORM_SONOS\x10\x0f\x12\x17\n\x13PLATFORM_LINUX_MIPS\x10\x10\x12\x16\ + \n\x12PLATFORM_LINUX_ARM\x10\x11\x12\x19\n\x15PLATFORM_LOGITECH_ARM\x10\ \x12\x12\x1b\n\x17PLATFORM_LINUX_BLACKFIN\x10\x13\x12\x14\n\x10PLATFORM_\ WP7_ARM\x10\x14\x12\x16\n\x12PLATFORM_ONKYO_ARM\x10\x15\x12\x17\n\x13PLA\ - TFORM_QNXNTO_ARM\x10\x16\x12\x14\n\x10PLATFORM_BCO_ARM\x10\x17\x1a\x02\ - \x10\0*E\n\x0bFingerprint\x12\x15\n\x11FINGERPRINT_GRAIN\x10\0\x12\x1b\n\ - \x17FINGERPRINT_HMAC_RIPEMD\x10\x01\x1a\x02\x10\0*K\n\x0bCryptosuite\x12\ - \x18\n\x14CRYPTO_SUITE_SHANNON\x10\0\x12\x1e\n\x1aCRYPTO_SUITE_RC4_SHA1_\ - HMAC\x10\x01\x1a\x02\x10\0*\"\n\tPowscheme\x12\x11\n\rPOW_HASH_CASH\x10\ - \0\x1a\x02\x10\0*\x8d\x02\n\tErrorCode\x12\x11\n\rProtocolError\x10\0\ - \x12\x10\n\x0cTryAnotherAP\x10\x02\x12\x13\n\x0fBadConnectionId\x10\x05\ - \x12\x15\n\x11TravelRestriction\x10\t\x12\x1a\n\x16PremiumAccountRequire\ - d\x10\x0b\x12\x12\n\x0eBadCredentials\x10\x0c\x12\x1f\n\x1bCouldNotValid\ - ateCredentials\x10\r\x12\x11\n\rAccountExists\x10\x0e\x12\x1d\n\x19Extra\ - VerificationRequired\x10\x0f\x12\x11\n\rInvalidAppKey\x10\x10\x12\x15\n\ - \x11ApplicationBanned\x10\x11\x1a\x02\x10\0B\0b\x06proto2\ + TFORM_QNXNTO_ARM\x10\x16\x12\x14\n\x10PLATFORM_BCO_ARM\x10\x17\x1a\0*C\n\ + \x0bFingerprint\x12\x15\n\x11FINGERPRINT_GRAIN\x10\0\x12\x1b\n\x17FINGER\ + PRINT_HMAC_RIPEMD\x10\x01\x1a\0*I\n\x0bCryptosuite\x12\x18\n\x14CRYPTO_S\ + UITE_SHANNON\x10\0\x12\x1e\n\x1aCRYPTO_SUITE_RC4_SHA1_HMAC\x10\x01\x1a\0\ + *\x20\n\tPowscheme\x12\x11\n\rPOW_HASH_CASH\x10\0\x1a\0*\x8b\x02\n\tErro\ + rCode\x12\x11\n\rProtocolError\x10\0\x12\x10\n\x0cTryAnotherAP\x10\x02\ + \x12\x13\n\x0fBadConnectionId\x10\x05\x12\x15\n\x11TravelRestriction\x10\ + \t\x12\x1a\n\x16PremiumAccountRequired\x10\x0b\x12\x12\n\x0eBadCredentia\ + ls\x10\x0c\x12\x1f\n\x1bCouldNotValidateCredentials\x10\r\x12\x11\n\rAcc\ + ountExists\x10\x0e\x12\x1d\n\x19ExtraVerificationRequired\x10\x0f\x12\ + \x11\n\rInvalidAppKey\x10\x10\x12\x15\n\x11ApplicationBanned\x10\x11\x1a\ + \0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/mercury.rs b/protocol/src/mercury.rs index a778a0ac..47461890 100644 --- a/protocol/src/mercury.rs +++ b/protocol/src/mercury.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.7.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,17 +17,28 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `mercury.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_7_0; + #[derive(PartialEq,Clone,Default)] pub struct MercuryMultiGetRequest { // message fields request: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryMultiGetRequest { + fn default() -> &'a MercuryMultiGetRequest { + ::default_instance() + } } impl MercuryMultiGetRequest { @@ -37,6 +48,10 @@ impl MercuryMultiGetRequest { // repeated .MercuryRequest request = 1; + + pub fn get_request(&self) -> &[MercuryRequest] { + &self.request + } pub fn clear_request(&mut self) { self.request.clear(); } @@ -55,10 +70,6 @@ impl MercuryMultiGetRequest { pub fn take_request(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.request, ::protobuf::RepeatedField::new()) } - - pub fn get_request(&self) -> &[MercuryRequest] { - &self.request - } } impl ::protobuf::Message for MercuryMultiGetRequest { @@ -174,7 +185,7 @@ impl ::protobuf::Message for MercuryMultiGetRequest { impl ::protobuf::Clear for MercuryMultiGetRequest { fn clear(&mut self) { - self.clear_request(); + self.request.clear(); self.unknown_fields.clear(); } } @@ -196,8 +207,14 @@ pub struct MercuryMultiGetReply { // message fields reply: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryMultiGetReply { + fn default() -> &'a MercuryMultiGetReply { + ::default_instance() + } } impl MercuryMultiGetReply { @@ -207,6 +224,10 @@ impl MercuryMultiGetReply { // repeated .MercuryReply reply = 1; + + pub fn get_reply(&self) -> &[MercuryReply] { + &self.reply + } pub fn clear_reply(&mut self) { self.reply.clear(); } @@ -225,10 +246,6 @@ impl MercuryMultiGetReply { pub fn take_reply(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.reply, ::protobuf::RepeatedField::new()) } - - pub fn get_reply(&self) -> &[MercuryReply] { - &self.reply - } } impl ::protobuf::Message for MercuryMultiGetReply { @@ -344,7 +361,7 @@ impl ::protobuf::Message for MercuryMultiGetReply { impl ::protobuf::Clear for MercuryMultiGetReply { fn clear(&mut self) { - self.clear_reply(); + self.reply.clear(); self.unknown_fields.clear(); } } @@ -369,8 +386,14 @@ pub struct MercuryRequest { body: ::protobuf::SingularField<::std::vec::Vec>, etag: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryRequest { + fn default() -> &'a MercuryRequest { + ::default_instance() + } } impl MercuryRequest { @@ -380,6 +403,13 @@ impl MercuryRequest { // optional string uri = 1; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -407,15 +437,15 @@ impl MercuryRequest { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { + // optional string content_type = 2; + + + pub fn get_content_type(&self) -> &str { + match self.content_type.as_ref() { Some(v) => &v, None => "", } } - - // optional string content_type = 2; - pub fn clear_content_type(&mut self) { self.content_type.clear(); } @@ -443,15 +473,15 @@ impl MercuryRequest { self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_content_type(&self) -> &str { - match self.content_type.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes body = 3; + + pub fn get_body(&self) -> &[u8] { + match self.body.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_body(&mut self) { self.body.clear(); } @@ -479,15 +509,15 @@ impl MercuryRequest { self.body.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_body(&self) -> &[u8] { - match self.body.as_ref() { + // optional bytes etag = 4; + + + pub fn get_etag(&self) -> &[u8] { + match self.etag.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes etag = 4; - pub fn clear_etag(&mut self) { self.etag.clear(); } @@ -514,13 +544,6 @@ impl MercuryRequest { pub fn take_etag(&mut self) -> ::std::vec::Vec { self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_etag(&self) -> &[u8] { - match self.etag.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for MercuryRequest { @@ -670,10 +693,10 @@ impl ::protobuf::Message for MercuryRequest { impl ::protobuf::Clear for MercuryRequest { fn clear(&mut self) { - self.clear_uri(); - self.clear_content_type(); - self.clear_body(); - self.clear_etag(); + self.uri.clear(); + self.content_type.clear(); + self.body.clear(); + self.etag.clear(); self.unknown_fields.clear(); } } @@ -701,8 +724,14 @@ pub struct MercuryReply { content_type: ::protobuf::SingularField<::std::string::String>, body: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MercuryReply { + fn default() -> &'a MercuryReply { + ::default_instance() + } } impl MercuryReply { @@ -712,6 +741,10 @@ impl MercuryReply { // optional sint32 status_code = 1; + + pub fn get_status_code(&self) -> i32 { + self.status_code.unwrap_or(0) + } pub fn clear_status_code(&mut self) { self.status_code = ::std::option::Option::None; } @@ -725,12 +758,15 @@ impl MercuryReply { self.status_code = ::std::option::Option::Some(v); } - pub fn get_status_code(&self) -> i32 { - self.status_code.unwrap_or(0) - } - // optional string status_message = 2; + + pub fn get_status_message(&self) -> &str { + match self.status_message.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_status_message(&mut self) { self.status_message.clear(); } @@ -758,15 +794,12 @@ impl MercuryReply { self.status_message.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_status_message(&self) -> &str { - match self.status_message.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .MercuryReply.CachePolicy cache_policy = 3; + + pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy { + self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO) + } pub fn clear_cache_policy(&mut self) { self.cache_policy = ::std::option::Option::None; } @@ -780,12 +813,12 @@ impl MercuryReply { self.cache_policy = ::std::option::Option::Some(v); } - pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy { - self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO) - } - // optional sint32 ttl = 4; + + pub fn get_ttl(&self) -> i32 { + self.ttl.unwrap_or(0) + } pub fn clear_ttl(&mut self) { self.ttl = ::std::option::Option::None; } @@ -799,12 +832,15 @@ impl MercuryReply { self.ttl = ::std::option::Option::Some(v); } - pub fn get_ttl(&self) -> i32 { - self.ttl.unwrap_or(0) - } - // optional bytes etag = 5; + + pub fn get_etag(&self) -> &[u8] { + match self.etag.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_etag(&mut self) { self.etag.clear(); } @@ -832,15 +868,15 @@ impl MercuryReply { self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_etag(&self) -> &[u8] { - match self.etag.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string content_type = 6; + + pub fn get_content_type(&self) -> &str { + match self.content_type.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_content_type(&mut self) { self.content_type.clear(); } @@ -868,15 +904,15 @@ impl MercuryReply { self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_content_type(&self) -> &str { - match self.content_type.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes body = 7; + + pub fn get_body(&self) -> &[u8] { + match self.body.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_body(&mut self) { self.body.clear(); } @@ -903,13 +939,6 @@ impl MercuryReply { pub fn take_body(&mut self) -> ::std::vec::Vec { self.body.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_body(&self) -> &[u8] { - match self.body.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for MercuryReply { @@ -1109,13 +1138,13 @@ impl ::protobuf::Message for MercuryReply { impl ::protobuf::Clear for MercuryReply { fn clear(&mut self) { - self.clear_status_code(); - self.clear_status_message(); - self.clear_cache_policy(); - self.clear_ttl(); - self.clear_etag(); - self.clear_content_type(); - self.clear_body(); + self.status_code = ::std::option::Option::None; + self.status_message.clear(); + self.cache_policy = ::std::option::Option::None; + self.ttl = ::std::option::Option::None; + self.etag.clear(); + self.content_type.clear(); + self.body.clear(); self.unknown_fields.clear(); } } @@ -1178,6 +1207,13 @@ impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy { impl ::std::marker::Copy for MercuryReply_CachePolicy { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for MercuryReply_CachePolicy { + fn default() -> Self { + MercuryReply_CachePolicy::CACHE_NO + } +} + impl ::protobuf::reflect::ProtobufValue for MercuryReply_CachePolicy { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -1193,8 +1229,14 @@ pub struct Header { status_code: ::std::option::Option, user_fields: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Header { + fn default() -> &'a Header { +
::default_instance() + } } impl Header { @@ -1204,6 +1246,13 @@ impl Header { // optional string uri = 1; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -1231,15 +1280,15 @@ impl Header { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { + // optional string content_type = 2; + + + pub fn get_content_type(&self) -> &str { + match self.content_type.as_ref() { Some(v) => &v, None => "", } } - - // optional string content_type = 2; - pub fn clear_content_type(&mut self) { self.content_type.clear(); } @@ -1267,15 +1316,15 @@ impl Header { self.content_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_content_type(&self) -> &str { - match self.content_type.as_ref() { + // optional string method = 3; + + + pub fn get_method(&self) -> &str { + match self.method.as_ref() { Some(v) => &v, None => "", } } - - // optional string method = 3; - pub fn clear_method(&mut self) { self.method.clear(); } @@ -1303,15 +1352,12 @@ impl Header { self.method.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_method(&self) -> &str { - match self.method.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional sint32 status_code = 4; + + pub fn get_status_code(&self) -> i32 { + self.status_code.unwrap_or(0) + } pub fn clear_status_code(&mut self) { self.status_code = ::std::option::Option::None; } @@ -1325,12 +1371,12 @@ impl Header { self.status_code = ::std::option::Option::Some(v); } - pub fn get_status_code(&self) -> i32 { - self.status_code.unwrap_or(0) - } - // repeated .UserField user_fields = 6; + + pub fn get_user_fields(&self) -> &[UserField] { + &self.user_fields + } pub fn clear_user_fields(&mut self) { self.user_fields.clear(); } @@ -1349,10 +1395,6 @@ impl Header { pub fn take_user_fields(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.user_fields, ::protobuf::RepeatedField::new()) } - - pub fn get_user_fields(&self) -> &[UserField] { - &self.user_fields - } } impl ::protobuf::Message for Header { @@ -1528,11 +1570,11 @@ impl ::protobuf::Message for Header { impl ::protobuf::Clear for Header { fn clear(&mut self) { - self.clear_uri(); - self.clear_content_type(); - self.clear_method(); - self.clear_status_code(); - self.clear_user_fields(); + self.uri.clear(); + self.content_type.clear(); + self.method.clear(); + self.status_code = ::std::option::Option::None; + self.user_fields.clear(); self.unknown_fields.clear(); } } @@ -1555,8 +1597,14 @@ pub struct UserField { key: ::protobuf::SingularField<::std::string::String>, value: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UserField { + fn default() -> &'a UserField { + ::default_instance() + } } impl UserField { @@ -1566,6 +1614,13 @@ impl UserField { // 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(); } @@ -1593,15 +1648,15 @@ impl UserField { self.key.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_key(&self) -> &str { - match self.key.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes value = 2; + + pub fn get_value(&self) -> &[u8] { + match self.value.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_value(&mut self) { self.value.clear(); } @@ -1628,13 +1683,6 @@ impl UserField { pub fn take_value(&mut self) -> ::std::vec::Vec { self.value.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_value(&self) -> &[u8] { - match self.value.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for UserField { @@ -1756,8 +1804,8 @@ impl ::protobuf::Message for UserField { impl ::protobuf::Clear for UserField { fn clear(&mut self) { - self.clear_key(); - self.clear_value(); + self.key.clear(); + self.value.clear(); self.unknown_fields.clear(); } } @@ -1775,27 +1823,24 @@ impl ::protobuf::reflect::ProtobufValue for UserField { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12$\n\x07request\ - \x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\x02\x18\0\"8\n\x14MercuryMult\ - iGetReply\x12\x20\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\x02\ - \x18\0\"_\n\x0eMercuryRequest\x12\x0f\n\x03uri\x18\x01\x20\x01(\tB\x02\ - \x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\x18\0\x12\x10\n\ - \x04body\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04etag\x18\x04\x20\ - \x01(\x0cB\x02\x18\0\"\x8d\x02\n\x0cMercuryReply\x12\x17\n\x0bstatus_cod\ - e\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x1a\n\x0estatus_message\x18\x02\ - \x20\x01(\tB\x02\x18\0\x123\n\x0ccache_policy\x18\x03\x20\x01(\x0e2\x19.\ - MercuryReply.CachePolicyB\x02\x18\0\x12\x0f\n\x03ttl\x18\x04\x20\x01(\ - \x11B\x02\x18\0\x12\x10\n\x04etag\x18\x05\x20\x01(\x0cB\x02\x18\0\x12\ - \x18\n\x0ccontent_type\x18\x06\x20\x01(\tB\x02\x18\0\x12\x10\n\x04body\ - \x18\x07\x20\x01(\x0cB\x02\x18\0\"D\n\x0bCachePolicy\x12\x0c\n\x08CACHE_\ - NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\x10\x02\x12\x10\n\x0cCACHE_PUBLIC\ - \x10\x03\x1a\x02\x10\0\"\x85\x01\n\x06Header\x12\x0f\n\x03uri\x18\x01\ - \x20\x01(\tB\x02\x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\ - \x18\0\x12\x12\n\x06method\x18\x03\x20\x01(\tB\x02\x18\0\x12\x17\n\x0bst\ - atus_code\x18\x04\x20\x01(\x11B\x02\x18\0\x12#\n\x0buser_fields\x18\x06\ - \x20\x03(\x0b2\n.UserFieldB\x02\x18\0\"/\n\tUserField\x12\x0f\n\x03key\ - \x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\x0cB\ - \x02\x18\0B\0b\x06proto2\ + \n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12\"\n\x07reques\ + t\x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\0:\0\"8\n\x14MercuryMultiGet\ + Reply\x12\x1e\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\0:\0\"Y\n\ + \x0eMercuryRequest\x12\r\n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccon\ + tent_type\x18\x02\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x03\x20\x01(\x0cB\ + \0\x12\x0e\n\x04etag\x18\x04\x20\x01(\x0cB\0:\0\"\xff\x01\n\x0cMercuryRe\ + ply\x12\x15\n\x0bstatus_code\x18\x01\x20\x01(\x11B\0\x12\x18\n\x0estatus\ + _message\x18\x02\x20\x01(\tB\0\x121\n\x0ccache_policy\x18\x03\x20\x01(\ + \x0e2\x19.MercuryReply.CachePolicyB\0\x12\r\n\x03ttl\x18\x04\x20\x01(\ + \x11B\0\x12\x0e\n\x04etag\x18\x05\x20\x01(\x0cB\0\x12\x16\n\x0ccontent_t\ + ype\x18\x06\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x07\x20\x01(\x0cB\0\"B\n\ + \x0bCachePolicy\x12\x0c\n\x08CACHE_NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\ + \x10\x02\x12\x10\n\x0cCACHE_PUBLIC\x10\x03\x1a\0:\0\"}\n\x06Header\x12\r\ + \n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccontent_type\x18\x02\x20\ + \x01(\tB\0\x12\x10\n\x06method\x18\x03\x20\x01(\tB\0\x12\x15\n\x0bstatus\ + _code\x18\x04\x20\x01(\x11B\0\x12!\n\x0buser_fields\x18\x06\x20\x03(\x0b\ + 2\n.UserFieldB\0:\0\"-\n\tUserField\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\ + \x12\x0f\n\x05value\x18\x02\x20\x01(\x0cB\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/metadata.rs b/protocol/src/metadata.rs index bc55ded5..00ceba39 100644 --- a/protocol/src/metadata.rs +++ b/protocol/src/metadata.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.7.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,18 +17,29 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `metadata.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_7_0; + #[derive(PartialEq,Clone,Default)] pub struct TopTracks { // message fields country: ::protobuf::SingularField<::std::string::String>, track: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a TopTracks { + fn default() -> &'a TopTracks { + ::default_instance() + } } impl TopTracks { @@ -38,6 +49,13 @@ impl TopTracks { // optional string country = 1; + + pub fn get_country(&self) -> &str { + match self.country.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_country(&mut self) { self.country.clear(); } @@ -65,15 +83,12 @@ impl TopTracks { self.country.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_country(&self) -> &str { - match self.country.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Track track = 2; + + pub fn get_track(&self) -> &[Track] { + &self.track + } pub fn clear_track(&mut self) { self.track.clear(); } @@ -92,10 +107,6 @@ impl TopTracks { pub fn take_track(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new()) } - - pub fn get_track(&self) -> &[Track] { - &self.track - } } impl ::protobuf::Message for TopTracks { @@ -225,8 +236,8 @@ impl ::protobuf::Message for TopTracks { impl ::protobuf::Clear for TopTracks { fn clear(&mut self) { - self.clear_country(); - self.clear_track(); + self.country.clear(); + self.track.clear(); self.unknown_fields.clear(); } } @@ -250,8 +261,14 @@ pub struct ActivityPeriod { end_year: ::std::option::Option, decade: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ActivityPeriod { + fn default() -> &'a ActivityPeriod { + ::default_instance() + } } impl ActivityPeriod { @@ -261,6 +278,10 @@ impl ActivityPeriod { // optional sint32 start_year = 1; + + pub fn get_start_year(&self) -> i32 { + self.start_year.unwrap_or(0) + } pub fn clear_start_year(&mut self) { self.start_year = ::std::option::Option::None; } @@ -274,12 +295,12 @@ impl ActivityPeriod { self.start_year = ::std::option::Option::Some(v); } - pub fn get_start_year(&self) -> i32 { - self.start_year.unwrap_or(0) - } - // optional sint32 end_year = 2; + + pub fn get_end_year(&self) -> i32 { + self.end_year.unwrap_or(0) + } pub fn clear_end_year(&mut self) { self.end_year = ::std::option::Option::None; } @@ -293,12 +314,12 @@ impl ActivityPeriod { self.end_year = ::std::option::Option::Some(v); } - pub fn get_end_year(&self) -> i32 { - self.end_year.unwrap_or(0) - } - // optional sint32 decade = 3; + + pub fn get_decade(&self) -> i32 { + self.decade.unwrap_or(0) + } pub fn clear_decade(&mut self) { self.decade = ::std::option::Option::None; } @@ -311,10 +332,6 @@ impl ActivityPeriod { pub fn set_decade(&mut self, v: i32) { self.decade = ::std::option::Option::Some(v); } - - pub fn get_decade(&self) -> i32 { - self.decade.unwrap_or(0) - } } impl ::protobuf::Message for ActivityPeriod { @@ -462,9 +479,9 @@ impl ::protobuf::Message for ActivityPeriod { impl ::protobuf::Clear for ActivityPeriod { fn clear(&mut self) { - self.clear_start_year(); - self.clear_end_year(); - self.clear_decade(); + self.start_year = ::std::option::Option::None; + self.end_year = ::std::option::Option::None; + self.decade = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -502,8 +519,14 @@ pub struct Artist { is_portrait_album_cover: ::std::option::Option, portrait_group: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Artist { + fn default() -> &'a Artist { + ::default_instance() + } } impl Artist { @@ -513,6 +536,13 @@ impl Artist { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -540,15 +570,15 @@ impl Artist { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -576,15 +606,12 @@ impl Artist { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional sint32 popularity = 3; + + pub fn get_popularity(&self) -> i32 { + self.popularity.unwrap_or(0) + } pub fn clear_popularity(&mut self) { self.popularity = ::std::option::Option::None; } @@ -598,12 +625,12 @@ impl Artist { self.popularity = ::std::option::Option::Some(v); } - pub fn get_popularity(&self) -> i32 { - self.popularity.unwrap_or(0) - } - // repeated .TopTracks top_track = 4; + + pub fn get_top_track(&self) -> &[TopTracks] { + &self.top_track + } pub fn clear_top_track(&mut self) { self.top_track.clear(); } @@ -623,12 +650,12 @@ impl Artist { ::std::mem::replace(&mut self.top_track, ::protobuf::RepeatedField::new()) } - pub fn get_top_track(&self) -> &[TopTracks] { - &self.top_track - } - // repeated .AlbumGroup album_group = 5; + + pub fn get_album_group(&self) -> &[AlbumGroup] { + &self.album_group + } pub fn clear_album_group(&mut self) { self.album_group.clear(); } @@ -648,12 +675,12 @@ impl Artist { ::std::mem::replace(&mut self.album_group, ::protobuf::RepeatedField::new()) } - pub fn get_album_group(&self) -> &[AlbumGroup] { - &self.album_group - } - // repeated .AlbumGroup single_group = 6; + + pub fn get_single_group(&self) -> &[AlbumGroup] { + &self.single_group + } pub fn clear_single_group(&mut self) { self.single_group.clear(); } @@ -673,12 +700,12 @@ impl Artist { ::std::mem::replace(&mut self.single_group, ::protobuf::RepeatedField::new()) } - pub fn get_single_group(&self) -> &[AlbumGroup] { - &self.single_group - } - // repeated .AlbumGroup compilation_group = 7; + + pub fn get_compilation_group(&self) -> &[AlbumGroup] { + &self.compilation_group + } pub fn clear_compilation_group(&mut self) { self.compilation_group.clear(); } @@ -698,12 +725,12 @@ impl Artist { ::std::mem::replace(&mut self.compilation_group, ::protobuf::RepeatedField::new()) } - pub fn get_compilation_group(&self) -> &[AlbumGroup] { - &self.compilation_group - } - // repeated .AlbumGroup appears_on_group = 8; + + pub fn get_appears_on_group(&self) -> &[AlbumGroup] { + &self.appears_on_group + } pub fn clear_appears_on_group(&mut self) { self.appears_on_group.clear(); } @@ -723,12 +750,12 @@ impl Artist { ::std::mem::replace(&mut self.appears_on_group, ::protobuf::RepeatedField::new()) } - pub fn get_appears_on_group(&self) -> &[AlbumGroup] { - &self.appears_on_group - } - // repeated string genre = 9; + + pub fn get_genre(&self) -> &[::std::string::String] { + &self.genre + } pub fn clear_genre(&mut self) { self.genre.clear(); } @@ -748,12 +775,12 @@ impl Artist { ::std::mem::replace(&mut self.genre, ::protobuf::RepeatedField::new()) } - pub fn get_genre(&self) -> &[::std::string::String] { - &self.genre - } - // repeated .ExternalId external_id = 10; + + pub fn get_external_id(&self) -> &[ExternalId] { + &self.external_id + } pub fn clear_external_id(&mut self) { self.external_id.clear(); } @@ -773,12 +800,12 @@ impl Artist { ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new()) } - pub fn get_external_id(&self) -> &[ExternalId] { - &self.external_id - } - // repeated .Image portrait = 11; + + pub fn get_portrait(&self) -> &[Image] { + &self.portrait + } pub fn clear_portrait(&mut self) { self.portrait.clear(); } @@ -798,12 +825,12 @@ impl Artist { ::std::mem::replace(&mut self.portrait, ::protobuf::RepeatedField::new()) } - pub fn get_portrait(&self) -> &[Image] { - &self.portrait - } - // repeated .Biography biography = 12; + + pub fn get_biography(&self) -> &[Biography] { + &self.biography + } pub fn clear_biography(&mut self) { self.biography.clear(); } @@ -823,12 +850,12 @@ impl Artist { ::std::mem::replace(&mut self.biography, ::protobuf::RepeatedField::new()) } - pub fn get_biography(&self) -> &[Biography] { - &self.biography - } - // repeated .ActivityPeriod activity_period = 13; + + pub fn get_activity_period(&self) -> &[ActivityPeriod] { + &self.activity_period + } pub fn clear_activity_period(&mut self) { self.activity_period.clear(); } @@ -848,12 +875,12 @@ impl Artist { ::std::mem::replace(&mut self.activity_period, ::protobuf::RepeatedField::new()) } - pub fn get_activity_period(&self) -> &[ActivityPeriod] { - &self.activity_period - } - // repeated .Restriction restriction = 14; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -873,12 +900,12 @@ impl Artist { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // repeated .Artist related = 15; + + pub fn get_related(&self) -> &[Artist] { + &self.related + } pub fn clear_related(&mut self) { self.related.clear(); } @@ -898,12 +925,12 @@ impl Artist { ::std::mem::replace(&mut self.related, ::protobuf::RepeatedField::new()) } - pub fn get_related(&self) -> &[Artist] { - &self.related - } - // optional bool is_portrait_album_cover = 16; + + pub fn get_is_portrait_album_cover(&self) -> bool { + self.is_portrait_album_cover.unwrap_or(false) + } pub fn clear_is_portrait_album_cover(&mut self) { self.is_portrait_album_cover = ::std::option::Option::None; } @@ -917,12 +944,12 @@ impl Artist { self.is_portrait_album_cover = ::std::option::Option::Some(v); } - pub fn get_is_portrait_album_cover(&self) -> bool { - self.is_portrait_album_cover.unwrap_or(false) - } - // optional .ImageGroup portrait_group = 17; + + pub fn get_portrait_group(&self) -> &ImageGroup { + self.portrait_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + } pub fn clear_portrait_group(&mut self) { self.portrait_group.clear(); } @@ -949,10 +976,6 @@ impl Artist { pub fn take_portrait_group(&mut self) -> ImageGroup { self.portrait_group.take().unwrap_or_else(|| ImageGroup::new()) } - - pub fn get_portrait_group(&self) -> &ImageGroup { - self.portrait_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) - } } impl ::protobuf::Message for Artist { @@ -1388,23 +1411,23 @@ impl ::protobuf::Message for Artist { impl ::protobuf::Clear for Artist { fn clear(&mut self) { - self.clear_gid(); - self.clear_name(); - self.clear_popularity(); - self.clear_top_track(); - self.clear_album_group(); - self.clear_single_group(); - self.clear_compilation_group(); - self.clear_appears_on_group(); - self.clear_genre(); - self.clear_external_id(); - self.clear_portrait(); - self.clear_biography(); - self.clear_activity_period(); - self.clear_restriction(); - self.clear_related(); - self.clear_is_portrait_album_cover(); - self.clear_portrait_group(); + self.gid.clear(); + self.name.clear(); + self.popularity = ::std::option::Option::None; + self.top_track.clear(); + self.album_group.clear(); + self.single_group.clear(); + self.compilation_group.clear(); + self.appears_on_group.clear(); + self.genre.clear(); + self.external_id.clear(); + self.portrait.clear(); + self.biography.clear(); + self.activity_period.clear(); + self.restriction.clear(); + self.related.clear(); + self.is_portrait_album_cover = ::std::option::Option::None; + self.portrait_group.clear(); self.unknown_fields.clear(); } } @@ -1426,8 +1449,14 @@ pub struct AlbumGroup { // message fields album: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AlbumGroup { + fn default() -> &'a AlbumGroup { + ::default_instance() + } } impl AlbumGroup { @@ -1437,6 +1466,10 @@ impl AlbumGroup { // repeated .Album album = 1; + + pub fn get_album(&self) -> &[Album] { + &self.album + } pub fn clear_album(&mut self) { self.album.clear(); } @@ -1455,10 +1488,6 @@ impl AlbumGroup { pub fn take_album(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.album, ::protobuf::RepeatedField::new()) } - - pub fn get_album(&self) -> &[Album] { - &self.album - } } impl ::protobuf::Message for AlbumGroup { @@ -1574,7 +1603,7 @@ impl ::protobuf::Message for AlbumGroup { impl ::protobuf::Clear for AlbumGroup { fn clear(&mut self) { - self.clear_album(); + self.album.clear(); self.unknown_fields.clear(); } } @@ -1598,8 +1627,14 @@ pub struct Date { month: ::std::option::Option, day: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Date { + fn default() -> &'a Date { + ::default_instance() + } } impl Date { @@ -1609,6 +1644,10 @@ impl Date { // optional sint32 year = 1; + + pub fn get_year(&self) -> i32 { + self.year.unwrap_or(0) + } pub fn clear_year(&mut self) { self.year = ::std::option::Option::None; } @@ -1622,12 +1661,12 @@ impl Date { self.year = ::std::option::Option::Some(v); } - pub fn get_year(&self) -> i32 { - self.year.unwrap_or(0) - } - // optional sint32 month = 2; + + pub fn get_month(&self) -> i32 { + self.month.unwrap_or(0) + } pub fn clear_month(&mut self) { self.month = ::std::option::Option::None; } @@ -1641,12 +1680,12 @@ impl Date { self.month = ::std::option::Option::Some(v); } - pub fn get_month(&self) -> i32 { - self.month.unwrap_or(0) - } - // optional sint32 day = 3; + + pub fn get_day(&self) -> i32 { + self.day.unwrap_or(0) + } pub fn clear_day(&mut self) { self.day = ::std::option::Option::None; } @@ -1659,10 +1698,6 @@ impl Date { pub fn set_day(&mut self, v: i32) { self.day = ::std::option::Option::Some(v); } - - pub fn get_day(&self) -> i32 { - self.day.unwrap_or(0) - } } impl ::protobuf::Message for Date { @@ -1810,9 +1845,9 @@ impl ::protobuf::Message for Date { impl ::protobuf::Clear for Date { fn clear(&mut self) { - self.clear_year(); - self.clear_month(); - self.clear_day(); + self.year = ::std::option::Option::None; + self.month = ::std::option::Option::None; + self.day = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -1850,8 +1885,14 @@ pub struct Album { sale_period: ::protobuf::RepeatedField, cover_group: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Album { + fn default() -> &'a Album { + ::default_instance() + } } impl Album { @@ -1861,6 +1902,13 @@ impl Album { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -1888,15 +1936,15 @@ impl Album { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -1924,15 +1972,12 @@ impl Album { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Artist artist = 3; + + pub fn get_artist(&self) -> &[Artist] { + &self.artist + } pub fn clear_artist(&mut self) { self.artist.clear(); } @@ -1952,12 +1997,12 @@ impl Album { ::std::mem::replace(&mut self.artist, ::protobuf::RepeatedField::new()) } - pub fn get_artist(&self) -> &[Artist] { - &self.artist - } - // optional .Album.Type typ = 4; + + pub fn get_typ(&self) -> Album_Type { + self.typ.unwrap_or(Album_Type::ALBUM) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -1971,12 +2016,15 @@ impl Album { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> Album_Type { - self.typ.unwrap_or(Album_Type::ALBUM) - } - // optional string label = 5; + + pub fn get_label(&self) -> &str { + match self.label.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_label(&mut self) { self.label.clear(); } @@ -2004,15 +2052,12 @@ impl Album { self.label.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_label(&self) -> &str { - match self.label.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Date date = 6; + + pub fn get_date(&self) -> &Date { + self.date.as_ref().unwrap_or_else(|| Date::default_instance()) + } pub fn clear_date(&mut self) { self.date.clear(); } @@ -2040,12 +2085,12 @@ impl Album { self.date.take().unwrap_or_else(|| Date::new()) } - pub fn get_date(&self) -> &Date { - self.date.as_ref().unwrap_or_else(|| Date::default_instance()) - } - // optional sint32 popularity = 7; + + pub fn get_popularity(&self) -> i32 { + self.popularity.unwrap_or(0) + } pub fn clear_popularity(&mut self) { self.popularity = ::std::option::Option::None; } @@ -2059,12 +2104,12 @@ impl Album { self.popularity = ::std::option::Option::Some(v); } - pub fn get_popularity(&self) -> i32 { - self.popularity.unwrap_or(0) - } - // repeated string genre = 8; + + pub fn get_genre(&self) -> &[::std::string::String] { + &self.genre + } pub fn clear_genre(&mut self) { self.genre.clear(); } @@ -2084,12 +2129,12 @@ impl Album { ::std::mem::replace(&mut self.genre, ::protobuf::RepeatedField::new()) } - pub fn get_genre(&self) -> &[::std::string::String] { - &self.genre - } - // repeated .Image cover = 9; + + pub fn get_cover(&self) -> &[Image] { + &self.cover + } pub fn clear_cover(&mut self) { self.cover.clear(); } @@ -2109,12 +2154,12 @@ impl Album { ::std::mem::replace(&mut self.cover, ::protobuf::RepeatedField::new()) } - pub fn get_cover(&self) -> &[Image] { - &self.cover - } - // repeated .ExternalId external_id = 10; + + pub fn get_external_id(&self) -> &[ExternalId] { + &self.external_id + } pub fn clear_external_id(&mut self) { self.external_id.clear(); } @@ -2134,12 +2179,12 @@ impl Album { ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new()) } - pub fn get_external_id(&self) -> &[ExternalId] { - &self.external_id - } - // repeated .Disc disc = 11; + + pub fn get_disc(&self) -> &[Disc] { + &self.disc + } pub fn clear_disc(&mut self) { self.disc.clear(); } @@ -2159,12 +2204,12 @@ impl Album { ::std::mem::replace(&mut self.disc, ::protobuf::RepeatedField::new()) } - pub fn get_disc(&self) -> &[Disc] { - &self.disc - } - // repeated string review = 12; + + pub fn get_review(&self) -> &[::std::string::String] { + &self.review + } pub fn clear_review(&mut self) { self.review.clear(); } @@ -2184,12 +2229,12 @@ impl Album { ::std::mem::replace(&mut self.review, ::protobuf::RepeatedField::new()) } - pub fn get_review(&self) -> &[::std::string::String] { - &self.review - } - // repeated .Copyright copyright = 13; + + pub fn get_copyright(&self) -> &[Copyright] { + &self.copyright + } pub fn clear_copyright(&mut self) { self.copyright.clear(); } @@ -2209,12 +2254,12 @@ impl Album { ::std::mem::replace(&mut self.copyright, ::protobuf::RepeatedField::new()) } - pub fn get_copyright(&self) -> &[Copyright] { - &self.copyright - } - // repeated .Restriction restriction = 14; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -2234,12 +2279,12 @@ impl Album { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // repeated .Album related = 15; + + pub fn get_related(&self) -> &[Album] { + &self.related + } pub fn clear_related(&mut self) { self.related.clear(); } @@ -2259,12 +2304,12 @@ impl Album { ::std::mem::replace(&mut self.related, ::protobuf::RepeatedField::new()) } - pub fn get_related(&self) -> &[Album] { - &self.related - } - // repeated .SalePeriod sale_period = 16; + + pub fn get_sale_period(&self) -> &[SalePeriod] { + &self.sale_period + } pub fn clear_sale_period(&mut self) { self.sale_period.clear(); } @@ -2284,12 +2329,12 @@ impl Album { ::std::mem::replace(&mut self.sale_period, ::protobuf::RepeatedField::new()) } - pub fn get_sale_period(&self) -> &[SalePeriod] { - &self.sale_period - } - // optional .ImageGroup cover_group = 17; + + pub fn get_cover_group(&self) -> &ImageGroup { + self.cover_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) + } pub fn clear_cover_group(&mut self) { self.cover_group.clear(); } @@ -2316,10 +2361,6 @@ impl Album { pub fn take_cover_group(&mut self) -> ImageGroup { self.cover_group.take().unwrap_or_else(|| ImageGroup::new()) } - - pub fn get_cover_group(&self) -> &ImageGroup { - self.cover_group.as_ref().unwrap_or_else(|| ImageGroup::default_instance()) - } } impl ::protobuf::Message for Album { @@ -2735,23 +2776,23 @@ impl ::protobuf::Message for Album { impl ::protobuf::Clear for Album { fn clear(&mut self) { - self.clear_gid(); - self.clear_name(); - self.clear_artist(); - self.clear_typ(); - self.clear_label(); - self.clear_date(); - self.clear_popularity(); - self.clear_genre(); - self.clear_cover(); - self.clear_external_id(); - self.clear_disc(); - self.clear_review(); - self.clear_copyright(); - self.clear_restriction(); - self.clear_related(); - self.clear_sale_period(); - self.clear_cover_group(); + self.gid.clear(); + self.name.clear(); + self.artist.clear(); + self.typ = ::std::option::Option::None; + self.label.clear(); + self.date.clear(); + self.popularity = ::std::option::Option::None; + self.genre.clear(); + self.cover.clear(); + self.external_id.clear(); + self.disc.clear(); + self.review.clear(); + self.copyright.clear(); + self.restriction.clear(); + self.related.clear(); + self.sale_period.clear(); + self.cover_group.clear(); self.unknown_fields.clear(); } } @@ -2817,6 +2858,13 @@ impl ::protobuf::ProtobufEnum for Album_Type { impl ::std::marker::Copy for Album_Type { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for Album_Type { + fn default() -> Self { + Album_Type::ALBUM + } +} + impl ::protobuf::reflect::ProtobufValue for Album_Type { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -2842,8 +2890,14 @@ pub struct Track { sale_period: ::protobuf::RepeatedField, preview: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Track { + fn default() -> &'a Track { + ::default_instance() + } } impl Track { @@ -2853,6 +2907,13 @@ impl Track { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -2880,15 +2941,15 @@ impl Track { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -2916,15 +2977,12 @@ impl Track { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Album album = 3; + + pub fn get_album(&self) -> &Album { + self.album.as_ref().unwrap_or_else(|| Album::default_instance()) + } pub fn clear_album(&mut self) { self.album.clear(); } @@ -2952,12 +3010,12 @@ impl Track { self.album.take().unwrap_or_else(|| Album::new()) } - pub fn get_album(&self) -> &Album { - self.album.as_ref().unwrap_or_else(|| Album::default_instance()) - } - // repeated .Artist artist = 4; + + pub fn get_artist(&self) -> &[Artist] { + &self.artist + } pub fn clear_artist(&mut self) { self.artist.clear(); } @@ -2977,12 +3035,12 @@ impl Track { ::std::mem::replace(&mut self.artist, ::protobuf::RepeatedField::new()) } - pub fn get_artist(&self) -> &[Artist] { - &self.artist - } - // optional sint32 number = 5; + + pub fn get_number(&self) -> i32 { + self.number.unwrap_or(0) + } pub fn clear_number(&mut self) { self.number = ::std::option::Option::None; } @@ -2996,12 +3054,12 @@ impl Track { self.number = ::std::option::Option::Some(v); } - pub fn get_number(&self) -> i32 { - self.number.unwrap_or(0) - } - // optional sint32 disc_number = 6; + + pub fn get_disc_number(&self) -> i32 { + self.disc_number.unwrap_or(0) + } pub fn clear_disc_number(&mut self) { self.disc_number = ::std::option::Option::None; } @@ -3015,12 +3073,12 @@ impl Track { self.disc_number = ::std::option::Option::Some(v); } - pub fn get_disc_number(&self) -> i32 { - self.disc_number.unwrap_or(0) - } - // optional sint32 duration = 7; + + pub fn get_duration(&self) -> i32 { + self.duration.unwrap_or(0) + } pub fn clear_duration(&mut self) { self.duration = ::std::option::Option::None; } @@ -3034,12 +3092,12 @@ impl Track { self.duration = ::std::option::Option::Some(v); } - pub fn get_duration(&self) -> i32 { - self.duration.unwrap_or(0) - } - // optional sint32 popularity = 8; + + pub fn get_popularity(&self) -> i32 { + self.popularity.unwrap_or(0) + } pub fn clear_popularity(&mut self) { self.popularity = ::std::option::Option::None; } @@ -3053,12 +3111,12 @@ impl Track { self.popularity = ::std::option::Option::Some(v); } - pub fn get_popularity(&self) -> i32 { - self.popularity.unwrap_or(0) - } - // optional bool explicit = 9; + + pub fn get_explicit(&self) -> bool { + self.explicit.unwrap_or(false) + } pub fn clear_explicit(&mut self) { self.explicit = ::std::option::Option::None; } @@ -3072,12 +3130,12 @@ impl Track { self.explicit = ::std::option::Option::Some(v); } - pub fn get_explicit(&self) -> bool { - self.explicit.unwrap_or(false) - } - // repeated .ExternalId external_id = 10; + + pub fn get_external_id(&self) -> &[ExternalId] { + &self.external_id + } pub fn clear_external_id(&mut self) { self.external_id.clear(); } @@ -3097,12 +3155,12 @@ impl Track { ::std::mem::replace(&mut self.external_id, ::protobuf::RepeatedField::new()) } - pub fn get_external_id(&self) -> &[ExternalId] { - &self.external_id - } - // repeated .Restriction restriction = 11; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -3122,12 +3180,12 @@ impl Track { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // repeated .AudioFile file = 12; + + pub fn get_file(&self) -> &[AudioFile] { + &self.file + } pub fn clear_file(&mut self) { self.file.clear(); } @@ -3147,12 +3205,12 @@ impl Track { ::std::mem::replace(&mut self.file, ::protobuf::RepeatedField::new()) } - pub fn get_file(&self) -> &[AudioFile] { - &self.file - } - // repeated .Track alternative = 13; + + pub fn get_alternative(&self) -> &[Track] { + &self.alternative + } pub fn clear_alternative(&mut self) { self.alternative.clear(); } @@ -3172,12 +3230,12 @@ impl Track { ::std::mem::replace(&mut self.alternative, ::protobuf::RepeatedField::new()) } - pub fn get_alternative(&self) -> &[Track] { - &self.alternative - } - // repeated .SalePeriod sale_period = 14; + + pub fn get_sale_period(&self) -> &[SalePeriod] { + &self.sale_period + } pub fn clear_sale_period(&mut self) { self.sale_period.clear(); } @@ -3197,12 +3255,12 @@ impl Track { ::std::mem::replace(&mut self.sale_period, ::protobuf::RepeatedField::new()) } - pub fn get_sale_period(&self) -> &[SalePeriod] { - &self.sale_period - } - // repeated .AudioFile preview = 15; + + pub fn get_preview(&self) -> &[AudioFile] { + &self.preview + } pub fn clear_preview(&mut self) { self.preview.clear(); } @@ -3221,10 +3279,6 @@ impl Track { pub fn take_preview(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.preview, ::protobuf::RepeatedField::new()) } - - pub fn get_preview(&self) -> &[AudioFile] { - &self.preview - } } impl ::protobuf::Message for Track { @@ -3612,21 +3666,21 @@ impl ::protobuf::Message for Track { impl ::protobuf::Clear for Track { fn clear(&mut self) { - self.clear_gid(); - self.clear_name(); - self.clear_album(); - self.clear_artist(); - self.clear_number(); - self.clear_disc_number(); - self.clear_duration(); - self.clear_popularity(); - self.clear_explicit(); - self.clear_external_id(); - self.clear_restriction(); - self.clear_file(); - self.clear_alternative(); - self.clear_sale_period(); - self.clear_preview(); + self.gid.clear(); + self.name.clear(); + self.album.clear(); + self.artist.clear(); + self.number = ::std::option::Option::None; + self.disc_number = ::std::option::Option::None; + self.duration = ::std::option::Option::None; + self.popularity = ::std::option::Option::None; + self.explicit = ::std::option::Option::None; + self.external_id.clear(); + self.restriction.clear(); + self.file.clear(); + self.alternative.clear(); + self.sale_period.clear(); + self.preview.clear(); self.unknown_fields.clear(); } } @@ -3651,8 +3705,14 @@ pub struct Image { width: ::std::option::Option, height: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Image { + fn default() -> &'a Image { + ::default_instance() + } } impl Image { @@ -3662,6 +3722,13 @@ impl Image { // optional bytes file_id = 1; + + pub fn get_file_id(&self) -> &[u8] { + match self.file_id.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_file_id(&mut self) { self.file_id.clear(); } @@ -3689,15 +3756,12 @@ impl Image { self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_file_id(&self) -> &[u8] { - match self.file_id.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .Image.Size size = 2; + + pub fn get_size(&self) -> Image_Size { + self.size.unwrap_or(Image_Size::DEFAULT) + } pub fn clear_size(&mut self) { self.size = ::std::option::Option::None; } @@ -3711,12 +3775,12 @@ impl Image { self.size = ::std::option::Option::Some(v); } - pub fn get_size(&self) -> Image_Size { - self.size.unwrap_or(Image_Size::DEFAULT) - } - // optional sint32 width = 3; + + pub fn get_width(&self) -> i32 { + self.width.unwrap_or(0) + } pub fn clear_width(&mut self) { self.width = ::std::option::Option::None; } @@ -3730,12 +3794,12 @@ impl Image { self.width = ::std::option::Option::Some(v); } - pub fn get_width(&self) -> i32 { - self.width.unwrap_or(0) - } - // optional sint32 height = 4; + + pub fn get_height(&self) -> i32 { + self.height.unwrap_or(0) + } pub fn clear_height(&mut self) { self.height = ::std::option::Option::None; } @@ -3748,10 +3812,6 @@ impl Image { pub fn set_height(&mut self, v: i32) { self.height = ::std::option::Option::Some(v); } - - pub fn get_height(&self) -> i32 { - self.height.unwrap_or(0) - } } impl ::protobuf::Message for Image { @@ -3909,10 +3969,10 @@ impl ::protobuf::Message for Image { impl ::protobuf::Clear for Image { fn clear(&mut self) { - self.clear_file_id(); - self.clear_size(); - self.clear_width(); - self.clear_height(); + self.file_id.clear(); + self.size = ::std::option::Option::None; + self.width = ::std::option::Option::None; + self.height = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -3978,6 +4038,12 @@ impl ::protobuf::ProtobufEnum for Image_Size { impl ::std::marker::Copy for Image_Size { } +impl ::std::default::Default for Image_Size { + fn default() -> Self { + Image_Size::DEFAULT + } +} + impl ::protobuf::reflect::ProtobufValue for Image_Size { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -3989,8 +4055,14 @@ pub struct ImageGroup { // message fields image: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ImageGroup { + fn default() -> &'a ImageGroup { + ::default_instance() + } } impl ImageGroup { @@ -4000,6 +4072,10 @@ impl ImageGroup { // repeated .Image image = 1; + + pub fn get_image(&self) -> &[Image] { + &self.image + } pub fn clear_image(&mut self) { self.image.clear(); } @@ -4018,10 +4094,6 @@ impl ImageGroup { pub fn take_image(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.image, ::protobuf::RepeatedField::new()) } - - pub fn get_image(&self) -> &[Image] { - &self.image - } } impl ::protobuf::Message for ImageGroup { @@ -4137,7 +4209,7 @@ impl ::protobuf::Message for ImageGroup { impl ::protobuf::Clear for ImageGroup { fn clear(&mut self) { - self.clear_image(); + self.image.clear(); self.unknown_fields.clear(); } } @@ -4161,8 +4233,14 @@ pub struct Biography { portrait: ::protobuf::RepeatedField, portrait_group: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Biography { + fn default() -> &'a Biography { + ::default_instance() + } } impl Biography { @@ -4172,6 +4250,13 @@ impl Biography { // optional string text = 1; + + pub fn get_text(&self) -> &str { + match self.text.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_text(&mut self) { self.text.clear(); } @@ -4199,15 +4284,12 @@ impl Biography { self.text.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_text(&self) -> &str { - match self.text.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Image portrait = 2; + + pub fn get_portrait(&self) -> &[Image] { + &self.portrait + } pub fn clear_portrait(&mut self) { self.portrait.clear(); } @@ -4227,12 +4309,12 @@ impl Biography { ::std::mem::replace(&mut self.portrait, ::protobuf::RepeatedField::new()) } - pub fn get_portrait(&self) -> &[Image] { - &self.portrait - } - // repeated .ImageGroup portrait_group = 3; + + pub fn get_portrait_group(&self) -> &[ImageGroup] { + &self.portrait_group + } pub fn clear_portrait_group(&mut self) { self.portrait_group.clear(); } @@ -4251,10 +4333,6 @@ impl Biography { pub fn take_portrait_group(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.portrait_group, ::protobuf::RepeatedField::new()) } - - pub fn get_portrait_group(&self) -> &[ImageGroup] { - &self.portrait_group - } } impl ::protobuf::Message for Biography { @@ -4406,9 +4484,9 @@ impl ::protobuf::Message for Biography { impl ::protobuf::Clear for Biography { fn clear(&mut self) { - self.clear_text(); - self.clear_portrait(); - self.clear_portrait_group(); + self.text.clear(); + self.portrait.clear(); + self.portrait_group.clear(); self.unknown_fields.clear(); } } @@ -4432,8 +4510,14 @@ pub struct Disc { name: ::protobuf::SingularField<::std::string::String>, track: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Disc { + fn default() -> &'a Disc { + ::default_instance() + } } impl Disc { @@ -4443,6 +4527,10 @@ impl Disc { // optional sint32 number = 1; + + pub fn get_number(&self) -> i32 { + self.number.unwrap_or(0) + } pub fn clear_number(&mut self) { self.number = ::std::option::Option::None; } @@ -4456,12 +4544,15 @@ impl Disc { self.number = ::std::option::Option::Some(v); } - pub fn get_number(&self) -> i32 { - self.number.unwrap_or(0) - } - // optional string name = 2; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -4489,15 +4580,12 @@ impl Disc { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Track track = 3; + + pub fn get_track(&self) -> &[Track] { + &self.track + } pub fn clear_track(&mut self) { self.track.clear(); } @@ -4516,10 +4604,6 @@ impl Disc { pub fn take_track(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new()) } - - pub fn get_track(&self) -> &[Track] { - &self.track - } } impl ::protobuf::Message for Disc { @@ -4667,9 +4751,9 @@ impl ::protobuf::Message for Disc { impl ::protobuf::Clear for Disc { fn clear(&mut self) { - self.clear_number(); - self.clear_name(); - self.clear_track(); + self.number = ::std::option::Option::None; + self.name.clear(); + self.track.clear(); self.unknown_fields.clear(); } } @@ -4692,8 +4776,14 @@ pub struct Copyright { typ: ::std::option::Option, text: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Copyright { + fn default() -> &'a Copyright { + ::default_instance() + } } impl Copyright { @@ -4703,6 +4793,10 @@ impl Copyright { // optional .Copyright.Type typ = 1; + + pub fn get_typ(&self) -> Copyright_Type { + self.typ.unwrap_or(Copyright_Type::P) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -4716,12 +4810,15 @@ impl Copyright { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> Copyright_Type { - self.typ.unwrap_or(Copyright_Type::P) - } - // optional string text = 2; + + pub fn get_text(&self) -> &str { + match self.text.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_text(&mut self) { self.text.clear(); } @@ -4748,13 +4845,6 @@ impl Copyright { pub fn take_text(&mut self) -> ::std::string::String { self.text.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_text(&self) -> &str { - match self.text.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for Copyright { @@ -4876,8 +4966,8 @@ impl ::protobuf::Message for Copyright { impl ::protobuf::Clear for Copyright { fn clear(&mut self) { - self.clear_typ(); - self.clear_text(); + self.typ = ::std::option::Option::None; + self.text.clear(); self.unknown_fields.clear(); } } @@ -4937,6 +5027,12 @@ impl ::protobuf::ProtobufEnum for Copyright_Type { impl ::std::marker::Copy for Copyright_Type { } +impl ::std::default::Default for Copyright_Type { + fn default() -> Self { + Copyright_Type::P + } +} + impl ::protobuf::reflect::ProtobufValue for Copyright_Type { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4951,8 +5047,14 @@ pub struct Restriction { typ: ::std::option::Option, catalogue_str: ::protobuf::RepeatedField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Restriction { + fn default() -> &'a Restriction { + ::default_instance() + } } impl Restriction { @@ -4962,6 +5064,13 @@ impl Restriction { // optional string countries_allowed = 2; + + pub fn get_countries_allowed(&self) -> &str { + match self.countries_allowed.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_countries_allowed(&mut self) { self.countries_allowed.clear(); } @@ -4989,15 +5098,15 @@ impl Restriction { self.countries_allowed.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_countries_allowed(&self) -> &str { - match self.countries_allowed.as_ref() { + // optional string countries_forbidden = 3; + + + pub fn get_countries_forbidden(&self) -> &str { + match self.countries_forbidden.as_ref() { Some(v) => &v, None => "", } } - - // optional string countries_forbidden = 3; - pub fn clear_countries_forbidden(&mut self) { self.countries_forbidden.clear(); } @@ -5025,15 +5134,12 @@ impl Restriction { self.countries_forbidden.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_countries_forbidden(&self) -> &str { - match self.countries_forbidden.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Restriction.Type typ = 4; + + pub fn get_typ(&self) -> Restriction_Type { + self.typ.unwrap_or(Restriction_Type::STREAMING) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -5047,12 +5153,12 @@ impl Restriction { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> Restriction_Type { - self.typ.unwrap_or(Restriction_Type::STREAMING) - } - // repeated string catalogue_str = 5; + + pub fn get_catalogue_str(&self) -> &[::std::string::String] { + &self.catalogue_str + } pub fn clear_catalogue_str(&mut self) { self.catalogue_str.clear(); } @@ -5071,10 +5177,6 @@ impl Restriction { pub fn take_catalogue_str(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { ::std::mem::replace(&mut self.catalogue_str, ::protobuf::RepeatedField::new()) } - - pub fn get_catalogue_str(&self) -> &[::std::string::String] { - &self.catalogue_str - } } impl ::protobuf::Message for Restriction { @@ -5224,10 +5326,10 @@ impl ::protobuf::Message for Restriction { impl ::protobuf::Clear for Restriction { fn clear(&mut self) { - self.clear_countries_allowed(); - self.clear_countries_forbidden(); - self.clear_typ(); - self.clear_catalogue_str(); + self.countries_allowed.clear(); + self.countries_forbidden.clear(); + self.typ = ::std::option::Option::None; + self.catalogue_str.clear(); self.unknown_fields.clear(); } } @@ -5284,6 +5386,12 @@ impl ::protobuf::ProtobufEnum for Restriction_Type { impl ::std::marker::Copy for Restriction_Type { } +impl ::std::default::Default for Restriction_Type { + fn default() -> Self { + Restriction_Type::STREAMING + } +} + impl ::protobuf::reflect::ProtobufValue for Restriction_Type { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -5297,8 +5405,14 @@ pub struct SalePeriod { start: ::protobuf::SingularPtrField, end: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SalePeriod { + fn default() -> &'a SalePeriod { + ::default_instance() + } } impl SalePeriod { @@ -5308,6 +5422,10 @@ impl SalePeriod { // repeated .Restriction restriction = 1; + + pub fn get_restriction(&self) -> &[Restriction] { + &self.restriction + } pub fn clear_restriction(&mut self) { self.restriction.clear(); } @@ -5327,12 +5445,12 @@ impl SalePeriod { ::std::mem::replace(&mut self.restriction, ::protobuf::RepeatedField::new()) } - pub fn get_restriction(&self) -> &[Restriction] { - &self.restriction - } - // optional .Date start = 2; + + pub fn get_start(&self) -> &Date { + self.start.as_ref().unwrap_or_else(|| Date::default_instance()) + } pub fn clear_start(&mut self) { self.start.clear(); } @@ -5360,12 +5478,12 @@ impl SalePeriod { self.start.take().unwrap_or_else(|| Date::new()) } - pub fn get_start(&self) -> &Date { - self.start.as_ref().unwrap_or_else(|| Date::default_instance()) - } - // optional .Date end = 3; + + pub fn get_end(&self) -> &Date { + self.end.as_ref().unwrap_or_else(|| Date::default_instance()) + } pub fn clear_end(&mut self) { self.end.clear(); } @@ -5392,10 +5510,6 @@ impl SalePeriod { pub fn take_end(&mut self) -> Date { self.end.take().unwrap_or_else(|| Date::new()) } - - pub fn get_end(&self) -> &Date { - self.end.as_ref().unwrap_or_else(|| Date::default_instance()) - } } impl ::protobuf::Message for SalePeriod { @@ -5555,9 +5669,9 @@ impl ::protobuf::Message for SalePeriod { impl ::protobuf::Clear for SalePeriod { fn clear(&mut self) { - self.clear_restriction(); - self.clear_start(); - self.clear_end(); + self.restriction.clear(); + self.start.clear(); + self.end.clear(); self.unknown_fields.clear(); } } @@ -5580,8 +5694,14 @@ pub struct ExternalId { typ: ::protobuf::SingularField<::std::string::String>, id: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ExternalId { + fn default() -> &'a ExternalId { + ::default_instance() + } } impl ExternalId { @@ -5591,6 +5711,13 @@ impl ExternalId { // optional string typ = 1; + + pub fn get_typ(&self) -> &str { + match self.typ.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_typ(&mut self) { self.typ.clear(); } @@ -5618,15 +5745,15 @@ impl ExternalId { self.typ.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_typ(&self) -> &str { - match self.typ.as_ref() { + // optional string id = 2; + + + pub fn get_id(&self) -> &str { + match self.id.as_ref() { Some(v) => &v, None => "", } } - - // optional string id = 2; - pub fn clear_id(&mut self) { self.id.clear(); } @@ -5653,13 +5780,6 @@ impl ExternalId { pub fn take_id(&mut self) -> ::std::string::String { self.id.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_id(&self) -> &str { - match self.id.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for ExternalId { @@ -5781,8 +5901,8 @@ impl ::protobuf::Message for ExternalId { impl ::protobuf::Clear for ExternalId { fn clear(&mut self) { - self.clear_typ(); - self.clear_id(); + self.typ.clear(); + self.id.clear(); self.unknown_fields.clear(); } } @@ -5805,8 +5925,14 @@ pub struct AudioFile { file_id: ::protobuf::SingularField<::std::vec::Vec>, format: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AudioFile { + fn default() -> &'a AudioFile { + ::default_instance() + } } impl AudioFile { @@ -5816,6 +5942,13 @@ impl AudioFile { // optional bytes file_id = 1; + + pub fn get_file_id(&self) -> &[u8] { + match self.file_id.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_file_id(&mut self) { self.file_id.clear(); } @@ -5843,15 +5976,12 @@ impl AudioFile { self.file_id.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_file_id(&self) -> &[u8] { - match self.file_id.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional .AudioFile.Format format = 2; + + pub fn get_format(&self) -> AudioFile_Format { + self.format.unwrap_or(AudioFile_Format::OGG_VORBIS_96) + } pub fn clear_format(&mut self) { self.format = ::std::option::Option::None; } @@ -5864,10 +5994,6 @@ impl AudioFile { pub fn set_format(&mut self, v: AudioFile_Format) { self.format = ::std::option::Option::Some(v); } - - pub fn get_format(&self) -> AudioFile_Format { - self.format.unwrap_or(AudioFile_Format::OGG_VORBIS_96) - } } impl ::protobuf::Message for AudioFile { @@ -5989,8 +6115,8 @@ impl ::protobuf::Message for AudioFile { impl ::protobuf::Clear for AudioFile { fn clear(&mut self) { - self.clear_file_id(); - self.clear_format(); + self.file_id.clear(); + self.format = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -6086,6 +6212,12 @@ impl ::protobuf::ProtobufEnum for AudioFile_Format { impl ::std::marker::Copy for AudioFile_Format { } +impl ::std::default::Default for AudioFile_Format { + fn default() -> Self { + AudioFile_Format::OGG_VORBIS_96 + } +} + impl ::protobuf::reflect::ProtobufValue for AudioFile_Format { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -6093,92 +6225,83 @@ impl ::protobuf::reflect::ProtobufValue for AudioFile_Format { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0emetadata.proto\x12\0\";\n\tTopTracks\x12\x13\n\x07country\x18\x01\ - \x20\x01(\tB\x02\x18\0\x12\x19\n\x05track\x18\x02\x20\x03(\x0b2\x06.Trac\ - kB\x02\x18\0\"R\n\x0eActivityPeriod\x12\x16\n\nstart_year\x18\x01\x20\ - \x01(\x11B\x02\x18\0\x12\x14\n\x08end_year\x18\x02\x20\x01(\x11B\x02\x18\ - \0\x12\x12\n\x06decade\x18\x03\x20\x01(\x11B\x02\x18\0\"\xc5\x04\n\x06Ar\ - tist\x12\x0f\n\x03gid\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04name\ - \x18\x02\x20\x01(\tB\x02\x18\0\x12\x16\n\npopularity\x18\x03\x20\x01(\ - \x11B\x02\x18\0\x12!\n\ttop_track\x18\x04\x20\x03(\x0b2\n.TopTracksB\x02\ - \x18\0\x12$\n\x0balbum_group\x18\x05\x20\x03(\x0b2\x0b.AlbumGroupB\x02\ - \x18\0\x12%\n\x0csingle_group\x18\x06\x20\x03(\x0b2\x0b.AlbumGroupB\x02\ - \x18\0\x12*\n\x11compilation_group\x18\x07\x20\x03(\x0b2\x0b.AlbumGroupB\ - \x02\x18\0\x12)\n\x10appears_on_group\x18\x08\x20\x03(\x0b2\x0b.AlbumGro\ - upB\x02\x18\0\x12\x11\n\x05genre\x18\t\x20\x03(\tB\x02\x18\0\x12$\n\x0be\ - xternal_id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\x02\x18\0\x12\x1c\n\x08po\ - rtrait\x18\x0b\x20\x03(\x0b2\x06.ImageB\x02\x18\0\x12!\n\tbiography\x18\ - \x0c\x20\x03(\x0b2\n.BiographyB\x02\x18\0\x12,\n\x0factivity_period\x18\ - \r\x20\x03(\x0b2\x0f.ActivityPeriodB\x02\x18\0\x12%\n\x0brestriction\x18\ - \x0e\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\x1c\n\x07related\x18\ - \x0f\x20\x03(\x0b2\x07.ArtistB\x02\x18\0\x12#\n\x17is_portrait_album_cov\ - er\x18\x10\x20\x01(\x08B\x02\x18\0\x12'\n\x0eportrait_group\x18\x11\x20\ - \x01(\x0b2\x0b.ImageGroupB\x02\x18\0\"'\n\nAlbumGroup\x12\x19\n\x05album\ - \x18\x01\x20\x03(\x0b2\x06.AlbumB\x02\x18\0\"<\n\x04Date\x12\x10\n\x04ye\ - ar\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x11\n\x05month\x18\x02\x20\x01(\ - \x11B\x02\x18\0\x12\x0f\n\x03day\x18\x03\x20\x01(\x11B\x02\x18\0\"\x99\ - \x04\n\x05Album\x12\x0f\n\x03gid\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\ - \n\x04name\x18\x02\x20\x01(\tB\x02\x18\0\x12\x1b\n\x06artist\x18\x03\x20\ - \x03(\x0b2\x07.ArtistB\x02\x18\0\x12\x1c\n\x03typ\x18\x04\x20\x01(\x0e2\ - \x0b.Album.TypeB\x02\x18\0\x12\x11\n\x05label\x18\x05\x20\x01(\tB\x02\ - \x18\0\x12\x17\n\x04date\x18\x06\x20\x01(\x0b2\x05.DateB\x02\x18\0\x12\ - \x16\n\npopularity\x18\x07\x20\x01(\x11B\x02\x18\0\x12\x11\n\x05genre\ - \x18\x08\x20\x03(\tB\x02\x18\0\x12\x19\n\x05cover\x18\t\x20\x03(\x0b2\ - \x06.ImageB\x02\x18\0\x12$\n\x0bexternal_id\x18\n\x20\x03(\x0b2\x0b.Exte\ - rnalIdB\x02\x18\0\x12\x17\n\x04disc\x18\x0b\x20\x03(\x0b2\x05.DiscB\x02\ - \x18\0\x12\x12\n\x06review\x18\x0c\x20\x03(\tB\x02\x18\0\x12!\n\tcopyrig\ - ht\x18\r\x20\x03(\x0b2\n.CopyrightB\x02\x18\0\x12%\n\x0brestriction\x18\ - \x0e\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\x1b\n\x07related\x18\ - \x0f\x20\x03(\x0b2\x06.AlbumB\x02\x18\0\x12$\n\x0bsale_period\x18\x10\ - \x20\x03(\x0b2\x0b.SalePeriodB\x02\x18\0\x12$\n\x0bcover_group\x18\x11\ - \x20\x01(\x0b2\x0b.ImageGroupB\x02\x18\0\":\n\x04Type\x12\t\n\x05ALBUM\ - \x10\x01\x12\n\n\x06SINGLE\x10\x02\x12\x0f\n\x0bCOMPILATION\x10\x03\x12\ - \x06\n\x02EP\x10\x04\x1a\x02\x10\0\"\xa6\x03\n\x05Track\x12\x0f\n\x03gid\ - \x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04name\x18\x02\x20\x01(\tB\ - \x02\x18\0\x12\x19\n\x05album\x18\x03\x20\x01(\x0b2\x06.AlbumB\x02\x18\0\ - \x12\x1b\n\x06artist\x18\x04\x20\x03(\x0b2\x07.ArtistB\x02\x18\0\x12\x12\ - \n\x06number\x18\x05\x20\x01(\x11B\x02\x18\0\x12\x17\n\x0bdisc_number\ - \x18\x06\x20\x01(\x11B\x02\x18\0\x12\x14\n\x08duration\x18\x07\x20\x01(\ - \x11B\x02\x18\0\x12\x16\n\npopularity\x18\x08\x20\x01(\x11B\x02\x18\0\ - \x12\x14\n\x08explicit\x18\t\x20\x01(\x08B\x02\x18\0\x12$\n\x0bexternal_\ - id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\x02\x18\0\x12%\n\x0brestriction\ - \x18\x0b\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\x1c\n\x04file\x18\ - \x0c\x20\x03(\x0b2\n.AudioFileB\x02\x18\0\x12\x1f\n\x0balternative\x18\r\ - \x20\x03(\x0b2\x06.TrackB\x02\x18\0\x12$\n\x0bsale_period\x18\x0e\x20\ - \x03(\x0b2\x0b.SalePeriodB\x02\x18\0\x12\x1f\n\x07preview\x18\x0f\x20\ - \x03(\x0b2\n.AudioFileB\x02\x18\0\"\x9d\x01\n\x05Image\x12\x13\n\x07file\ - _id\x18\x01\x20\x01(\x0cB\x02\x18\0\x12\x1d\n\x04size\x18\x02\x20\x01(\ - \x0e2\x0b.Image.SizeB\x02\x18\0\x12\x11\n\x05width\x18\x03\x20\x01(\x11B\ - \x02\x18\0\x12\x12\n\x06height\x18\x04\x20\x01(\x11B\x02\x18\0\"9\n\x04S\ - ize\x12\x0b\n\x07DEFAULT\x10\0\x12\t\n\x05SMALL\x10\x01\x12\t\n\x05LARGE\ - \x10\x02\x12\n\n\x06XLARGE\x10\x03\x1a\x02\x10\0\"'\n\nImageGroup\x12\ - \x19\n\x05image\x18\x01\x20\x03(\x0b2\x06.ImageB\x02\x18\0\"d\n\tBiograp\ - hy\x12\x10\n\x04text\x18\x01\x20\x01(\tB\x02\x18\0\x12\x1c\n\x08portrait\ - \x18\x02\x20\x03(\x0b2\x06.ImageB\x02\x18\0\x12'\n\x0eportrait_group\x18\ - \x03\x20\x03(\x0b2\x0b.ImageGroupB\x02\x18\0\"G\n\x04Disc\x12\x12\n\x06n\ - umber\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x10\n\x04name\x18\x02\x20\x01(\ - \tB\x02\x18\0\x12\x19\n\x05track\x18\x03\x20\x03(\x0b2\x06.TrackB\x02\ - \x18\0\"Y\n\tCopyright\x12\x20\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Copyri\ - ght.TypeB\x02\x18\0\x12\x10\n\x04text\x18\x02\x20\x01(\tB\x02\x18\0\"\ - \x18\n\x04Type\x12\x05\n\x01P\x10\0\x12\x05\n\x01C\x10\x01\x1a\x02\x10\0\ - \"\xa7\x01\n\x0bRestriction\x12\x1d\n\x11countries_allowed\x18\x02\x20\ - \x01(\tB\x02\x18\0\x12\x1f\n\x13countries_forbidden\x18\x03\x20\x01(\tB\ - \x02\x18\0\x12\"\n\x03typ\x18\x04\x20\x01(\x0e2\x11.Restriction.TypeB\ - \x02\x18\0\x12\x19\n\rcatalogue_str\x18\x05\x20\x03(\tB\x02\x18\0\"\x19\ - \n\x04Type\x12\r\n\tSTREAMING\x10\0\x1a\x02\x10\0\"e\n\nSalePeriod\x12%\ - \n\x0brestriction\x18\x01\x20\x03(\x0b2\x0c.RestrictionB\x02\x18\0\x12\ - \x18\n\x05start\x18\x02\x20\x01(\x0b2\x05.DateB\x02\x18\0\x12\x16\n\x03e\ - nd\x18\x03\x20\x01(\x0b2\x05.DateB\x02\x18\0\"-\n\nExternalId\x12\x0f\n\ - \x03typ\x18\x01\x20\x01(\tB\x02\x18\0\x12\x0e\n\x02id\x18\x02\x20\x01(\t\ - B\x02\x18\0\"\x9f\x02\n\tAudioFile\x12\x13\n\x07file_id\x18\x01\x20\x01(\ - \x0cB\x02\x18\0\x12%\n\x06format\x18\x02\x20\x01(\x0e2\x11.AudioFile.For\ - matB\x02\x18\0\"\xd5\x01\n\x06Format\x12\x11\n\rOGG_VORBIS_96\x10\0\x12\ - \x12\n\x0eOGG_VORBIS_160\x10\x01\x12\x12\n\x0eOGG_VORBIS_320\x10\x02\x12\ - \x0b\n\x07MP3_256\x10\x03\x12\x0b\n\x07MP3_320\x10\x04\x12\x0b\n\x07MP3_\ - 160\x10\x05\x12\n\n\x06MP3_96\x10\x06\x12\x0f\n\x0bMP3_160_ENC\x10\x07\ - \x12\n\n\x06OTHER2\x10\x08\x12\n\n\x06OTHER3\x10\t\x12\x0b\n\x07AAC_160\ - \x10\n\x12\x0b\n\x07AAC_320\x10\x0b\x12\n\n\x06OTHER4\x10\x0c\x12\n\n\ - \x06OTHER5\x10\r\x1a\x02\x10\0B\0b\x06proto2\ + \n\x0emetadata.proto\x12\0\"9\n\tTopTracks\x12\x11\n\x07country\x18\x01\ + \x20\x01(\tB\0\x12\x17\n\x05track\x18\x02\x20\x03(\x0b2\x06.TrackB\0:\0\ + \"N\n\x0eActivityPeriod\x12\x14\n\nstart_year\x18\x01\x20\x01(\x11B\0\ + \x12\x12\n\x08end_year\x18\x02\x20\x01(\x11B\0\x12\x10\n\x06decade\x18\ + \x03\x20\x01(\x11B\0:\0\"\xa5\x04\n\x06Artist\x12\r\n\x03gid\x18\x01\x20\ + \x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x14\n\npopulari\ + ty\x18\x03\x20\x01(\x11B\0\x12\x1f\n\ttop_track\x18\x04\x20\x03(\x0b2\n.\ + TopTracksB\0\x12\"\n\x0balbum_group\x18\x05\x20\x03(\x0b2\x0b.AlbumGroup\ + B\0\x12#\n\x0csingle_group\x18\x06\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12(\ + \n\x11compilation_group\x18\x07\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12'\n\ + \x10appears_on_group\x18\x08\x20\x03(\x0b2\x0b.AlbumGroupB\0\x12\x0f\n\ + \x05genre\x18\t\x20\x03(\tB\0\x12\"\n\x0bexternal_id\x18\n\x20\x03(\x0b2\ + \x0b.ExternalIdB\0\x12\x1a\n\x08portrait\x18\x0b\x20\x03(\x0b2\x06.Image\ + B\0\x12\x1f\n\tbiography\x18\x0c\x20\x03(\x0b2\n.BiographyB\0\x12*\n\x0f\ + activity_period\x18\r\x20\x03(\x0b2\x0f.ActivityPeriodB\0\x12#\n\x0brest\ + riction\x18\x0e\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x1a\n\x07related\ + \x18\x0f\x20\x03(\x0b2\x07.ArtistB\0\x12!\n\x17is_portrait_album_cover\ + \x18\x10\x20\x01(\x08B\0\x12%\n\x0eportrait_group\x18\x11\x20\x01(\x0b2\ + \x0b.ImageGroupB\0:\0\"'\n\nAlbumGroup\x12\x17\n\x05album\x18\x01\x20\ + \x03(\x0b2\x06.AlbumB\0:\0\"8\n\x04Date\x12\x0e\n\x04year\x18\x01\x20\ + \x01(\x11B\0\x12\x0f\n\x05month\x18\x02\x20\x01(\x11B\0\x12\r\n\x03day\ + \x18\x03\x20\x01(\x11B\0:\0\"\xf7\x03\n\x05Album\x12\r\n\x03gid\x18\x01\ + \x20\x01(\x0cB\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x19\n\x06ar\ + tist\x18\x03\x20\x03(\x0b2\x07.ArtistB\0\x12\x1a\n\x03typ\x18\x04\x20\ + \x01(\x0e2\x0b.Album.TypeB\0\x12\x0f\n\x05label\x18\x05\x20\x01(\tB\0\ + \x12\x15\n\x04date\x18\x06\x20\x01(\x0b2\x05.DateB\0\x12\x14\n\npopulari\ + ty\x18\x07\x20\x01(\x11B\0\x12\x0f\n\x05genre\x18\x08\x20\x03(\tB\0\x12\ + \x17\n\x05cover\x18\t\x20\x03(\x0b2\x06.ImageB\0\x12\"\n\x0bexternal_id\ + \x18\n\x20\x03(\x0b2\x0b.ExternalIdB\0\x12\x15\n\x04disc\x18\x0b\x20\x03\ + (\x0b2\x05.DiscB\0\x12\x10\n\x06review\x18\x0c\x20\x03(\tB\0\x12\x1f\n\t\ + copyright\x18\r\x20\x03(\x0b2\n.CopyrightB\0\x12#\n\x0brestriction\x18\ + \x0e\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x19\n\x07related\x18\x0f\x20\ + \x03(\x0b2\x06.AlbumB\0\x12\"\n\x0bsale_period\x18\x10\x20\x03(\x0b2\x0b\ + .SalePeriodB\0\x12\"\n\x0bcover_group\x18\x11\x20\x01(\x0b2\x0b.ImageGro\ + upB\0\"8\n\x04Type\x12\t\n\x05ALBUM\x10\x01\x12\n\n\x06SINGLE\x10\x02\ + \x12\x0f\n\x0bCOMPILATION\x10\x03\x12\x06\n\x02EP\x10\x04\x1a\0:\0\"\x8a\ + \x03\n\x05Track\x12\r\n\x03gid\x18\x01\x20\x01(\x0cB\0\x12\x0e\n\x04name\ + \x18\x02\x20\x01(\tB\0\x12\x17\n\x05album\x18\x03\x20\x01(\x0b2\x06.Albu\ + mB\0\x12\x19\n\x06artist\x18\x04\x20\x03(\x0b2\x07.ArtistB\0\x12\x10\n\ + \x06number\x18\x05\x20\x01(\x11B\0\x12\x15\n\x0bdisc_number\x18\x06\x20\ + \x01(\x11B\0\x12\x12\n\x08duration\x18\x07\x20\x01(\x11B\0\x12\x14\n\npo\ + pularity\x18\x08\x20\x01(\x11B\0\x12\x12\n\x08explicit\x18\t\x20\x01(\ + \x08B\0\x12\"\n\x0bexternal_id\x18\n\x20\x03(\x0b2\x0b.ExternalIdB\0\x12\ + #\n\x0brestriction\x18\x0b\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x1a\n\ + \x04file\x18\x0c\x20\x03(\x0b2\n.AudioFileB\0\x12\x1d\n\x0balternative\ + \x18\r\x20\x03(\x0b2\x06.TrackB\0\x12\"\n\x0bsale_period\x18\x0e\x20\x03\ + (\x0b2\x0b.SalePeriodB\0\x12\x1d\n\x07preview\x18\x0f\x20\x03(\x0b2\n.Au\ + dioFileB\0:\0\"\x95\x01\n\x05Image\x12\x11\n\x07file_id\x18\x01\x20\x01(\ + \x0cB\0\x12\x1b\n\x04size\x18\x02\x20\x01(\x0e2\x0b.Image.SizeB\0\x12\ + \x0f\n\x05width\x18\x03\x20\x01(\x11B\0\x12\x10\n\x06height\x18\x04\x20\ + \x01(\x11B\0\"7\n\x04Size\x12\x0b\n\x07DEFAULT\x10\0\x12\t\n\x05SMALL\ + \x10\x01\x12\t\n\x05LARGE\x10\x02\x12\n\n\x06XLARGE\x10\x03\x1a\0:\0\"'\ + \n\nImageGroup\x12\x17\n\x05image\x18\x01\x20\x03(\x0b2\x06.ImageB\0:\0\ + \"`\n\tBiography\x12\x0e\n\x04text\x18\x01\x20\x01(\tB\0\x12\x1a\n\x08po\ + rtrait\x18\x02\x20\x03(\x0b2\x06.ImageB\0\x12%\n\x0eportrait_group\x18\ + \x03\x20\x03(\x0b2\x0b.ImageGroupB\0:\0\"C\n\x04Disc\x12\x10\n\x06number\ + \x18\x01\x20\x01(\x11B\0\x12\x0e\n\x04name\x18\x02\x20\x01(\tB\0\x12\x17\ + \n\x05track\x18\x03\x20\x03(\x0b2\x06.TrackB\0:\0\"U\n\tCopyright\x12\ + \x1e\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Copyright.TypeB\0\x12\x0e\n\x04t\ + ext\x18\x02\x20\x01(\tB\0\"\x16\n\x04Type\x12\x05\n\x01P\x10\0\x12\x05\n\ + \x01C\x10\x01\x1a\0:\0\"\x9f\x01\n\x0bRestriction\x12\x1b\n\x11countries\ + _allowed\x18\x02\x20\x01(\tB\0\x12\x1d\n\x13countries_forbidden\x18\x03\ + \x20\x01(\tB\0\x12\x20\n\x03typ\x18\x04\x20\x01(\x0e2\x11.Restriction.Ty\ + peB\0\x12\x17\n\rcatalogue_str\x18\x05\x20\x03(\tB\0\"\x17\n\x04Type\x12\ + \r\n\tSTREAMING\x10\0\x1a\0:\0\"a\n\nSalePeriod\x12#\n\x0brestriction\ + \x18\x01\x20\x03(\x0b2\x0c.RestrictionB\0\x12\x16\n\x05start\x18\x02\x20\ + \x01(\x0b2\x05.DateB\0\x12\x14\n\x03end\x18\x03\x20\x01(\x0b2\x05.DateB\ + \0:\0\"+\n\nExternalId\x12\r\n\x03typ\x18\x01\x20\x01(\tB\0\x12\x0c\n\ + \x02id\x18\x02\x20\x01(\tB\0:\0\"\x9b\x02\n\tAudioFile\x12\x11\n\x07file\ + _id\x18\x01\x20\x01(\x0cB\0\x12#\n\x06format\x18\x02\x20\x01(\x0e2\x11.A\ + udioFile.FormatB\0\"\xd3\x01\n\x06Format\x12\x11\n\rOGG_VORBIS_96\x10\0\ + \x12\x12\n\x0eOGG_VORBIS_160\x10\x01\x12\x12\n\x0eOGG_VORBIS_320\x10\x02\ + \x12\x0b\n\x07MP3_256\x10\x03\x12\x0b\n\x07MP3_320\x10\x04\x12\x0b\n\x07\ + MP3_160\x10\x05\x12\n\n\x06MP3_96\x10\x06\x12\x0f\n\x0bMP3_160_ENC\x10\ + \x07\x12\n\n\x06OTHER2\x10\x08\x12\n\n\x06OTHER3\x10\t\x12\x0b\n\x07AAC_\ + 160\x10\n\x12\x0b\n\x07AAC_320\x10\x0b\x12\n\n\x06OTHER4\x10\x0c\x12\n\n\ + \x06OTHER5\x10\r\x1a\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/pubsub.rs b/protocol/src/pubsub.rs index caa4a26d..5159c2e9 100644 --- a/protocol/src/pubsub.rs +++ b/protocol/src/pubsub.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.7.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `pubsub.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_7_0; + #[derive(PartialEq,Clone,Default)] pub struct Subscription { // message fields @@ -28,8 +33,14 @@ pub struct Subscription { expiry: ::std::option::Option, status_code: ::std::option::Option, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Subscription { + fn default() -> &'a Subscription { + ::default_instance() + } } impl Subscription { @@ -39,6 +50,13 @@ impl Subscription { // optional string uri = 1; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -66,15 +84,12 @@ impl Subscription { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional int32 expiry = 2; + + pub fn get_expiry(&self) -> i32 { + self.expiry.unwrap_or(0) + } pub fn clear_expiry(&mut self) { self.expiry = ::std::option::Option::None; } @@ -88,12 +103,12 @@ impl Subscription { self.expiry = ::std::option::Option::Some(v); } - pub fn get_expiry(&self) -> i32 { - self.expiry.unwrap_or(0) - } - // optional int32 status_code = 3; + + pub fn get_status_code(&self) -> i32 { + self.status_code.unwrap_or(0) + } pub fn clear_status_code(&mut self) { self.status_code = ::std::option::Option::None; } @@ -106,10 +121,6 @@ impl Subscription { pub fn set_status_code(&mut self, v: i32) { self.status_code = ::std::option::Option::Some(v); } - - pub fn get_status_code(&self) -> i32 { - self.status_code.unwrap_or(0) - } } impl ::protobuf::Message for Subscription { @@ -253,9 +264,9 @@ impl ::protobuf::Message for Subscription { impl ::protobuf::Clear for Subscription { fn clear(&mut self) { - self.clear_uri(); - self.clear_expiry(); - self.clear_status_code(); + self.uri.clear(); + self.expiry = ::std::option::Option::None; + self.status_code = ::std::option::Option::None; self.unknown_fields.clear(); } } @@ -273,10 +284,9 @@ impl ::protobuf::reflect::ProtobufValue for Subscription { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0cpubsub.proto\x12\0\"L\n\x0cSubscription\x12\x0f\n\x03uri\x18\x01\ - \x20\x01(\tB\x02\x18\0\x12\x12\n\x06expiry\x18\x02\x20\x01(\x05B\x02\x18\ - \0\x12\x17\n\x0bstatus_code\x18\x03\x20\x01(\x05B\x02\x18\0B\0b\x06proto\ - 2\ + \n\x0cpubsub.proto\x12\0\"H\n\x0cSubscription\x12\r\n\x03uri\x18\x01\x20\ + \x01(\tB\0\x12\x10\n\x06expiry\x18\x02\x20\x01(\x05B\0\x12\x15\n\x0bstat\ + us_code\x18\x03\x20\x01(\x05B\0:\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { diff --git a/protocol/src/spirc.rs b/protocol/src/spirc.rs index 0380169b..37cadd0b 100644 --- a/protocol/src/spirc.rs +++ b/protocol/src/spirc.rs @@ -1,9 +1,9 @@ -// This file is generated by rust-protobuf 2.0.5. Do not edit +// This file is generated by rust-protobuf 2.7.0. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] -#![allow(clippy)] +#![allow(clippy::all)] #![cfg_attr(rustfmt, rustfmt_skip)] @@ -17,10 +17,15 @@ #![allow(unsafe_code)] #![allow(unused_imports)] #![allow(unused_results)] +//! Generated file from `spirc.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_7_0; + #[derive(PartialEq,Clone,Default)] pub struct Frame { // message fields @@ -40,8 +45,14 @@ pub struct Frame { new_name: ::protobuf::SingularField<::std::string::String>, metadata: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Frame { + fn default() -> &'a Frame { + ::default_instance() + } } impl Frame { @@ -51,6 +62,10 @@ impl Frame { // optional uint32 version = 1; + + pub fn get_version(&self) -> u32 { + self.version.unwrap_or(0) + } pub fn clear_version(&mut self) { self.version = ::std::option::Option::None; } @@ -64,12 +79,15 @@ impl Frame { self.version = ::std::option::Option::Some(v); } - pub fn get_version(&self) -> u32 { - self.version.unwrap_or(0) - } - // optional string ident = 2; + + pub fn get_ident(&self) -> &str { + match self.ident.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_ident(&mut self) { self.ident.clear(); } @@ -97,15 +115,15 @@ impl Frame { self.ident.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_ident(&self) -> &str { - match self.ident.as_ref() { + // optional string protocol_version = 3; + + + pub fn get_protocol_version(&self) -> &str { + match self.protocol_version.as_ref() { Some(v) => &v, None => "", } } - - // optional string protocol_version = 3; - pub fn clear_protocol_version(&mut self) { self.protocol_version.clear(); } @@ -133,15 +151,12 @@ impl Frame { self.protocol_version.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_protocol_version(&self) -> &str { - match self.protocol_version.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 seq_nr = 4; + + pub fn get_seq_nr(&self) -> u32 { + self.seq_nr.unwrap_or(0) + } pub fn clear_seq_nr(&mut self) { self.seq_nr = ::std::option::Option::None; } @@ -155,12 +170,12 @@ impl Frame { self.seq_nr = ::std::option::Option::Some(v); } - pub fn get_seq_nr(&self) -> u32 { - self.seq_nr.unwrap_or(0) - } - // optional .MessageType typ = 5; + + pub fn get_typ(&self) -> MessageType { + self.typ.unwrap_or(MessageType::kMessageTypeHello) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -174,12 +189,12 @@ impl Frame { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> MessageType { - self.typ.unwrap_or(MessageType::kMessageTypeHello) - } - // optional .DeviceState device_state = 7; + + pub fn get_device_state(&self) -> &DeviceState { + self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance()) + } pub fn clear_device_state(&mut self) { self.device_state.clear(); } @@ -207,12 +222,12 @@ impl Frame { self.device_state.take().unwrap_or_else(|| DeviceState::new()) } - pub fn get_device_state(&self) -> &DeviceState { - self.device_state.as_ref().unwrap_or_else(|| DeviceState::default_instance()) - } - // optional .Goodbye goodbye = 11; + + pub fn get_goodbye(&self) -> &Goodbye { + self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance()) + } pub fn clear_goodbye(&mut self) { self.goodbye.clear(); } @@ -240,12 +255,12 @@ impl Frame { self.goodbye.take().unwrap_or_else(|| Goodbye::new()) } - pub fn get_goodbye(&self) -> &Goodbye { - self.goodbye.as_ref().unwrap_or_else(|| Goodbye::default_instance()) - } - // optional .State state = 12; + + pub fn get_state(&self) -> &State { + self.state.as_ref().unwrap_or_else(|| State::default_instance()) + } pub fn clear_state(&mut self) { self.state.clear(); } @@ -273,12 +288,12 @@ impl Frame { self.state.take().unwrap_or_else(|| State::new()) } - pub fn get_state(&self) -> &State { - self.state.as_ref().unwrap_or_else(|| State::default_instance()) - } - // optional uint32 position = 13; + + pub fn get_position(&self) -> u32 { + self.position.unwrap_or(0) + } pub fn clear_position(&mut self) { self.position = ::std::option::Option::None; } @@ -292,12 +307,12 @@ impl Frame { self.position = ::std::option::Option::Some(v); } - pub fn get_position(&self) -> u32 { - self.position.unwrap_or(0) - } - // optional uint32 volume = 14; + + pub fn get_volume(&self) -> u32 { + self.volume.unwrap_or(0) + } pub fn clear_volume(&mut self) { self.volume = ::std::option::Option::None; } @@ -311,12 +326,12 @@ impl Frame { self.volume = ::std::option::Option::Some(v); } - pub fn get_volume(&self) -> u32 { - self.volume.unwrap_or(0) - } - // optional int64 state_update_id = 17; + + pub fn get_state_update_id(&self) -> i64 { + self.state_update_id.unwrap_or(0) + } pub fn clear_state_update_id(&mut self) { self.state_update_id = ::std::option::Option::None; } @@ -330,12 +345,12 @@ impl Frame { self.state_update_id = ::std::option::Option::Some(v); } - pub fn get_state_update_id(&self) -> i64 { - self.state_update_id.unwrap_or(0) - } - // repeated string recipient = 18; + + pub fn get_recipient(&self) -> &[::std::string::String] { + &self.recipient + } pub fn clear_recipient(&mut self) { self.recipient.clear(); } @@ -355,12 +370,15 @@ impl Frame { ::std::mem::replace(&mut self.recipient, ::protobuf::RepeatedField::new()) } - pub fn get_recipient(&self) -> &[::std::string::String] { - &self.recipient - } - // optional bytes context_player_state = 19; + + pub fn get_context_player_state(&self) -> &[u8] { + match self.context_player_state.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_context_player_state(&mut self) { self.context_player_state.clear(); } @@ -388,15 +406,15 @@ impl Frame { self.context_player_state.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_context_player_state(&self) -> &[u8] { - match self.context_player_state.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string new_name = 20; + + pub fn get_new_name(&self) -> &str { + match self.new_name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_new_name(&mut self) { self.new_name.clear(); } @@ -424,15 +442,12 @@ impl Frame { self.new_name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_new_name(&self) -> &str { - match self.new_name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional .Metadata metadata = 25; + + pub fn get_metadata(&self) -> &Metadata { + self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance()) + } pub fn clear_metadata(&mut self) { self.metadata.clear(); } @@ -459,10 +474,6 @@ impl Frame { pub fn take_metadata(&mut self) -> Metadata { self.metadata.take().unwrap_or_else(|| Metadata::new()) } - - pub fn get_metadata(&self) -> &Metadata { - self.metadata.as_ref().unwrap_or_else(|| Metadata::default_instance()) - } } impl ::protobuf::Message for Frame { @@ -818,21 +829,21 @@ impl ::protobuf::Message for Frame { impl ::protobuf::Clear for Frame { fn clear(&mut self) { - self.clear_version(); - self.clear_ident(); - self.clear_protocol_version(); - self.clear_seq_nr(); - self.clear_typ(); - self.clear_device_state(); - self.clear_goodbye(); - self.clear_state(); - self.clear_position(); - self.clear_volume(); - self.clear_state_update_id(); - self.clear_recipient(); - self.clear_context_player_state(); - self.clear_new_name(); - self.clear_metadata(); + self.version = ::std::option::Option::None; + self.ident.clear(); + self.protocol_version.clear(); + self.seq_nr = ::std::option::Option::None; + self.typ = ::std::option::Option::None; + self.device_state.clear(); + self.goodbye.clear(); + self.state.clear(); + self.position = ::std::option::Option::None; + self.volume = ::std::option::Option::None; + self.state_update_id = ::std::option::Option::None; + self.recipient.clear(); + self.context_player_state.clear(); + self.new_name.clear(); + self.metadata.clear(); self.unknown_fields.clear(); } } @@ -864,8 +875,14 @@ pub struct DeviceState { context_player_error: ::protobuf::SingularField<::std::string::String>, metadata: ::protobuf::RepeatedField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a DeviceState { + fn default() -> &'a DeviceState { + ::default_instance() + } } impl DeviceState { @@ -875,6 +892,13 @@ impl DeviceState { // optional string sw_version = 1; + + pub fn get_sw_version(&self) -> &str { + match self.sw_version.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_sw_version(&mut self) { self.sw_version.clear(); } @@ -902,15 +926,12 @@ impl DeviceState { self.sw_version.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_sw_version(&self) -> &str { - match self.sw_version.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bool is_active = 10; + + pub fn get_is_active(&self) -> bool { + self.is_active.unwrap_or(false) + } pub fn clear_is_active(&mut self) { self.is_active = ::std::option::Option::None; } @@ -924,12 +945,12 @@ impl DeviceState { self.is_active = ::std::option::Option::Some(v); } - pub fn get_is_active(&self) -> bool { - self.is_active.unwrap_or(false) - } - // optional bool can_play = 11; + + pub fn get_can_play(&self) -> bool { + self.can_play.unwrap_or(false) + } pub fn clear_can_play(&mut self) { self.can_play = ::std::option::Option::None; } @@ -943,12 +964,12 @@ impl DeviceState { self.can_play = ::std::option::Option::Some(v); } - pub fn get_can_play(&self) -> bool { - self.can_play.unwrap_or(false) - } - // optional uint32 volume = 12; + + pub fn get_volume(&self) -> u32 { + self.volume.unwrap_or(0) + } pub fn clear_volume(&mut self) { self.volume = ::std::option::Option::None; } @@ -962,12 +983,15 @@ impl DeviceState { self.volume = ::std::option::Option::Some(v); } - pub fn get_volume(&self) -> u32 { - self.volume.unwrap_or(0) - } - // optional string name = 13; + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_name(&mut self) { self.name.clear(); } @@ -995,15 +1019,12 @@ impl DeviceState { self.name.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_name(&self) -> &str { - match self.name.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 error_code = 14; + + pub fn get_error_code(&self) -> u32 { + self.error_code.unwrap_or(0) + } pub fn clear_error_code(&mut self) { self.error_code = ::std::option::Option::None; } @@ -1017,12 +1038,12 @@ impl DeviceState { self.error_code = ::std::option::Option::Some(v); } - pub fn get_error_code(&self) -> u32 { - self.error_code.unwrap_or(0) - } - // optional int64 became_active_at = 15; + + pub fn get_became_active_at(&self) -> i64 { + self.became_active_at.unwrap_or(0) + } pub fn clear_became_active_at(&mut self) { self.became_active_at = ::std::option::Option::None; } @@ -1036,12 +1057,15 @@ impl DeviceState { self.became_active_at = ::std::option::Option::Some(v); } - pub fn get_became_active_at(&self) -> i64 { - self.became_active_at.unwrap_or(0) - } - // optional string error_message = 16; + + pub fn get_error_message(&self) -> &str { + match self.error_message.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_error_message(&mut self) { self.error_message.clear(); } @@ -1069,15 +1093,12 @@ impl DeviceState { self.error_message.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_error_message(&self) -> &str { - match self.error_message.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Capability capabilities = 17; + + pub fn get_capabilities(&self) -> &[Capability] { + &self.capabilities + } pub fn clear_capabilities(&mut self) { self.capabilities.clear(); } @@ -1097,12 +1118,15 @@ impl DeviceState { ::std::mem::replace(&mut self.capabilities, ::protobuf::RepeatedField::new()) } - pub fn get_capabilities(&self) -> &[Capability] { - &self.capabilities - } - // optional string context_player_error = 20; + + pub fn get_context_player_error(&self) -> &str { + match self.context_player_error.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context_player_error(&mut self) { self.context_player_error.clear(); } @@ -1130,15 +1154,12 @@ impl DeviceState { self.context_player_error.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_context_player_error(&self) -> &str { - match self.context_player_error.as_ref() { - Some(v) => &v, - None => "", - } - } - // repeated .Metadata metadata = 25; + + pub fn get_metadata(&self) -> &[Metadata] { + &self.metadata + } pub fn clear_metadata(&mut self) { self.metadata.clear(); } @@ -1157,10 +1178,6 @@ impl DeviceState { pub fn take_metadata(&mut self) -> ::protobuf::RepeatedField { ::std::mem::replace(&mut self.metadata, ::protobuf::RepeatedField::new()) } - - pub fn get_metadata(&self) -> &[Metadata] { - &self.metadata - } } impl ::protobuf::Message for DeviceState { @@ -1444,17 +1461,17 @@ impl ::protobuf::Message for DeviceState { impl ::protobuf::Clear for DeviceState { fn clear(&mut self) { - self.clear_sw_version(); - self.clear_is_active(); - self.clear_can_play(); - self.clear_volume(); - self.clear_name(); - self.clear_error_code(); - self.clear_became_active_at(); - self.clear_error_message(); - self.clear_capabilities(); - self.clear_context_player_error(); - self.clear_metadata(); + self.sw_version.clear(); + self.is_active = ::std::option::Option::None; + self.can_play = ::std::option::Option::None; + self.volume = ::std::option::Option::None; + self.name.clear(); + self.error_code = ::std::option::Option::None; + self.became_active_at = ::std::option::Option::None; + self.error_message.clear(); + self.capabilities.clear(); + self.context_player_error.clear(); + self.metadata.clear(); self.unknown_fields.clear(); } } @@ -1478,8 +1495,14 @@ pub struct Capability { intValue: ::std::vec::Vec, stringValue: ::protobuf::RepeatedField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Capability { + fn default() -> &'a Capability { + ::default_instance() + } } impl Capability { @@ -1489,6 +1512,10 @@ impl Capability { // optional .CapabilityType typ = 1; + + pub fn get_typ(&self) -> CapabilityType { + self.typ.unwrap_or(CapabilityType::kSupportedContexts) + } pub fn clear_typ(&mut self) { self.typ = ::std::option::Option::None; } @@ -1502,12 +1529,12 @@ impl Capability { self.typ = ::std::option::Option::Some(v); } - pub fn get_typ(&self) -> CapabilityType { - self.typ.unwrap_or(CapabilityType::kSupportedContexts) - } - // repeated int64 intValue = 2; + + pub fn get_intValue(&self) -> &[i64] { + &self.intValue + } pub fn clear_intValue(&mut self) { self.intValue.clear(); } @@ -1527,12 +1554,12 @@ impl Capability { ::std::mem::replace(&mut self.intValue, ::std::vec::Vec::new()) } - pub fn get_intValue(&self) -> &[i64] { - &self.intValue - } - // repeated string stringValue = 3; + + pub fn get_stringValue(&self) -> &[::std::string::String] { + &self.stringValue + } pub fn clear_stringValue(&mut self) { self.stringValue.clear(); } @@ -1551,10 +1578,6 @@ impl Capability { pub fn take_stringValue(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { ::std::mem::replace(&mut self.stringValue, ::protobuf::RepeatedField::new()) } - - pub fn get_stringValue(&self) -> &[::std::string::String] { - &self.stringValue - } } impl ::protobuf::Message for Capability { @@ -1690,9 +1713,9 @@ impl ::protobuf::Message for Capability { impl ::protobuf::Clear for Capability { fn clear(&mut self) { - self.clear_typ(); - self.clear_intValue(); - self.clear_stringValue(); + self.typ = ::std::option::Option::None; + self.intValue.clear(); + self.stringValue.clear(); self.unknown_fields.clear(); } } @@ -1714,8 +1737,14 @@ pub struct Goodbye { // message fields reason: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Goodbye { + fn default() -> &'a Goodbye { + ::default_instance() + } } impl Goodbye { @@ -1725,6 +1754,13 @@ impl Goodbye { // optional string reason = 1; + + pub fn get_reason(&self) -> &str { + match self.reason.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_reason(&mut self) { self.reason.clear(); } @@ -1751,13 +1787,6 @@ impl Goodbye { pub fn take_reason(&mut self) -> ::std::string::String { self.reason.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_reason(&self) -> &str { - match self.reason.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for Goodbye { @@ -1865,7 +1894,7 @@ impl ::protobuf::Message for Goodbye { impl ::protobuf::Clear for Goodbye { fn clear(&mut self) { - self.clear_reason(); + self.reason.clear(); self.unknown_fields.clear(); } } @@ -1901,8 +1930,14 @@ pub struct State { track: ::protobuf::RepeatedField, ad: ::protobuf::SingularPtrField, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a State { + fn default() -> &'a State { + ::default_instance() + } } impl State { @@ -1912,6 +1947,13 @@ impl State { // optional string context_uri = 2; + + pub fn get_context_uri(&self) -> &str { + match self.context_uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context_uri(&mut self) { self.context_uri.clear(); } @@ -1939,15 +1981,12 @@ impl State { self.context_uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_context_uri(&self) -> &str { - match self.context_uri.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 index = 3; + + pub fn get_index(&self) -> u32 { + self.index.unwrap_or(0) + } pub fn clear_index(&mut self) { self.index = ::std::option::Option::None; } @@ -1961,12 +2000,12 @@ impl State { self.index = ::std::option::Option::Some(v); } - pub fn get_index(&self) -> u32 { - self.index.unwrap_or(0) - } - // optional uint32 position_ms = 4; + + pub fn get_position_ms(&self) -> u32 { + self.position_ms.unwrap_or(0) + } pub fn clear_position_ms(&mut self) { self.position_ms = ::std::option::Option::None; } @@ -1980,12 +2019,12 @@ impl State { self.position_ms = ::std::option::Option::Some(v); } - pub fn get_position_ms(&self) -> u32 { - self.position_ms.unwrap_or(0) - } - // optional .PlayStatus status = 5; + + pub fn get_status(&self) -> PlayStatus { + self.status.unwrap_or(PlayStatus::kPlayStatusStop) + } pub fn clear_status(&mut self) { self.status = ::std::option::Option::None; } @@ -1999,12 +2038,12 @@ impl State { self.status = ::std::option::Option::Some(v); } - pub fn get_status(&self) -> PlayStatus { - self.status.unwrap_or(PlayStatus::kPlayStatusStop) - } - // optional uint64 position_measured_at = 7; + + pub fn get_position_measured_at(&self) -> u64 { + self.position_measured_at.unwrap_or(0) + } pub fn clear_position_measured_at(&mut self) { self.position_measured_at = ::std::option::Option::None; } @@ -2018,12 +2057,15 @@ impl State { self.position_measured_at = ::std::option::Option::Some(v); } - pub fn get_position_measured_at(&self) -> u64 { - self.position_measured_at.unwrap_or(0) - } - // optional string context_description = 8; + + pub fn get_context_description(&self) -> &str { + match self.context_description.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context_description(&mut self) { self.context_description.clear(); } @@ -2051,15 +2093,12 @@ impl State { self.context_description.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_context_description(&self) -> &str { - match self.context_description.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bool shuffle = 13; + + pub fn get_shuffle(&self) -> bool { + self.shuffle.unwrap_or(false) + } pub fn clear_shuffle(&mut self) { self.shuffle = ::std::option::Option::None; } @@ -2073,12 +2112,12 @@ impl State { self.shuffle = ::std::option::Option::Some(v); } - pub fn get_shuffle(&self) -> bool { - self.shuffle.unwrap_or(false) - } - // optional bool repeat = 14; + + pub fn get_repeat(&self) -> bool { + self.repeat.unwrap_or(false) + } pub fn clear_repeat(&mut self) { self.repeat = ::std::option::Option::None; } @@ -2092,12 +2131,15 @@ impl State { self.repeat = ::std::option::Option::Some(v); } - pub fn get_repeat(&self) -> bool { - self.repeat.unwrap_or(false) - } - // optional string last_command_ident = 20; + + pub fn get_last_command_ident(&self) -> &str { + match self.last_command_ident.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_last_command_ident(&mut self) { self.last_command_ident.clear(); } @@ -2125,15 +2167,12 @@ impl State { self.last_command_ident.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_last_command_ident(&self) -> &str { - match self.last_command_ident.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional uint32 last_command_msgid = 21; + + pub fn get_last_command_msgid(&self) -> u32 { + self.last_command_msgid.unwrap_or(0) + } pub fn clear_last_command_msgid(&mut self) { self.last_command_msgid = ::std::option::Option::None; } @@ -2147,12 +2186,12 @@ impl State { self.last_command_msgid = ::std::option::Option::Some(v); } - pub fn get_last_command_msgid(&self) -> u32 { - self.last_command_msgid.unwrap_or(0) - } - // optional bool playing_from_fallback = 24; + + pub fn get_playing_from_fallback(&self) -> bool { + self.playing_from_fallback.unwrap_or(false) + } pub fn clear_playing_from_fallback(&mut self) { self.playing_from_fallback = ::std::option::Option::None; } @@ -2166,12 +2205,12 @@ impl State { self.playing_from_fallback = ::std::option::Option::Some(v); } - pub fn get_playing_from_fallback(&self) -> bool { - self.playing_from_fallback.unwrap_or(false) - } - // optional uint32 row = 25; + + pub fn get_row(&self) -> u32 { + self.row.unwrap_or(0) + } pub fn clear_row(&mut self) { self.row = ::std::option::Option::None; } @@ -2185,12 +2224,12 @@ impl State { self.row = ::std::option::Option::Some(v); } - pub fn get_row(&self) -> u32 { - self.row.unwrap_or(0) - } - // optional uint32 playing_track_index = 26; + + pub fn get_playing_track_index(&self) -> u32 { + self.playing_track_index.unwrap_or(0) + } pub fn clear_playing_track_index(&mut self) { self.playing_track_index = ::std::option::Option::None; } @@ -2204,12 +2243,12 @@ impl State { self.playing_track_index = ::std::option::Option::Some(v); } - pub fn get_playing_track_index(&self) -> u32 { - self.playing_track_index.unwrap_or(0) - } - // repeated .TrackRef track = 27; + + pub fn get_track(&self) -> &[TrackRef] { + &self.track + } pub fn clear_track(&mut self) { self.track.clear(); } @@ -2229,12 +2268,12 @@ impl State { ::std::mem::replace(&mut self.track, ::protobuf::RepeatedField::new()) } - pub fn get_track(&self) -> &[TrackRef] { - &self.track - } - // optional .Ad ad = 28; + + pub fn get_ad(&self) -> &Ad { + self.ad.as_ref().unwrap_or_else(|| Ad::default_instance()) + } pub fn clear_ad(&mut self) { self.ad.clear(); } @@ -2261,10 +2300,6 @@ impl State { pub fn take_ad(&mut self) -> Ad { self.ad.take().unwrap_or_else(|| Ad::new()) } - - pub fn get_ad(&self) -> &Ad { - self.ad.as_ref().unwrap_or_else(|| Ad::default_instance()) - } } impl ::protobuf::Message for State { @@ -2620,21 +2655,21 @@ impl ::protobuf::Message for State { impl ::protobuf::Clear for State { fn clear(&mut self) { - self.clear_context_uri(); - self.clear_index(); - self.clear_position_ms(); - self.clear_status(); - self.clear_position_measured_at(); - self.clear_context_description(); - self.clear_shuffle(); - self.clear_repeat(); - self.clear_last_command_ident(); - self.clear_last_command_msgid(); - self.clear_playing_from_fallback(); - self.clear_row(); - self.clear_playing_track_index(); - self.clear_track(); - self.clear_ad(); + self.context_uri.clear(); + self.index = ::std::option::Option::None; + self.position_ms = ::std::option::Option::None; + self.status = ::std::option::Option::None; + self.position_measured_at = ::std::option::Option::None; + self.context_description.clear(); + self.shuffle = ::std::option::Option::None; + self.repeat = ::std::option::Option::None; + self.last_command_ident.clear(); + self.last_command_msgid = ::std::option::Option::None; + self.playing_from_fallback = ::std::option::Option::None; + self.row = ::std::option::Option::None; + self.playing_track_index = ::std::option::Option::None; + self.track.clear(); + self.ad.clear(); self.unknown_fields.clear(); } } @@ -2659,8 +2694,14 @@ pub struct TrackRef { queued: ::std::option::Option, context: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a TrackRef { + fn default() -> &'a TrackRef { + ::default_instance() + } } impl TrackRef { @@ -2670,6 +2711,13 @@ impl TrackRef { // optional bytes gid = 1; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -2697,15 +2745,15 @@ impl TrackRef { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional string uri = 2; + + pub fn get_uri(&self) -> &str { + match self.uri.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_uri(&mut self) { self.uri.clear(); } @@ -2733,15 +2781,12 @@ impl TrackRef { self.uri.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_uri(&self) -> &str { - match self.uri.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bool queued = 3; + + pub fn get_queued(&self) -> bool { + self.queued.unwrap_or(false) + } pub fn clear_queued(&mut self) { self.queued = ::std::option::Option::None; } @@ -2755,12 +2800,15 @@ impl TrackRef { self.queued = ::std::option::Option::Some(v); } - pub fn get_queued(&self) -> bool { - self.queued.unwrap_or(false) - } - // optional string context = 4; + + pub fn get_context(&self) -> &str { + match self.context.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_context(&mut self) { self.context.clear(); } @@ -2787,13 +2835,6 @@ impl TrackRef { pub fn take_context(&mut self) -> ::std::string::String { self.context.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_context(&self) -> &str { - match self.context.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for TrackRef { @@ -2947,10 +2988,10 @@ impl ::protobuf::Message for TrackRef { impl ::protobuf::Clear for TrackRef { fn clear(&mut self) { - self.clear_gid(); - self.clear_uri(); - self.clear_queued(); - self.clear_context(); + self.gid.clear(); + self.uri.clear(); + self.queued = ::std::option::Option::None; + self.context.clear(); self.unknown_fields.clear(); } } @@ -2980,8 +3021,14 @@ pub struct Ad { advertiser: ::protobuf::SingularField<::std::string::String>, gid: ::protobuf::SingularField<::std::vec::Vec>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Ad { + fn default() -> &'a Ad { + ::default_instance() + } } impl Ad { @@ -2991,6 +3038,10 @@ impl Ad { // optional int32 next = 1; + + pub fn get_next(&self) -> i32 { + self.next.unwrap_or(0) + } pub fn clear_next(&mut self) { self.next = ::std::option::Option::None; } @@ -3004,12 +3055,15 @@ impl Ad { self.next = ::std::option::Option::Some(v); } - pub fn get_next(&self) -> i32 { - self.next.unwrap_or(0) - } - // optional bytes ogg_fid = 2; + + pub fn get_ogg_fid(&self) -> &[u8] { + match self.ogg_fid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_ogg_fid(&mut self) { self.ogg_fid.clear(); } @@ -3037,15 +3091,15 @@ impl Ad { self.ogg_fid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_ogg_fid(&self) -> &[u8] { - match self.ogg_fid.as_ref() { + // optional bytes image_fid = 3; + + + pub fn get_image_fid(&self) -> &[u8] { + match self.image_fid.as_ref() { Some(v) => &v, None => &[], } } - - // optional bytes image_fid = 3; - pub fn clear_image_fid(&mut self) { self.image_fid.clear(); } @@ -3073,15 +3127,12 @@ impl Ad { self.image_fid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - pub fn get_image_fid(&self) -> &[u8] { - match self.image_fid.as_ref() { - Some(v) => &v, - None => &[], - } - } - // optional int32 duration = 4; + + pub fn get_duration(&self) -> i32 { + self.duration.unwrap_or(0) + } pub fn clear_duration(&mut self) { self.duration = ::std::option::Option::None; } @@ -3095,12 +3146,15 @@ impl Ad { self.duration = ::std::option::Option::Some(v); } - pub fn get_duration(&self) -> i32 { - self.duration.unwrap_or(0) - } - // optional string click_url = 5; + + pub fn get_click_url(&self) -> &str { + match self.click_url.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_click_url(&mut self) { self.click_url.clear(); } @@ -3128,15 +3182,15 @@ impl Ad { self.click_url.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_click_url(&self) -> &str { - match self.click_url.as_ref() { + // optional string impression_url = 6; + + + pub fn get_impression_url(&self) -> &str { + match self.impression_url.as_ref() { Some(v) => &v, None => "", } } - - // optional string impression_url = 6; - pub fn clear_impression_url(&mut self) { self.impression_url.clear(); } @@ -3164,15 +3218,15 @@ impl Ad { self.impression_url.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_impression_url(&self) -> &str { - match self.impression_url.as_ref() { + // optional string product = 7; + + + pub fn get_product(&self) -> &str { + match self.product.as_ref() { Some(v) => &v, None => "", } } - - // optional string product = 7; - pub fn clear_product(&mut self) { self.product.clear(); } @@ -3200,15 +3254,15 @@ impl Ad { self.product.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_product(&self) -> &str { - match self.product.as_ref() { + // optional string advertiser = 8; + + + pub fn get_advertiser(&self) -> &str { + match self.advertiser.as_ref() { Some(v) => &v, None => "", } } - - // optional string advertiser = 8; - pub fn clear_advertiser(&mut self) { self.advertiser.clear(); } @@ -3236,15 +3290,15 @@ impl Ad { self.advertiser.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_advertiser(&self) -> &str { - match self.advertiser.as_ref() { - Some(v) => &v, - None => "", - } - } - // optional bytes gid = 9; + + pub fn get_gid(&self) -> &[u8] { + match self.gid.as_ref() { + Some(v) => &v, + None => &[], + } + } pub fn clear_gid(&mut self) { self.gid.clear(); } @@ -3271,13 +3325,6 @@ impl Ad { pub fn take_gid(&mut self) -> ::std::vec::Vec { self.gid.take().unwrap_or_else(|| ::std::vec::Vec::new()) } - - pub fn get_gid(&self) -> &[u8] { - match self.gid.as_ref() { - Some(v) => &v, - None => &[], - } - } } impl ::protobuf::Message for Ad { @@ -3505,15 +3552,15 @@ impl ::protobuf::Message for Ad { impl ::protobuf::Clear for Ad { fn clear(&mut self) { - self.clear_next(); - self.clear_ogg_fid(); - self.clear_image_fid(); - self.clear_duration(); - self.clear_click_url(); - self.clear_impression_url(); - self.clear_product(); - self.clear_advertiser(); - self.clear_gid(); + self.next = ::std::option::Option::None; + self.ogg_fid.clear(); + self.image_fid.clear(); + self.duration = ::std::option::Option::None; + self.click_url.clear(); + self.impression_url.clear(); + self.product.clear(); + self.advertiser.clear(); + self.gid.clear(); self.unknown_fields.clear(); } } @@ -3536,8 +3583,14 @@ pub struct Metadata { field_type: ::protobuf::SingularField<::std::string::String>, metadata: ::protobuf::SingularField<::std::string::String>, // special fields - unknown_fields: ::protobuf::UnknownFields, - cached_size: ::protobuf::CachedSize, + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Metadata { + fn default() -> &'a Metadata { + ::default_instance() + } } impl Metadata { @@ -3547,6 +3600,13 @@ impl Metadata { // optional string type = 1; + + pub fn get_field_type(&self) -> &str { + match self.field_type.as_ref() { + Some(v) => &v, + None => "", + } + } pub fn clear_field_type(&mut self) { self.field_type.clear(); } @@ -3574,15 +3634,15 @@ impl Metadata { self.field_type.take().unwrap_or_else(|| ::std::string::String::new()) } - pub fn get_field_type(&self) -> &str { - match self.field_type.as_ref() { + // optional string metadata = 2; + + + pub fn get_metadata(&self) -> &str { + match self.metadata.as_ref() { Some(v) => &v, None => "", } } - - // optional string metadata = 2; - pub fn clear_metadata(&mut self) { self.metadata.clear(); } @@ -3609,13 +3669,6 @@ impl Metadata { pub fn take_metadata(&mut self) -> ::std::string::String { self.metadata.take().unwrap_or_else(|| ::std::string::String::new()) } - - pub fn get_metadata(&self) -> &str { - match self.metadata.as_ref() { - Some(v) => &v, - None => "", - } - } } impl ::protobuf::Message for Metadata { @@ -3737,8 +3790,8 @@ impl ::protobuf::Message for Metadata { impl ::protobuf::Clear for Metadata { fn clear(&mut self) { - self.clear_field_type(); - self.clear_metadata(); + self.field_type.clear(); + self.metadata.clear(); self.unknown_fields.clear(); } } @@ -3855,6 +3908,13 @@ impl ::protobuf::ProtobufEnum for MessageType { impl ::std::marker::Copy for MessageType { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for MessageType { + fn default() -> Self { + MessageType::kMessageTypeHello + } +} + impl ::protobuf::reflect::ProtobufValue for MessageType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -3940,6 +4000,13 @@ impl ::protobuf::ProtobufEnum for CapabilityType { impl ::std::marker::Copy for CapabilityType { } +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for CapabilityType { + fn default() -> Self { + CapabilityType::kSupportedContexts + } +} + impl ::protobuf::reflect::ProtobufValue for CapabilityType { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -3995,6 +4062,12 @@ impl ::protobuf::ProtobufEnum for PlayStatus { impl ::std::marker::Copy for PlayStatus { } +impl ::std::default::Default for PlayStatus { + fn default() -> Self { + PlayStatus::kPlayStatusStop + } +} + impl ::protobuf::reflect::ProtobufValue for PlayStatus { fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) @@ -4002,79 +4075,72 @@ impl ::protobuf::reflect::ProtobufValue for PlayStatus { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0bspirc.proto\x12\0\"\x99\x03\n\x05Frame\x12\x13\n\x07version\x18\ - \x01\x20\x01(\rB\x02\x18\0\x12\x11\n\x05ident\x18\x02\x20\x01(\tB\x02\ - \x18\0\x12\x1c\n\x10protocol_version\x18\x03\x20\x01(\tB\x02\x18\0\x12\ - \x12\n\x06seq_nr\x18\x04\x20\x01(\rB\x02\x18\0\x12\x1d\n\x03typ\x18\x05\ - \x20\x01(\x0e2\x0c.MessageTypeB\x02\x18\0\x12&\n\x0cdevice_state\x18\x07\ - \x20\x01(\x0b2\x0c.DeviceStateB\x02\x18\0\x12\x1d\n\x07goodbye\x18\x0b\ - \x20\x01(\x0b2\x08.GoodbyeB\x02\x18\0\x12\x19\n\x05state\x18\x0c\x20\x01\ - (\x0b2\x06.StateB\x02\x18\0\x12\x14\n\x08position\x18\r\x20\x01(\rB\x02\ - \x18\0\x12\x12\n\x06volume\x18\x0e\x20\x01(\rB\x02\x18\0\x12\x1b\n\x0fst\ - ate_update_id\x18\x11\x20\x01(\x03B\x02\x18\0\x12\x15\n\trecipient\x18\ - \x12\x20\x03(\tB\x02\x18\0\x12\x20\n\x14context_player_state\x18\x13\x20\ - \x01(\x0cB\x02\x18\0\x12\x14\n\x08new_name\x18\x14\x20\x01(\tB\x02\x18\0\ - \x12\x1f\n\x08metadata\x18\x19\x20\x01(\x0b2\t.MetadataB\x02\x18\0\"\xb3\ - \x02\n\x0bDeviceState\x12\x16\n\nsw_version\x18\x01\x20\x01(\tB\x02\x18\ - \0\x12\x15\n\tis_active\x18\n\x20\x01(\x08B\x02\x18\0\x12\x14\n\x08can_p\ - lay\x18\x0b\x20\x01(\x08B\x02\x18\0\x12\x12\n\x06volume\x18\x0c\x20\x01(\ - \rB\x02\x18\0\x12\x10\n\x04name\x18\r\x20\x01(\tB\x02\x18\0\x12\x16\n\ne\ - rror_code\x18\x0e\x20\x01(\rB\x02\x18\0\x12\x1c\n\x10became_active_at\ - \x18\x0f\x20\x01(\x03B\x02\x18\0\x12\x19\n\rerror_message\x18\x10\x20\ - \x01(\tB\x02\x18\0\x12%\n\x0ccapabilities\x18\x11\x20\x03(\x0b2\x0b.Capa\ - bilityB\x02\x18\0\x12\x20\n\x14context_player_error\x18\x14\x20\x01(\tB\ - \x02\x18\0\x12\x1f\n\x08metadata\x18\x19\x20\x03(\x0b2\t.MetadataB\x02\ - \x18\0\"]\n\nCapability\x12\x20\n\x03typ\x18\x01\x20\x01(\x0e2\x0f.Capab\ - ilityTypeB\x02\x18\0\x12\x14\n\x08intValue\x18\x02\x20\x03(\x03B\x02\x18\ - \0\x12\x17\n\x0bstringValue\x18\x03\x20\x03(\tB\x02\x18\0\"\x1d\n\x07Goo\ - dbye\x12\x12\n\x06reason\x18\x01\x20\x01(\tB\x02\x18\0\"\xa1\x03\n\x05St\ - ate\x12\x17\n\x0bcontext_uri\x18\x02\x20\x01(\tB\x02\x18\0\x12\x11\n\x05\ - index\x18\x03\x20\x01(\rB\x02\x18\0\x12\x17\n\x0bposition_ms\x18\x04\x20\ - \x01(\rB\x02\x18\0\x12\x1f\n\x06status\x18\x05\x20\x01(\x0e2\x0b.PlaySta\ - tusB\x02\x18\0\x12\x20\n\x14position_measured_at\x18\x07\x20\x01(\x04B\ - \x02\x18\0\x12\x1f\n\x13context_description\x18\x08\x20\x01(\tB\x02\x18\ - \0\x12\x13\n\x07shuffle\x18\r\x20\x01(\x08B\x02\x18\0\x12\x12\n\x06repea\ - t\x18\x0e\x20\x01(\x08B\x02\x18\0\x12\x1e\n\x12last_command_ident\x18\ - \x14\x20\x01(\tB\x02\x18\0\x12\x1e\n\x12last_command_msgid\x18\x15\x20\ - \x01(\rB\x02\x18\0\x12!\n\x15playing_from_fallback\x18\x18\x20\x01(\x08B\ - \x02\x18\0\x12\x0f\n\x03row\x18\x19\x20\x01(\rB\x02\x18\0\x12\x1f\n\x13p\ - laying_track_index\x18\x1a\x20\x01(\rB\x02\x18\0\x12\x1c\n\x05track\x18\ - \x1b\x20\x03(\x0b2\t.TrackRefB\x02\x18\0\x12\x13\n\x02ad\x18\x1c\x20\x01\ - (\x0b2\x03.AdB\x02\x18\0\"U\n\x08TrackRef\x12\x0f\n\x03gid\x18\x01\x20\ - \x01(\x0cB\x02\x18\0\x12\x0f\n\x03uri\x18\x02\x20\x01(\tB\x02\x18\0\x12\ - \x12\n\x06queued\x18\x03\x20\x01(\x08B\x02\x18\0\x12\x13\n\x07context\ - \x18\x04\x20\x01(\tB\x02\x18\0\"\xc9\x01\n\x02Ad\x12\x10\n\x04next\x18\ - \x01\x20\x01(\x05B\x02\x18\0\x12\x13\n\x07ogg_fid\x18\x02\x20\x01(\x0cB\ - \x02\x18\0\x12\x15\n\timage_fid\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x14\ - \n\x08duration\x18\x04\x20\x01(\x05B\x02\x18\0\x12\x15\n\tclick_url\x18\ - \x05\x20\x01(\tB\x02\x18\0\x12\x1a\n\x0eimpression_url\x18\x06\x20\x01(\ - \tB\x02\x18\0\x12\x13\n\x07product\x18\x07\x20\x01(\tB\x02\x18\0\x12\x16\ - \n\nadvertiser\x18\x08\x20\x01(\tB\x02\x18\0\x12\x0f\n\x03gid\x18\t\x20\ - \x01(\x0cB\x02\x18\0\"2\n\x08Metadata\x12\x10\n\x04type\x18\x01\x20\x01(\ - \tB\x02\x18\0\x12\x14\n\x08metadata\x18\x02\x20\x01(\tB\x02\x18\0*\x91\ - \x04\n\x0bMessageType\x12\x15\n\x11kMessageTypeHello\x10\x01\x12\x17\n\ - \x13kMessageTypeGoodbye\x10\x02\x12\x15\n\x11kMessageTypeProbe\x10\x03\ - \x12\x16\n\x12kMessageTypeNotify\x10\n\x12\x14\n\x10kMessageTypeLoad\x10\ - \x14\x12\x14\n\x10kMessageTypePlay\x10\x15\x12\x15\n\x11kMessageTypePaus\ - e\x10\x16\x12\x19\n\x15kMessageTypePlayPause\x10\x17\x12\x14\n\x10kMessa\ - geTypeSeek\x10\x18\x12\x14\n\x10kMessageTypePrev\x10\x19\x12\x14\n\x10kM\ - essageTypeNext\x10\x1a\x12\x16\n\x12kMessageTypeVolume\x10\x1b\x12\x17\n\ - \x13kMessageTypeShuffle\x10\x1c\x12\x16\n\x12kMessageTypeRepeat\x10\x1d\ - \x12\x1a\n\x16kMessageTypeVolumeDown\x10\x1f\x12\x18\n\x14kMessageTypeVo\ - lumeUp\x10\x20\x12\x17\n\x13kMessageTypeReplace\x10!\x12\x16\n\x12kMessa\ - geTypeLogout\x10\"\x12\x16\n\x12kMessageTypeAction\x10#\x12\x16\n\x12kMe\ - ssageTypeRename\x10$\x12\x1f\n\x1akMessageTypeUpdateMetadata\x10\x80\x01\ - \x1a\x02\x10\0*\xb6\x02\n\x0eCapabilityType\x12\x16\n\x12kSupportedConte\ - xts\x10\x01\x12\x10\n\x0ckCanBePlayer\x10\x02\x12\x14\n\x10kRestrictToLo\ - cal\x10\x03\x12\x0f\n\x0bkDeviceType\x10\x04\x12\x14\n\x10kGaiaEqConnect\ - Id\x10\x05\x12\x13\n\x0fkSupportsLogout\x10\x06\x12\x11\n\rkIsObservable\ - \x10\x07\x12\x10\n\x0ckVolumeSteps\x10\x08\x12\x13\n\x0fkSupportedTypes\ - \x10\t\x12\x10\n\x0ckCommandAcks\x10\n\x12\x13\n\x0fkSupportsRename\x10\ - \x0b\x12\x0b\n\x07kHidden\x10\x0c\x12\x17\n\x13kSupportsPlaylistV2\x10\r\ - \x12\x1d\n\x19kSupportsExternalEpisodes\x10\x0e\x1a\x02\x10\0*h\n\nPlayS\ - tatus\x12\x13\n\x0fkPlayStatusStop\x10\0\x12\x13\n\x0fkPlayStatusPlay\ - \x10\x01\x12\x14\n\x10kPlayStatusPause\x10\x02\x12\x16\n\x12kPlayStatusL\ - oading\x10\x03\x1a\x02\x10\0B\0b\x06proto2\ + \n\x0bspirc.proto\x12\0\"\xfd\x02\n\x05Frame\x12\x11\n\x07version\x18\ + \x01\x20\x01(\rB\0\x12\x0f\n\x05ident\x18\x02\x20\x01(\tB\0\x12\x1a\n\ + \x10protocol_version\x18\x03\x20\x01(\tB\0\x12\x10\n\x06seq_nr\x18\x04\ + \x20\x01(\rB\0\x12\x1b\n\x03typ\x18\x05\x20\x01(\x0e2\x0c.MessageTypeB\0\ + \x12$\n\x0cdevice_state\x18\x07\x20\x01(\x0b2\x0c.DeviceStateB\0\x12\x1b\ + \n\x07goodbye\x18\x0b\x20\x01(\x0b2\x08.GoodbyeB\0\x12\x17\n\x05state\ + \x18\x0c\x20\x01(\x0b2\x06.StateB\0\x12\x12\n\x08position\x18\r\x20\x01(\ + \rB\0\x12\x10\n\x06volume\x18\x0e\x20\x01(\rB\0\x12\x19\n\x0fstate_updat\ + e_id\x18\x11\x20\x01(\x03B\0\x12\x13\n\trecipient\x18\x12\x20\x03(\tB\0\ + \x12\x1e\n\x14context_player_state\x18\x13\x20\x01(\x0cB\0\x12\x12\n\x08\ + new_name\x18\x14\x20\x01(\tB\0\x12\x1d\n\x08metadata\x18\x19\x20\x01(\ + \x0b2\t.MetadataB\0:\0\"\x9f\x02\n\x0bDeviceState\x12\x14\n\nsw_version\ + \x18\x01\x20\x01(\tB\0\x12\x13\n\tis_active\x18\n\x20\x01(\x08B\0\x12\ + \x12\n\x08can_play\x18\x0b\x20\x01(\x08B\0\x12\x10\n\x06volume\x18\x0c\ + \x20\x01(\rB\0\x12\x0e\n\x04name\x18\r\x20\x01(\tB\0\x12\x14\n\nerror_co\ + de\x18\x0e\x20\x01(\rB\0\x12\x1a\n\x10became_active_at\x18\x0f\x20\x01(\ + \x03B\0\x12\x17\n\rerror_message\x18\x10\x20\x01(\tB\0\x12#\n\x0ccapabil\ + ities\x18\x11\x20\x03(\x0b2\x0b.CapabilityB\0\x12\x1e\n\x14context_playe\ + r_error\x18\x14\x20\x01(\tB\0\x12\x1d\n\x08metadata\x18\x19\x20\x03(\x0b\ + 2\t.MetadataB\0:\0\"Y\n\nCapability\x12\x1e\n\x03typ\x18\x01\x20\x01(\ + \x0e2\x0f.CapabilityTypeB\0\x12\x12\n\x08intValue\x18\x02\x20\x03(\x03B\ + \0\x12\x15\n\x0bstringValue\x18\x03\x20\x03(\tB\0:\0\"\x1d\n\x07Goodbye\ + \x12\x10\n\x06reason\x18\x01\x20\x01(\tB\0:\0\"\x85\x03\n\x05State\x12\ + \x15\n\x0bcontext_uri\x18\x02\x20\x01(\tB\0\x12\x0f\n\x05index\x18\x03\ + \x20\x01(\rB\0\x12\x15\n\x0bposition_ms\x18\x04\x20\x01(\rB\0\x12\x1d\n\ + \x06status\x18\x05\x20\x01(\x0e2\x0b.PlayStatusB\0\x12\x1e\n\x14position\ + _measured_at\x18\x07\x20\x01(\x04B\0\x12\x1d\n\x13context_description\ + \x18\x08\x20\x01(\tB\0\x12\x11\n\x07shuffle\x18\r\x20\x01(\x08B\0\x12\ + \x10\n\x06repeat\x18\x0e\x20\x01(\x08B\0\x12\x1c\n\x12last_command_ident\ + \x18\x14\x20\x01(\tB\0\x12\x1c\n\x12last_command_msgid\x18\x15\x20\x01(\ + \rB\0\x12\x1f\n\x15playing_from_fallback\x18\x18\x20\x01(\x08B\0\x12\r\n\ + \x03row\x18\x19\x20\x01(\rB\0\x12\x1d\n\x13playing_track_index\x18\x1a\ + \x20\x01(\rB\0\x12\x1a\n\x05track\x18\x1b\x20\x03(\x0b2\t.TrackRefB\0\ + \x12\x11\n\x02ad\x18\x1c\x20\x01(\x0b2\x03.AdB\0:\0\"O\n\x08TrackRef\x12\ + \r\n\x03gid\x18\x01\x20\x01(\x0cB\0\x12\r\n\x03uri\x18\x02\x20\x01(\tB\0\ + \x12\x10\n\x06queued\x18\x03\x20\x01(\x08B\0\x12\x11\n\x07context\x18\ + \x04\x20\x01(\tB\0:\0\"\xb9\x01\n\x02Ad\x12\x0e\n\x04next\x18\x01\x20\ + \x01(\x05B\0\x12\x11\n\x07ogg_fid\x18\x02\x20\x01(\x0cB\0\x12\x13\n\tima\ + ge_fid\x18\x03\x20\x01(\x0cB\0\x12\x12\n\x08duration\x18\x04\x20\x01(\ + \x05B\0\x12\x13\n\tclick_url\x18\x05\x20\x01(\tB\0\x12\x18\n\x0eimpressi\ + on_url\x18\x06\x20\x01(\tB\0\x12\x11\n\x07product\x18\x07\x20\x01(\tB\0\ + \x12\x14\n\nadvertiser\x18\x08\x20\x01(\tB\0\x12\r\n\x03gid\x18\t\x20\ + \x01(\x0cB\0:\0\"0\n\x08Metadata\x12\x0e\n\x04type\x18\x01\x20\x01(\tB\0\ + \x12\x12\n\x08metadata\x18\x02\x20\x01(\tB\0:\0*\x8f\x04\n\x0bMessageTyp\ + e\x12\x15\n\x11kMessageTypeHello\x10\x01\x12\x17\n\x13kMessageTypeGoodby\ + e\x10\x02\x12\x15\n\x11kMessageTypeProbe\x10\x03\x12\x16\n\x12kMessageTy\ + peNotify\x10\n\x12\x14\n\x10kMessageTypeLoad\x10\x14\x12\x14\n\x10kMessa\ + geTypePlay\x10\x15\x12\x15\n\x11kMessageTypePause\x10\x16\x12\x19\n\x15k\ + MessageTypePlayPause\x10\x17\x12\x14\n\x10kMessageTypeSeek\x10\x18\x12\ + \x14\n\x10kMessageTypePrev\x10\x19\x12\x14\n\x10kMessageTypeNext\x10\x1a\ + \x12\x16\n\x12kMessageTypeVolume\x10\x1b\x12\x17\n\x13kMessageTypeShuffl\ + e\x10\x1c\x12\x16\n\x12kMessageTypeRepeat\x10\x1d\x12\x1a\n\x16kMessageT\ + ypeVolumeDown\x10\x1f\x12\x18\n\x14kMessageTypeVolumeUp\x10\x20\x12\x17\ + \n\x13kMessageTypeReplace\x10!\x12\x16\n\x12kMessageTypeLogout\x10\"\x12\ + \x16\n\x12kMessageTypeAction\x10#\x12\x16\n\x12kMessageTypeRename\x10$\ + \x12\x1f\n\x1akMessageTypeUpdateMetadata\x10\x80\x01\x1a\0*\xb4\x02\n\ + \x0eCapabilityType\x12\x16\n\x12kSupportedContexts\x10\x01\x12\x10\n\x0c\ + kCanBePlayer\x10\x02\x12\x14\n\x10kRestrictToLocal\x10\x03\x12\x0f\n\x0b\ + kDeviceType\x10\x04\x12\x14\n\x10kGaiaEqConnectId\x10\x05\x12\x13\n\x0fk\ + SupportsLogout\x10\x06\x12\x11\n\rkIsObservable\x10\x07\x12\x10\n\x0ckVo\ + lumeSteps\x10\x08\x12\x13\n\x0fkSupportedTypes\x10\t\x12\x10\n\x0ckComma\ + ndAcks\x10\n\x12\x13\n\x0fkSupportsRename\x10\x0b\x12\x0b\n\x07kHidden\ + \x10\x0c\x12\x17\n\x13kSupportsPlaylistV2\x10\r\x12\x1d\n\x19kSupportsEx\ + ternalEpisodes\x10\x0e\x1a\0*f\n\nPlayStatus\x12\x13\n\x0fkPlayStatusSto\ + p\x10\0\x12\x13\n\x0fkPlayStatusPlay\x10\x01\x12\x14\n\x10kPlayStatusPau\ + se\x10\x02\x12\x16\n\x12kPlayStatusLoading\x10\x03\x1a\0B\0b\x06proto2\ "; static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {