librespot/protocol/src/keyexchange.rs

7590 lines
246 KiB
Rust
Raw Normal View History

// This file is generated by rust-protobuf 2.14.0. Do not edit
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `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_14_0;
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct ClientHello {
// message fields
build_info: ::protobuf::SingularPtrField<BuildInfo>,
fingerprints_supported: ::std::vec::Vec<Fingerprint>,
cryptosuites_supported: ::std::vec::Vec<Cryptosuite>,
powschemes_supported: ::std::vec::Vec<Powscheme>,
login_crypto_hello: ::protobuf::SingularPtrField<LoginCryptoHelloUnion>,
client_nonce: ::protobuf::SingularField<::std::vec::Vec<u8>>,
padding: ::protobuf::SingularField<::std::vec::Vec<u8>>,
feature_set: ::protobuf::SingularPtrField<FeatureSet>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ClientHello {
fn default() -> &'a ClientHello {
<ClientHello as ::protobuf::Message>::default_instance()
}
}
impl ClientHello {
pub fn new() -> ClientHello {
::std::default::Default::default()
}
// required .BuildInfo build_info = 10;
pub fn get_build_info(&self) -> &BuildInfo {
2020-07-22 15:35:05 +00:00
self.build_info
.as_ref()
.unwrap_or_else(|| BuildInfo::default_instance())
}
pub fn clear_build_info(&mut self) {
self.build_info.clear();
}
pub fn has_build_info(&self) -> bool {
self.build_info.is_some()
}
// Param is passed by value, moved
pub fn set_build_info(&mut self, v: BuildInfo) {
self.build_info = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_build_info(&mut self) -> &mut BuildInfo {
if self.build_info.is_none() {
self.build_info.set_default();
}
self.build_info.as_mut().unwrap()
}
// Take field
pub fn take_build_info(&mut self) -> BuildInfo {
self.build_info.take().unwrap_or_else(|| BuildInfo::new())
}
// 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();
}
// Param is passed by value, moved
pub fn set_fingerprints_supported(&mut self, v: ::std::vec::Vec<Fingerprint>) {
self.fingerprints_supported = v;
}
// Mutable pointer to the field.
pub fn mut_fingerprints_supported(&mut self) -> &mut ::std::vec::Vec<Fingerprint> {
&mut self.fingerprints_supported
}
// Take field
pub fn take_fingerprints_supported(&mut self) -> ::std::vec::Vec<Fingerprint> {
::std::mem::replace(&mut self.fingerprints_supported, ::std::vec::Vec::new())
}
// 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();
}
// Param is passed by value, moved
pub fn set_cryptosuites_supported(&mut self, v: ::std::vec::Vec<Cryptosuite>) {
self.cryptosuites_supported = v;
}
// Mutable pointer to the field.
pub fn mut_cryptosuites_supported(&mut self) -> &mut ::std::vec::Vec<Cryptosuite> {
&mut self.cryptosuites_supported
}
// Take field
pub fn take_cryptosuites_supported(&mut self) -> ::std::vec::Vec<Cryptosuite> {
::std::mem::replace(&mut self.cryptosuites_supported, ::std::vec::Vec::new())
}
// 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();
}
// Param is passed by value, moved
pub fn set_powschemes_supported(&mut self, v: ::std::vec::Vec<Powscheme>) {
self.powschemes_supported = v;
}
// Mutable pointer to the field.
pub fn mut_powschemes_supported(&mut self) -> &mut ::std::vec::Vec<Powscheme> {
&mut self.powschemes_supported
}
// Take field
pub fn take_powschemes_supported(&mut self) -> ::std::vec::Vec<Powscheme> {
::std::mem::replace(&mut self.powschemes_supported, ::std::vec::Vec::new())
}
// required .LoginCryptoHelloUnion login_crypto_hello = 50;
pub fn get_login_crypto_hello(&self) -> &LoginCryptoHelloUnion {
2020-07-22 15:35:05 +00:00
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();
}
pub fn has_login_crypto_hello(&self) -> bool {
self.login_crypto_hello.is_some()
}
// Param is passed by value, moved
pub fn set_login_crypto_hello(&mut self, v: LoginCryptoHelloUnion) {
self.login_crypto_hello = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_login_crypto_hello(&mut self) -> &mut LoginCryptoHelloUnion {
if self.login_crypto_hello.is_none() {
self.login_crypto_hello.set_default();
}
self.login_crypto_hello.as_mut().unwrap()
}
// Take field
pub fn take_login_crypto_hello(&mut self) -> LoginCryptoHelloUnion {
2020-07-22 15:35:05 +00:00
self.login_crypto_hello
.take()
.unwrap_or_else(|| LoginCryptoHelloUnion::new())
}
// 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();
}
pub fn has_client_nonce(&self) -> bool {
self.client_nonce.is_some()
}
// Param is passed by value, moved
pub fn set_client_nonce(&mut self, v: ::std::vec::Vec<u8>) {
self.client_nonce = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_client_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.client_nonce.is_none() {
self.client_nonce.set_default();
}
self.client_nonce.as_mut().unwrap()
}
// Take field
pub fn take_client_nonce(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.client_nonce
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes padding = 70;
pub fn get_padding(&self) -> &[u8] {
match self.padding.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_padding(&mut self) {
self.padding.clear();
}
pub fn has_padding(&self) -> bool {
self.padding.is_some()
}
// Param is passed by value, moved
pub fn set_padding(&mut self, v: ::std::vec::Vec<u8>) {
self.padding = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_padding(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.padding.is_none() {
self.padding.set_default();
}
self.padding.as_mut().unwrap()
}
// Take field
pub fn take_padding(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.padding
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional .FeatureSet feature_set = 80;
pub fn get_feature_set(&self) -> &FeatureSet {
2020-07-22 15:35:05 +00:00
self.feature_set
.as_ref()
.unwrap_or_else(|| FeatureSet::default_instance())
}
pub fn clear_feature_set(&mut self) {
self.feature_set.clear();
}
pub fn has_feature_set(&self) -> bool {
self.feature_set.is_some()
}
// Param is passed by value, moved
pub fn set_feature_set(&mut self, v: FeatureSet) {
self.feature_set = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_feature_set(&mut self) -> &mut FeatureSet {
if self.feature_set.is_none() {
self.feature_set.set_default();
}
self.feature_set.as_mut().unwrap()
}
// Take field
pub fn take_feature_set(&mut self) -> FeatureSet {
self.feature_set.take().unwrap_or_else(|| FeatureSet::new())
}
}
impl ::protobuf::Message for ClientHello {
fn is_initialized(&self) -> bool {
if self.build_info.is_none() {
return false;
}
if self.login_crypto_hello.is_none() {
return false;
}
if self.client_nonce.is_none() {
return false;
}
for v in &self.build_info {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.login_crypto_hello {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.feature_set {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.build_info,
)?;
}
20 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.fingerprints_supported,
20,
&mut self.unknown_fields,
)?,
30 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.cryptosuites_supported,
30,
&mut self.unknown_fields,
)?,
40 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.powschemes_supported,
40,
&mut self.unknown_fields,
)?,
50 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.login_crypto_hello,
)?;
}
60 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_bytes_into(
wire_type,
is,
&mut self.client_nonce,
)?;
}
70 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?;
2020-07-22 15:35:05 +00:00
}
80 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.feature_set,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.build_info.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
for value in &self.fingerprints_supported {
my_size += ::protobuf::rt::enum_size(20, *value);
2020-07-22 15:35:05 +00:00
}
for value in &self.cryptosuites_supported {
my_size += ::protobuf::rt::enum_size(30, *value);
2020-07-22 15:35:05 +00:00
}
for value in &self.powschemes_supported {
my_size += ::protobuf::rt::enum_size(40, *value);
2020-07-22 15:35:05 +00:00
}
if let Some(ref v) = self.login_crypto_hello.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.client_nonce.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(60, &v);
}
if let Some(ref v) = self.padding.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(70, &v);
}
if let Some(ref v) = self.feature_set.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.build_info.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
for v in &self.fingerprints_supported {
2017-01-18 05:58:12 +00:00
os.write_enum(20, v.value())?;
2020-07-22 15:35:05 +00:00
}
for v in &self.cryptosuites_supported {
2017-01-18 05:58:12 +00:00
os.write_enum(30, v.value())?;
2020-07-22 15:35:05 +00:00
}
for v in &self.powschemes_supported {
2017-01-18 05:58:12 +00:00
os.write_enum(40, v.value())?;
2020-07-22 15:35:05 +00:00
}
if let Some(ref v) = self.login_crypto_hello.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(50, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.client_nonce.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(60, &v)?;
}
if let Some(ref v) = self.padding.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(70, &v)?;
}
if let Some(ref v) = self.feature_set.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(80, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ClientHello {
ClientHello::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<BuildInfo>,
>(
"build_info",
|m: &ClientHello| &m.build_info,
|m: &mut ClientHello| &mut m.build_info,
),
);
fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<Fingerprint>,
>(
"fingerprints_supported",
2020-07-22 15:35:05 +00:00
|m: &ClientHello| &m.fingerprints_supported,
|m: &mut ClientHello| &mut m.fingerprints_supported,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<Cryptosuite>,
>(
"cryptosuites_supported",
2020-07-22 15:35:05 +00:00
|m: &ClientHello| &m.cryptosuites_supported,
|m: &mut ClientHello| &mut m.cryptosuites_supported,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<Powscheme>,
>(
"powschemes_supported",
2020-07-22 15:35:05 +00:00
|m: &ClientHello| &m.powschemes_supported,
|m: &mut ClientHello| &mut m.powschemes_supported,
));
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<LoginCryptoHelloUnion>,
>(
"login_crypto_hello",
|m: &ClientHello| &m.login_crypto_hello,
|m: &mut ClientHello| &mut m.login_crypto_hello,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"client_nonce",
|m: &ClientHello| &m.client_nonce,
|m: &mut ClientHello| &mut m.client_nonce,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"padding",
|m: &ClientHello| &m.padding,
|m: &mut ClientHello| &mut m.padding,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<FeatureSet>,
>(
"feature_set",
|m: &ClientHello| &m.feature_set,
|m: &mut ClientHello| &mut m.feature_set,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<ClientHello>(
"ClientHello",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static ClientHello {
static mut instance: ::protobuf::lazy::Lazy<ClientHello> = ::protobuf::lazy::Lazy::INIT;
2020-07-22 15:35:05 +00:00
unsafe { instance.get(ClientHello::new) }
}
}
impl ::protobuf::Clear for ClientHello {
fn clear(&mut self) {
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();
}
}
impl ::std::fmt::Debug for ClientHello {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for ClientHello {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct BuildInfo {
// message fields
product: ::std::option::Option<Product>,
product_flags: ::std::vec::Vec<ProductFlags>,
platform: ::std::option::Option<Platform>,
version: ::std::option::Option<u64>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a BuildInfo {
fn default() -> &'a BuildInfo {
<BuildInfo as ::protobuf::Message>::default_instance()
}
}
impl BuildInfo {
pub fn new() -> BuildInfo {
::std::default::Default::default()
}
// 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;
}
pub fn has_product(&self) -> bool {
self.product.is_some()
}
// Param is passed by value, moved
pub fn set_product(&mut self, v: Product) {
self.product = ::std::option::Option::Some(v);
}
// 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();
}
// Param is passed by value, moved
pub fn set_product_flags(&mut self, v: ::std::vec::Vec<ProductFlags>) {
self.product_flags = v;
}
// Mutable pointer to the field.
pub fn mut_product_flags(&mut self) -> &mut ::std::vec::Vec<ProductFlags> {
&mut self.product_flags
}
// Take field
pub fn take_product_flags(&mut self) -> ::std::vec::Vec<ProductFlags> {
::std::mem::replace(&mut self.product_flags, ::std::vec::Vec::new())
}
// 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;
}
pub fn has_platform(&self) -> bool {
self.platform.is_some()
}
// Param is passed by value, moved
pub fn set_platform(&mut self, v: Platform) {
self.platform = ::std::option::Option::Some(v);
}
// 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;
}
pub fn has_version(&self) -> bool {
self.version.is_some()
}
// Param is passed by value, moved
pub fn set_version(&mut self, v: u64) {
self.version = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for BuildInfo {
fn is_initialized(&self) -> bool {
if self.product.is_none() {
return false;
}
if self.platform.is_none() {
return false;
}
if self.version.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
2020-07-22 15:35:05 +00:00
10 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.product,
10,
&mut self.unknown_fields,
)?,
20 => ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.product_flags,
20,
&mut self.unknown_fields,
)?,
30 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.platform,
30,
&mut self.unknown_fields,
)?,
40 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_uint64()?;
self.version = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
2017-01-18 05:58:12 +00:00
if let Some(v) = self.product {
my_size += ::protobuf::rt::enum_size(10, v);
}
for value in &self.product_flags {
my_size += ::protobuf::rt::enum_size(20, *value);
2020-07-22 15:35:05 +00:00
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.platform {
my_size += ::protobuf::rt::enum_size(30, v);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.version {
my_size += ::protobuf::rt::value_size(40, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.product {
2017-01-18 05:58:12 +00:00
os.write_enum(10, v.value())?;
}
for v in &self.product_flags {
2017-01-18 05:58:12 +00:00
os.write_enum(20, v.value())?;
2020-07-22 15:35:05 +00:00
}
if let Some(v) = self.platform {
2017-01-18 05:58:12 +00:00
os.write_enum(30, v.value())?;
}
if let Some(v) = self.version {
2017-01-18 05:58:12 +00:00
os.write_uint64(40, v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> BuildInfo {
BuildInfo::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<Product>,
>(
"product",
2020-07-22 15:35:05 +00:00
|m: &BuildInfo| &m.product,
|m: &mut BuildInfo| &mut m.product,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_vec_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<ProductFlags>,
>(
"product_flags",
2020-07-22 15:35:05 +00:00
|m: &BuildInfo| &m.product_flags,
|m: &mut BuildInfo| &mut m.product_flags,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<Platform>,
>(
"platform",
2020-07-22 15:35:05 +00:00
|m: &BuildInfo| &m.platform,
|m: &mut BuildInfo| &mut m.platform,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeUint64,
>(
"version",
2020-07-22 15:35:05 +00:00
|m: &BuildInfo| &m.version,
|m: &mut BuildInfo| &mut m.version,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<BuildInfo>(
"BuildInfo",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static BuildInfo {
static mut instance: ::protobuf::lazy::Lazy<BuildInfo> = ::protobuf::lazy::Lazy::INIT;
2020-07-22 15:35:05 +00:00
unsafe { instance.get(BuildInfo::new) }
}
}
impl ::protobuf::Clear for BuildInfo {
fn clear(&mut self) {
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();
}
}
impl ::std::fmt::Debug for BuildInfo {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for BuildInfo {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct LoginCryptoHelloUnion {
// message fields
diffie_hellman: ::protobuf::SingularPtrField<LoginCryptoDiffieHellmanHello>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoginCryptoHelloUnion {
fn default() -> &'a LoginCryptoHelloUnion {
<LoginCryptoHelloUnion as ::protobuf::Message>::default_instance()
}
}
impl LoginCryptoHelloUnion {
pub fn new() -> LoginCryptoHelloUnion {
::std::default::Default::default()
}
// optional .LoginCryptoDiffieHellmanHello diffie_hellman = 10;
pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanHello {
2020-07-22 15:35:05 +00:00
self.diffie_hellman
.as_ref()
.unwrap_or_else(|| LoginCryptoDiffieHellmanHello::default_instance())
}
pub fn clear_diffie_hellman(&mut self) {
self.diffie_hellman.clear();
}
pub fn has_diffie_hellman(&self) -> bool {
self.diffie_hellman.is_some()
}
// Param is passed by value, moved
pub fn set_diffie_hellman(&mut self, v: LoginCryptoDiffieHellmanHello) {
self.diffie_hellman = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_diffie_hellman(&mut self) -> &mut LoginCryptoDiffieHellmanHello {
if self.diffie_hellman.is_none() {
self.diffie_hellman.set_default();
}
self.diffie_hellman.as_mut().unwrap()
}
// Take field
pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanHello {
2020-07-22 15:35:05 +00:00
self.diffie_hellman
.take()
.unwrap_or_else(|| LoginCryptoDiffieHellmanHello::new())
}
}
impl ::protobuf::Message for LoginCryptoHelloUnion {
fn is_initialized(&self) -> bool {
for v in &self.diffie_hellman {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.diffie_hellman,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.diffie_hellman.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.diffie_hellman.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoginCryptoHelloUnion {
LoginCryptoHelloUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<LoginCryptoDiffieHellmanHello>,
>(
"diffie_hellman",
|m: &LoginCryptoHelloUnion| &m.diffie_hellman,
|m: &mut LoginCryptoHelloUnion| &mut m.diffie_hellman,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<LoginCryptoHelloUnion>(
"LoginCryptoHelloUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static LoginCryptoHelloUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<LoginCryptoHelloUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(LoginCryptoHelloUnion::new) }
}
}
impl ::protobuf::Clear for LoginCryptoHelloUnion {
fn clear(&mut self) {
self.diffie_hellman.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoginCryptoHelloUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for LoginCryptoHelloUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct LoginCryptoDiffieHellmanHello {
// message fields
gc: ::protobuf::SingularField<::std::vec::Vec<u8>>,
server_keys_known: ::std::option::Option<u32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanHello {
fn default() -> &'a LoginCryptoDiffieHellmanHello {
<LoginCryptoDiffieHellmanHello as ::protobuf::Message>::default_instance()
}
}
impl LoginCryptoDiffieHellmanHello {
pub fn new() -> LoginCryptoDiffieHellmanHello {
::std::default::Default::default()
}
// 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();
}
pub fn has_gc(&self) -> bool {
self.gc.is_some()
}
// Param is passed by value, moved
pub fn set_gc(&mut self, v: ::std::vec::Vec<u8>) {
self.gc = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_gc(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.gc.is_none() {
self.gc.set_default();
}
self.gc.as_mut().unwrap()
}
// Take field
pub fn take_gc(&mut self) -> ::std::vec::Vec<u8> {
self.gc.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// 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;
}
pub fn has_server_keys_known(&self) -> bool {
self.server_keys_known.is_some()
}
// Param is passed by value, moved
pub fn set_server_keys_known(&mut self, v: u32) {
self.server_keys_known = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for LoginCryptoDiffieHellmanHello {
fn is_initialized(&self) -> bool {
if self.gc.is_none() {
return false;
}
if self.server_keys_known.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gc)?;
2020-07-22 15:35:05 +00:00
}
20 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_uint32()?;
self.server_keys_known = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.gc.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.server_keys_known {
my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.gc.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
if let Some(v) = self.server_keys_known {
2017-01-18 05:58:12 +00:00
os.write_uint32(20, v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoginCryptoDiffieHellmanHello {
LoginCryptoDiffieHellmanHello::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2017-01-18 05:58:12 +00:00
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"gc",
|m: &LoginCryptoDiffieHellmanHello| { &m.gc },
|m: &mut LoginCryptoDiffieHellmanHello| { &mut m.gc },
));
2017-01-18 05:58:12 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
"server_keys_known",
|m: &LoginCryptoDiffieHellmanHello| { &m.server_keys_known },
|m: &mut LoginCryptoDiffieHellmanHello| { &mut m.server_keys_known },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<LoginCryptoDiffieHellmanHello>(
"LoginCryptoDiffieHellmanHello",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static LoginCryptoDiffieHellmanHello {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<LoginCryptoDiffieHellmanHello> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(LoginCryptoDiffieHellmanHello::new) }
}
}
impl ::protobuf::Clear for LoginCryptoDiffieHellmanHello {
fn clear(&mut self) {
self.gc.clear();
self.server_keys_known = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoginCryptoDiffieHellmanHello {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanHello {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct FeatureSet {
// message fields
autoupdate2: ::std::option::Option<bool>,
current_location: ::std::option::Option<bool>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FeatureSet {
fn default() -> &'a FeatureSet {
<FeatureSet as ::protobuf::Message>::default_instance()
}
}
impl FeatureSet {
pub fn new() -> FeatureSet {
::std::default::Default::default()
}
// 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;
}
pub fn has_autoupdate2(&self) -> bool {
self.autoupdate2.is_some()
}
// Param is passed by value, moved
pub fn set_autoupdate2(&mut self, v: bool) {
self.autoupdate2 = ::std::option::Option::Some(v);
}
// 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;
}
pub fn has_current_location(&self) -> bool {
self.current_location.is_some()
}
// Param is passed by value, moved
pub fn set_current_location(&mut self, v: bool) {
self.current_location = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for FeatureSet {
fn is_initialized(&self) -> bool {
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_bool()?;
self.autoupdate2 = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_bool()?;
self.current_location = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
2017-01-18 05:58:12 +00:00
if let Some(v) = self.autoupdate2 {
my_size += 2;
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.current_location {
my_size += 2;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.autoupdate2 {
2017-01-18 05:58:12 +00:00
os.write_bool(1, v)?;
}
if let Some(v) = self.current_location {
2017-01-18 05:58:12 +00:00
os.write_bool(2, v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FeatureSet {
FeatureSet::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeBool,
>(
"autoupdate2",
2020-07-22 15:35:05 +00:00
|m: &FeatureSet| &m.autoupdate2,
|m: &mut FeatureSet| &mut m.autoupdate2,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeBool,
>(
"current_location",
2020-07-22 15:35:05 +00:00
|m: &FeatureSet| &m.current_location,
|m: &mut FeatureSet| &mut m.current_location,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FeatureSet>(
"FeatureSet",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static FeatureSet {
static mut instance: ::protobuf::lazy::Lazy<FeatureSet> = ::protobuf::lazy::Lazy::INIT;
2020-07-22 15:35:05 +00:00
unsafe { instance.get(FeatureSet::new) }
}
}
impl ::protobuf::Clear for FeatureSet {
fn clear(&mut self) {
self.autoupdate2 = ::std::option::Option::None;
self.current_location = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FeatureSet {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for FeatureSet {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct APResponseMessage {
// message fields
challenge: ::protobuf::SingularPtrField<APChallenge>,
upgrade: ::protobuf::SingularPtrField<UpgradeRequiredMessage>,
login_failed: ::protobuf::SingularPtrField<APLoginFailed>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a APResponseMessage {
fn default() -> &'a APResponseMessage {
<APResponseMessage as ::protobuf::Message>::default_instance()
}
}
impl APResponseMessage {
pub fn new() -> APResponseMessage {
::std::default::Default::default()
}
// optional .APChallenge challenge = 10;
pub fn get_challenge(&self) -> &APChallenge {
2020-07-22 15:35:05 +00:00
self.challenge
.as_ref()
.unwrap_or_else(|| APChallenge::default_instance())
}
pub fn clear_challenge(&mut self) {
self.challenge.clear();
}
pub fn has_challenge(&self) -> bool {
self.challenge.is_some()
}
// Param is passed by value, moved
pub fn set_challenge(&mut self, v: APChallenge) {
self.challenge = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_challenge(&mut self) -> &mut APChallenge {
if self.challenge.is_none() {
self.challenge.set_default();
}
self.challenge.as_mut().unwrap()
}
// Take field
pub fn take_challenge(&mut self) -> APChallenge {
self.challenge.take().unwrap_or_else(|| APChallenge::new())
}
// optional .UpgradeRequiredMessage upgrade = 20;
pub fn get_upgrade(&self) -> &UpgradeRequiredMessage {
2020-07-22 15:35:05 +00:00
self.upgrade
.as_ref()
.unwrap_or_else(|| UpgradeRequiredMessage::default_instance())
}
pub fn clear_upgrade(&mut self) {
self.upgrade.clear();
}
pub fn has_upgrade(&self) -> bool {
self.upgrade.is_some()
}
// Param is passed by value, moved
pub fn set_upgrade(&mut self, v: UpgradeRequiredMessage) {
self.upgrade = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_upgrade(&mut self) -> &mut UpgradeRequiredMessage {
if self.upgrade.is_none() {
self.upgrade.set_default();
}
self.upgrade.as_mut().unwrap()
}
// Take field
pub fn take_upgrade(&mut self) -> UpgradeRequiredMessage {
2020-07-22 15:35:05 +00:00
self.upgrade
.take()
.unwrap_or_else(|| UpgradeRequiredMessage::new())
}
// optional .APLoginFailed login_failed = 30;
pub fn get_login_failed(&self) -> &APLoginFailed {
2020-07-22 15:35:05 +00:00
self.login_failed
.as_ref()
.unwrap_or_else(|| APLoginFailed::default_instance())
}
pub fn clear_login_failed(&mut self) {
self.login_failed.clear();
}
pub fn has_login_failed(&self) -> bool {
self.login_failed.is_some()
}
// Param is passed by value, moved
pub fn set_login_failed(&mut self, v: APLoginFailed) {
self.login_failed = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_login_failed(&mut self) -> &mut APLoginFailed {
if self.login_failed.is_none() {
self.login_failed.set_default();
}
self.login_failed.as_mut().unwrap()
}
// Take field
pub fn take_login_failed(&mut self) -> APLoginFailed {
2020-07-22 15:35:05 +00:00
self.login_failed
.take()
.unwrap_or_else(|| APLoginFailed::new())
}
}
impl ::protobuf::Message for APResponseMessage {
fn is_initialized(&self) -> bool {
for v in &self.challenge {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.upgrade {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.login_failed {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.challenge)?;
2020-07-22 15:35:05 +00:00
}
20 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.upgrade)?;
2020-07-22 15:35:05 +00:00
}
30 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.login_failed,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.challenge.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.upgrade.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.login_failed.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.challenge.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.upgrade.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.login_failed.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> APResponseMessage {
APResponseMessage::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<APChallenge>,
>(
"challenge",
|m: &APResponseMessage| &m.challenge,
|m: &mut APResponseMessage| &mut m.challenge,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<UpgradeRequiredMessage>,
>(
"upgrade",
|m: &APResponseMessage| &m.upgrade,
|m: &mut APResponseMessage| &mut m.upgrade,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<APLoginFailed>,
>(
"login_failed",
|m: &APResponseMessage| &m.login_failed,
|m: &mut APResponseMessage| &mut m.login_failed,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<APResponseMessage>(
"APResponseMessage",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static APResponseMessage {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<APResponseMessage> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(APResponseMessage::new) }
}
}
impl ::protobuf::Clear for APResponseMessage {
fn clear(&mut self) {
self.challenge.clear();
self.upgrade.clear();
self.login_failed.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for APResponseMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for APResponseMessage {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct APChallenge {
// message fields
login_crypto_challenge: ::protobuf::SingularPtrField<LoginCryptoChallengeUnion>,
fingerprint_challenge: ::protobuf::SingularPtrField<FingerprintChallengeUnion>,
pow_challenge: ::protobuf::SingularPtrField<PoWChallengeUnion>,
crypto_challenge: ::protobuf::SingularPtrField<CryptoChallengeUnion>,
server_nonce: ::protobuf::SingularField<::std::vec::Vec<u8>>,
padding: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a APChallenge {
fn default() -> &'a APChallenge {
<APChallenge as ::protobuf::Message>::default_instance()
}
}
impl APChallenge {
pub fn new() -> APChallenge {
::std::default::Default::default()
}
// required .LoginCryptoChallengeUnion login_crypto_challenge = 10;
pub fn get_login_crypto_challenge(&self) -> &LoginCryptoChallengeUnion {
2020-07-22 15:35:05 +00:00
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();
}
pub fn has_login_crypto_challenge(&self) -> bool {
self.login_crypto_challenge.is_some()
}
// Param is passed by value, moved
pub fn set_login_crypto_challenge(&mut self, v: LoginCryptoChallengeUnion) {
self.login_crypto_challenge = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_login_crypto_challenge(&mut self) -> &mut LoginCryptoChallengeUnion {
if self.login_crypto_challenge.is_none() {
self.login_crypto_challenge.set_default();
}
self.login_crypto_challenge.as_mut().unwrap()
}
// Take field
pub fn take_login_crypto_challenge(&mut self) -> LoginCryptoChallengeUnion {
2020-07-22 15:35:05 +00:00
self.login_crypto_challenge
.take()
.unwrap_or_else(|| LoginCryptoChallengeUnion::new())
}
// required .FingerprintChallengeUnion fingerprint_challenge = 20;
pub fn get_fingerprint_challenge(&self) -> &FingerprintChallengeUnion {
2020-07-22 15:35:05 +00:00
self.fingerprint_challenge
.as_ref()
.unwrap_or_else(|| FingerprintChallengeUnion::default_instance())
}
pub fn clear_fingerprint_challenge(&mut self) {
self.fingerprint_challenge.clear();
}
pub fn has_fingerprint_challenge(&self) -> bool {
self.fingerprint_challenge.is_some()
}
// Param is passed by value, moved
pub fn set_fingerprint_challenge(&mut self, v: FingerprintChallengeUnion) {
self.fingerprint_challenge = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_fingerprint_challenge(&mut self) -> &mut FingerprintChallengeUnion {
if self.fingerprint_challenge.is_none() {
self.fingerprint_challenge.set_default();
}
self.fingerprint_challenge.as_mut().unwrap()
}
// Take field
pub fn take_fingerprint_challenge(&mut self) -> FingerprintChallengeUnion {
2020-07-22 15:35:05 +00:00
self.fingerprint_challenge
.take()
.unwrap_or_else(|| FingerprintChallengeUnion::new())
}
// required .PoWChallengeUnion pow_challenge = 30;
pub fn get_pow_challenge(&self) -> &PoWChallengeUnion {
2020-07-22 15:35:05 +00:00
self.pow_challenge
.as_ref()
.unwrap_or_else(|| PoWChallengeUnion::default_instance())
}
pub fn clear_pow_challenge(&mut self) {
self.pow_challenge.clear();
}
pub fn has_pow_challenge(&self) -> bool {
self.pow_challenge.is_some()
}
// Param is passed by value, moved
pub fn set_pow_challenge(&mut self, v: PoWChallengeUnion) {
self.pow_challenge = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_pow_challenge(&mut self) -> &mut PoWChallengeUnion {
if self.pow_challenge.is_none() {
self.pow_challenge.set_default();
}
self.pow_challenge.as_mut().unwrap()
}
// Take field
pub fn take_pow_challenge(&mut self) -> PoWChallengeUnion {
2020-07-22 15:35:05 +00:00
self.pow_challenge
.take()
.unwrap_or_else(|| PoWChallengeUnion::new())
}
// required .CryptoChallengeUnion crypto_challenge = 40;
pub fn get_crypto_challenge(&self) -> &CryptoChallengeUnion {
2020-07-22 15:35:05 +00:00
self.crypto_challenge
.as_ref()
.unwrap_or_else(|| CryptoChallengeUnion::default_instance())
}
pub fn clear_crypto_challenge(&mut self) {
self.crypto_challenge.clear();
}
pub fn has_crypto_challenge(&self) -> bool {
self.crypto_challenge.is_some()
}
// Param is passed by value, moved
pub fn set_crypto_challenge(&mut self, v: CryptoChallengeUnion) {
self.crypto_challenge = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_crypto_challenge(&mut self) -> &mut CryptoChallengeUnion {
if self.crypto_challenge.is_none() {
self.crypto_challenge.set_default();
}
self.crypto_challenge.as_mut().unwrap()
}
// Take field
pub fn take_crypto_challenge(&mut self) -> CryptoChallengeUnion {
2020-07-22 15:35:05 +00:00
self.crypto_challenge
.take()
.unwrap_or_else(|| CryptoChallengeUnion::new())
}
// 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();
}
pub fn has_server_nonce(&self) -> bool {
self.server_nonce.is_some()
}
// Param is passed by value, moved
pub fn set_server_nonce(&mut self, v: ::std::vec::Vec<u8>) {
self.server_nonce = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_server_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.server_nonce.is_none() {
self.server_nonce.set_default();
}
self.server_nonce.as_mut().unwrap()
}
// Take field
pub fn take_server_nonce(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.server_nonce
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes padding = 60;
pub fn get_padding(&self) -> &[u8] {
match self.padding.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_padding(&mut self) {
self.padding.clear();
}
pub fn has_padding(&self) -> bool {
self.padding.is_some()
}
// Param is passed by value, moved
pub fn set_padding(&mut self, v: ::std::vec::Vec<u8>) {
self.padding = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_padding(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.padding.is_none() {
self.padding.set_default();
}
self.padding.as_mut().unwrap()
}
// Take field
pub fn take_padding(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.padding
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for APChallenge {
fn is_initialized(&self) -> bool {
if self.login_crypto_challenge.is_none() {
return false;
}
if self.fingerprint_challenge.is_none() {
return false;
}
if self.pow_challenge.is_none() {
return false;
}
if self.crypto_challenge.is_none() {
return false;
}
if self.server_nonce.is_none() {
return false;
}
for v in &self.login_crypto_challenge {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.fingerprint_challenge {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.pow_challenge {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.crypto_challenge {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.login_crypto_challenge,
)?;
}
20 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.fingerprint_challenge,
)?;
}
30 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.pow_challenge,
)?;
}
40 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.crypto_challenge,
)?;
}
50 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_bytes_into(
wire_type,
is,
&mut self.server_nonce,
)?;
}
60 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.padding)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.login_crypto_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.fingerprint_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.pow_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.crypto_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.server_nonce.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(50, &v);
}
if let Some(ref v) = self.padding.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(60, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.login_crypto_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.fingerprint_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.pow_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.crypto_challenge.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(40, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.server_nonce.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(50, &v)?;
}
if let Some(ref v) = self.padding.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(60, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> APChallenge {
APChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<LoginCryptoChallengeUnion>,
>(
"login_crypto_challenge",
|m: &APChallenge| &m.login_crypto_challenge,
|m: &mut APChallenge| &mut m.login_crypto_challenge,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<FingerprintChallengeUnion>,
>(
"fingerprint_challenge",
|m: &APChallenge| &m.fingerprint_challenge,
|m: &mut APChallenge| &mut m.fingerprint_challenge,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<PoWChallengeUnion>,
>(
"pow_challenge",
|m: &APChallenge| &m.pow_challenge,
|m: &mut APChallenge| &mut m.pow_challenge,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<CryptoChallengeUnion>,
>(
"crypto_challenge",
|m: &APChallenge| &m.crypto_challenge,
|m: &mut APChallenge| &mut m.crypto_challenge,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"server_nonce",
|m: &APChallenge| &m.server_nonce,
|m: &mut APChallenge| &mut m.server_nonce,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"padding",
|m: &APChallenge| &m.padding,
|m: &mut APChallenge| &mut m.padding,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<APChallenge>(
"APChallenge",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static APChallenge {
static mut instance: ::protobuf::lazy::Lazy<APChallenge> = ::protobuf::lazy::Lazy::INIT;
2020-07-22 15:35:05 +00:00
unsafe { instance.get(APChallenge::new) }
}
}
impl ::protobuf::Clear for APChallenge {
fn clear(&mut self) {
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();
}
}
impl ::std::fmt::Debug for APChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for APChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct LoginCryptoChallengeUnion {
// message fields
diffie_hellman: ::protobuf::SingularPtrField<LoginCryptoDiffieHellmanChallenge>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoginCryptoChallengeUnion {
fn default() -> &'a LoginCryptoChallengeUnion {
<LoginCryptoChallengeUnion as ::protobuf::Message>::default_instance()
}
}
impl LoginCryptoChallengeUnion {
pub fn new() -> LoginCryptoChallengeUnion {
::std::default::Default::default()
}
// optional .LoginCryptoDiffieHellmanChallenge diffie_hellman = 10;
pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanChallenge {
2020-07-22 15:35:05 +00:00
self.diffie_hellman
.as_ref()
.unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::default_instance())
}
pub fn clear_diffie_hellman(&mut self) {
self.diffie_hellman.clear();
}
pub fn has_diffie_hellman(&self) -> bool {
self.diffie_hellman.is_some()
}
// Param is passed by value, moved
pub fn set_diffie_hellman(&mut self, v: LoginCryptoDiffieHellmanChallenge) {
self.diffie_hellman = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_diffie_hellman(&mut self) -> &mut LoginCryptoDiffieHellmanChallenge {
if self.diffie_hellman.is_none() {
self.diffie_hellman.set_default();
}
self.diffie_hellman.as_mut().unwrap()
}
// Take field
pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanChallenge {
2020-07-22 15:35:05 +00:00
self.diffie_hellman
.take()
.unwrap_or_else(|| LoginCryptoDiffieHellmanChallenge::new())
}
}
impl ::protobuf::Message for LoginCryptoChallengeUnion {
fn is_initialized(&self) -> bool {
for v in &self.diffie_hellman {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.diffie_hellman,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.diffie_hellman.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.diffie_hellman.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoginCryptoChallengeUnion {
LoginCryptoChallengeUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<LoginCryptoDiffieHellmanChallenge>,
>(
"diffie_hellman",
|m: &LoginCryptoChallengeUnion| &m.diffie_hellman,
|m: &mut LoginCryptoChallengeUnion| &mut m.diffie_hellman,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<LoginCryptoChallengeUnion>(
"LoginCryptoChallengeUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static LoginCryptoChallengeUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<LoginCryptoChallengeUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(LoginCryptoChallengeUnion::new) }
}
}
impl ::protobuf::Clear for LoginCryptoChallengeUnion {
fn clear(&mut self) {
self.diffie_hellman.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoginCryptoChallengeUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for LoginCryptoChallengeUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct LoginCryptoDiffieHellmanChallenge {
// message fields
gs: ::protobuf::SingularField<::std::vec::Vec<u8>>,
server_signature_key: ::std::option::Option<i32>,
gs_signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanChallenge {
fn default() -> &'a LoginCryptoDiffieHellmanChallenge {
<LoginCryptoDiffieHellmanChallenge as ::protobuf::Message>::default_instance()
}
}
impl LoginCryptoDiffieHellmanChallenge {
pub fn new() -> LoginCryptoDiffieHellmanChallenge {
::std::default::Default::default()
}
// 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();
}
pub fn has_gs(&self) -> bool {
self.gs.is_some()
}
// Param is passed by value, moved
pub fn set_gs(&mut self, v: ::std::vec::Vec<u8>) {
self.gs = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_gs(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.gs.is_none() {
self.gs.set_default();
}
self.gs.as_mut().unwrap()
}
// Take field
pub fn take_gs(&mut self) -> ::std::vec::Vec<u8> {
self.gs.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// 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;
}
pub fn has_server_signature_key(&self) -> bool {
self.server_signature_key.is_some()
}
// Param is passed by value, moved
pub fn set_server_signature_key(&mut self, v: i32) {
self.server_signature_key = ::std::option::Option::Some(v);
}
// 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();
}
pub fn has_gs_signature(&self) -> bool {
self.gs_signature.is_some()
}
// Param is passed by value, moved
pub fn set_gs_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.gs_signature = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_gs_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.gs_signature.is_none() {
self.gs_signature.set_default();
}
self.gs_signature.as_mut().unwrap()
}
// Take field
pub fn take_gs_signature(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.gs_signature
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for LoginCryptoDiffieHellmanChallenge {
fn is_initialized(&self) -> bool {
if self.gs.is_none() {
return false;
}
if self.server_signature_key.is_none() {
return false;
}
if self.gs_signature.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.gs)?;
2020-07-22 15:35:05 +00:00
}
20 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.server_signature_key = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
30 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_bytes_into(
wire_type,
is,
&mut self.gs_signature,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.gs.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.server_signature_key {
my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.gs_signature.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(30, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.gs.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
if let Some(v) = self.server_signature_key {
2017-01-18 05:58:12 +00:00
os.write_int32(20, v)?;
}
if let Some(ref v) = self.gs_signature.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(30, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoginCryptoDiffieHellmanChallenge {
LoginCryptoDiffieHellmanChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"gs",
|m: &LoginCryptoDiffieHellmanChallenge| &m.gs,
|m: &mut LoginCryptoDiffieHellmanChallenge| &mut m.gs,
),
);
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"server_signature_key",
2020-07-22 15:35:05 +00:00
|m: &LoginCryptoDiffieHellmanChallenge| &m.server_signature_key,
|m: &mut LoginCryptoDiffieHellmanChallenge| &mut m.server_signature_key,
));
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"gs_signature",
|m: &LoginCryptoDiffieHellmanChallenge| &m.gs_signature,
|m: &mut LoginCryptoDiffieHellmanChallenge| &mut m.gs_signature,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<
LoginCryptoDiffieHellmanChallenge,
>(
"LoginCryptoDiffieHellmanChallenge",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static LoginCryptoDiffieHellmanChallenge {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<LoginCryptoDiffieHellmanChallenge> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(LoginCryptoDiffieHellmanChallenge::new) }
}
}
impl ::protobuf::Clear for LoginCryptoDiffieHellmanChallenge {
fn clear(&mut self) {
self.gs.clear();
self.server_signature_key = ::std::option::Option::None;
self.gs_signature.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoginCryptoDiffieHellmanChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct FingerprintChallengeUnion {
// message fields
grain: ::protobuf::SingularPtrField<FingerprintGrainChallenge>,
hmac_ripemd: ::protobuf::SingularPtrField<FingerprintHmacRipemdChallenge>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FingerprintChallengeUnion {
fn default() -> &'a FingerprintChallengeUnion {
<FingerprintChallengeUnion as ::protobuf::Message>::default_instance()
}
}
impl FingerprintChallengeUnion {
pub fn new() -> FingerprintChallengeUnion {
::std::default::Default::default()
}
// optional .FingerprintGrainChallenge grain = 10;
pub fn get_grain(&self) -> &FingerprintGrainChallenge {
2020-07-22 15:35:05 +00:00
self.grain
.as_ref()
.unwrap_or_else(|| FingerprintGrainChallenge::default_instance())
}
pub fn clear_grain(&mut self) {
self.grain.clear();
}
pub fn has_grain(&self) -> bool {
self.grain.is_some()
}
// Param is passed by value, moved
pub fn set_grain(&mut self, v: FingerprintGrainChallenge) {
self.grain = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_grain(&mut self) -> &mut FingerprintGrainChallenge {
if self.grain.is_none() {
self.grain.set_default();
}
self.grain.as_mut().unwrap()
}
// Take field
pub fn take_grain(&mut self) -> FingerprintGrainChallenge {
2020-07-22 15:35:05 +00:00
self.grain
.take()
.unwrap_or_else(|| FingerprintGrainChallenge::new())
}
// optional .FingerprintHmacRipemdChallenge hmac_ripemd = 20;
pub fn get_hmac_ripemd(&self) -> &FingerprintHmacRipemdChallenge {
2020-07-22 15:35:05 +00:00
self.hmac_ripemd
.as_ref()
.unwrap_or_else(|| FingerprintHmacRipemdChallenge::default_instance())
}
pub fn clear_hmac_ripemd(&mut self) {
self.hmac_ripemd.clear();
}
pub fn has_hmac_ripemd(&self) -> bool {
self.hmac_ripemd.is_some()
}
// Param is passed by value, moved
pub fn set_hmac_ripemd(&mut self, v: FingerprintHmacRipemdChallenge) {
self.hmac_ripemd = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_hmac_ripemd(&mut self) -> &mut FingerprintHmacRipemdChallenge {
if self.hmac_ripemd.is_none() {
self.hmac_ripemd.set_default();
}
self.hmac_ripemd.as_mut().unwrap()
}
// Take field
pub fn take_hmac_ripemd(&mut self) -> FingerprintHmacRipemdChallenge {
2020-07-22 15:35:05 +00:00
self.hmac_ripemd
.take()
.unwrap_or_else(|| FingerprintHmacRipemdChallenge::new())
}
}
impl ::protobuf::Message for FingerprintChallengeUnion {
fn is_initialized(&self) -> bool {
for v in &self.grain {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.hmac_ripemd {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.grain)?;
2020-07-22 15:35:05 +00:00
}
20 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.hmac_ripemd,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.grain.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.hmac_ripemd.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.grain.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.hmac_ripemd.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FingerprintChallengeUnion {
FingerprintChallengeUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<FingerprintGrainChallenge>,
>(
"grain",
|m: &FingerprintChallengeUnion| &m.grain,
|m: &mut FingerprintChallengeUnion| &mut m.grain,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<FingerprintHmacRipemdChallenge>,
>(
"hmac_ripemd",
|m: &FingerprintChallengeUnion| &m.hmac_ripemd,
|m: &mut FingerprintChallengeUnion| &mut m.hmac_ripemd,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<FingerprintChallengeUnion>(
"FingerprintChallengeUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static FingerprintChallengeUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<FingerprintChallengeUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(FingerprintChallengeUnion::new) }
}
}
impl ::protobuf::Clear for FingerprintChallengeUnion {
fn clear(&mut self) {
self.grain.clear();
self.hmac_ripemd.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FingerprintChallengeUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for FingerprintChallengeUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct FingerprintGrainChallenge {
// message fields
kek: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FingerprintGrainChallenge {
fn default() -> &'a FingerprintGrainChallenge {
<FingerprintGrainChallenge as ::protobuf::Message>::default_instance()
}
}
impl FingerprintGrainChallenge {
pub fn new() -> FingerprintGrainChallenge {
::std::default::Default::default()
}
// 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();
}
pub fn has_kek(&self) -> bool {
self.kek.is_some()
}
// Param is passed by value, moved
pub fn set_kek(&mut self, v: ::std::vec::Vec<u8>) {
self.kek = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_kek(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.kek.is_none() {
self.kek.set_default();
}
self.kek.as_mut().unwrap()
}
// Take field
pub fn take_kek(&mut self) -> ::std::vec::Vec<u8> {
self.kek.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for FingerprintGrainChallenge {
fn is_initialized(&self) -> bool {
if self.kek.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.kek)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.kek.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.kek.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FingerprintGrainChallenge {
FingerprintGrainChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"kek",
|m: &FingerprintGrainChallenge| &m.kek,
|m: &mut FingerprintGrainChallenge| &mut m.kek,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<FingerprintGrainChallenge>(
"FingerprintGrainChallenge",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static FingerprintGrainChallenge {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<FingerprintGrainChallenge> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(FingerprintGrainChallenge::new) }
}
}
impl ::protobuf::Clear for FingerprintGrainChallenge {
fn clear(&mut self) {
self.kek.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FingerprintGrainChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for FingerprintGrainChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct FingerprintHmacRipemdChallenge {
// message fields
challenge: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a FingerprintHmacRipemdChallenge {
fn default() -> &'a FingerprintHmacRipemdChallenge {
<FingerprintHmacRipemdChallenge as ::protobuf::Message>::default_instance()
}
}
impl FingerprintHmacRipemdChallenge {
pub fn new() -> FingerprintHmacRipemdChallenge {
::std::default::Default::default()
}
// 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();
}
pub fn has_challenge(&self) -> bool {
self.challenge.is_some()
}
// Param is passed by value, moved
pub fn set_challenge(&mut self, v: ::std::vec::Vec<u8>) {
self.challenge = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_challenge(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.challenge.is_none() {
self.challenge.set_default();
}
self.challenge.as_mut().unwrap()
}
// Take field
pub fn take_challenge(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.challenge
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for FingerprintHmacRipemdChallenge {
fn is_initialized(&self) -> bool {
if self.challenge.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.challenge)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.challenge.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.challenge.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> FingerprintHmacRipemdChallenge {
FingerprintHmacRipemdChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2017-01-18 05:58:12 +00:00
fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"challenge",
|m: &FingerprintHmacRipemdChallenge| { &m.challenge },
|m: &mut FingerprintHmacRipemdChallenge| { &mut m.challenge },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<FingerprintHmacRipemdChallenge>(
"FingerprintHmacRipemdChallenge",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static FingerprintHmacRipemdChallenge {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<FingerprintHmacRipemdChallenge> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(FingerprintHmacRipemdChallenge::new) }
}
}
impl ::protobuf::Clear for FingerprintHmacRipemdChallenge {
fn clear(&mut self) {
self.challenge.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for FingerprintHmacRipemdChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for FingerprintHmacRipemdChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct PoWChallengeUnion {
// message fields
hash_cash: ::protobuf::SingularPtrField<PoWHashCashChallenge>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a PoWChallengeUnion {
fn default() -> &'a PoWChallengeUnion {
<PoWChallengeUnion as ::protobuf::Message>::default_instance()
}
}
impl PoWChallengeUnion {
pub fn new() -> PoWChallengeUnion {
::std::default::Default::default()
}
// optional .PoWHashCashChallenge hash_cash = 10;
pub fn get_hash_cash(&self) -> &PoWHashCashChallenge {
2020-07-22 15:35:05 +00:00
self.hash_cash
.as_ref()
.unwrap_or_else(|| PoWHashCashChallenge::default_instance())
}
pub fn clear_hash_cash(&mut self) {
self.hash_cash.clear();
}
pub fn has_hash_cash(&self) -> bool {
self.hash_cash.is_some()
}
// Param is passed by value, moved
pub fn set_hash_cash(&mut self, v: PoWHashCashChallenge) {
self.hash_cash = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_hash_cash(&mut self) -> &mut PoWHashCashChallenge {
if self.hash_cash.is_none() {
self.hash_cash.set_default();
}
self.hash_cash.as_mut().unwrap()
}
// Take field
pub fn take_hash_cash(&mut self) -> PoWHashCashChallenge {
2020-07-22 15:35:05 +00:00
self.hash_cash
.take()
.unwrap_or_else(|| PoWHashCashChallenge::new())
}
}
impl ::protobuf::Message for PoWChallengeUnion {
fn is_initialized(&self) -> bool {
for v in &self.hash_cash {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hash_cash)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.hash_cash.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.hash_cash.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PoWChallengeUnion {
PoWChallengeUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<PoWHashCashChallenge>,
>(
"hash_cash",
|m: &PoWChallengeUnion| &m.hash_cash,
|m: &mut PoWChallengeUnion| &mut m.hash_cash,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<PoWChallengeUnion>(
"PoWChallengeUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static PoWChallengeUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<PoWChallengeUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(PoWChallengeUnion::new) }
}
}
impl ::protobuf::Clear for PoWChallengeUnion {
fn clear(&mut self) {
self.hash_cash.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PoWChallengeUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for PoWChallengeUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct PoWHashCashChallenge {
// message fields
prefix: ::protobuf::SingularField<::std::vec::Vec<u8>>,
length: ::std::option::Option<i32>,
target: ::std::option::Option<i32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a PoWHashCashChallenge {
fn default() -> &'a PoWHashCashChallenge {
<PoWHashCashChallenge as ::protobuf::Message>::default_instance()
}
}
impl PoWHashCashChallenge {
pub fn new() -> PoWHashCashChallenge {
::std::default::Default::default()
}
// 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();
}
pub fn has_prefix(&self) -> bool {
self.prefix.is_some()
}
// Param is passed by value, moved
pub fn set_prefix(&mut self, v: ::std::vec::Vec<u8>) {
self.prefix = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_prefix(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.prefix.is_none() {
self.prefix.set_default();
}
self.prefix.as_mut().unwrap()
}
// Take field
pub fn take_prefix(&mut self) -> ::std::vec::Vec<u8> {
self.prefix.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// 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;
}
pub fn has_length(&self) -> bool {
self.length.is_some()
}
// Param is passed by value, moved
pub fn set_length(&mut self, v: i32) {
self.length = ::std::option::Option::Some(v);
}
// 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;
}
pub fn has_target(&self) -> bool {
self.target.is_some()
}
// Param is passed by value, moved
pub fn set_target(&mut self, v: i32) {
self.target = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for PoWHashCashChallenge {
fn is_initialized(&self) -> bool {
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.prefix)?;
2020-07-22 15:35:05 +00:00
}
20 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.length = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
30 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.target = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.prefix.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.length {
my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.target {
my_size += ::protobuf::rt::value_size(30, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.prefix.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
if let Some(v) = self.length {
2017-01-18 05:58:12 +00:00
os.write_int32(20, v)?;
}
if let Some(v) = self.target {
2017-01-18 05:58:12 +00:00
os.write_int32(30, v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PoWHashCashChallenge {
PoWHashCashChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"prefix",
|m: &PoWHashCashChallenge| &m.prefix,
|m: &mut PoWHashCashChallenge| &mut m.prefix,
),
);
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"length",
2020-07-22 15:35:05 +00:00
|m: &PoWHashCashChallenge| &m.length,
|m: &mut PoWHashCashChallenge| &mut m.length,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"target",
2020-07-22 15:35:05 +00:00
|m: &PoWHashCashChallenge| &m.target,
|m: &mut PoWHashCashChallenge| &mut m.target,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<PoWHashCashChallenge>(
"PoWHashCashChallenge",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static PoWHashCashChallenge {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<PoWHashCashChallenge> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(PoWHashCashChallenge::new) }
}
}
impl ::protobuf::Clear for PoWHashCashChallenge {
fn clear(&mut self) {
self.prefix.clear();
self.length = ::std::option::Option::None;
self.target = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PoWHashCashChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for PoWHashCashChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct CryptoChallengeUnion {
// message fields
shannon: ::protobuf::SingularPtrField<CryptoShannonChallenge>,
rc4_sha1_hmac: ::protobuf::SingularPtrField<CryptoRc4Sha1HmacChallenge>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CryptoChallengeUnion {
fn default() -> &'a CryptoChallengeUnion {
<CryptoChallengeUnion as ::protobuf::Message>::default_instance()
}
}
impl CryptoChallengeUnion {
pub fn new() -> CryptoChallengeUnion {
::std::default::Default::default()
}
// optional .CryptoShannonChallenge shannon = 10;
pub fn get_shannon(&self) -> &CryptoShannonChallenge {
2020-07-22 15:35:05 +00:00
self.shannon
.as_ref()
.unwrap_or_else(|| CryptoShannonChallenge::default_instance())
}
pub fn clear_shannon(&mut self) {
self.shannon.clear();
}
pub fn has_shannon(&self) -> bool {
self.shannon.is_some()
}
// Param is passed by value, moved
pub fn set_shannon(&mut self, v: CryptoShannonChallenge) {
self.shannon = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_shannon(&mut self) -> &mut CryptoShannonChallenge {
if self.shannon.is_none() {
self.shannon.set_default();
}
self.shannon.as_mut().unwrap()
}
// Take field
pub fn take_shannon(&mut self) -> CryptoShannonChallenge {
2020-07-22 15:35:05 +00:00
self.shannon
.take()
.unwrap_or_else(|| CryptoShannonChallenge::new())
}
// optional .CryptoRc4Sha1HmacChallenge rc4_sha1_hmac = 20;
pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacChallenge {
2020-07-22 15:35:05 +00:00
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();
}
pub fn has_rc4_sha1_hmac(&self) -> bool {
self.rc4_sha1_hmac.is_some()
}
// Param is passed by value, moved
pub fn set_rc4_sha1_hmac(&mut self, v: CryptoRc4Sha1HmacChallenge) {
self.rc4_sha1_hmac = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_rc4_sha1_hmac(&mut self) -> &mut CryptoRc4Sha1HmacChallenge {
if self.rc4_sha1_hmac.is_none() {
self.rc4_sha1_hmac.set_default();
}
self.rc4_sha1_hmac.as_mut().unwrap()
}
// Take field
pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacChallenge {
2020-07-22 15:35:05 +00:00
self.rc4_sha1_hmac
.take()
.unwrap_or_else(|| CryptoRc4Sha1HmacChallenge::new())
}
}
impl ::protobuf::Message for CryptoChallengeUnion {
fn is_initialized(&self) -> bool {
for v in &self.shannon {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.rc4_sha1_hmac {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shannon)?;
2020-07-22 15:35:05 +00:00
}
20 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.rc4_sha1_hmac,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.shannon.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.shannon.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CryptoChallengeUnion {
CryptoChallengeUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<CryptoShannonChallenge>,
>(
"shannon",
|m: &CryptoChallengeUnion| &m.shannon,
|m: &mut CryptoChallengeUnion| &mut m.shannon,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<CryptoRc4Sha1HmacChallenge>,
>(
"rc4_sha1_hmac",
|m: &CryptoChallengeUnion| &m.rc4_sha1_hmac,
|m: &mut CryptoChallengeUnion| &mut m.rc4_sha1_hmac,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<CryptoChallengeUnion>(
"CryptoChallengeUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static CryptoChallengeUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<CryptoChallengeUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(CryptoChallengeUnion::new) }
}
}
impl ::protobuf::Clear for CryptoChallengeUnion {
fn clear(&mut self) {
self.shannon.clear();
self.rc4_sha1_hmac.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CryptoChallengeUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for CryptoChallengeUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct CryptoShannonChallenge {
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CryptoShannonChallenge {
fn default() -> &'a CryptoShannonChallenge {
<CryptoShannonChallenge as ::protobuf::Message>::default_instance()
}
}
impl CryptoShannonChallenge {
pub fn new() -> CryptoShannonChallenge {
::std::default::Default::default()
}
}
impl ::protobuf::Message for CryptoShannonChallenge {
fn is_initialized(&self) -> bool {
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CryptoShannonChallenge {
CryptoShannonChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new_pb_name::<CryptoShannonChallenge>(
"CryptoShannonChallenge",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static CryptoShannonChallenge {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<CryptoShannonChallenge> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(CryptoShannonChallenge::new) }
}
}
impl ::protobuf::Clear for CryptoShannonChallenge {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CryptoShannonChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for CryptoShannonChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct CryptoRc4Sha1HmacChallenge {
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacChallenge {
fn default() -> &'a CryptoRc4Sha1HmacChallenge {
<CryptoRc4Sha1HmacChallenge as ::protobuf::Message>::default_instance()
}
}
impl CryptoRc4Sha1HmacChallenge {
pub fn new() -> CryptoRc4Sha1HmacChallenge {
::std::default::Default::default()
}
}
impl ::protobuf::Message for CryptoRc4Sha1HmacChallenge {
fn is_initialized(&self) -> bool {
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CryptoRc4Sha1HmacChallenge {
CryptoRc4Sha1HmacChallenge::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new_pb_name::<CryptoRc4Sha1HmacChallenge>(
"CryptoRc4Sha1HmacChallenge",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static CryptoRc4Sha1HmacChallenge {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<CryptoRc4Sha1HmacChallenge> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(CryptoRc4Sha1HmacChallenge::new) }
}
}
impl ::protobuf::Clear for CryptoRc4Sha1HmacChallenge {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CryptoRc4Sha1HmacChallenge {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for CryptoRc4Sha1HmacChallenge {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct UpgradeRequiredMessage {
// message fields
upgrade_signed_part: ::protobuf::SingularField<::std::vec::Vec<u8>>,
signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
http_suffix: ::protobuf::SingularField<::std::string::String>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a UpgradeRequiredMessage {
fn default() -> &'a UpgradeRequiredMessage {
<UpgradeRequiredMessage as ::protobuf::Message>::default_instance()
}
}
impl UpgradeRequiredMessage {
pub fn new() -> UpgradeRequiredMessage {
::std::default::Default::default()
}
// 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();
}
pub fn has_upgrade_signed_part(&self) -> bool {
self.upgrade_signed_part.is_some()
}
// Param is passed by value, moved
pub fn set_upgrade_signed_part(&mut self, v: ::std::vec::Vec<u8>) {
self.upgrade_signed_part = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_upgrade_signed_part(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.upgrade_signed_part.is_none() {
self.upgrade_signed_part.set_default();
}
self.upgrade_signed_part.as_mut().unwrap()
}
// Take field
pub fn take_upgrade_signed_part(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.upgrade_signed_part
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes signature = 20;
pub fn get_signature(&self) -> &[u8] {
match self.signature.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_signature(&mut self) {
self.signature.clear();
}
pub fn has_signature(&self) -> bool {
self.signature.is_some()
}
// Param is passed by value, moved
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature.is_none() {
self.signature.set_default();
}
self.signature.as_mut().unwrap()
}
// Take field
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.signature
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
// 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();
}
pub fn has_http_suffix(&self) -> bool {
self.http_suffix.is_some()
}
// Param is passed by value, moved
pub fn set_http_suffix(&mut self, v: ::std::string::String) {
self.http_suffix = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_http_suffix(&mut self) -> &mut ::std::string::String {
if self.http_suffix.is_none() {
self.http_suffix.set_default();
}
self.http_suffix.as_mut().unwrap()
}
// Take field
pub fn take_http_suffix(&mut self) -> ::std::string::String {
2020-07-22 15:35:05 +00:00
self.http_suffix
.take()
.unwrap_or_else(|| ::std::string::String::new())
}
}
impl ::protobuf::Message for UpgradeRequiredMessage {
fn is_initialized(&self) -> bool {
if self.upgrade_signed_part.is_none() {
return false;
}
if self.signature.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_bytes_into(
wire_type,
is,
&mut self.upgrade_signed_part,
)?;
}
20 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?;
2020-07-22 15:35:05 +00:00
}
30 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_string_into(
wire_type,
is,
&mut self.http_suffix,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.upgrade_signed_part.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
if let Some(ref v) = self.signature.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(20, &v);
}
if let Some(ref v) = self.http_suffix.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::string_size(30, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.upgrade_signed_part.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
if let Some(ref v) = self.signature.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(20, &v)?;
}
if let Some(ref v) = self.http_suffix.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_string(30, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> UpgradeRequiredMessage {
UpgradeRequiredMessage::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"upgrade_signed_part",
|m: &UpgradeRequiredMessage| &m.upgrade_signed_part,
|m: &mut UpgradeRequiredMessage| &mut m.upgrade_signed_part,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"signature",
|m: &UpgradeRequiredMessage| &m.signature,
|m: &mut UpgradeRequiredMessage| &mut m.signature,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeString,
>(
"http_suffix",
|m: &UpgradeRequiredMessage| &m.http_suffix,
|m: &mut UpgradeRequiredMessage| &mut m.http_suffix,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpgradeRequiredMessage>(
"UpgradeRequiredMessage",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static UpgradeRequiredMessage {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<UpgradeRequiredMessage> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(UpgradeRequiredMessage::new) }
}
}
impl ::protobuf::Clear for UpgradeRequiredMessage {
fn clear(&mut self) {
self.upgrade_signed_part.clear();
self.signature.clear();
self.http_suffix.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for UpgradeRequiredMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for UpgradeRequiredMessage {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct APLoginFailed {
// message fields
error_code: ::std::option::Option<ErrorCode>,
retry_delay: ::std::option::Option<i32>,
expiry: ::std::option::Option<i32>,
error_description: ::protobuf::SingularField<::std::string::String>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a APLoginFailed {
fn default() -> &'a APLoginFailed {
<APLoginFailed as ::protobuf::Message>::default_instance()
}
}
impl APLoginFailed {
pub fn new() -> APLoginFailed {
::std::default::Default::default()
}
// 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;
}
pub fn has_error_code(&self) -> bool {
self.error_code.is_some()
}
// Param is passed by value, moved
pub fn set_error_code(&mut self, v: ErrorCode) {
self.error_code = ::std::option::Option::Some(v);
}
// 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;
}
pub fn has_retry_delay(&self) -> bool {
self.retry_delay.is_some()
}
// Param is passed by value, moved
pub fn set_retry_delay(&mut self, v: i32) {
self.retry_delay = ::std::option::Option::Some(v);
}
// 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;
}
pub fn has_expiry(&self) -> bool {
self.expiry.is_some()
}
// Param is passed by value, moved
pub fn set_expiry(&mut self, v: i32) {
self.expiry = ::std::option::Option::Some(v);
}
// 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();
}
pub fn has_error_description(&self) -> bool {
self.error_description.is_some()
}
// Param is passed by value, moved
pub fn set_error_description(&mut self, v: ::std::string::String) {
self.error_description = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_error_description(&mut self) -> &mut ::std::string::String {
if self.error_description.is_none() {
self.error_description.set_default();
}
self.error_description.as_mut().unwrap()
}
// Take field
pub fn take_error_description(&mut self) -> ::std::string::String {
2020-07-22 15:35:05 +00:00
self.error_description
.take()
.unwrap_or_else(|| ::std::string::String::new())
}
}
impl ::protobuf::Message for APLoginFailed {
fn is_initialized(&self) -> bool {
if self.error_code.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
2020-07-22 15:35:05 +00:00
10 => ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(
wire_type,
is,
&mut self.error_code,
10,
&mut self.unknown_fields,
)?,
20 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.retry_delay = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
30 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.expiry = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
40 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_string_into(
wire_type,
is,
&mut self.error_description,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
2017-01-18 05:58:12 +00:00
if let Some(v) = self.error_code {
my_size += ::protobuf::rt::enum_size(10, v);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.retry_delay {
my_size += ::protobuf::rt::value_size(20, v, ::protobuf::wire_format::WireTypeVarint);
}
2017-01-18 05:58:12 +00:00
if let Some(v) = self.expiry {
my_size += ::protobuf::rt::value_size(30, v, ::protobuf::wire_format::WireTypeVarint);
}
if let Some(ref v) = self.error_description.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::string_size(40, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.error_code {
2017-01-18 05:58:12 +00:00
os.write_enum(10, v.value())?;
}
if let Some(v) = self.retry_delay {
2017-01-18 05:58:12 +00:00
os.write_int32(20, v)?;
}
if let Some(v) = self.expiry {
2017-01-18 05:58:12 +00:00
os.write_int32(30, v)?;
}
if let Some(ref v) = self.error_description.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_string(40, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> APLoginFailed {
APLoginFailed::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeEnum<ErrorCode>,
>(
"error_code",
2020-07-22 15:35:05 +00:00
|m: &APLoginFailed| &m.error_code,
|m: &mut APLoginFailed| &mut m.error_code,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"retry_delay",
2020-07-22 15:35:05 +00:00
|m: &APLoginFailed| &m.retry_delay,
|m: &mut APLoginFailed| &mut m.retry_delay,
));
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"expiry",
2020-07-22 15:35:05 +00:00
|m: &APLoginFailed| &m.expiry,
|m: &mut APLoginFailed| &mut m.expiry,
));
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeString,
>(
"error_description",
|m: &APLoginFailed| &m.error_description,
|m: &mut APLoginFailed| &mut m.error_description,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<APLoginFailed>(
"APLoginFailed",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static APLoginFailed {
static mut instance: ::protobuf::lazy::Lazy<APLoginFailed> = ::protobuf::lazy::Lazy::INIT;
2020-07-22 15:35:05 +00:00
unsafe { instance.get(APLoginFailed::new) }
}
}
impl ::protobuf::Clear for APLoginFailed {
fn clear(&mut self) {
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();
}
}
impl ::std::fmt::Debug for APLoginFailed {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for APLoginFailed {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct ClientResponsePlaintext {
// message fields
login_crypto_response: ::protobuf::SingularPtrField<LoginCryptoResponseUnion>,
pow_response: ::protobuf::SingularPtrField<PoWResponseUnion>,
crypto_response: ::protobuf::SingularPtrField<CryptoResponseUnion>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a ClientResponsePlaintext {
fn default() -> &'a ClientResponsePlaintext {
<ClientResponsePlaintext as ::protobuf::Message>::default_instance()
}
}
impl ClientResponsePlaintext {
pub fn new() -> ClientResponsePlaintext {
::std::default::Default::default()
}
// required .LoginCryptoResponseUnion login_crypto_response = 10;
pub fn get_login_crypto_response(&self) -> &LoginCryptoResponseUnion {
2020-07-22 15:35:05 +00:00
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();
}
pub fn has_login_crypto_response(&self) -> bool {
self.login_crypto_response.is_some()
}
// Param is passed by value, moved
pub fn set_login_crypto_response(&mut self, v: LoginCryptoResponseUnion) {
self.login_crypto_response = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_login_crypto_response(&mut self) -> &mut LoginCryptoResponseUnion {
if self.login_crypto_response.is_none() {
self.login_crypto_response.set_default();
}
self.login_crypto_response.as_mut().unwrap()
}
// Take field
pub fn take_login_crypto_response(&mut self) -> LoginCryptoResponseUnion {
2020-07-22 15:35:05 +00:00
self.login_crypto_response
.take()
.unwrap_or_else(|| LoginCryptoResponseUnion::new())
}
// required .PoWResponseUnion pow_response = 20;
pub fn get_pow_response(&self) -> &PoWResponseUnion {
2020-07-22 15:35:05 +00:00
self.pow_response
.as_ref()
.unwrap_or_else(|| PoWResponseUnion::default_instance())
}
pub fn clear_pow_response(&mut self) {
self.pow_response.clear();
}
pub fn has_pow_response(&self) -> bool {
self.pow_response.is_some()
}
// Param is passed by value, moved
pub fn set_pow_response(&mut self, v: PoWResponseUnion) {
self.pow_response = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_pow_response(&mut self) -> &mut PoWResponseUnion {
if self.pow_response.is_none() {
self.pow_response.set_default();
}
self.pow_response.as_mut().unwrap()
}
// Take field
pub fn take_pow_response(&mut self) -> PoWResponseUnion {
2020-07-22 15:35:05 +00:00
self.pow_response
.take()
.unwrap_or_else(|| PoWResponseUnion::new())
}
// required .CryptoResponseUnion crypto_response = 30;
pub fn get_crypto_response(&self) -> &CryptoResponseUnion {
2020-07-22 15:35:05 +00:00
self.crypto_response
.as_ref()
.unwrap_or_else(|| CryptoResponseUnion::default_instance())
}
pub fn clear_crypto_response(&mut self) {
self.crypto_response.clear();
}
pub fn has_crypto_response(&self) -> bool {
self.crypto_response.is_some()
}
// Param is passed by value, moved
pub fn set_crypto_response(&mut self, v: CryptoResponseUnion) {
self.crypto_response = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_crypto_response(&mut self) -> &mut CryptoResponseUnion {
if self.crypto_response.is_none() {
self.crypto_response.set_default();
}
self.crypto_response.as_mut().unwrap()
}
// Take field
pub fn take_crypto_response(&mut self) -> CryptoResponseUnion {
2020-07-22 15:35:05 +00:00
self.crypto_response
.take()
.unwrap_or_else(|| CryptoResponseUnion::new())
2017-01-18 05:58:12 +00:00
}
}
impl ::protobuf::Message for ClientResponsePlaintext {
fn is_initialized(&self) -> bool {
if self.login_crypto_response.is_none() {
return false;
}
if self.pow_response.is_none() {
return false;
}
if self.crypto_response.is_none() {
return false;
}
for v in &self.login_crypto_response {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.pow_response {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.crypto_response {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.login_crypto_response,
)?;
}
20 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.pow_response,
)?;
}
30 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.crypto_response,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.login_crypto_response.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.pow_response.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.crypto_response.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.login_crypto_response.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.pow_response.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.crypto_response.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(30, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> ClientResponsePlaintext {
ClientResponsePlaintext::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<LoginCryptoResponseUnion>,
>(
"login_crypto_response",
|m: &ClientResponsePlaintext| &m.login_crypto_response,
|m: &mut ClientResponsePlaintext| &mut m.login_crypto_response,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<PoWResponseUnion>,
>(
"pow_response",
|m: &ClientResponsePlaintext| &m.pow_response,
|m: &mut ClientResponsePlaintext| &mut m.pow_response,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<CryptoResponseUnion>,
>(
"crypto_response",
|m: &ClientResponsePlaintext| &m.crypto_response,
|m: &mut ClientResponsePlaintext| &mut m.crypto_response,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<ClientResponsePlaintext>(
"ClientResponsePlaintext",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static ClientResponsePlaintext {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<ClientResponsePlaintext> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(ClientResponsePlaintext::new) }
}
}
impl ::protobuf::Clear for ClientResponsePlaintext {
fn clear(&mut self) {
self.login_crypto_response.clear();
self.pow_response.clear();
self.crypto_response.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for ClientResponsePlaintext {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for ClientResponsePlaintext {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct LoginCryptoResponseUnion {
// message fields
diffie_hellman: ::protobuf::SingularPtrField<LoginCryptoDiffieHellmanResponse>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoginCryptoResponseUnion {
fn default() -> &'a LoginCryptoResponseUnion {
<LoginCryptoResponseUnion as ::protobuf::Message>::default_instance()
}
}
impl LoginCryptoResponseUnion {
pub fn new() -> LoginCryptoResponseUnion {
::std::default::Default::default()
}
// optional .LoginCryptoDiffieHellmanResponse diffie_hellman = 10;
pub fn get_diffie_hellman(&self) -> &LoginCryptoDiffieHellmanResponse {
2020-07-22 15:35:05 +00:00
self.diffie_hellman
.as_ref()
.unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::default_instance())
}
pub fn clear_diffie_hellman(&mut self) {
self.diffie_hellman.clear();
}
pub fn has_diffie_hellman(&self) -> bool {
self.diffie_hellman.is_some()
}
// Param is passed by value, moved
pub fn set_diffie_hellman(&mut self, v: LoginCryptoDiffieHellmanResponse) {
self.diffie_hellman = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_diffie_hellman(&mut self) -> &mut LoginCryptoDiffieHellmanResponse {
if self.diffie_hellman.is_none() {
self.diffie_hellman.set_default();
}
self.diffie_hellman.as_mut().unwrap()
}
// Take field
pub fn take_diffie_hellman(&mut self) -> LoginCryptoDiffieHellmanResponse {
2020-07-22 15:35:05 +00:00
self.diffie_hellman
.take()
.unwrap_or_else(|| LoginCryptoDiffieHellmanResponse::new())
}
}
impl ::protobuf::Message for LoginCryptoResponseUnion {
fn is_initialized(&self) -> bool {
for v in &self.diffie_hellman {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.diffie_hellman,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.diffie_hellman.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.diffie_hellman.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoginCryptoResponseUnion {
LoginCryptoResponseUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<LoginCryptoDiffieHellmanResponse>,
>(
"diffie_hellman",
|m: &LoginCryptoResponseUnion| &m.diffie_hellman,
|m: &mut LoginCryptoResponseUnion| &mut m.diffie_hellman,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<LoginCryptoResponseUnion>(
"LoginCryptoResponseUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static LoginCryptoResponseUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<LoginCryptoResponseUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(LoginCryptoResponseUnion::new) }
}
}
impl ::protobuf::Clear for LoginCryptoResponseUnion {
fn clear(&mut self) {
self.diffie_hellman.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoginCryptoResponseUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for LoginCryptoResponseUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct LoginCryptoDiffieHellmanResponse {
// message fields
hmac: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a LoginCryptoDiffieHellmanResponse {
fn default() -> &'a LoginCryptoDiffieHellmanResponse {
<LoginCryptoDiffieHellmanResponse as ::protobuf::Message>::default_instance()
}
}
impl LoginCryptoDiffieHellmanResponse {
pub fn new() -> LoginCryptoDiffieHellmanResponse {
::std::default::Default::default()
}
// 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();
}
pub fn has_hmac(&self) -> bool {
self.hmac.is_some()
}
// Param is passed by value, moved
pub fn set_hmac(&mut self, v: ::std::vec::Vec<u8>) {
self.hmac = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_hmac(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.hmac.is_none() {
self.hmac.set_default();
}
self.hmac.as_mut().unwrap()
}
// Take field
pub fn take_hmac(&mut self) -> ::std::vec::Vec<u8> {
self.hmac.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for LoginCryptoDiffieHellmanResponse {
fn is_initialized(&self) -> bool {
if self.hmac.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hmac)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.hmac.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.hmac.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> LoginCryptoDiffieHellmanResponse {
LoginCryptoDiffieHellmanResponse::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"hmac",
|m: &LoginCryptoDiffieHellmanResponse| &m.hmac,
|m: &mut LoginCryptoDiffieHellmanResponse| &mut m.hmac,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<
LoginCryptoDiffieHellmanResponse,
>(
"LoginCryptoDiffieHellmanResponse",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static LoginCryptoDiffieHellmanResponse {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<LoginCryptoDiffieHellmanResponse> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(LoginCryptoDiffieHellmanResponse::new) }
}
}
impl ::protobuf::Clear for LoginCryptoDiffieHellmanResponse {
fn clear(&mut self) {
self.hmac.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for LoginCryptoDiffieHellmanResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for LoginCryptoDiffieHellmanResponse {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct PoWResponseUnion {
// message fields
hash_cash: ::protobuf::SingularPtrField<PoWHashCashResponse>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a PoWResponseUnion {
fn default() -> &'a PoWResponseUnion {
<PoWResponseUnion as ::protobuf::Message>::default_instance()
}
}
impl PoWResponseUnion {
pub fn new() -> PoWResponseUnion {
::std::default::Default::default()
}
// optional .PoWHashCashResponse hash_cash = 10;
pub fn get_hash_cash(&self) -> &PoWHashCashResponse {
2020-07-22 15:35:05 +00:00
self.hash_cash
.as_ref()
.unwrap_or_else(|| PoWHashCashResponse::default_instance())
}
pub fn clear_hash_cash(&mut self) {
self.hash_cash.clear();
}
pub fn has_hash_cash(&self) -> bool {
self.hash_cash.is_some()
}
// Param is passed by value, moved
pub fn set_hash_cash(&mut self, v: PoWHashCashResponse) {
self.hash_cash = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_hash_cash(&mut self) -> &mut PoWHashCashResponse {
if self.hash_cash.is_none() {
self.hash_cash.set_default();
}
self.hash_cash.as_mut().unwrap()
}
// Take field
pub fn take_hash_cash(&mut self) -> PoWHashCashResponse {
2020-07-22 15:35:05 +00:00
self.hash_cash
.take()
.unwrap_or_else(|| PoWHashCashResponse::new())
}
}
impl ::protobuf::Message for PoWResponseUnion {
fn is_initialized(&self) -> bool {
for v in &self.hash_cash {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.hash_cash)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.hash_cash.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.hash_cash.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PoWResponseUnion {
PoWResponseUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<PoWHashCashResponse>,
>(
"hash_cash",
|m: &PoWResponseUnion| &m.hash_cash,
|m: &mut PoWResponseUnion| &mut m.hash_cash,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<PoWResponseUnion>(
"PoWResponseUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static PoWResponseUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<PoWResponseUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(PoWResponseUnion::new) }
}
}
impl ::protobuf::Clear for PoWResponseUnion {
fn clear(&mut self) {
self.hash_cash.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PoWResponseUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for PoWResponseUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct PoWHashCashResponse {
// message fields
hash_suffix: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a PoWHashCashResponse {
fn default() -> &'a PoWHashCashResponse {
<PoWHashCashResponse as ::protobuf::Message>::default_instance()
}
}
impl PoWHashCashResponse {
pub fn new() -> PoWHashCashResponse {
::std::default::Default::default()
}
// 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();
}
pub fn has_hash_suffix(&self) -> bool {
self.hash_suffix.is_some()
}
// Param is passed by value, moved
pub fn set_hash_suffix(&mut self, v: ::std::vec::Vec<u8>) {
self.hash_suffix = ::protobuf::SingularField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_hash_suffix(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.hash_suffix.is_none() {
self.hash_suffix.set_default();
}
self.hash_suffix.as_mut().unwrap()
}
// Take field
pub fn take_hash_suffix(&mut self) -> ::std::vec::Vec<u8> {
2020-07-22 15:35:05 +00:00
self.hash_suffix
.take()
.unwrap_or_else(|| ::std::vec::Vec::new())
}
}
impl ::protobuf::Message for PoWHashCashResponse {
fn is_initialized(&self) -> bool {
if self.hash_suffix.is_none() {
return false;
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.hash_suffix)?;
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.hash_suffix.as_ref() {
2017-01-18 05:58:12 +00:00
my_size += ::protobuf::rt::bytes_size(10, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.hash_suffix.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_bytes(10, &v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PoWHashCashResponse {
PoWHashCashResponse::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_field_accessor::<
_,
::protobuf::types::ProtobufTypeBytes,
>(
"hash_suffix",
|m: &PoWHashCashResponse| &m.hash_suffix,
|m: &mut PoWHashCashResponse| &mut m.hash_suffix,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<PoWHashCashResponse>(
"PoWHashCashResponse",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static PoWHashCashResponse {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<PoWHashCashResponse> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(PoWHashCashResponse::new) }
}
}
impl ::protobuf::Clear for PoWHashCashResponse {
fn clear(&mut self) {
self.hash_suffix.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PoWHashCashResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for PoWHashCashResponse {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct CryptoResponseUnion {
// message fields
shannon: ::protobuf::SingularPtrField<CryptoShannonResponse>,
rc4_sha1_hmac: ::protobuf::SingularPtrField<CryptoRc4Sha1HmacResponse>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CryptoResponseUnion {
fn default() -> &'a CryptoResponseUnion {
<CryptoResponseUnion as ::protobuf::Message>::default_instance()
}
}
impl CryptoResponseUnion {
pub fn new() -> CryptoResponseUnion {
::std::default::Default::default()
}
// optional .CryptoShannonResponse shannon = 10;
pub fn get_shannon(&self) -> &CryptoShannonResponse {
2020-07-22 15:35:05 +00:00
self.shannon
.as_ref()
.unwrap_or_else(|| CryptoShannonResponse::default_instance())
}
pub fn clear_shannon(&mut self) {
self.shannon.clear();
}
pub fn has_shannon(&self) -> bool {
self.shannon.is_some()
}
// Param is passed by value, moved
pub fn set_shannon(&mut self, v: CryptoShannonResponse) {
self.shannon = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_shannon(&mut self) -> &mut CryptoShannonResponse {
if self.shannon.is_none() {
self.shannon.set_default();
}
self.shannon.as_mut().unwrap()
}
// Take field
pub fn take_shannon(&mut self) -> CryptoShannonResponse {
2020-07-22 15:35:05 +00:00
self.shannon
.take()
.unwrap_or_else(|| CryptoShannonResponse::new())
}
// optional .CryptoRc4Sha1HmacResponse rc4_sha1_hmac = 20;
pub fn get_rc4_sha1_hmac(&self) -> &CryptoRc4Sha1HmacResponse {
2020-07-22 15:35:05 +00:00
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();
}
pub fn has_rc4_sha1_hmac(&self) -> bool {
self.rc4_sha1_hmac.is_some()
}
// Param is passed by value, moved
pub fn set_rc4_sha1_hmac(&mut self, v: CryptoRc4Sha1HmacResponse) {
self.rc4_sha1_hmac = ::protobuf::SingularPtrField::some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_rc4_sha1_hmac(&mut self) -> &mut CryptoRc4Sha1HmacResponse {
if self.rc4_sha1_hmac.is_none() {
self.rc4_sha1_hmac.set_default();
}
self.rc4_sha1_hmac.as_mut().unwrap()
}
// Take field
pub fn take_rc4_sha1_hmac(&mut self) -> CryptoRc4Sha1HmacResponse {
2020-07-22 15:35:05 +00:00
self.rc4_sha1_hmac
.take()
.unwrap_or_else(|| CryptoRc4Sha1HmacResponse::new())
}
}
impl ::protobuf::Message for CryptoResponseUnion {
fn is_initialized(&self) -> bool {
for v in &self.shannon {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
for v in &self.rc4_sha1_hmac {
if !v.is_initialized() {
return false;
}
2020-07-22 15:35:05 +00:00
}
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
10 => {
2017-01-18 05:58:12 +00:00
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.shannon)?;
2020-07-22 15:35:05 +00:00
}
20 => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_singular_message_into(
wire_type,
is,
&mut self.rc4_sha1_hmac,
)?;
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.shannon.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
2017-01-18 05:58:12 +00:00
let len = v.compute_size();
my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.shannon.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.rc4_sha1_hmac.as_ref() {
2017-01-18 05:58:12 +00:00
os.write_tag(20, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CryptoResponseUnion {
CryptoResponseUnion::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<CryptoShannonResponse>,
>(
"shannon",
|m: &CryptoResponseUnion| &m.shannon,
|m: &mut CryptoResponseUnion| &mut m.shannon,
),
);
fields.push(
::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<
_,
::protobuf::types::ProtobufTypeMessage<CryptoRc4Sha1HmacResponse>,
>(
"rc4_sha1_hmac",
|m: &CryptoResponseUnion| &m.rc4_sha1_hmac,
|m: &mut CryptoResponseUnion| &mut m.rc4_sha1_hmac,
),
);
::protobuf::reflect::MessageDescriptor::new_pb_name::<CryptoResponseUnion>(
"CryptoResponseUnion",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static CryptoResponseUnion {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<CryptoResponseUnion> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(CryptoResponseUnion::new) }
}
}
impl ::protobuf::Clear for CryptoResponseUnion {
fn clear(&mut self) {
self.shannon.clear();
self.rc4_sha1_hmac.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CryptoResponseUnion {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for CryptoResponseUnion {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct CryptoShannonResponse {
// message fields
dummy: ::std::option::Option<i32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CryptoShannonResponse {
fn default() -> &'a CryptoShannonResponse {
<CryptoShannonResponse as ::protobuf::Message>::default_instance()
}
}
impl CryptoShannonResponse {
pub fn new() -> CryptoShannonResponse {
::std::default::Default::default()
}
// 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;
}
pub fn has_dummy(&self) -> bool {
self.dummy.is_some()
}
// Param is passed by value, moved
pub fn set_dummy(&mut self, v: i32) {
self.dummy = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for CryptoShannonResponse {
fn is_initialized(&self) -> bool {
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.dummy = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
2017-01-18 05:58:12 +00:00
if let Some(v) = self.dummy {
my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.dummy {
2017-01-18 05:58:12 +00:00
os.write_int32(1, v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CryptoShannonResponse {
CryptoShannonResponse::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"dummy",
2020-07-22 15:35:05 +00:00
|m: &CryptoShannonResponse| &m.dummy,
|m: &mut CryptoShannonResponse| &mut m.dummy,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<CryptoShannonResponse>(
"CryptoShannonResponse",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static CryptoShannonResponse {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<CryptoShannonResponse> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(CryptoShannonResponse::new) }
}
}
impl ::protobuf::Clear for CryptoShannonResponse {
fn clear(&mut self) {
self.dummy = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CryptoShannonResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for CryptoShannonResponse {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(PartialEq, Clone, Default)]
pub struct CryptoRc4Sha1HmacResponse {
// message fields
dummy: ::std::option::Option<i32>,
// special fields
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CryptoRc4Sha1HmacResponse {
fn default() -> &'a CryptoRc4Sha1HmacResponse {
<CryptoRc4Sha1HmacResponse as ::protobuf::Message>::default_instance()
}
}
impl CryptoRc4Sha1HmacResponse {
pub fn new() -> CryptoRc4Sha1HmacResponse {
::std::default::Default::default()
}
// 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;
}
pub fn has_dummy(&self) -> bool {
self.dummy.is_some()
}
// Param is passed by value, moved
pub fn set_dummy(&mut self, v: i32) {
self.dummy = ::std::option::Option::Some(v);
}
}
impl ::protobuf::Message for CryptoRc4Sha1HmacResponse {
fn is_initialized(&self) -> bool {
true
}
2020-07-22 15:35:05 +00:00
fn merge_from(
&mut self,
is: &mut ::protobuf::CodedInputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
2017-01-18 05:58:12 +00:00
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
2020-07-22 15:35:05 +00:00
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(
wire_type,
));
}
2017-01-18 05:58:12 +00:00
let tmp = is.read_int32()?;
self.dummy = ::std::option::Option::Some(tmp);
2020-07-22 15:35:05 +00:00
}
_ => {
2020-07-22 15:35:05 +00:00
::protobuf::rt::read_unknown_or_skip_group(
field_number,
wire_type,
is,
self.mut_unknown_fields(),
)?;
}
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
2017-01-18 05:58:12 +00:00
if let Some(v) = self.dummy {
my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
2020-07-22 15:35:05 +00:00
fn write_to_with_cached_sizes(
&self,
os: &mut ::protobuf::CodedOutputStream<'_>,
) -> ::protobuf::ProtobufResult<()> {
if let Some(v) = self.dummy {
2017-01-18 05:58:12 +00:00
os.write_int32(1, v)?;
}
2017-01-18 05:58:12 +00:00
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CryptoRc4Sha1HmacResponse {
CryptoRc4Sha1HmacResponse::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
2020-07-22 15:35:05 +00:00
fields.push(::protobuf::reflect::accessor::make_option_accessor::<
_,
::protobuf::types::ProtobufTypeInt32,
>(
"dummy",
2020-07-22 15:35:05 +00:00
|m: &CryptoRc4Sha1HmacResponse| &m.dummy,
|m: &mut CryptoRc4Sha1HmacResponse| &mut m.dummy,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<CryptoRc4Sha1HmacResponse>(
"CryptoRc4Sha1HmacResponse",
fields,
2020-07-22 15:35:05 +00:00
file_descriptor_proto(),
)
})
}
}
fn default_instance() -> &'static CryptoRc4Sha1HmacResponse {
2020-07-22 15:35:05 +00:00
static mut instance: ::protobuf::lazy::Lazy<CryptoRc4Sha1HmacResponse> =
::protobuf::lazy::Lazy::INIT;
unsafe { instance.get(CryptoRc4Sha1HmacResponse::new) }
}
}
impl ::protobuf::Clear for CryptoRc4Sha1HmacResponse {
fn clear(&mut self) {
self.dummy = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CryptoRc4Sha1HmacResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for CryptoRc4Sha1HmacResponse {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum Product {
PRODUCT_CLIENT = 0,
PRODUCT_LIBSPOTIFY = 1,
PRODUCT_MOBILE = 2,
PRODUCT_PARTNER = 3,
PRODUCT_LIBSPOTIFY_EMBEDDED = 5,
}
impl ::protobuf::ProtobufEnum for Product {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Product> {
match value {
0 => ::std::option::Option::Some(Product::PRODUCT_CLIENT),
1 => ::std::option::Option::Some(Product::PRODUCT_LIBSPOTIFY),
2 => ::std::option::Option::Some(Product::PRODUCT_MOBILE),
3 => ::std::option::Option::Some(Product::PRODUCT_PARTNER),
5 => ::std::option::Option::Some(Product::PRODUCT_LIBSPOTIFY_EMBEDDED),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
static values: &'static [Product] = &[
Product::PRODUCT_CLIENT,
Product::PRODUCT_LIBSPOTIFY,
Product::PRODUCT_MOBILE,
Product::PRODUCT_PARTNER,
Product::PRODUCT_LIBSPOTIFY_EMBEDDED,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<Product>(
"Product",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for Product {}
impl ::std::default::Default for Product {
fn default() -> Self {
Product::PRODUCT_CLIENT
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for Product {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum ProductFlags {
PRODUCT_FLAG_NONE = 0,
PRODUCT_FLAG_DEV_BUILD = 1,
}
impl ::protobuf::ProtobufEnum for ProductFlags {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ProductFlags> {
match value {
0 => ::std::option::Option::Some(ProductFlags::PRODUCT_FLAG_NONE),
1 => ::std::option::Option::Some(ProductFlags::PRODUCT_FLAG_DEV_BUILD),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
static values: &'static [ProductFlags] = &[
ProductFlags::PRODUCT_FLAG_NONE,
ProductFlags::PRODUCT_FLAG_DEV_BUILD,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<ProductFlags>(
"ProductFlags",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for ProductFlags {}
impl ::std::default::Default for ProductFlags {
fn default() -> Self {
ProductFlags::PRODUCT_FLAG_NONE
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for ProductFlags {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum Platform {
PLATFORM_WIN32_X86 = 0,
PLATFORM_OSX_X86 = 1,
PLATFORM_LINUX_X86 = 2,
PLATFORM_IPHONE_ARM = 3,
PLATFORM_S60_ARM = 4,
PLATFORM_OSX_PPC = 5,
PLATFORM_ANDROID_ARM = 6,
PLATFORM_WINDOWS_CE_ARM = 7,
PLATFORM_LINUX_X86_64 = 8,
PLATFORM_OSX_X86_64 = 9,
PLATFORM_PALM_ARM = 10,
PLATFORM_LINUX_SH = 11,
PLATFORM_FREEBSD_X86 = 12,
PLATFORM_FREEBSD_X86_64 = 13,
PLATFORM_BLACKBERRY_ARM = 14,
PLATFORM_SONOS = 15,
PLATFORM_LINUX_MIPS = 16,
PLATFORM_LINUX_ARM = 17,
PLATFORM_LOGITECH_ARM = 18,
PLATFORM_LINUX_BLACKFIN = 19,
PLATFORM_WP7_ARM = 20,
PLATFORM_ONKYO_ARM = 21,
PLATFORM_QNXNTO_ARM = 22,
PLATFORM_BCO_ARM = 23,
}
impl ::protobuf::ProtobufEnum for Platform {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Platform> {
match value {
0 => ::std::option::Option::Some(Platform::PLATFORM_WIN32_X86),
1 => ::std::option::Option::Some(Platform::PLATFORM_OSX_X86),
2 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_X86),
3 => ::std::option::Option::Some(Platform::PLATFORM_IPHONE_ARM),
4 => ::std::option::Option::Some(Platform::PLATFORM_S60_ARM),
5 => ::std::option::Option::Some(Platform::PLATFORM_OSX_PPC),
6 => ::std::option::Option::Some(Platform::PLATFORM_ANDROID_ARM),
7 => ::std::option::Option::Some(Platform::PLATFORM_WINDOWS_CE_ARM),
8 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_X86_64),
9 => ::std::option::Option::Some(Platform::PLATFORM_OSX_X86_64),
10 => ::std::option::Option::Some(Platform::PLATFORM_PALM_ARM),
11 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_SH),
12 => ::std::option::Option::Some(Platform::PLATFORM_FREEBSD_X86),
13 => ::std::option::Option::Some(Platform::PLATFORM_FREEBSD_X86_64),
14 => ::std::option::Option::Some(Platform::PLATFORM_BLACKBERRY_ARM),
15 => ::std::option::Option::Some(Platform::PLATFORM_SONOS),
16 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_MIPS),
17 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_ARM),
18 => ::std::option::Option::Some(Platform::PLATFORM_LOGITECH_ARM),
19 => ::std::option::Option::Some(Platform::PLATFORM_LINUX_BLACKFIN),
20 => ::std::option::Option::Some(Platform::PLATFORM_WP7_ARM),
21 => ::std::option::Option::Some(Platform::PLATFORM_ONKYO_ARM),
22 => ::std::option::Option::Some(Platform::PLATFORM_QNXNTO_ARM),
23 => ::std::option::Option::Some(Platform::PLATFORM_BCO_ARM),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
static values: &'static [Platform] = &[
Platform::PLATFORM_WIN32_X86,
Platform::PLATFORM_OSX_X86,
Platform::PLATFORM_LINUX_X86,
Platform::PLATFORM_IPHONE_ARM,
Platform::PLATFORM_S60_ARM,
Platform::PLATFORM_OSX_PPC,
Platform::PLATFORM_ANDROID_ARM,
Platform::PLATFORM_WINDOWS_CE_ARM,
Platform::PLATFORM_LINUX_X86_64,
Platform::PLATFORM_OSX_X86_64,
Platform::PLATFORM_PALM_ARM,
Platform::PLATFORM_LINUX_SH,
Platform::PLATFORM_FREEBSD_X86,
Platform::PLATFORM_FREEBSD_X86_64,
Platform::PLATFORM_BLACKBERRY_ARM,
Platform::PLATFORM_SONOS,
Platform::PLATFORM_LINUX_MIPS,
Platform::PLATFORM_LINUX_ARM,
Platform::PLATFORM_LOGITECH_ARM,
Platform::PLATFORM_LINUX_BLACKFIN,
Platform::PLATFORM_WP7_ARM,
Platform::PLATFORM_ONKYO_ARM,
Platform::PLATFORM_QNXNTO_ARM,
Platform::PLATFORM_BCO_ARM,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<Platform>(
"Platform",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for Platform {}
impl ::std::default::Default for Platform {
fn default() -> Self {
Platform::PLATFORM_WIN32_X86
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for Platform {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum Fingerprint {
FINGERPRINT_GRAIN = 0,
FINGERPRINT_HMAC_RIPEMD = 1,
}
impl ::protobuf::ProtobufEnum for Fingerprint {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Fingerprint> {
match value {
0 => ::std::option::Option::Some(Fingerprint::FINGERPRINT_GRAIN),
1 => ::std::option::Option::Some(Fingerprint::FINGERPRINT_HMAC_RIPEMD),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
static values: &'static [Fingerprint] = &[
Fingerprint::FINGERPRINT_GRAIN,
Fingerprint::FINGERPRINT_HMAC_RIPEMD,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<Fingerprint>(
"Fingerprint",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for Fingerprint {}
impl ::std::default::Default for Fingerprint {
fn default() -> Self {
Fingerprint::FINGERPRINT_GRAIN
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for Fingerprint {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum Cryptosuite {
CRYPTO_SUITE_SHANNON = 0,
CRYPTO_SUITE_RC4_SHA1_HMAC = 1,
}
impl ::protobuf::ProtobufEnum for Cryptosuite {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Cryptosuite> {
match value {
0 => ::std::option::Option::Some(Cryptosuite::CRYPTO_SUITE_SHANNON),
1 => ::std::option::Option::Some(Cryptosuite::CRYPTO_SUITE_RC4_SHA1_HMAC),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
static values: &'static [Cryptosuite] = &[
Cryptosuite::CRYPTO_SUITE_SHANNON,
Cryptosuite::CRYPTO_SUITE_RC4_SHA1_HMAC,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<Cryptosuite>(
"Cryptosuite",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for Cryptosuite {}
impl ::std::default::Default for Cryptosuite {
fn default() -> Self {
Cryptosuite::CRYPTO_SUITE_SHANNON
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for Cryptosuite {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum Powscheme {
POW_HASH_CASH = 0,
}
impl ::protobuf::ProtobufEnum for Powscheme {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Powscheme> {
match value {
0 => ::std::option::Option::Some(Powscheme::POW_HASH_CASH),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
2020-07-22 15:35:05 +00:00
static values: &'static [Powscheme] = &[Powscheme::POW_HASH_CASH];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<Powscheme>(
"Powscheme",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for Powscheme {}
impl ::std::default::Default for Powscheme {
fn default() -> Self {
Powscheme::POW_HASH_CASH
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for Powscheme {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
2020-07-22 15:35:05 +00:00
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
pub enum ErrorCode {
ProtocolError = 0,
TryAnotherAP = 2,
BadConnectionId = 5,
TravelRestriction = 9,
PremiumAccountRequired = 11,
BadCredentials = 12,
CouldNotValidateCredentials = 13,
AccountExists = 14,
ExtraVerificationRequired = 15,
InvalidAppKey = 16,
ApplicationBanned = 17,
}
impl ::protobuf::ProtobufEnum for ErrorCode {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ErrorCode> {
match value {
0 => ::std::option::Option::Some(ErrorCode::ProtocolError),
2 => ::std::option::Option::Some(ErrorCode::TryAnotherAP),
5 => ::std::option::Option::Some(ErrorCode::BadConnectionId),
9 => ::std::option::Option::Some(ErrorCode::TravelRestriction),
11 => ::std::option::Option::Some(ErrorCode::PremiumAccountRequired),
12 => ::std::option::Option::Some(ErrorCode::BadCredentials),
13 => ::std::option::Option::Some(ErrorCode::CouldNotValidateCredentials),
14 => ::std::option::Option::Some(ErrorCode::AccountExists),
15 => ::std::option::Option::Some(ErrorCode::ExtraVerificationRequired),
16 => ::std::option::Option::Some(ErrorCode::InvalidAppKey),
17 => ::std::option::Option::Some(ErrorCode::ApplicationBanned),
2020-07-22 15:35:05 +00:00
_ => ::std::option::Option::None,
}
}
fn values() -> &'static [Self] {
static values: &'static [ErrorCode] = &[
ErrorCode::ProtocolError,
ErrorCode::TryAnotherAP,
ErrorCode::BadConnectionId,
ErrorCode::TravelRestriction,
ErrorCode::PremiumAccountRequired,
ErrorCode::BadCredentials,
ErrorCode::CouldNotValidateCredentials,
ErrorCode::AccountExists,
ErrorCode::ExtraVerificationRequired,
ErrorCode::InvalidAppKey,
ErrorCode::ApplicationBanned,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2020-07-22 15:35:05 +00:00
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> =
::protobuf::lazy::Lazy::INIT;
unsafe {
descriptor.get(|| {
2020-07-22 15:35:05 +00:00
::protobuf::reflect::EnumDescriptor::new_pb_name::<ErrorCode>(
"ErrorCode",
file_descriptor_proto(),
)
})
}
}
}
2020-07-22 15:35:05 +00:00
impl ::std::marker::Copy for ErrorCode {}
impl ::std::default::Default for ErrorCode {
fn default() -> Self {
ErrorCode::ProtocolError
}
}
2017-01-18 05:58:12 +00:00
impl ::protobuf::reflect::ProtobufValue for ErrorCode {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
2017-01-18 05:58:12 +00:00
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\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\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\
";
2020-07-22 15:35:05 +00:00
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<
::protobuf::descriptor::FileDescriptorProto,
> = ::protobuf::lazy::Lazy::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
2020-07-22 15:35:05 +00:00
unsafe { file_descriptor_proto_lazy.get(|| parse_descriptor_proto()) }
}