gz_msgs/ign_msgs8/
statistic.rs

1// This file is generated by rust-protobuf 3.7.2. Do not edit
2// .proto file is parsed by protoc 3.21.12
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21//! Generated file from `ignition/msgs/statistic.proto`
22
23/// Generated files are compatible only with the same version
24/// of protobuf runtime.
25const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::IgnMessage)]
28// @@protoc_insertion_point(message:ignition.msgs.Statistic)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct Statistic {
31    // message fields
32    // @@protoc_insertion_point(field:ignition.msgs.Statistic.header)
33    pub header: ::protobuf::MessageField<super::header::Header>,
34    // @@protoc_insertion_point(field:ignition.msgs.Statistic.type)
35    pub type_: ::protobuf::EnumOrUnknown<statistic::DataType>,
36    // @@protoc_insertion_point(field:ignition.msgs.Statistic.name)
37    pub name: ::std::string::String,
38    // @@protoc_insertion_point(field:ignition.msgs.Statistic.value)
39    pub value: f64,
40    // special fields
41    // @@protoc_insertion_point(special_field:ignition.msgs.Statistic.special_fields)
42    pub special_fields: ::protobuf::SpecialFields,
43}
44
45impl<'a> ::std::default::Default for &'a Statistic {
46    fn default() -> &'a Statistic {
47        <Statistic as ::protobuf::Message>::default_instance()
48    }
49}
50
51impl Statistic {
52    pub fn new() -> Statistic {
53        ::std::default::Default::default()
54    }
55
56    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
57        let mut fields = ::std::vec::Vec::with_capacity(4);
58        let mut oneofs = ::std::vec::Vec::with_capacity(0);
59        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
60            "header",
61            |m: &Statistic| { &m.header },
62            |m: &mut Statistic| { &mut m.header },
63        ));
64        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
65            "type",
66            |m: &Statistic| { &m.type_ },
67            |m: &mut Statistic| { &mut m.type_ },
68        ));
69        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
70            "name",
71            |m: &Statistic| { &m.name },
72            |m: &mut Statistic| { &mut m.name },
73        ));
74        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
75            "value",
76            |m: &Statistic| { &m.value },
77            |m: &mut Statistic| { &mut m.value },
78        ));
79        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Statistic>(
80            "Statistic",
81            fields,
82            oneofs,
83        )
84    }
85}
86
87impl ::protobuf::Message for Statistic {
88    const NAME: &'static str = "Statistic";
89
90    fn is_initialized(&self) -> bool {
91        true
92    }
93
94    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
95        while let Some(tag) = is.read_raw_tag_or_eof()? {
96            match tag {
97                10 => {
98                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
99                },
100                16 => {
101                    self.type_ = is.read_enum_or_unknown()?;
102                },
103                26 => {
104                    self.name = is.read_string()?;
105                },
106                33 => {
107                    self.value = is.read_double()?;
108                },
109                tag => {
110                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
111                },
112            };
113        }
114        ::std::result::Result::Ok(())
115    }
116
117    // Compute sizes of nested messages
118    #[allow(unused_variables)]
119    fn compute_size(&self) -> u64 {
120        let mut my_size = 0;
121        if let Some(v) = self.header.as_ref() {
122            let len = v.compute_size();
123            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
124        }
125        if self.type_ != ::protobuf::EnumOrUnknown::new(statistic::DataType::UNINITIALIZED) {
126            my_size += ::protobuf::rt::int32_size(2, self.type_.value());
127        }
128        if !self.name.is_empty() {
129            my_size += ::protobuf::rt::string_size(3, &self.name);
130        }
131        if self.value != 0. {
132            my_size += 1 + 8;
133        }
134        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
135        self.special_fields.cached_size().set(my_size as u32);
136        my_size
137    }
138
139    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
140        if let Some(v) = self.header.as_ref() {
141            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
142        }
143        if self.type_ != ::protobuf::EnumOrUnknown::new(statistic::DataType::UNINITIALIZED) {
144            os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.type_))?;
145        }
146        if !self.name.is_empty() {
147            os.write_string(3, &self.name)?;
148        }
149        if self.value != 0. {
150            os.write_double(4, self.value)?;
151        }
152        os.write_unknown_fields(self.special_fields.unknown_fields())?;
153        ::std::result::Result::Ok(())
154    }
155
156    fn special_fields(&self) -> &::protobuf::SpecialFields {
157        &self.special_fields
158    }
159
160    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
161        &mut self.special_fields
162    }
163
164    fn new() -> Statistic {
165        Statistic::new()
166    }
167
168    fn clear(&mut self) {
169        self.header.clear();
170        self.type_ = ::protobuf::EnumOrUnknown::new(statistic::DataType::UNINITIALIZED);
171        self.name.clear();
172        self.value = 0.;
173        self.special_fields.clear();
174    }
175
176    fn default_instance() -> &'static Statistic {
177        static instance: Statistic = Statistic {
178            header: ::protobuf::MessageField::none(),
179            type_: ::protobuf::EnumOrUnknown::from_i32(0),
180            name: ::std::string::String::new(),
181            value: 0.,
182            special_fields: ::protobuf::SpecialFields::new(),
183        };
184        &instance
185    }
186}
187
188impl ::protobuf::MessageFull for Statistic {
189    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
190        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
191        descriptor.get(|| file_descriptor().message_by_package_relative_name("Statistic").unwrap()).clone()
192    }
193}
194
195impl ::std::fmt::Display for Statistic {
196    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
197        ::protobuf::text_format::fmt(self, f)
198    }
199}
200
201impl ::protobuf::reflect::ProtobufValue for Statistic {
202    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
203}
204
205/// Nested message and enums of message `Statistic`
206pub mod statistic {
207    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
208    // @@protoc_insertion_point(enum:ignition.msgs.Statistic.DataType)
209    pub enum DataType {
210        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.UNINITIALIZED)
211        UNINITIALIZED = 0,
212        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.AVERAGE)
213        AVERAGE = 1,
214        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.MINIMUM)
215        MINIMUM = 2,
216        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.MAXIMUM)
217        MAXIMUM = 3,
218        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.VARIANCE)
219        VARIANCE = 4,
220        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.STDDEV)
221        STDDEV = 5,
222        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.SAMPLE_COUNT)
223        SAMPLE_COUNT = 6,
224        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.ROOT_MEAN_SQUARE)
225        ROOT_MEAN_SQUARE = 7,
226        // @@protoc_insertion_point(enum_value:ignition.msgs.Statistic.DataType.MAX_ABS_VALUE)
227        MAX_ABS_VALUE = 8,
228    }
229
230    impl ::protobuf::Enum for DataType {
231        const NAME: &'static str = "DataType";
232
233        fn value(&self) -> i32 {
234            *self as i32
235        }
236
237        fn from_i32(value: i32) -> ::std::option::Option<DataType> {
238            match value {
239                0 => ::std::option::Option::Some(DataType::UNINITIALIZED),
240                1 => ::std::option::Option::Some(DataType::AVERAGE),
241                2 => ::std::option::Option::Some(DataType::MINIMUM),
242                3 => ::std::option::Option::Some(DataType::MAXIMUM),
243                4 => ::std::option::Option::Some(DataType::VARIANCE),
244                5 => ::std::option::Option::Some(DataType::STDDEV),
245                6 => ::std::option::Option::Some(DataType::SAMPLE_COUNT),
246                7 => ::std::option::Option::Some(DataType::ROOT_MEAN_SQUARE),
247                8 => ::std::option::Option::Some(DataType::MAX_ABS_VALUE),
248                _ => ::std::option::Option::None
249            }
250        }
251
252        fn from_str(str: &str) -> ::std::option::Option<DataType> {
253            match str {
254                "UNINITIALIZED" => ::std::option::Option::Some(DataType::UNINITIALIZED),
255                "AVERAGE" => ::std::option::Option::Some(DataType::AVERAGE),
256                "MINIMUM" => ::std::option::Option::Some(DataType::MINIMUM),
257                "MAXIMUM" => ::std::option::Option::Some(DataType::MAXIMUM),
258                "VARIANCE" => ::std::option::Option::Some(DataType::VARIANCE),
259                "STDDEV" => ::std::option::Option::Some(DataType::STDDEV),
260                "SAMPLE_COUNT" => ::std::option::Option::Some(DataType::SAMPLE_COUNT),
261                "ROOT_MEAN_SQUARE" => ::std::option::Option::Some(DataType::ROOT_MEAN_SQUARE),
262                "MAX_ABS_VALUE" => ::std::option::Option::Some(DataType::MAX_ABS_VALUE),
263                _ => ::std::option::Option::None
264            }
265        }
266
267        const VALUES: &'static [DataType] = &[
268            DataType::UNINITIALIZED,
269            DataType::AVERAGE,
270            DataType::MINIMUM,
271            DataType::MAXIMUM,
272            DataType::VARIANCE,
273            DataType::STDDEV,
274            DataType::SAMPLE_COUNT,
275            DataType::ROOT_MEAN_SQUARE,
276            DataType::MAX_ABS_VALUE,
277        ];
278    }
279
280    impl ::protobuf::EnumFull for DataType {
281        fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
282            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
283            descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("Statistic.DataType").unwrap()).clone()
284        }
285
286        fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
287            let index = *self as usize;
288            Self::enum_descriptor().value_by_index(index)
289        }
290    }
291
292    impl ::std::default::Default for DataType {
293        fn default() -> Self {
294            DataType::UNINITIALIZED
295        }
296    }
297
298    impl DataType {
299        pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
300            ::protobuf::reflect::GeneratedEnumDescriptorData::new::<DataType>("Statistic.DataType")
301        }
302    }
303}
304
305#[derive(::gz_msgs_common::IgnMessage)]
306// @@protoc_insertion_point(message:ignition.msgs.StatisticsGroup)
307#[derive(PartialEq,Clone,Default,Debug)]
308pub struct StatisticsGroup {
309    // message fields
310    // @@protoc_insertion_point(field:ignition.msgs.StatisticsGroup.header)
311    pub header: ::protobuf::MessageField<super::header::Header>,
312    // @@protoc_insertion_point(field:ignition.msgs.StatisticsGroup.name)
313    pub name: ::std::string::String,
314    // @@protoc_insertion_point(field:ignition.msgs.StatisticsGroup.statistics)
315    pub statistics: ::std::vec::Vec<Statistic>,
316    // special fields
317    // @@protoc_insertion_point(special_field:ignition.msgs.StatisticsGroup.special_fields)
318    pub special_fields: ::protobuf::SpecialFields,
319}
320
321impl<'a> ::std::default::Default for &'a StatisticsGroup {
322    fn default() -> &'a StatisticsGroup {
323        <StatisticsGroup as ::protobuf::Message>::default_instance()
324    }
325}
326
327impl StatisticsGroup {
328    pub fn new() -> StatisticsGroup {
329        ::std::default::Default::default()
330    }
331
332    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
333        let mut fields = ::std::vec::Vec::with_capacity(3);
334        let mut oneofs = ::std::vec::Vec::with_capacity(0);
335        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
336            "header",
337            |m: &StatisticsGroup| { &m.header },
338            |m: &mut StatisticsGroup| { &mut m.header },
339        ));
340        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
341            "name",
342            |m: &StatisticsGroup| { &m.name },
343            |m: &mut StatisticsGroup| { &mut m.name },
344        ));
345        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
346            "statistics",
347            |m: &StatisticsGroup| { &m.statistics },
348            |m: &mut StatisticsGroup| { &mut m.statistics },
349        ));
350        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<StatisticsGroup>(
351            "StatisticsGroup",
352            fields,
353            oneofs,
354        )
355    }
356}
357
358impl ::protobuf::Message for StatisticsGroup {
359    const NAME: &'static str = "StatisticsGroup";
360
361    fn is_initialized(&self) -> bool {
362        true
363    }
364
365    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
366        while let Some(tag) = is.read_raw_tag_or_eof()? {
367            match tag {
368                10 => {
369                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
370                },
371                18 => {
372                    self.name = is.read_string()?;
373                },
374                26 => {
375                    self.statistics.push(is.read_message()?);
376                },
377                tag => {
378                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
379                },
380            };
381        }
382        ::std::result::Result::Ok(())
383    }
384
385    // Compute sizes of nested messages
386    #[allow(unused_variables)]
387    fn compute_size(&self) -> u64 {
388        let mut my_size = 0;
389        if let Some(v) = self.header.as_ref() {
390            let len = v.compute_size();
391            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
392        }
393        if !self.name.is_empty() {
394            my_size += ::protobuf::rt::string_size(2, &self.name);
395        }
396        for value in &self.statistics {
397            let len = value.compute_size();
398            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
399        };
400        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
401        self.special_fields.cached_size().set(my_size as u32);
402        my_size
403    }
404
405    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
406        if let Some(v) = self.header.as_ref() {
407            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
408        }
409        if !self.name.is_empty() {
410            os.write_string(2, &self.name)?;
411        }
412        for v in &self.statistics {
413            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
414        };
415        os.write_unknown_fields(self.special_fields.unknown_fields())?;
416        ::std::result::Result::Ok(())
417    }
418
419    fn special_fields(&self) -> &::protobuf::SpecialFields {
420        &self.special_fields
421    }
422
423    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
424        &mut self.special_fields
425    }
426
427    fn new() -> StatisticsGroup {
428        StatisticsGroup::new()
429    }
430
431    fn clear(&mut self) {
432        self.header.clear();
433        self.name.clear();
434        self.statistics.clear();
435        self.special_fields.clear();
436    }
437
438    fn default_instance() -> &'static StatisticsGroup {
439        static instance: StatisticsGroup = StatisticsGroup {
440            header: ::protobuf::MessageField::none(),
441            name: ::std::string::String::new(),
442            statistics: ::std::vec::Vec::new(),
443            special_fields: ::protobuf::SpecialFields::new(),
444        };
445        &instance
446    }
447}
448
449impl ::protobuf::MessageFull for StatisticsGroup {
450    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
451        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
452        descriptor.get(|| file_descriptor().message_by_package_relative_name("StatisticsGroup").unwrap()).clone()
453    }
454}
455
456impl ::std::fmt::Display for StatisticsGroup {
457    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
458        ::protobuf::text_format::fmt(self, f)
459    }
460}
461
462impl ::protobuf::reflect::ProtobufValue for StatisticsGroup {
463    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
464}
465
466#[derive(::gz_msgs_common::IgnMessage)]
467// @@protoc_insertion_point(message:ignition.msgs.Metric)
468#[derive(PartialEq,Clone,Default,Debug)]
469pub struct Metric {
470    // message fields
471    // @@protoc_insertion_point(field:ignition.msgs.Metric.header)
472    pub header: ::protobuf::MessageField<super::header::Header>,
473    // @@protoc_insertion_point(field:ignition.msgs.Metric.unit)
474    pub unit: ::std::string::String,
475    // @@protoc_insertion_point(field:ignition.msgs.Metric.statistics_groups)
476    pub statistics_groups: ::std::vec::Vec<StatisticsGroup>,
477    // @@protoc_insertion_point(field:ignition.msgs.Metric.statistics)
478    pub statistics: ::std::vec::Vec<Statistic>,
479    // special fields
480    // @@protoc_insertion_point(special_field:ignition.msgs.Metric.special_fields)
481    pub special_fields: ::protobuf::SpecialFields,
482}
483
484impl<'a> ::std::default::Default for &'a Metric {
485    fn default() -> &'a Metric {
486        <Metric as ::protobuf::Message>::default_instance()
487    }
488}
489
490impl Metric {
491    pub fn new() -> Metric {
492        ::std::default::Default::default()
493    }
494
495    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
496        let mut fields = ::std::vec::Vec::with_capacity(4);
497        let mut oneofs = ::std::vec::Vec::with_capacity(0);
498        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
499            "header",
500            |m: &Metric| { &m.header },
501            |m: &mut Metric| { &mut m.header },
502        ));
503        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
504            "unit",
505            |m: &Metric| { &m.unit },
506            |m: &mut Metric| { &mut m.unit },
507        ));
508        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
509            "statistics_groups",
510            |m: &Metric| { &m.statistics_groups },
511            |m: &mut Metric| { &mut m.statistics_groups },
512        ));
513        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
514            "statistics",
515            |m: &Metric| { &m.statistics },
516            |m: &mut Metric| { &mut m.statistics },
517        ));
518        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Metric>(
519            "Metric",
520            fields,
521            oneofs,
522        )
523    }
524}
525
526impl ::protobuf::Message for Metric {
527    const NAME: &'static str = "Metric";
528
529    fn is_initialized(&self) -> bool {
530        true
531    }
532
533    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
534        while let Some(tag) = is.read_raw_tag_or_eof()? {
535            match tag {
536                10 => {
537                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
538                },
539                18 => {
540                    self.unit = is.read_string()?;
541                },
542                26 => {
543                    self.statistics_groups.push(is.read_message()?);
544                },
545                34 => {
546                    self.statistics.push(is.read_message()?);
547                },
548                tag => {
549                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
550                },
551            };
552        }
553        ::std::result::Result::Ok(())
554    }
555
556    // Compute sizes of nested messages
557    #[allow(unused_variables)]
558    fn compute_size(&self) -> u64 {
559        let mut my_size = 0;
560        if let Some(v) = self.header.as_ref() {
561            let len = v.compute_size();
562            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
563        }
564        if !self.unit.is_empty() {
565            my_size += ::protobuf::rt::string_size(2, &self.unit);
566        }
567        for value in &self.statistics_groups {
568            let len = value.compute_size();
569            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
570        };
571        for value in &self.statistics {
572            let len = value.compute_size();
573            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
574        };
575        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
576        self.special_fields.cached_size().set(my_size as u32);
577        my_size
578    }
579
580    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
581        if let Some(v) = self.header.as_ref() {
582            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
583        }
584        if !self.unit.is_empty() {
585            os.write_string(2, &self.unit)?;
586        }
587        for v in &self.statistics_groups {
588            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
589        };
590        for v in &self.statistics {
591            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
592        };
593        os.write_unknown_fields(self.special_fields.unknown_fields())?;
594        ::std::result::Result::Ok(())
595    }
596
597    fn special_fields(&self) -> &::protobuf::SpecialFields {
598        &self.special_fields
599    }
600
601    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
602        &mut self.special_fields
603    }
604
605    fn new() -> Metric {
606        Metric::new()
607    }
608
609    fn clear(&mut self) {
610        self.header.clear();
611        self.unit.clear();
612        self.statistics_groups.clear();
613        self.statistics.clear();
614        self.special_fields.clear();
615    }
616
617    fn default_instance() -> &'static Metric {
618        static instance: Metric = Metric {
619            header: ::protobuf::MessageField::none(),
620            unit: ::std::string::String::new(),
621            statistics_groups: ::std::vec::Vec::new(),
622            statistics: ::std::vec::Vec::new(),
623            special_fields: ::protobuf::SpecialFields::new(),
624        };
625        &instance
626    }
627}
628
629impl ::protobuf::MessageFull for Metric {
630    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
631        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
632        descriptor.get(|| file_descriptor().message_by_package_relative_name("Metric").unwrap()).clone()
633    }
634}
635
636impl ::std::fmt::Display for Metric {
637    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
638        ::protobuf::text_format::fmt(self, f)
639    }
640}
641
642impl ::protobuf::reflect::ProtobufValue for Metric {
643    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
644}
645
646static file_descriptor_proto_data: &'static [u8] = b"\
647    \n\x1dignition/msgs/statistic.proto\x12\rignition.msgs\x1a\x1aignition/m\
648    sgs/header.proto\"\xb7\x02\n\tStatistic\x12-\n\x06header\x18\x01\x20\x01\
649    (\x0b2\x15.ignition.msgs.HeaderR\x06header\x125\n\x04type\x18\x02\x20\
650    \x01(\x0e2!.ignition.msgs.Statistic.DataTypeR\x04type\x12\x12\n\x04name\
651    \x18\x03\x20\x01(\tR\x04name\x12\x14\n\x05value\x18\x04\x20\x01(\x01R\
652    \x05value\"\x99\x01\n\x08DataType\x12\x11\n\rUNINITIALIZED\x10\0\x12\x0b\
653    \n\x07AVERAGE\x10\x01\x12\x0b\n\x07MINIMUM\x10\x02\x12\x0b\n\x07MAXIMUM\
654    \x10\x03\x12\x0c\n\x08VARIANCE\x10\x04\x12\n\n\x06STDDEV\x10\x05\x12\x10\
655    \n\x0cSAMPLE_COUNT\x10\x06\x12\x14\n\x10ROOT_MEAN_SQUARE\x10\x07\x12\x11\
656    \n\rMAX_ABS_VALUE\x10\x08\"\x8e\x01\n\x0fStatisticsGroup\x12-\n\x06heade\
657    r\x18\x01\x20\x01(\x0b2\x15.ignition.msgs.HeaderR\x06header\x12\x12\n\
658    \x04name\x18\x02\x20\x01(\tR\x04name\x128\n\nstatistics\x18\x03\x20\x03(\
659    \x0b2\x18.ignition.msgs.StatisticR\nstatistics\"\xd2\x01\n\x06Metric\x12\
660    -\n\x06header\x18\x01\x20\x01(\x0b2\x15.ignition.msgs.HeaderR\x06header\
661    \x12\x12\n\x04unit\x18\x02\x20\x01(\tR\x04unit\x12K\n\x11statistics_grou\
662    ps\x18\x03\x20\x03(\x0b2\x1e.ignition.msgs.StatisticsGroupR\x10statistic\
663    sGroups\x128\n\nstatistics\x18\x04\x20\x03(\x0b2\x18.ignition.msgs.Stati\
664    sticR\nstatisticsB$\n\x11com.ignition.msgsB\x0fStatisticProtosb\x06proto\
665    3\
666";
667
668/// `FileDescriptorProto` object which was a source for this generated file
669fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
670    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
671    file_descriptor_proto_lazy.get(|| {
672        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
673    })
674}
675
676/// `FileDescriptor` object which allows dynamic access to files
677pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
678    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
679    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
680    file_descriptor.get(|| {
681        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
682            let mut deps = ::std::vec::Vec::with_capacity(1);
683            deps.push(super::header::file_descriptor().clone());
684            let mut messages = ::std::vec::Vec::with_capacity(3);
685            messages.push(Statistic::generated_message_descriptor_data());
686            messages.push(StatisticsGroup::generated_message_descriptor_data());
687            messages.push(Metric::generated_message_descriptor_data());
688            let mut enums = ::std::vec::Vec::with_capacity(1);
689            enums.push(statistic::DataType::generated_enum_descriptor_data());
690            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
691                file_descriptor_proto(),
692                deps,
693                messages,
694                enums,
695            )
696        });
697        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
698    })
699}