// This file is generated by rust-protobuf 3.4.0. Do not edit // .proto file is parsed by pure // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![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(unused_results)] #![allow(unused_mut)] //! Generated file from `sock.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_4_0; // @@protoc_insertion_point(message:SocketRequest) #[derive(PartialEq,Clone,Default,Debug)] pub struct SocketRequest { // message oneof groups pub message: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:SocketRequest.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SocketRequest { fn default() -> &'a SocketRequest { ::default_instance() } } impl SocketRequest { pub fn new() -> SocketRequest { ::std::default::Default::default() } // optional .ChangeGeneralSound cgs = 1; pub fn cgs(&self) -> &ChangeGeneralSound { match self.message { ::std::option::Option::Some(socket_request::Message::Cgs(ref v)) => v, _ => ::default_instance(), } } pub fn clear_cgs(&mut self) { self.message = ::std::option::Option::None; } pub fn has_cgs(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Cgs(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_cgs(&mut self, v: ChangeGeneralSound) { self.message = ::std::option::Option::Some(socket_request::Message::Cgs(v)) } // Mutable pointer to the field. pub fn mut_cgs(&mut self) -> &mut ChangeGeneralSound { if let ::std::option::Option::Some(socket_request::Message::Cgs(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Cgs(ChangeGeneralSound::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Cgs(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_cgs(&mut self) -> ChangeGeneralSound { if self.has_cgs() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Cgs(v)) => v, _ => panic!(), } } else { ChangeGeneralSound::new() } } // optional .ChangePollFrequency cpf = 2; pub fn cpf(&self) -> &ChangePollFrequency { match self.message { ::std::option::Option::Some(socket_request::Message::Cpf(ref v)) => v, _ => ::default_instance(), } } pub fn clear_cpf(&mut self) { self.message = ::std::option::Option::None; } pub fn has_cpf(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Cpf(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_cpf(&mut self, v: ChangePollFrequency) { self.message = ::std::option::Option::Some(socket_request::Message::Cpf(v)) } // Mutable pointer to the field. pub fn mut_cpf(&mut self) -> &mut ChangePollFrequency { if let ::std::option::Option::Some(socket_request::Message::Cpf(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Cpf(ChangePollFrequency::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Cpf(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_cpf(&mut self) -> ChangePollFrequency { if self.has_cpf() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Cpf(v)) => v, _ => panic!(), } } else { ChangePollFrequency::new() } } // optional .SetNotify sn = 3; pub fn sn(&self) -> &SetNotify { match self.message { ::std::option::Option::Some(socket_request::Message::Sn(ref v)) => v, _ => ::default_instance(), } } pub fn clear_sn(&mut self) { self.message = ::std::option::Option::None; } pub fn has_sn(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Sn(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_sn(&mut self, v: SetNotify) { self.message = ::std::option::Option::Some(socket_request::Message::Sn(v)) } // Mutable pointer to the field. pub fn mut_sn(&mut self) -> &mut SetNotify { if let ::std::option::Option::Some(socket_request::Message::Sn(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Sn(SetNotify::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Sn(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_sn(&mut self) -> SetNotify { if self.has_sn() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Sn(v)) => v, _ => panic!(), } } else { SetNotify::new() } } // optional .ChangeAppName can = 4; pub fn can(&self) -> &ChangeAppName { match self.message { ::std::option::Option::Some(socket_request::Message::Can(ref v)) => v, _ => ::default_instance(), } } pub fn clear_can(&mut self) { self.message = ::std::option::Option::None; } pub fn has_can(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Can(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_can(&mut self, v: ChangeAppName) { self.message = ::std::option::Option::Some(socket_request::Message::Can(v)) } // Mutable pointer to the field. pub fn mut_can(&mut self) -> &mut ChangeAppName { if let ::std::option::Option::Some(socket_request::Message::Can(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Can(ChangeAppName::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Can(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_can(&mut self) -> ChangeAppName { if self.has_can() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Can(v)) => v, _ => panic!(), } } else { ChangeAppName::new() } } // optional .FetchGeneralInfo fgi = 5; pub fn fgi(&self) -> &FetchGeneralInfo { match self.message { ::std::option::Option::Some(socket_request::Message::Fgi(ref v)) => v, _ => ::default_instance(), } } pub fn clear_fgi(&mut self) { self.message = ::std::option::Option::None; } pub fn has_fgi(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Fgi(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_fgi(&mut self, v: FetchGeneralInfo) { self.message = ::std::option::Option::Some(socket_request::Message::Fgi(v)) } // Mutable pointer to the field. pub fn mut_fgi(&mut self) -> &mut FetchGeneralInfo { if let ::std::option::Option::Some(socket_request::Message::Fgi(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Fgi(FetchGeneralInfo::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Fgi(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_fgi(&mut self) -> FetchGeneralInfo { if self.has_fgi() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Fgi(v)) => v, _ => panic!(), } } else { FetchGeneralInfo::new() } } // optional .FetchAlarms fa = 6; pub fn fa(&self) -> &FetchAlarms { match self.message { ::std::option::Option::Some(socket_request::Message::Fa(ref v)) => v, _ => ::default_instance(), } } pub fn clear_fa(&mut self) { self.message = ::std::option::Option::None; } pub fn has_fa(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Fa(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_fa(&mut self, v: FetchAlarms) { self.message = ::std::option::Option::Some(socket_request::Message::Fa(v)) } // Mutable pointer to the field. pub fn mut_fa(&mut self) -> &mut FetchAlarms { if let ::std::option::Option::Some(socket_request::Message::Fa(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Fa(FetchAlarms::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Fa(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_fa(&mut self) -> FetchAlarms { if self.has_fa() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Fa(v)) => v, _ => panic!(), } } else { FetchAlarms::new() } } // optional .NewAlarm na = 7; pub fn na(&self) -> &NewAlarm { match self.message { ::std::option::Option::Some(socket_request::Message::Na(ref v)) => v, _ => ::default_instance(), } } pub fn clear_na(&mut self) { self.message = ::std::option::Option::None; } pub fn has_na(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Na(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_na(&mut self, v: NewAlarm) { self.message = ::std::option::Option::Some(socket_request::Message::Na(v)) } // Mutable pointer to the field. pub fn mut_na(&mut self) -> &mut NewAlarm { if let ::std::option::Option::Some(socket_request::Message::Na(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Na(NewAlarm::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Na(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_na(&mut self) -> NewAlarm { if self.has_na() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Na(v)) => v, _ => panic!(), } } else { NewAlarm::new() } } // optional .RemoveAlarm ra = 8; pub fn ra(&self) -> &RemoveAlarm { match self.message { ::std::option::Option::Some(socket_request::Message::Ra(ref v)) => v, _ => ::default_instance(), } } pub fn clear_ra(&mut self) { self.message = ::std::option::Option::None; } pub fn has_ra(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Ra(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_ra(&mut self, v: RemoveAlarm) { self.message = ::std::option::Option::Some(socket_request::Message::Ra(v)) } // Mutable pointer to the field. pub fn mut_ra(&mut self) -> &mut RemoveAlarm { if let ::std::option::Option::Some(socket_request::Message::Ra(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Ra(RemoveAlarm::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Ra(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_ra(&mut self) -> RemoveAlarm { if self.has_ra() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Ra(v)) => v, _ => panic!(), } } else { RemoveAlarm::new() } } // optional .KillSwitch ks = 9; pub fn ks(&self) -> &KillSwitch { match self.message { ::std::option::Option::Some(socket_request::Message::Ks(ref v)) => v, _ => ::default_instance(), } } pub fn clear_ks(&mut self) { self.message = ::std::option::Option::None; } pub fn has_ks(&self) -> bool { match self.message { ::std::option::Option::Some(socket_request::Message::Ks(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_ks(&mut self, v: KillSwitch) { self.message = ::std::option::Option::Some(socket_request::Message::Ks(v)) } // Mutable pointer to the field. pub fn mut_ks(&mut self) -> &mut KillSwitch { if let ::std::option::Option::Some(socket_request::Message::Ks(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_request::Message::Ks(KillSwitch::new())); } match self.message { ::std::option::Option::Some(socket_request::Message::Ks(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_ks(&mut self) -> KillSwitch { if self.has_ks() { match self.message.take() { ::std::option::Option::Some(socket_request::Message::Ks(v)) => v, _ => panic!(), } } else { KillSwitch::new() } } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(9); let mut oneofs = ::std::vec::Vec::with_capacity(1); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, ChangeGeneralSound>( "cgs", SocketRequest::has_cgs, SocketRequest::cgs, SocketRequest::mut_cgs, SocketRequest::set_cgs, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, ChangePollFrequency>( "cpf", SocketRequest::has_cpf, SocketRequest::cpf, SocketRequest::mut_cpf, SocketRequest::set_cpf, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, SetNotify>( "sn", SocketRequest::has_sn, SocketRequest::sn, SocketRequest::mut_sn, SocketRequest::set_sn, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, ChangeAppName>( "can", SocketRequest::has_can, SocketRequest::can, SocketRequest::mut_can, SocketRequest::set_can, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, FetchGeneralInfo>( "fgi", SocketRequest::has_fgi, SocketRequest::fgi, SocketRequest::mut_fgi, SocketRequest::set_fgi, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, FetchAlarms>( "fa", SocketRequest::has_fa, SocketRequest::fa, SocketRequest::mut_fa, SocketRequest::set_fa, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, NewAlarm>( "na", SocketRequest::has_na, SocketRequest::na, SocketRequest::mut_na, SocketRequest::set_na, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, RemoveAlarm>( "ra", SocketRequest::has_ra, SocketRequest::ra, SocketRequest::mut_ra, SocketRequest::set_ra, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, KillSwitch>( "ks", SocketRequest::has_ks, SocketRequest::ks, SocketRequest::mut_ks, SocketRequest::set_ks, )); oneofs.push(socket_request::Message::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SocketRequest", fields, oneofs, ) } } impl ::protobuf::Message for SocketRequest { const NAME: &'static str = "SocketRequest"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.message = ::std::option::Option::Some(socket_request::Message::Cgs(is.read_message()?)); }, 18 => { self.message = ::std::option::Option::Some(socket_request::Message::Cpf(is.read_message()?)); }, 26 => { self.message = ::std::option::Option::Some(socket_request::Message::Sn(is.read_message()?)); }, 34 => { self.message = ::std::option::Option::Some(socket_request::Message::Can(is.read_message()?)); }, 42 => { self.message = ::std::option::Option::Some(socket_request::Message::Fgi(is.read_message()?)); }, 50 => { self.message = ::std::option::Option::Some(socket_request::Message::Fa(is.read_message()?)); }, 58 => { self.message = ::std::option::Option::Some(socket_request::Message::Na(is.read_message()?)); }, 66 => { self.message = ::std::option::Option::Some(socket_request::Message::Ra(is.read_message()?)); }, 74 => { self.message = ::std::option::Option::Some(socket_request::Message::Ks(is.read_message()?)); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let ::std::option::Option::Some(ref v) = self.message { match v { &socket_request::Message::Cgs(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Cpf(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Sn(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Can(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Fgi(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Fa(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Na(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Ra(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_request::Message::Ks(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, }; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let ::std::option::Option::Some(ref v) = self.message { match v { &socket_request::Message::Cgs(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }, &socket_request::Message::Cpf(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }, &socket_request::Message::Sn(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }, &socket_request::Message::Can(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }, &socket_request::Message::Fgi(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; }, &socket_request::Message::Fa(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; }, &socket_request::Message::Na(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; }, &socket_request::Message::Ra(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; }, &socket_request::Message::Ks(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; }, }; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SocketRequest { SocketRequest::new() } fn clear(&mut self) { self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static SocketRequest { static instance: SocketRequest = SocketRequest { message: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SocketRequest { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SocketRequest").unwrap()).clone() } } impl ::std::fmt::Display for SocketRequest { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SocketRequest { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `SocketRequest` pub mod socket_request { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:SocketRequest.message) pub enum Message { // @@protoc_insertion_point(oneof_field:SocketRequest.cgs) Cgs(super::ChangeGeneralSound), // @@protoc_insertion_point(oneof_field:SocketRequest.cpf) Cpf(super::ChangePollFrequency), // @@protoc_insertion_point(oneof_field:SocketRequest.sn) Sn(super::SetNotify), // @@protoc_insertion_point(oneof_field:SocketRequest.can) Can(super::ChangeAppName), // @@protoc_insertion_point(oneof_field:SocketRequest.fgi) Fgi(super::FetchGeneralInfo), // @@protoc_insertion_point(oneof_field:SocketRequest.fa) Fa(super::FetchAlarms), // @@protoc_insertion_point(oneof_field:SocketRequest.na) Na(super::NewAlarm), // @@protoc_insertion_point(oneof_field:SocketRequest.ra) Ra(super::RemoveAlarm), // @@protoc_insertion_point(oneof_field:SocketRequest.ks) Ks(super::KillSwitch), } impl ::protobuf::Oneof for Message { } impl ::protobuf::OneofFull for Message { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("message").unwrap()).clone() } } impl Message { pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("message") } } } // @@protoc_insertion_point(message:ChangeGeneralSound) #[derive(PartialEq,Clone,Default,Debug)] pub struct ChangeGeneralSound { // message fields // @@protoc_insertion_point(field:ChangeGeneralSound.newsound) pub newsound: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:ChangeGeneralSound.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ChangeGeneralSound { fn default() -> &'a ChangeGeneralSound { ::default_instance() } } impl ChangeGeneralSound { pub fn new() -> ChangeGeneralSound { ::std::default::Default::default() } // optional string newsound = 1; pub fn newsound(&self) -> &str { match self.newsound.as_ref() { Some(v) => v, None => "", } } pub fn clear_newsound(&mut self) { self.newsound = ::std::option::Option::None; } pub fn has_newsound(&self) -> bool { self.newsound.is_some() } // Param is passed by value, moved pub fn set_newsound(&mut self, v: ::std::string::String) { self.newsound = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_newsound(&mut self) -> &mut ::std::string::String { if self.newsound.is_none() { self.newsound = ::std::option::Option::Some(::std::string::String::new()); } self.newsound.as_mut().unwrap() } // Take field pub fn take_newsound(&mut self) -> ::std::string::String { self.newsound.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "newsound", |m: &ChangeGeneralSound| { &m.newsound }, |m: &mut ChangeGeneralSound| { &mut m.newsound }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ChangeGeneralSound", fields, oneofs, ) } } impl ::protobuf::Message for ChangeGeneralSound { const NAME: &'static str = "ChangeGeneralSound"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.newsound = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.newsound.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.newsound.as_ref() { os.write_string(1, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ChangeGeneralSound { ChangeGeneralSound::new() } fn clear(&mut self) { self.newsound = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ChangeGeneralSound { static instance: ChangeGeneralSound = ChangeGeneralSound { newsound: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ChangeGeneralSound { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ChangeGeneralSound").unwrap()).clone() } } impl ::std::fmt::Display for ChangeGeneralSound { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ChangeGeneralSound { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:ChangePollFrequency) #[derive(PartialEq,Clone,Default,Debug)] pub struct ChangePollFrequency { // message fields // @@protoc_insertion_point(field:ChangePollFrequency.poll) pub poll: ::std::option::Option, // @@protoc_insertion_point(field:ChangePollFrequency.tpfc) pub tpfc: ::std::option::Option, // @@protoc_insertion_point(field:ChangePollFrequency.tsfc) pub tsfc: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:ChangePollFrequency.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ChangePollFrequency { fn default() -> &'a ChangePollFrequency { ::default_instance() } } impl ChangePollFrequency { pub fn new() -> ChangePollFrequency { ::std::default::Default::default() } // optional uint64 poll = 1; pub fn poll(&self) -> u64 { self.poll.unwrap_or(0) } pub fn clear_poll(&mut self) { self.poll = ::std::option::Option::None; } pub fn has_poll(&self) -> bool { self.poll.is_some() } // Param is passed by value, moved pub fn set_poll(&mut self, v: u64) { self.poll = ::std::option::Option::Some(v); } // optional uint32 tpfc = 2; pub fn tpfc(&self) -> u32 { self.tpfc.unwrap_or(0) } pub fn clear_tpfc(&mut self) { self.tpfc = ::std::option::Option::None; } pub fn has_tpfc(&self) -> bool { self.tpfc.is_some() } // Param is passed by value, moved pub fn set_tpfc(&mut self, v: u32) { self.tpfc = ::std::option::Option::Some(v); } // optional uint32 tsfc = 3; pub fn tsfc(&self) -> u32 { self.tsfc.unwrap_or(0) } pub fn clear_tsfc(&mut self) { self.tsfc = ::std::option::Option::None; } pub fn has_tsfc(&self) -> bool { self.tsfc.is_some() } // Param is passed by value, moved pub fn set_tsfc(&mut self, v: u32) { self.tsfc = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(3); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "poll", |m: &ChangePollFrequency| { &m.poll }, |m: &mut ChangePollFrequency| { &mut m.poll }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "tpfc", |m: &ChangePollFrequency| { &m.tpfc }, |m: &mut ChangePollFrequency| { &mut m.tpfc }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "tsfc", |m: &ChangePollFrequency| { &m.tsfc }, |m: &mut ChangePollFrequency| { &mut m.tsfc }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ChangePollFrequency", fields, oneofs, ) } } impl ::protobuf::Message for ChangePollFrequency { const NAME: &'static str = "ChangePollFrequency"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.poll = ::std::option::Option::Some(is.read_uint64()?); }, 16 => { self.tpfc = ::std::option::Option::Some(is.read_uint32()?); }, 24 => { self.tsfc = ::std::option::Option::Some(is.read_uint32()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.poll { my_size += ::protobuf::rt::uint64_size(1, v); } if let Some(v) = self.tpfc { my_size += ::protobuf::rt::uint32_size(2, v); } if let Some(v) = self.tsfc { my_size += ::protobuf::rt::uint32_size(3, v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.poll { os.write_uint64(1, v)?; } if let Some(v) = self.tpfc { os.write_uint32(2, v)?; } if let Some(v) = self.tsfc { os.write_uint32(3, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ChangePollFrequency { ChangePollFrequency::new() } fn clear(&mut self) { self.poll = ::std::option::Option::None; self.tpfc = ::std::option::Option::None; self.tsfc = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ChangePollFrequency { static instance: ChangePollFrequency = ChangePollFrequency { poll: ::std::option::Option::None, tpfc: ::std::option::Option::None, tsfc: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ChangePollFrequency { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ChangePollFrequency").unwrap()).clone() } } impl ::std::fmt::Display for ChangePollFrequency { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ChangePollFrequency { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:SetNotify) #[derive(PartialEq,Clone,Default,Debug)] pub struct SetNotify { // message fields // @@protoc_insertion_point(field:SetNotify.noti) pub noti: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:SetNotify.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SetNotify { fn default() -> &'a SetNotify { ::default_instance() } } impl SetNotify { pub fn new() -> SetNotify { ::std::default::Default::default() } // optional bool noti = 1; pub fn noti(&self) -> bool { self.noti.unwrap_or(false) } pub fn clear_noti(&mut self) { self.noti = ::std::option::Option::None; } pub fn has_noti(&self) -> bool { self.noti.is_some() } // Param is passed by value, moved pub fn set_noti(&mut self, v: bool) { self.noti = ::std::option::Option::Some(v); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "noti", |m: &SetNotify| { &m.noti }, |m: &mut SetNotify| { &mut m.noti }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SetNotify", fields, oneofs, ) } } impl ::protobuf::Message for SetNotify { const NAME: &'static str = "SetNotify"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.noti = ::std::option::Option::Some(is.read_bool()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.noti { my_size += 1 + 1; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.noti { os.write_bool(1, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SetNotify { SetNotify::new() } fn clear(&mut self) { self.noti = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static SetNotify { static instance: SetNotify = SetNotify { noti: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SetNotify { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SetNotify").unwrap()).clone() } } impl ::std::fmt::Display for SetNotify { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SetNotify { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:ChangeAppName) #[derive(PartialEq,Clone,Default,Debug)] pub struct ChangeAppName { // message fields // @@protoc_insertion_point(field:ChangeAppName.newname) pub newname: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:ChangeAppName.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a ChangeAppName { fn default() -> &'a ChangeAppName { ::default_instance() } } impl ChangeAppName { pub fn new() -> ChangeAppName { ::std::default::Default::default() } // optional string newname = 1; pub fn newname(&self) -> &str { match self.newname.as_ref() { Some(v) => v, None => "", } } pub fn clear_newname(&mut self) { self.newname = ::std::option::Option::None; } pub fn has_newname(&self) -> bool { self.newname.is_some() } // Param is passed by value, moved pub fn set_newname(&mut self, v: ::std::string::String) { self.newname = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_newname(&mut self) -> &mut ::std::string::String { if self.newname.is_none() { self.newname = ::std::option::Option::Some(::std::string::String::new()); } self.newname.as_mut().unwrap() } // Take field pub fn take_newname(&mut self) -> ::std::string::String { self.newname.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "newname", |m: &ChangeAppName| { &m.newname }, |m: &mut ChangeAppName| { &mut m.newname }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "ChangeAppName", fields, oneofs, ) } } impl ::protobuf::Message for ChangeAppName { const NAME: &'static str = "ChangeAppName"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.newname = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.newname.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.newname.as_ref() { os.write_string(1, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> ChangeAppName { ChangeAppName::new() } fn clear(&mut self) { self.newname = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static ChangeAppName { static instance: ChangeAppName = ChangeAppName { newname: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for ChangeAppName { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("ChangeAppName").unwrap()).clone() } } impl ::std::fmt::Display for ChangeAppName { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for ChangeAppName { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:FetchGeneralInfo) #[derive(PartialEq,Clone,Default,Debug)] pub struct FetchGeneralInfo { // message fields // @@protoc_insertion_point(field:FetchGeneralInfo.git) pub git: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields // @@protoc_insertion_point(special_field:FetchGeneralInfo.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FetchGeneralInfo { fn default() -> &'a FetchGeneralInfo { ::default_instance() } } impl FetchGeneralInfo { pub fn new() -> FetchGeneralInfo { ::std::default::Default::default() } // optional .GeneralInfoType git = 1; pub fn git(&self) -> GeneralInfoType { match self.git { Some(e) => e.enum_value_or(GeneralInfoType::Sound), None => GeneralInfoType::Sound, } } pub fn clear_git(&mut self) { self.git = ::std::option::Option::None; } pub fn has_git(&self) -> bool { self.git.is_some() } // Param is passed by value, moved pub fn set_git(&mut self, v: GeneralInfoType) { self.git = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "git", |m: &FetchGeneralInfo| { &m.git }, |m: &mut FetchGeneralInfo| { &mut m.git }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "FetchGeneralInfo", fields, oneofs, ) } } impl ::protobuf::Message for FetchGeneralInfo { const NAME: &'static str = "FetchGeneralInfo"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.git = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.git { my_size += ::protobuf::rt::int32_size(1, v.value()); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.git { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> FetchGeneralInfo { FetchGeneralInfo::new() } fn clear(&mut self) { self.git = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static FetchGeneralInfo { static instance: FetchGeneralInfo = FetchGeneralInfo { git: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for FetchGeneralInfo { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("FetchGeneralInfo").unwrap()).clone() } } impl ::std::fmt::Display for FetchGeneralInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FetchGeneralInfo { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:FetchAlarms) #[derive(PartialEq,Clone,Default,Debug)] pub struct FetchAlarms { // special fields // @@protoc_insertion_point(special_field:FetchAlarms.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a FetchAlarms { fn default() -> &'a FetchAlarms { ::default_instance() } } impl FetchAlarms { pub fn new() -> FetchAlarms { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "FetchAlarms", fields, oneofs, ) } } impl ::protobuf::Message for FetchAlarms { const NAME: &'static str = "FetchAlarms"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> FetchAlarms { FetchAlarms::new() } fn clear(&mut self) { self.special_fields.clear(); } fn default_instance() -> &'static FetchAlarms { static instance: FetchAlarms = FetchAlarms { special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for FetchAlarms { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("FetchAlarms").unwrap()).clone() } } impl ::std::fmt::Display for FetchAlarms { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for FetchAlarms { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:NewAlarm) #[derive(PartialEq,Clone,Default,Debug)] pub struct NewAlarm { // message fields // @@protoc_insertion_point(field:NewAlarm.al) pub al: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:NewAlarm.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a NewAlarm { fn default() -> &'a NewAlarm { ::default_instance() } } impl NewAlarm { pub fn new() -> NewAlarm { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, AlarmInfo>( "al", |m: &NewAlarm| { &m.al }, |m: &mut NewAlarm| { &mut m.al }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "NewAlarm", fields, oneofs, ) } } impl ::protobuf::Message for NewAlarm { const NAME: &'static str = "NewAlarm"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.al)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.al.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.al.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> NewAlarm { NewAlarm::new() } fn clear(&mut self) { self.al.clear(); self.special_fields.clear(); } fn default_instance() -> &'static NewAlarm { static instance: NewAlarm = NewAlarm { al: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for NewAlarm { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("NewAlarm").unwrap()).clone() } } impl ::std::fmt::Display for NewAlarm { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for NewAlarm { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:RemoveAlarm) #[derive(PartialEq,Clone,Default,Debug)] pub struct RemoveAlarm { // message fields // @@protoc_insertion_point(field:RemoveAlarm.al) pub al: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:RemoveAlarm.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a RemoveAlarm { fn default() -> &'a RemoveAlarm { ::default_instance() } } impl RemoveAlarm { pub fn new() -> RemoveAlarm { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, AlarmInfo>( "al", |m: &RemoveAlarm| { &m.al }, |m: &mut RemoveAlarm| { &mut m.al }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RemoveAlarm", fields, oneofs, ) } } impl ::protobuf::Message for RemoveAlarm { const NAME: &'static str = "RemoveAlarm"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.al)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.al.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.al.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> RemoveAlarm { RemoveAlarm::new() } fn clear(&mut self) { self.al.clear(); self.special_fields.clear(); } fn default_instance() -> &'static RemoveAlarm { static instance: RemoveAlarm = RemoveAlarm { al: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for RemoveAlarm { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("RemoveAlarm").unwrap()).clone() } } impl ::std::fmt::Display for RemoveAlarm { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RemoveAlarm { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:KillSwitch) #[derive(PartialEq,Clone,Default,Debug)] pub struct KillSwitch { // special fields // @@protoc_insertion_point(special_field:KillSwitch.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a KillSwitch { fn default() -> &'a KillSwitch { ::default_instance() } } impl KillSwitch { pub fn new() -> KillSwitch { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "KillSwitch", fields, oneofs, ) } } impl ::protobuf::Message for KillSwitch { const NAME: &'static str = "KillSwitch"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> KillSwitch { KillSwitch::new() } fn clear(&mut self) { self.special_fields.clear(); } fn default_instance() -> &'static KillSwitch { static instance: KillSwitch = KillSwitch { special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for KillSwitch { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("KillSwitch").unwrap()).clone() } } impl ::std::fmt::Display for KillSwitch { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for KillSwitch { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:SocketResponse) #[derive(PartialEq,Clone,Default,Debug)] pub struct SocketResponse { // message oneof groups pub message: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:SocketResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a SocketResponse { fn default() -> &'a SocketResponse { ::default_instance() } } impl SocketResponse { pub fn new() -> SocketResponse { ::std::default::Default::default() } // optional .RequestError err = 1; pub fn err(&self) -> &RequestError { match self.message { ::std::option::Option::Some(socket_response::Message::Err(ref v)) => v, _ => ::default_instance(), } } pub fn clear_err(&mut self) { self.message = ::std::option::Option::None; } pub fn has_err(&self) -> bool { match self.message { ::std::option::Option::Some(socket_response::Message::Err(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_err(&mut self, v: RequestError) { self.message = ::std::option::Option::Some(socket_response::Message::Err(v)) } // Mutable pointer to the field. pub fn mut_err(&mut self) -> &mut RequestError { if let ::std::option::Option::Some(socket_response::Message::Err(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_response::Message::Err(RequestError::new())); } match self.message { ::std::option::Option::Some(socket_response::Message::Err(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_err(&mut self) -> RequestError { if self.has_err() { match self.message.take() { ::std::option::Option::Some(socket_response::Message::Err(v)) => v, _ => panic!(), } } else { RequestError::new() } } // optional .RequestSuccess suc = 2; pub fn suc(&self) -> &RequestSuccess { match self.message { ::std::option::Option::Some(socket_response::Message::Suc(ref v)) => v, _ => ::default_instance(), } } pub fn clear_suc(&mut self) { self.message = ::std::option::Option::None; } pub fn has_suc(&self) -> bool { match self.message { ::std::option::Option::Some(socket_response::Message::Suc(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_suc(&mut self, v: RequestSuccess) { self.message = ::std::option::Option::Some(socket_response::Message::Suc(v)) } // Mutable pointer to the field. pub fn mut_suc(&mut self) -> &mut RequestSuccess { if let ::std::option::Option::Some(socket_response::Message::Suc(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_response::Message::Suc(RequestSuccess::new())); } match self.message { ::std::option::Option::Some(socket_response::Message::Suc(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_suc(&mut self) -> RequestSuccess { if self.has_suc() { match self.message.take() { ::std::option::Option::Some(socket_response::Message::Suc(v)) => v, _ => panic!(), } } else { RequestSuccess::new() } } // optional .RequestSuccessWithData swd = 3; pub fn swd(&self) -> &RequestSuccessWithData { match self.message { ::std::option::Option::Some(socket_response::Message::Swd(ref v)) => v, _ => ::default_instance(), } } pub fn clear_swd(&mut self) { self.message = ::std::option::Option::None; } pub fn has_swd(&self) -> bool { match self.message { ::std::option::Option::Some(socket_response::Message::Swd(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_swd(&mut self, v: RequestSuccessWithData) { self.message = ::std::option::Option::Some(socket_response::Message::Swd(v)) } // Mutable pointer to the field. pub fn mut_swd(&mut self) -> &mut RequestSuccessWithData { if let ::std::option::Option::Some(socket_response::Message::Swd(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_response::Message::Swd(RequestSuccessWithData::new())); } match self.message { ::std::option::Option::Some(socket_response::Message::Swd(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_swd(&mut self) -> RequestSuccessWithData { if self.has_swd() { match self.message.take() { ::std::option::Option::Some(socket_response::Message::Swd(v)) => v, _ => panic!(), } } else { RequestSuccessWithData::new() } } // optional .RequestSuccessWithAlarms swa = 4; pub fn swa(&self) -> &RequestSuccessWithAlarms { match self.message { ::std::option::Option::Some(socket_response::Message::Swa(ref v)) => v, _ => ::default_instance(), } } pub fn clear_swa(&mut self) { self.message = ::std::option::Option::None; } pub fn has_swa(&self) -> bool { match self.message { ::std::option::Option::Some(socket_response::Message::Swa(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_swa(&mut self, v: RequestSuccessWithAlarms) { self.message = ::std::option::Option::Some(socket_response::Message::Swa(v)) } // Mutable pointer to the field. pub fn mut_swa(&mut self) -> &mut RequestSuccessWithAlarms { if let ::std::option::Option::Some(socket_response::Message::Swa(_)) = self.message { } else { self.message = ::std::option::Option::Some(socket_response::Message::Swa(RequestSuccessWithAlarms::new())); } match self.message { ::std::option::Option::Some(socket_response::Message::Swa(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_swa(&mut self) -> RequestSuccessWithAlarms { if self.has_swa() { match self.message.take() { ::std::option::Option::Some(socket_response::Message::Swa(v)) => v, _ => panic!(), } } else { RequestSuccessWithAlarms::new() } } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(1); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, RequestError>( "err", SocketResponse::has_err, SocketResponse::err, SocketResponse::mut_err, SocketResponse::set_err, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, RequestSuccess>( "suc", SocketResponse::has_suc, SocketResponse::suc, SocketResponse::mut_suc, SocketResponse::set_suc, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, RequestSuccessWithData>( "swd", SocketResponse::has_swd, SocketResponse::swd, SocketResponse::mut_swd, SocketResponse::set_swd, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, RequestSuccessWithAlarms>( "swa", SocketResponse::has_swa, SocketResponse::swa, SocketResponse::mut_swa, SocketResponse::set_swa, )); oneofs.push(socket_response::Message::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "SocketResponse", fields, oneofs, ) } } impl ::protobuf::Message for SocketResponse { const NAME: &'static str = "SocketResponse"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.message = ::std::option::Option::Some(socket_response::Message::Err(is.read_message()?)); }, 18 => { self.message = ::std::option::Option::Some(socket_response::Message::Suc(is.read_message()?)); }, 26 => { self.message = ::std::option::Option::Some(socket_response::Message::Swd(is.read_message()?)); }, 34 => { self.message = ::std::option::Option::Some(socket_response::Message::Swa(is.read_message()?)); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let ::std::option::Option::Some(ref v) = self.message { match v { &socket_response::Message::Err(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_response::Message::Suc(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_response::Message::Swd(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &socket_response::Message::Swa(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, }; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let ::std::option::Option::Some(ref v) = self.message { match v { &socket_response::Message::Err(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }, &socket_response::Message::Suc(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }, &socket_response::Message::Swd(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; }, &socket_response::Message::Swa(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; }, }; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> SocketResponse { SocketResponse::new() } fn clear(&mut self) { self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static SocketResponse { static instance: SocketResponse = SocketResponse { message: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for SocketResponse { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("SocketResponse").unwrap()).clone() } } impl ::std::fmt::Display for SocketResponse { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for SocketResponse { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `SocketResponse` pub mod socket_response { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:SocketResponse.message) pub enum Message { // @@protoc_insertion_point(oneof_field:SocketResponse.err) Err(super::RequestError), // @@protoc_insertion_point(oneof_field:SocketResponse.suc) Suc(super::RequestSuccess), // @@protoc_insertion_point(oneof_field:SocketResponse.swd) Swd(super::RequestSuccessWithData), // @@protoc_insertion_point(oneof_field:SocketResponse.swa) Swa(super::RequestSuccessWithAlarms), } impl ::protobuf::Oneof for Message { } impl ::protobuf::OneofFull for Message { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("message").unwrap()).clone() } } impl Message { pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("message") } } } // @@protoc_insertion_point(message:RequestError) #[derive(PartialEq,Clone,Default,Debug)] pub struct RequestError { // message fields // @@protoc_insertion_point(field:RequestError.er) pub er: ::std::option::Option<::protobuf::EnumOrUnknown>, // special fields // @@protoc_insertion_point(special_field:RequestError.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a RequestError { fn default() -> &'a RequestError { ::default_instance() } } impl RequestError { pub fn new() -> RequestError { ::std::default::Default::default() } // optional .ErrorReason er = 1; pub fn er(&self) -> ErrorReason { match self.er { Some(e) => e.enum_value_or(ErrorReason::ParseFailureError), None => ErrorReason::ParseFailureError, } } pub fn clear_er(&mut self) { self.er = ::std::option::Option::None; } pub fn has_er(&self) -> bool { self.er.is_some() } // Param is passed by value, moved pub fn set_er(&mut self, v: ErrorReason) { self.er = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "er", |m: &RequestError| { &m.er }, |m: &mut RequestError| { &mut m.er }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RequestError", fields, oneofs, ) } } impl ::protobuf::Message for RequestError { const NAME: &'static str = "RequestError"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 8 => { self.er = ::std::option::Option::Some(is.read_enum_or_unknown()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.er { my_size += ::protobuf::rt::int32_size(1, v.value()); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.er { os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> RequestError { RequestError::new() } fn clear(&mut self) { self.er = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static RequestError { static instance: RequestError = RequestError { er: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for RequestError { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("RequestError").unwrap()).clone() } } impl ::std::fmt::Display for RequestError { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RequestError { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:RequestSuccess) #[derive(PartialEq,Clone,Default,Debug)] pub struct RequestSuccess { // special fields // @@protoc_insertion_point(special_field:RequestSuccess.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a RequestSuccess { fn default() -> &'a RequestSuccess { ::default_instance() } } impl RequestSuccess { pub fn new() -> RequestSuccess { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RequestSuccess", fields, oneofs, ) } } impl ::protobuf::Message for RequestSuccess { const NAME: &'static str = "RequestSuccess"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> RequestSuccess { RequestSuccess::new() } fn clear(&mut self) { self.special_fields.clear(); } fn default_instance() -> &'static RequestSuccess { static instance: RequestSuccess = RequestSuccess { special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for RequestSuccess { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("RequestSuccess").unwrap()).clone() } } impl ::std::fmt::Display for RequestSuccess { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RequestSuccess { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:RequestSuccessWithData) #[derive(PartialEq,Clone,Default,Debug)] pub struct RequestSuccessWithData { // message oneof groups pub message: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:RequestSuccessWithData.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a RequestSuccessWithData { fn default() -> &'a RequestSuccessWithData { ::default_instance() } } impl RequestSuccessWithData { pub fn new() -> RequestSuccessWithData { ::std::default::Default::default() } // optional string st = 1; pub fn st(&self) -> &str { match self.message { ::std::option::Option::Some(request_success_with_data::Message::St(ref v)) => v, _ => "", } } pub fn clear_st(&mut self) { self.message = ::std::option::Option::None; } pub fn has_st(&self) -> bool { match self.message { ::std::option::Option::Some(request_success_with_data::Message::St(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_st(&mut self, v: ::std::string::String) { self.message = ::std::option::Option::Some(request_success_with_data::Message::St(v)) } // Mutable pointer to the field. pub fn mut_st(&mut self) -> &mut ::std::string::String { if let ::std::option::Option::Some(request_success_with_data::Message::St(_)) = self.message { } else { self.message = ::std::option::Option::Some(request_success_with_data::Message::St(::std::string::String::new())); } match self.message { ::std::option::Option::Some(request_success_with_data::Message::St(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_st(&mut self) -> ::std::string::String { if self.has_st() { match self.message.take() { ::std::option::Option::Some(request_success_with_data::Message::St(v)) => v, _ => panic!(), } } else { ::std::string::String::new() } } // optional uint64 ui = 2; pub fn ui(&self) -> u64 { match self.message { ::std::option::Option::Some(request_success_with_data::Message::Ui(v)) => v, _ => 0, } } pub fn clear_ui(&mut self) { self.message = ::std::option::Option::None; } pub fn has_ui(&self) -> bool { match self.message { ::std::option::Option::Some(request_success_with_data::Message::Ui(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_ui(&mut self, v: u64) { self.message = ::std::option::Option::Some(request_success_with_data::Message::Ui(v)) } // optional bool bl = 3; pub fn bl(&self) -> bool { match self.message { ::std::option::Option::Some(request_success_with_data::Message::Bl(v)) => v, _ => false, } } pub fn clear_bl(&mut self) { self.message = ::std::option::Option::None; } pub fn has_bl(&self) -> bool { match self.message { ::std::option::Option::Some(request_success_with_data::Message::Bl(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_bl(&mut self, v: bool) { self.message = ::std::option::Option::Some(request_success_with_data::Message::Bl(v)) } // optional uint32 sui = 4; pub fn sui(&self) -> u32 { match self.message { ::std::option::Option::Some(request_success_with_data::Message::Sui(v)) => v, _ => 0, } } pub fn clear_sui(&mut self) { self.message = ::std::option::Option::None; } pub fn has_sui(&self) -> bool { match self.message { ::std::option::Option::Some(request_success_with_data::Message::Sui(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_sui(&mut self, v: u32) { self.message = ::std::option::Option::Some(request_success_with_data::Message::Sui(v)) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(1); fields.push(::protobuf::reflect::rt::v2::make_oneof_deref_has_get_set_simpler_accessor::<_, _>( "st", RequestSuccessWithData::has_st, RequestSuccessWithData::st, RequestSuccessWithData::set_st, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>( "ui", RequestSuccessWithData::has_ui, RequestSuccessWithData::ui, RequestSuccessWithData::set_ui, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>( "bl", RequestSuccessWithData::has_bl, RequestSuccessWithData::bl, RequestSuccessWithData::set_bl, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_copy_has_get_set_simpler_accessors::<_, _>( "sui", RequestSuccessWithData::has_sui, RequestSuccessWithData::sui, RequestSuccessWithData::set_sui, )); oneofs.push(request_success_with_data::Message::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RequestSuccessWithData", fields, oneofs, ) } } impl ::protobuf::Message for RequestSuccessWithData { const NAME: &'static str = "RequestSuccessWithData"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.message = ::std::option::Option::Some(request_success_with_data::Message::St(is.read_string()?)); }, 16 => { self.message = ::std::option::Option::Some(request_success_with_data::Message::Ui(is.read_uint64()?)); }, 24 => { self.message = ::std::option::Option::Some(request_success_with_data::Message::Bl(is.read_bool()?)); }, 32 => { self.message = ::std::option::Option::Some(request_success_with_data::Message::Sui(is.read_uint32()?)); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let ::std::option::Option::Some(ref v) = self.message { match v { &request_success_with_data::Message::St(ref v) => { my_size += ::protobuf::rt::string_size(1, &v); }, &request_success_with_data::Message::Ui(v) => { my_size += ::protobuf::rt::uint64_size(2, v); }, &request_success_with_data::Message::Bl(v) => { my_size += 1 + 1; }, &request_success_with_data::Message::Sui(v) => { my_size += ::protobuf::rt::uint32_size(4, v); }, }; } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let ::std::option::Option::Some(ref v) = self.message { match v { &request_success_with_data::Message::St(ref v) => { os.write_string(1, v)?; }, &request_success_with_data::Message::Ui(v) => { os.write_uint64(2, v)?; }, &request_success_with_data::Message::Bl(v) => { os.write_bool(3, v)?; }, &request_success_with_data::Message::Sui(v) => { os.write_uint32(4, v)?; }, }; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> RequestSuccessWithData { RequestSuccessWithData::new() } fn clear(&mut self) { self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.message = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static RequestSuccessWithData { static instance: RequestSuccessWithData = RequestSuccessWithData { message: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for RequestSuccessWithData { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("RequestSuccessWithData").unwrap()).clone() } } impl ::std::fmt::Display for RequestSuccessWithData { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RequestSuccessWithData { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `RequestSuccessWithData` pub mod request_success_with_data { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:RequestSuccessWithData.message) pub enum Message { // @@protoc_insertion_point(oneof_field:RequestSuccessWithData.st) St(::std::string::String), // @@protoc_insertion_point(oneof_field:RequestSuccessWithData.ui) Ui(u64), // @@protoc_insertion_point(oneof_field:RequestSuccessWithData.bl) Bl(bool), // @@protoc_insertion_point(oneof_field:RequestSuccessWithData.sui) Sui(u32), } impl ::protobuf::Oneof for Message { } impl ::protobuf::OneofFull for Message { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("message").unwrap()).clone() } } impl Message { pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("message") } } } // @@protoc_insertion_point(message:RequestSuccessWithAlarms) #[derive(PartialEq,Clone,Default,Debug)] pub struct RequestSuccessWithAlarms { // message fields // @@protoc_insertion_point(field:RequestSuccessWithAlarms.als) pub als: ::std::vec::Vec, // special fields // @@protoc_insertion_point(special_field:RequestSuccessWithAlarms.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a RequestSuccessWithAlarms { fn default() -> &'a RequestSuccessWithAlarms { ::default_instance() } } impl RequestSuccessWithAlarms { pub fn new() -> RequestSuccessWithAlarms { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "als", |m: &RequestSuccessWithAlarms| { &m.als }, |m: &mut RequestSuccessWithAlarms| { &mut m.als }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "RequestSuccessWithAlarms", fields, oneofs, ) } } impl ::protobuf::Message for RequestSuccessWithAlarms { const NAME: &'static str = "RequestSuccessWithAlarms"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.als.push(is.read_message()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.als { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { for v in &self.als { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> RequestSuccessWithAlarms { RequestSuccessWithAlarms::new() } fn clear(&mut self) { self.als.clear(); self.special_fields.clear(); } fn default_instance() -> &'static RequestSuccessWithAlarms { static instance: RequestSuccessWithAlarms = RequestSuccessWithAlarms { als: ::std::vec::Vec::new(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for RequestSuccessWithAlarms { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("RequestSuccessWithAlarms").unwrap()).clone() } } impl ::std::fmt::Display for RequestSuccessWithAlarms { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for RequestSuccessWithAlarms { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:AlarmInfo) #[derive(PartialEq,Clone,Default,Debug)] pub struct AlarmInfo { // message fields // @@protoc_insertion_point(field:AlarmInfo.title) pub title: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:AlarmInfo.desc) pub desc: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:AlarmInfo.time) pub time: ::std::option::Option, // @@protoc_insertion_point(field:AlarmInfo.repeat) pub repeat: ::std::vec::Vec<::std::string::String>, // @@protoc_insertion_point(field:AlarmInfo.sound) pub sound: ::std::option::Option<::std::string::String>, // @@protoc_insertion_point(field:AlarmInfo.icon) pub icon: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:AlarmInfo.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AlarmInfo { fn default() -> &'a AlarmInfo { ::default_instance() } } impl AlarmInfo { pub fn new() -> AlarmInfo { ::std::default::Default::default() } // optional string title = 1; pub fn title(&self) -> &str { match self.title.as_ref() { Some(v) => v, None => "", } } pub fn clear_title(&mut self) { self.title = ::std::option::Option::None; } pub fn has_title(&self) -> bool { self.title.is_some() } // Param is passed by value, moved pub fn set_title(&mut self, v: ::std::string::String) { self.title = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_title(&mut self) -> &mut ::std::string::String { if self.title.is_none() { self.title = ::std::option::Option::Some(::std::string::String::new()); } self.title.as_mut().unwrap() } // Take field pub fn take_title(&mut self) -> ::std::string::String { self.title.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string desc = 2; pub fn desc(&self) -> &str { match self.desc.as_ref() { Some(v) => v, None => "", } } pub fn clear_desc(&mut self) { self.desc = ::std::option::Option::None; } pub fn has_desc(&self) -> bool { self.desc.is_some() } // Param is passed by value, moved pub fn set_desc(&mut self, v: ::std::string::String) { self.desc = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_desc(&mut self) -> &mut ::std::string::String { if self.desc.is_none() { self.desc = ::std::option::Option::Some(::std::string::String::new()); } self.desc.as_mut().unwrap() } // Take field pub fn take_desc(&mut self) -> ::std::string::String { self.desc.take().unwrap_or_else(|| ::std::string::String::new()) } // optional uint32 time = 3; pub fn time(&self) -> u32 { self.time.unwrap_or(0) } pub fn clear_time(&mut self) { self.time = ::std::option::Option::None; } pub fn has_time(&self) -> bool { self.time.is_some() } // Param is passed by value, moved pub fn set_time(&mut self, v: u32) { self.time = ::std::option::Option::Some(v); } // optional string sound = 5; pub fn sound(&self) -> &str { match self.sound.as_ref() { Some(v) => v, None => "", } } pub fn clear_sound(&mut self) { self.sound = ::std::option::Option::None; } pub fn has_sound(&self) -> bool { self.sound.is_some() } // Param is passed by value, moved pub fn set_sound(&mut self, v: ::std::string::String) { self.sound = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_sound(&mut self) -> &mut ::std::string::String { if self.sound.is_none() { self.sound = ::std::option::Option::Some(::std::string::String::new()); } self.sound.as_mut().unwrap() } // Take field pub fn take_sound(&mut self) -> ::std::string::String { self.sound.take().unwrap_or_else(|| ::std::string::String::new()) } // optional string icon = 6; pub fn icon(&self) -> &str { match self.icon.as_ref() { Some(v) => v, None => "", } } pub fn clear_icon(&mut self) { self.icon = ::std::option::Option::None; } pub fn has_icon(&self) -> bool { self.icon.is_some() } // Param is passed by value, moved pub fn set_icon(&mut self, v: ::std::string::String) { self.icon = ::std::option::Option::Some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_icon(&mut self) -> &mut ::std::string::String { if self.icon.is_none() { self.icon = ::std::option::Option::Some(::std::string::String::new()); } self.icon.as_mut().unwrap() } // Take field pub fn take_icon(&mut self) -> ::std::string::String { self.icon.take().unwrap_or_else(|| ::std::string::String::new()) } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "title", |m: &AlarmInfo| { &m.title }, |m: &mut AlarmInfo| { &mut m.title }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "desc", |m: &AlarmInfo| { &m.desc }, |m: &mut AlarmInfo| { &mut m.desc }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "time", |m: &AlarmInfo| { &m.time }, |m: &mut AlarmInfo| { &mut m.time }, )); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "repeat", |m: &AlarmInfo| { &m.repeat }, |m: &mut AlarmInfo| { &mut m.repeat }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "sound", |m: &AlarmInfo| { &m.sound }, |m: &mut AlarmInfo| { &mut m.sound }, )); fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( "icon", |m: &AlarmInfo| { &m.icon }, |m: &mut AlarmInfo| { &mut m.icon }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "AlarmInfo", fields, oneofs, ) } } impl ::protobuf::Message for AlarmInfo { const NAME: &'static str = "AlarmInfo"; fn is_initialized(&self) -> bool { true } fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { while let Some(tag) = is.read_raw_tag_or_eof()? { match tag { 10 => { self.title = ::std::option::Option::Some(is.read_string()?); }, 18 => { self.desc = ::std::option::Option::Some(is.read_string()?); }, 24 => { self.time = ::std::option::Option::Some(is.read_uint32()?); }, 34 => { self.repeat.push(is.read_string()?); }, 42 => { self.sound = ::std::option::Option::Some(is.read_string()?); }, 50 => { self.icon = ::std::option::Option::Some(is.read_string()?); }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if let Some(v) = self.title.as_ref() { my_size += ::protobuf::rt::string_size(1, &v); } if let Some(v) = self.desc.as_ref() { my_size += ::protobuf::rt::string_size(2, &v); } if let Some(v) = self.time { my_size += ::protobuf::rt::uint32_size(3, v); } for value in &self.repeat { my_size += ::protobuf::rt::string_size(4, &value); }; if let Some(v) = self.sound.as_ref() { my_size += ::protobuf::rt::string_size(5, &v); } if let Some(v) = self.icon.as_ref() { my_size += ::protobuf::rt::string_size(6, &v); } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size } fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { if let Some(v) = self.title.as_ref() { os.write_string(1, v)?; } if let Some(v) = self.desc.as_ref() { os.write_string(2, v)?; } if let Some(v) = self.time { os.write_uint32(3, v)?; } for v in &self.repeat { os.write_string(4, &v)?; }; if let Some(v) = self.sound.as_ref() { os.write_string(5, v)?; } if let Some(v) = self.icon.as_ref() { os.write_string(6, v)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AlarmInfo { AlarmInfo::new() } fn clear(&mut self) { self.title = ::std::option::Option::None; self.desc = ::std::option::Option::None; self.time = ::std::option::Option::None; self.repeat.clear(); self.sound = ::std::option::Option::None; self.icon = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static AlarmInfo { static instance: AlarmInfo = AlarmInfo { title: ::std::option::Option::None, desc: ::std::option::Option::None, time: ::std::option::Option::None, repeat: ::std::vec::Vec::new(), sound: ::std::option::Option::None, icon: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AlarmInfo { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("AlarmInfo").unwrap()).clone() } } impl ::std::fmt::Display for AlarmInfo { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AlarmInfo { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:GeneralInfoType) pub enum GeneralInfoType { // @@protoc_insertion_point(enum_value:GeneralInfoType.Sound) Sound = 1, // @@protoc_insertion_point(enum_value:GeneralInfoType.Poll) Poll = 2, // @@protoc_insertion_point(enum_value:GeneralInfoType.Notify) Notify = 3, // @@protoc_insertion_point(enum_value:GeneralInfoType.AppName) AppName = 4, // @@protoc_insertion_point(enum_value:GeneralInfoType.Daemon) Daemon = 5, // @@protoc_insertion_point(enum_value:GeneralInfoType.Tpfc) Tpfc = 6, // @@protoc_insertion_point(enum_value:GeneralInfoType.Tsfc) Tsfc = 7, } impl ::protobuf::Enum for GeneralInfoType { const NAME: &'static str = "GeneralInfoType"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 1 => ::std::option::Option::Some(GeneralInfoType::Sound), 2 => ::std::option::Option::Some(GeneralInfoType::Poll), 3 => ::std::option::Option::Some(GeneralInfoType::Notify), 4 => ::std::option::Option::Some(GeneralInfoType::AppName), 5 => ::std::option::Option::Some(GeneralInfoType::Daemon), 6 => ::std::option::Option::Some(GeneralInfoType::Tpfc), 7 => ::std::option::Option::Some(GeneralInfoType::Tsfc), _ => ::std::option::Option::None } } fn from_str(str: &str) -> ::std::option::Option { match str { "Sound" => ::std::option::Option::Some(GeneralInfoType::Sound), "Poll" => ::std::option::Option::Some(GeneralInfoType::Poll), "Notify" => ::std::option::Option::Some(GeneralInfoType::Notify), "AppName" => ::std::option::Option::Some(GeneralInfoType::AppName), "Daemon" => ::std::option::Option::Some(GeneralInfoType::Daemon), "Tpfc" => ::std::option::Option::Some(GeneralInfoType::Tpfc), "Tsfc" => ::std::option::Option::Some(GeneralInfoType::Tsfc), _ => ::std::option::Option::None } } const VALUES: &'static [GeneralInfoType] = &[ GeneralInfoType::Sound, GeneralInfoType::Poll, GeneralInfoType::Notify, GeneralInfoType::AppName, GeneralInfoType::Daemon, GeneralInfoType::Tpfc, GeneralInfoType::Tsfc, ]; } impl ::protobuf::EnumFull for GeneralInfoType { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().enum_by_package_relative_name("GeneralInfoType").unwrap()).clone() } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { let index = match self { GeneralInfoType::Sound => 0, GeneralInfoType::Poll => 1, GeneralInfoType::Notify => 2, GeneralInfoType::AppName => 3, GeneralInfoType::Daemon => 4, GeneralInfoType::Tpfc => 5, GeneralInfoType::Tsfc => 6, }; Self::enum_descriptor().value_by_index(index) } } // Note, `Default` is implemented although default value is not 0 impl ::std::default::Default for GeneralInfoType { fn default() -> Self { GeneralInfoType::Sound } } impl GeneralInfoType { fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("GeneralInfoType") } } #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] // @@protoc_insertion_point(enum:ErrorReason) pub enum ErrorReason { // @@protoc_insertion_point(enum_value:ErrorReason.ParseFailureError) ParseFailureError = 0, // @@protoc_insertion_point(enum_value:ErrorReason.MissingRequiredComponent) MissingRequiredComponent = 1, // @@protoc_insertion_point(enum_value:ErrorReason.IllegalEnumOption) IllegalEnumOption = 2, // @@protoc_insertion_point(enum_value:ErrorReason.InternalServerError) InternalServerError = 3, // @@protoc_insertion_point(enum_value:ErrorReason.DoesNotExist) DoesNotExist = 4, } impl ::protobuf::Enum for ErrorReason { const NAME: &'static str = "ErrorReason"; fn value(&self) -> i32 { *self as i32 } fn from_i32(value: i32) -> ::std::option::Option { match value { 0 => ::std::option::Option::Some(ErrorReason::ParseFailureError), 1 => ::std::option::Option::Some(ErrorReason::MissingRequiredComponent), 2 => ::std::option::Option::Some(ErrorReason::IllegalEnumOption), 3 => ::std::option::Option::Some(ErrorReason::InternalServerError), 4 => ::std::option::Option::Some(ErrorReason::DoesNotExist), _ => ::std::option::Option::None } } fn from_str(str: &str) -> ::std::option::Option { match str { "ParseFailureError" => ::std::option::Option::Some(ErrorReason::ParseFailureError), "MissingRequiredComponent" => ::std::option::Option::Some(ErrorReason::MissingRequiredComponent), "IllegalEnumOption" => ::std::option::Option::Some(ErrorReason::IllegalEnumOption), "InternalServerError" => ::std::option::Option::Some(ErrorReason::InternalServerError), "DoesNotExist" => ::std::option::Option::Some(ErrorReason::DoesNotExist), _ => ::std::option::Option::None } } const VALUES: &'static [ErrorReason] = &[ ErrorReason::ParseFailureError, ErrorReason::MissingRequiredComponent, ErrorReason::IllegalEnumOption, ErrorReason::InternalServerError, ErrorReason::DoesNotExist, ]; } impl ::protobuf::EnumFull for ErrorReason { fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().enum_by_package_relative_name("ErrorReason").unwrap()).clone() } fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { let index = *self as usize; Self::enum_descriptor().value_by_index(index) } } impl ::std::default::Default for ErrorReason { fn default() -> Self { ErrorReason::ParseFailureError } } impl ErrorReason { fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { ::protobuf::reflect::GeneratedEnumDescriptorData::new::("ErrorReason") } } static file_descriptor_proto_data: &'static [u8] = b"\ \n\nsock.proto\"\xd2\x02\n\rSocketRequest\x12'\n\x03cgs\x18\x01\x20\x01(\ \x0b2\x13.ChangeGeneralSoundH\0R\x03cgs\x12(\n\x03cpf\x18\x02\x20\x01(\ \x0b2\x14.ChangePollFrequencyH\0R\x03cpf\x12\x1c\n\x02sn\x18\x03\x20\x01\ (\x0b2\n.SetNotifyH\0R\x02sn\x12\"\n\x03can\x18\x04\x20\x01(\x0b2\x0e.Ch\ angeAppNameH\0R\x03can\x12%\n\x03fgi\x18\x05\x20\x01(\x0b2\x11.FetchGene\ ralInfoH\0R\x03fgi\x12\x1e\n\x02fa\x18\x06\x20\x01(\x0b2\x0c.FetchAlarms\ H\0R\x02fa\x12\x1b\n\x02na\x18\x07\x20\x01(\x0b2\t.NewAlarmH\0R\x02na\ \x12\x1e\n\x02ra\x18\x08\x20\x01(\x0b2\x0c.RemoveAlarmH\0R\x02ra\x12\x1d\ \n\x02ks\x18\t\x20\x01(\x0b2\x0b.KillSwitchH\0R\x02ksB\t\n\x07message\"0\ \n\x12ChangeGeneralSound\x12\x1a\n\x08newsound\x18\x01\x20\x01(\tR\x08ne\ wsound\"Q\n\x13ChangePollFrequency\x12\x12\n\x04poll\x18\x01\x20\x01(\ \x04R\x04poll\x12\x12\n\x04tpfc\x18\x02\x20\x01(\rR\x04tpfc\x12\x12\n\ \x04tsfc\x18\x03\x20\x01(\rR\x04tsfc\"\x1f\n\tSetNotify\x12\x12\n\x04not\ i\x18\x01\x20\x01(\x08R\x04noti\")\n\rChangeAppName\x12\x18\n\x07newname\ \x18\x01\x20\x01(\tR\x07newname\"6\n\x10FetchGeneralInfo\x12\"\n\x03git\ \x18\x01\x20\x01(\x0e2\x10.GeneralInfoTypeR\x03git\"\r\n\x0bFetchAlarms\ \"&\n\x08NewAlarm\x12\x1a\n\x02al\x18\x01\x20\x01(\x0b2\n.AlarmInfoR\x02\ al\")\n\x0bRemoveAlarm\x12\x1a\n\x02al\x18\x01\x20\x01(\x0b2\n.AlarmInfo\ R\x02al\"\x0c\n\nKillSwitch\"\xbf\x01\n\x0eSocketResponse\x12!\n\x03err\ \x18\x01\x20\x01(\x0b2\r.RequestErrorH\0R\x03err\x12#\n\x03suc\x18\x02\ \x20\x01(\x0b2\x0f.RequestSuccessH\0R\x03suc\x12+\n\x03swd\x18\x03\x20\ \x01(\x0b2\x17.RequestSuccessWithDataH\0R\x03swd\x12-\n\x03swa\x18\x04\ \x20\x01(\x0b2\x19.RequestSuccessWithAlarmsH\0R\x03swaB\t\n\x07message\"\ ,\n\x0cRequestError\x12\x1c\n\x02er\x18\x01\x20\x01(\x0e2\x0c.ErrorReaso\ nR\x02er\"\x10\n\x0eRequestSuccess\"m\n\x16RequestSuccessWithData\x12\ \x10\n\x02st\x18\x01\x20\x01(\tH\0R\x02st\x12\x10\n\x02ui\x18\x02\x20\ \x01(\x04H\0R\x02ui\x12\x10\n\x02bl\x18\x03\x20\x01(\x08H\0R\x02bl\x12\ \x12\n\x03sui\x18\x04\x20\x01(\rH\0R\x03suiB\t\n\x07message\"8\n\x18Requ\ estSuccessWithAlarms\x12\x1c\n\x03als\x18\x01\x20\x03(\x0b2\n.AlarmInfoR\ \x03als\"\x8b\x01\n\tAlarmInfo\x12\x14\n\x05title\x18\x01\x20\x01(\tR\ \x05title\x12\x12\n\x04desc\x18\x02\x20\x01(\tR\x04desc\x12\x12\n\x04tim\ e\x18\x03\x20\x01(\rR\x04time\x12\x16\n\x06repeat\x18\x04\x20\x03(\tR\ \x06repeat\x12\x14\n\x05sound\x18\x05\x20\x01(\tR\x05sound\x12\x12\n\x04\ icon\x18\x06\x20\x01(\tR\x04icon*_\n\x0fGeneralInfoType\x12\t\n\x05Sound\ \x10\x01\x12\x08\n\x04Poll\x10\x02\x12\n\n\x06Notify\x10\x03\x12\x0b\n\ \x07AppName\x10\x04\x12\n\n\x06Daemon\x10\x05\x12\x08\n\x04Tpfc\x10\x06\ \x12\x08\n\x04Tsfc\x10\x07*\x84\x01\n\x0bErrorReason\x12\x15\n\x11ParseF\ ailureError\x10\0\x12\x1c\n\x18MissingRequiredComponent\x10\x01\x12\x15\ \n\x11IllegalEnumOption\x10\x02\x12\x17\n\x13InternalServerError\x10\x03\ \x12\x10\n\x0cDoesNotExist\x10\x04b\x06proto2\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(0); let mut messages = ::std::vec::Vec::with_capacity(16); messages.push(SocketRequest::generated_message_descriptor_data()); messages.push(ChangeGeneralSound::generated_message_descriptor_data()); messages.push(ChangePollFrequency::generated_message_descriptor_data()); messages.push(SetNotify::generated_message_descriptor_data()); messages.push(ChangeAppName::generated_message_descriptor_data()); messages.push(FetchGeneralInfo::generated_message_descriptor_data()); messages.push(FetchAlarms::generated_message_descriptor_data()); messages.push(NewAlarm::generated_message_descriptor_data()); messages.push(RemoveAlarm::generated_message_descriptor_data()); messages.push(KillSwitch::generated_message_descriptor_data()); messages.push(SocketResponse::generated_message_descriptor_data()); messages.push(RequestError::generated_message_descriptor_data()); messages.push(RequestSuccess::generated_message_descriptor_data()); messages.push(RequestSuccessWithData::generated_message_descriptor_data()); messages.push(RequestSuccessWithAlarms::generated_message_descriptor_data()); messages.push(AlarmInfo::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(2); enums.push(GeneralInfoType::generated_enum_descriptor_data()); enums.push(ErrorReason::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) }