#![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_7_2;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Coordinate {
pub lat: f32,
pub lon: f32,
pub alt: ::std::option::Option<i32>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Coordinate {
fn default() -> &'a Coordinate {
<Coordinate as ::protobuf::Message>::default_instance()
}
}
impl Coordinate {
pub fn new() -> Coordinate {
::std::default::Default::default()
}
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_simpler_field_accessor::<_, _>(
"lat",
|m: &Coordinate| { &m.lat },
|m: &mut Coordinate| { &mut m.lat },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"lon",
|m: &Coordinate| { &m.lon },
|m: &mut Coordinate| { &mut m.lon },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"alt",
|m: &Coordinate| { &m.alt },
|m: &mut Coordinate| { &mut m.alt },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Coordinate>(
"Coordinate",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Coordinate {
const NAME: &'static str = "Coordinate";
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 {
13 => {
self.lat = is.read_float()?;
},
21 => {
self.lon = is.read_float()?;
},
24 => {
self.alt = ::std::option::Option::Some(is.read_int32()?);
},
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 self.lat != 0. {
my_size += 1 + 4;
}
if self.lon != 0. {
my_size += 1 + 4;
}
if let Some(v) = self.alt {
my_size += ::protobuf::rt::int32_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 self.lat != 0. {
os.write_float(1, self.lat)?;
}
if self.lon != 0. {
os.write_float(2, self.lon)?;
}
if let Some(v) = self.alt {
os.write_int32(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() -> Coordinate {
Coordinate::new()
}
fn clear(&mut self) {
self.lat = 0.;
self.lon = 0.;
self.alt = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static Coordinate {
static instance: Coordinate = Coordinate {
lat: 0.,
lon: 0.,
alt: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Coordinate {
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("Coordinate").unwrap()).clone()
}
}
impl ::std::fmt::Display for Coordinate {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Coordinate {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Station {
pub clu: i32,
pub id: ::std::string::String,
pub name: ::std::string::String,
pub location: ::protobuf::MessageField<Coordinate>,
pub area: ::protobuf::EnumOrUnknown<Area>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Station {
fn default() -> &'a Station {
<Station as ::protobuf::Message>::default_instance()
}
}
impl Station {
pub fn new() -> Station {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(5);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"clu",
|m: &Station| { &m.clu },
|m: &mut Station| { &mut m.clu },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"id",
|m: &Station| { &m.id },
|m: &mut Station| { &mut m.id },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"name",
|m: &Station| { &m.name },
|m: &mut Station| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Coordinate>(
"location",
|m: &Station| { &m.location },
|m: &mut Station| { &mut m.location },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"area",
|m: &Station| { &m.area },
|m: &mut Station| { &mut m.area },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Station>(
"Station",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Station {
const NAME: &'static str = "Station";
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.clu = is.read_int32()?;
},
18 => {
self.id = is.read_string()?;
},
26 => {
self.name = is.read_string()?;
},
34 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.location)?;
},
40 => {
self.area = 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(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.clu != 0 {
my_size += ::protobuf::rt::int32_size(1, self.clu);
}
if !self.id.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.id);
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.name);
}
if let Some(v) = self.location.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if self.area != ::protobuf::EnumOrUnknown::new(Area::LAND) {
my_size += ::protobuf::rt::int32_size(5, self.area.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 self.clu != 0 {
os.write_int32(1, self.clu)?;
}
if !self.id.is_empty() {
os.write_string(2, &self.id)?;
}
if !self.name.is_empty() {
os.write_string(3, &self.name)?;
}
if let Some(v) = self.location.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
}
if self.area != ::protobuf::EnumOrUnknown::new(Area::LAND) {
os.write_enum(5, ::protobuf::EnumOrUnknown::value(&self.area))?;
}
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() -> Station {
Station::new()
}
fn clear(&mut self) {
self.clu = 0;
self.id.clear();
self.name.clear();
self.location.clear();
self.area = ::protobuf::EnumOrUnknown::new(Area::LAND);
self.special_fields.clear();
}
fn default_instance() -> &'static Station {
static instance: Station = Station {
clu: 0,
id: ::std::string::String::new(),
name: ::std::string::String::new(),
location: ::protobuf::MessageField::none(),
area: ::protobuf::EnumOrUnknown::from_i32(0),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Station {
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("Station").unwrap()).clone()
}
}
impl ::std::fmt::Display for Station {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Station {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct StationRegistry {
pub stations: ::std::vec::Vec<Station>,
pub last_updated: ::protobuf::MessageField<::protobuf::well_known_types::timestamp::Timestamp>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a StationRegistry {
fn default() -> &'a StationRegistry {
<StationRegistry as ::protobuf::Message>::default_instance()
}
}
impl StationRegistry {
pub fn new() -> StationRegistry {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"stations",
|m: &StationRegistry| { &m.stations },
|m: &mut StationRegistry| { &mut m.stations },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::timestamp::Timestamp>(
"last_updated",
|m: &StationRegistry| { &m.last_updated },
|m: &mut StationRegistry| { &mut m.last_updated },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<StationRegistry>(
"StationRegistry",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for StationRegistry {
const NAME: &'static str = "StationRegistry";
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.stations.push(is.read_message()?);
},
18 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.last_updated)?;
},
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;
for value in &self.stations {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
if let Some(v) = self.last_updated.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<()> {
for v in &self.stations {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
};
if let Some(v) = self.last_updated.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(2, 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() -> StationRegistry {
StationRegistry::new()
}
fn clear(&mut self) {
self.stations.clear();
self.last_updated.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static StationRegistry {
static instance: StationRegistry = StationRegistry {
stations: ::std::vec::Vec::new(),
last_updated: ::protobuf::MessageField::none(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for StationRegistry {
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("StationRegistry").unwrap()).clone()
}
}
impl ::std::fmt::Display for StationRegistry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for StationRegistry {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum Area {
LAND = 0,
MOUNTAIN = 1,
OCEAN = 2,
COAST = 3,
UNKNOWN = 9,
}
impl ::protobuf::Enum for Area {
const NAME: &'static str = "Area";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Area> {
match value {
0 => ::std::option::Option::Some(Area::LAND),
1 => ::std::option::Option::Some(Area::MOUNTAIN),
2 => ::std::option::Option::Some(Area::OCEAN),
3 => ::std::option::Option::Some(Area::COAST),
9 => ::std::option::Option::Some(Area::UNKNOWN),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<Area> {
match str {
"LAND" => ::std::option::Option::Some(Area::LAND),
"MOUNTAIN" => ::std::option::Option::Some(Area::MOUNTAIN),
"OCEAN" => ::std::option::Option::Some(Area::OCEAN),
"COAST" => ::std::option::Option::Some(Area::COAST),
"UNKNOWN" => ::std::option::Option::Some(Area::UNKNOWN),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [Area] = &[
Area::LAND,
Area::MOUNTAIN,
Area::OCEAN,
Area::COAST,
Area::UNKNOWN,
];
}
impl ::protobuf::EnumFull for Area {
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("Area").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
Area::LAND => 0,
Area::MOUNTAIN => 1,
Area::OCEAN => 2,
Area::COAST => 3,
Area::UNKNOWN => 4,
};
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for Area {
fn default() -> Self {
Area::LAND
}
}
impl Area {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<Area>("Area")
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0estations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"O\n\nCoordi\
nate\x12\x10\n\x03lat\x18\x01\x20\x01(\x02R\x03lat\x12\x10\n\x03lon\x18\
\x02\x20\x01(\x02R\x03lon\x12\x15\n\x03alt\x18\x03\x20\x01(\x05H\0R\x03a\
lt\x88\x01\x01B\x06\n\x04_alt\"\x83\x01\n\x07Station\x12\x10\n\x03clu\
\x18\x01\x20\x01(\x05R\x03clu\x12\x0e\n\x02id\x18\x02\x20\x01(\tR\x02id\
\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12'\n\x08location\x18\
\x04\x20\x01(\x0b2\x0b.CoordinateR\x08location\x12\x19\n\x04area\x18\x05\
\x20\x01(\x0e2\x05.AreaR\x04area\"v\n\x0fStationRegistry\x12$\n\x08stati\
ons\x18\x01\x20\x03(\x0b2\x08.StationR\x08stations\x12=\n\x0clast_update\
d\x18\x02\x20\x01(\x0b2\x1a.google.protobuf.TimestampR\x0blastUpdated*A\
\n\x04Area\x12\x08\n\x04LAND\x10\0\x12\x0c\n\x08MOUNTAIN\x10\x01\x12\t\n\
\x05OCEAN\x10\x02\x12\t\n\x05COAST\x10\x03\x12\x0b\n\x07UNKNOWN\x10\tb\
\x06proto3\
";
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(1);
deps.push(::protobuf::well_known_types::timestamp::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(3);
messages.push(Coordinate::generated_message_descriptor_data());
messages.push(Station::generated_message_descriptor_data());
messages.push(StationRegistry::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(1);
enums.push(Area::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}