#![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)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
#[derive(PartialEq,Clone,Default,Debug)]
#[derive(::gz_msgs_common::GzMessage)]
pub struct Statistic {
pub header: ::protobuf::MessageField<super::header::Header>,
pub type_: ::protobuf::EnumOrUnknown<statistic::DataType>,
pub name: ::std::string::String,
pub value: f64,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Statistic {
fn default() -> &'a Statistic {
<Statistic as ::protobuf::Message>::default_instance()
}
}
impl Statistic {
pub fn new() -> Statistic {
::std::default::Default::default()
}
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(0);
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
"header",
|m: &Statistic| { &m.header },
|m: &mut Statistic| { &mut m.header },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"type",
|m: &Statistic| { &m.type_ },
|m: &mut Statistic| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"name",
|m: &Statistic| { &m.name },
|m: &mut Statistic| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"value",
|m: &Statistic| { &m.value },
|m: &mut Statistic| { &mut m.value },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Statistic>(
"Statistic",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Statistic {
const NAME: &'static str = "Statistic";
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.header)?;
},
16 => {
self.type_ = is.read_enum_or_unknown()?;
},
26 => {
self.name = is.read_string()?;
},
33 => {
self.value = is.read_double()?;
},
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.header.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if self.type_ != ::protobuf::EnumOrUnknown::new(statistic::DataType::UNINITIALIZED) {
my_size += ::protobuf::rt::int32_size(2, self.type_.value());
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.name);
}
if self.value != 0. {
my_size += 1 + 8;
}
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.header.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if self.type_ != ::protobuf::EnumOrUnknown::new(statistic::DataType::UNINITIALIZED) {
os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.type_))?;
}
if !self.name.is_empty() {
os.write_string(3, &self.name)?;
}
if self.value != 0. {
os.write_double(4, self.value)?;
}
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() -> Statistic {
Statistic::new()
}
fn clear(&mut self) {
self.header.clear();
self.type_ = ::protobuf::EnumOrUnknown::new(statistic::DataType::UNINITIALIZED);
self.name.clear();
self.value = 0.;
self.special_fields.clear();
}
fn default_instance() -> &'static Statistic {
static instance: Statistic = Statistic {
header: ::protobuf::MessageField::none(),
type_: ::protobuf::EnumOrUnknown::from_i32(0),
name: ::std::string::String::new(),
value: 0.,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Statistic {
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("Statistic").unwrap()).clone()
}
}
impl ::std::fmt::Display for Statistic {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Statistic {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod statistic {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum DataType {
UNINITIALIZED = 0,
AVERAGE = 1,
MINIMUM = 2,
MAXIMUM = 3,
VARIANCE = 4,
STDDEV = 5,
SAMPLE_COUNT = 6,
ROOT_MEAN_SQUARE = 7,
MAX_ABS_VALUE = 8,
}
impl ::protobuf::Enum for DataType {
const NAME: &'static str = "DataType";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<DataType> {
match value {
0 => ::std::option::Option::Some(DataType::UNINITIALIZED),
1 => ::std::option::Option::Some(DataType::AVERAGE),
2 => ::std::option::Option::Some(DataType::MINIMUM),
3 => ::std::option::Option::Some(DataType::MAXIMUM),
4 => ::std::option::Option::Some(DataType::VARIANCE),
5 => ::std::option::Option::Some(DataType::STDDEV),
6 => ::std::option::Option::Some(DataType::SAMPLE_COUNT),
7 => ::std::option::Option::Some(DataType::ROOT_MEAN_SQUARE),
8 => ::std::option::Option::Some(DataType::MAX_ABS_VALUE),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [DataType] = &[
DataType::UNINITIALIZED,
DataType::AVERAGE,
DataType::MINIMUM,
DataType::MAXIMUM,
DataType::VARIANCE,
DataType::STDDEV,
DataType::SAMPLE_COUNT,
DataType::ROOT_MEAN_SQUARE,
DataType::MAX_ABS_VALUE,
];
}
impl ::protobuf::EnumFull for DataType {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("Statistic.DataType").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 DataType {
fn default() -> Self {
DataType::UNINITIALIZED
}
}
impl DataType {
pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<DataType>("Statistic.DataType")
}
}
}
#[derive(PartialEq,Clone,Default,Debug)]
#[derive(::gz_msgs_common::GzMessage)]
pub struct StatisticsGroup {
pub header: ::protobuf::MessageField<super::header::Header>,
pub name: ::std::string::String,
pub statistics: ::std::vec::Vec<Statistic>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a StatisticsGroup {
fn default() -> &'a StatisticsGroup {
<StatisticsGroup as ::protobuf::Message>::default_instance()
}
}
impl StatisticsGroup {
pub fn new() -> StatisticsGroup {
::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_message_field_accessor::<_, super::header::Header>(
"header",
|m: &StatisticsGroup| { &m.header },
|m: &mut StatisticsGroup| { &mut m.header },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"name",
|m: &StatisticsGroup| { &m.name },
|m: &mut StatisticsGroup| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"statistics",
|m: &StatisticsGroup| { &m.statistics },
|m: &mut StatisticsGroup| { &mut m.statistics },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<StatisticsGroup>(
"StatisticsGroup",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for StatisticsGroup {
const NAME: &'static str = "StatisticsGroup";
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.header)?;
},
18 => {
self.name = is.read_string()?;
},
26 => {
self.statistics.push(is.read_message()?);
},
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.header.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.name);
}
for value in &self.statistics {
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<()> {
if let Some(v) = self.header.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if !self.name.is_empty() {
os.write_string(2, &self.name)?;
}
for v in &self.statistics {
::protobuf::rt::write_message_field_with_cached_size(3, 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() -> StatisticsGroup {
StatisticsGroup::new()
}
fn clear(&mut self) {
self.header.clear();
self.name.clear();
self.statistics.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static StatisticsGroup {
static instance: StatisticsGroup = StatisticsGroup {
header: ::protobuf::MessageField::none(),
name: ::std::string::String::new(),
statistics: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for StatisticsGroup {
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("StatisticsGroup").unwrap()).clone()
}
}
impl ::std::fmt::Display for StatisticsGroup {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for StatisticsGroup {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
#[derive(::gz_msgs_common::GzMessage)]
pub struct Metric {
pub header: ::protobuf::MessageField<super::header::Header>,
pub unit: ::std::string::String,
pub statistics_groups: ::std::vec::Vec<StatisticsGroup>,
pub statistics: ::std::vec::Vec<Statistic>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Metric {
fn default() -> &'a Metric {
<Metric as ::protobuf::Message>::default_instance()
}
}
impl Metric {
pub fn new() -> Metric {
::std::default::Default::default()
}
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(0);
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
"header",
|m: &Metric| { &m.header },
|m: &mut Metric| { &mut m.header },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"unit",
|m: &Metric| { &m.unit },
|m: &mut Metric| { &mut m.unit },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"statistics_groups",
|m: &Metric| { &m.statistics_groups },
|m: &mut Metric| { &mut m.statistics_groups },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"statistics",
|m: &Metric| { &m.statistics },
|m: &mut Metric| { &mut m.statistics },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Metric>(
"Metric",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Metric {
const NAME: &'static str = "Metric";
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.header)?;
},
18 => {
self.unit = is.read_string()?;
},
26 => {
self.statistics_groups.push(is.read_message()?);
},
34 => {
self.statistics.push(is.read_message()?);
},
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.header.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if !self.unit.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.unit);
}
for value in &self.statistics_groups {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
for value in &self.statistics {
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<()> {
if let Some(v) = self.header.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if !self.unit.is_empty() {
os.write_string(2, &self.unit)?;
}
for v in &self.statistics_groups {
::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
};
for v in &self.statistics {
::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() -> Metric {
Metric::new()
}
fn clear(&mut self) {
self.header.clear();
self.unit.clear();
self.statistics_groups.clear();
self.statistics.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static Metric {
static instance: Metric = Metric {
header: ::protobuf::MessageField::none(),
unit: ::std::string::String::new(),
statistics_groups: ::std::vec::Vec::new(),
statistics: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Metric {
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("Metric").unwrap()).clone()
}
}
impl ::std::fmt::Display for Metric {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Metric {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x17gz/msgs/statistic.proto\x12\x07gz.msgs\x1a\x14gz/msgs/header.proto\
\"\xab\x02\n\tStatistic\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz.ms\
gs.HeaderR\x06header\x12/\n\x04type\x18\x02\x20\x01(\x0e2\x1b.gz.msgs.St\
atistic.DataTypeR\x04type\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\
\x12\x14\n\x05value\x18\x04\x20\x01(\x01R\x05value\"\x99\x01\n\x08DataTy\
pe\x12\x11\n\rUNINITIALIZED\x10\0\x12\x0b\n\x07AVERAGE\x10\x01\x12\x0b\n\
\x07MINIMUM\x10\x02\x12\x0b\n\x07MAXIMUM\x10\x03\x12\x0c\n\x08VARIANCE\
\x10\x04\x12\n\n\x06STDDEV\x10\x05\x12\x10\n\x0cSAMPLE_COUNT\x10\x06\x12\
\x14\n\x10ROOT_MEAN_SQUARE\x10\x07\x12\x11\n\rMAX_ABS_VALUE\x10\x08\"\
\x82\x01\n\x0fStatisticsGroup\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f\
.gz.msgs.HeaderR\x06header\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\
\x122\n\nstatistics\x18\x03\x20\x03(\x0b2\x12.gz.msgs.StatisticR\nstatis\
tics\"\xc0\x01\n\x06Metric\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz\
.msgs.HeaderR\x06header\x12\x12\n\x04unit\x18\x02\x20\x01(\tR\x04unit\
\x12E\n\x11statistics_groups\x18\x03\x20\x03(\x0b2\x18.gz.msgs.Statistic\
sGroupR\x10statisticsGroups\x122\n\nstatistics\x18\x04\x20\x03(\x0b2\x12\
.gz.msgs.StatisticR\nstatisticsB\x1e\n\x0bcom.gz.msgsB\x0fStatisticProto\
sb\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(super::header::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(3);
messages.push(Statistic::generated_message_descriptor_data());
messages.push(StatisticsGroup::generated_message_descriptor_data());
messages.push(Metric::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(1);
enums.push(statistic::DataType::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}