#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![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)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_5_1;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Identity {
pub protocolVersion: ::std::option::Option<::std::string::String>,
pub agentVersion: ::std::option::Option<::std::string::String>,
pub publicKey: ::std::option::Option<::std::vec::Vec<u8>>,
pub listenAddrs: ::std::vec::Vec<::std::vec::Vec<u8>>,
pub observedAddr: ::std::option::Option<::std::vec::Vec<u8>>,
pub protocols: ::std::vec::Vec<::std::string::String>,
pub signedPeerRecord: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Identity {
fn default() -> &'a Identity {
<Identity as ::protobuf::Message>::default_instance()
}
}
impl Identity {
pub fn new() -> Identity {
::std::default::Default::default()
}
pub fn protocolVersion(&self) -> &str {
match self.protocolVersion.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_protocolVersion(&mut self) {
self.protocolVersion = ::std::option::Option::None;
}
pub fn has_protocolVersion(&self) -> bool {
self.protocolVersion.is_some()
}
pub fn set_protocolVersion(&mut self, v: ::std::string::String) {
self.protocolVersion = ::std::option::Option::Some(v);
}
pub fn mut_protocolVersion(&mut self) -> &mut ::std::string::String {
if self.protocolVersion.is_none() {
self.protocolVersion = ::std::option::Option::Some(::std::string::String::new());
}
self.protocolVersion.as_mut().unwrap()
}
pub fn take_protocolVersion(&mut self) -> ::std::string::String {
self.protocolVersion.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn agentVersion(&self) -> &str {
match self.agentVersion.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_agentVersion(&mut self) {
self.agentVersion = ::std::option::Option::None;
}
pub fn has_agentVersion(&self) -> bool {
self.agentVersion.is_some()
}
pub fn set_agentVersion(&mut self, v: ::std::string::String) {
self.agentVersion = ::std::option::Option::Some(v);
}
pub fn mut_agentVersion(&mut self) -> &mut ::std::string::String {
if self.agentVersion.is_none() {
self.agentVersion = ::std::option::Option::Some(::std::string::String::new());
}
self.agentVersion.as_mut().unwrap()
}
pub fn take_agentVersion(&mut self) -> ::std::string::String {
self.agentVersion.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn publicKey(&self) -> &[u8] {
match self.publicKey.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_publicKey(&mut self) {
self.publicKey = ::std::option::Option::None;
}
pub fn has_publicKey(&self) -> bool {
self.publicKey.is_some()
}
pub fn set_publicKey(&mut self, v: ::std::vec::Vec<u8>) {
self.publicKey = ::std::option::Option::Some(v);
}
pub fn mut_publicKey(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.publicKey.is_none() {
self.publicKey = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.publicKey.as_mut().unwrap()
}
pub fn take_publicKey(&mut self) -> ::std::vec::Vec<u8> {
self.publicKey.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn observedAddr(&self) -> &[u8] {
match self.observedAddr.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_observedAddr(&mut self) {
self.observedAddr = ::std::option::Option::None;
}
pub fn has_observedAddr(&self) -> bool {
self.observedAddr.is_some()
}
pub fn set_observedAddr(&mut self, v: ::std::vec::Vec<u8>) {
self.observedAddr = ::std::option::Option::Some(v);
}
pub fn mut_observedAddr(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.observedAddr.is_none() {
self.observedAddr = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.observedAddr.as_mut().unwrap()
}
pub fn take_observedAddr(&mut self) -> ::std::vec::Vec<u8> {
self.observedAddr.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn signedPeerRecord(&self) -> &[u8] {
match self.signedPeerRecord.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signedPeerRecord(&mut self) {
self.signedPeerRecord = ::std::option::Option::None;
}
pub fn has_signedPeerRecord(&self) -> bool {
self.signedPeerRecord.is_some()
}
pub fn set_signedPeerRecord(&mut self, v: ::std::vec::Vec<u8>) {
self.signedPeerRecord = ::std::option::Option::Some(v);
}
pub fn mut_signedPeerRecord(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signedPeerRecord.is_none() {
self.signedPeerRecord = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signedPeerRecord.as_mut().unwrap()
}
pub fn take_signedPeerRecord(&mut self) -> ::std::vec::Vec<u8> {
self.signedPeerRecord.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(7);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"protocolVersion",
|m: &Identity| { &m.protocolVersion },
|m: &mut Identity| { &mut m.protocolVersion },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"agentVersion",
|m: &Identity| { &m.agentVersion },
|m: &mut Identity| { &mut m.agentVersion },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"publicKey",
|m: &Identity| { &m.publicKey },
|m: &mut Identity| { &mut m.publicKey },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"listenAddrs",
|m: &Identity| { &m.listenAddrs },
|m: &mut Identity| { &mut m.listenAddrs },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"observedAddr",
|m: &Identity| { &m.observedAddr },
|m: &mut Identity| { &mut m.observedAddr },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"protocols",
|m: &Identity| { &m.protocols },
|m: &mut Identity| { &mut m.protocols },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signedPeerRecord",
|m: &Identity| { &m.signedPeerRecord },
|m: &mut Identity| { &mut m.signedPeerRecord },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Identity>(
"Identity",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Identity {
const NAME: &'static str = "Identity";
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 {
42 => {
self.protocolVersion = ::std::option::Option::Some(is.read_string()?);
},
50 => {
self.agentVersion = ::std::option::Option::Some(is.read_string()?);
},
10 => {
self.publicKey = ::std::option::Option::Some(is.read_bytes()?);
},
18 => {
self.listenAddrs.push(is.read_bytes()?);
},
34 => {
self.observedAddr = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.protocols.push(is.read_string()?);
},
66 => {
self.signedPeerRecord = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.protocolVersion.as_ref() {
my_size += ::protobuf::rt::string_size(5, &v);
}
if let Some(v) = self.agentVersion.as_ref() {
my_size += ::protobuf::rt::string_size(6, &v);
}
if let Some(v) = self.publicKey.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
for value in &self.listenAddrs {
my_size += ::protobuf::rt::bytes_size(2, &value);
};
if let Some(v) = self.observedAddr.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
for value in &self.protocols {
my_size += ::protobuf::rt::string_size(3, &value);
};
if let Some(v) = self.signedPeerRecord.as_ref() {
my_size += ::protobuf::rt::bytes_size(8, &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.protocolVersion.as_ref() {
os.write_string(5, v)?;
}
if let Some(v) = self.agentVersion.as_ref() {
os.write_string(6, v)?;
}
if let Some(v) = self.publicKey.as_ref() {
os.write_bytes(1, v)?;
}
for v in &self.listenAddrs {
os.write_bytes(2, &v)?;
};
if let Some(v) = self.observedAddr.as_ref() {
os.write_bytes(4, v)?;
}
for v in &self.protocols {
os.write_string(3, &v)?;
};
if let Some(v) = self.signedPeerRecord.as_ref() {
os.write_bytes(8, 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() -> Identity {
Identity::new()
}
fn clear(&mut self) {
self.protocolVersion = ::std::option::Option::None;
self.agentVersion = ::std::option::Option::None;
self.publicKey = ::std::option::Option::None;
self.listenAddrs.clear();
self.observedAddr = ::std::option::Option::None;
self.protocols.clear();
self.signedPeerRecord = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static Identity {
static instance: Identity = Identity {
protocolVersion: ::std::option::Option::None,
agentVersion: ::std::option::Option::None,
publicKey: ::std::option::Option::None,
listenAddrs: ::std::vec::Vec::new(),
observedAddr: ::std::option::Option::None,
protocols: ::std::vec::Vec::new(),
signedPeerRecord: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Identity {
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("Identity").unwrap()).clone()
}
}
impl ::std::fmt::Display for Identity {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Identity {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0eidentity.proto\"\x86\x02\n\x08Identity\x12(\n\x0fprotocolVersion\
\x18\x05\x20\x01(\tR\x0fprotocolVersion\x12\"\n\x0cagentVersion\x18\x06\
\x20\x01(\tR\x0cagentVersion\x12\x1c\n\tpublicKey\x18\x01\x20\x01(\x0cR\
\tpublicKey\x12\x20\n\x0blistenAddrs\x18\x02\x20\x03(\x0cR\x0blistenAddr\
s\x12\"\n\x0cobservedAddr\x18\x04\x20\x01(\x0cR\x0cobservedAddr\x12\x1c\
\n\tprotocols\x18\x03\x20\x03(\tR\tprotocols\x12*\n\x10signedPeerRecord\
\x18\x08\x20\x01(\x0cR\x10signedPeerRecord\
";
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()
})
}
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(1);
messages.push(Identity::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}