prometheus/proto/
proto_model.rs

1// This file is generated by rust-protobuf 2.2.5. Do not edit
2// @generated
3
4// https://github.com/Manishearth/rust-clippy/issues/702
5#![allow(unknown_lints)]
6#![allow(clippy)]
7
8#![cfg_attr(rustfmt, rustfmt_skip)]
9
10#![allow(box_pointers)]
11#![allow(dead_code)]
12#![allow(missing_docs)]
13#![allow(non_camel_case_types)]
14#![allow(non_snake_case)]
15#![allow(non_upper_case_globals)]
16#![allow(trivial_casts)]
17#![allow(unsafe_code)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20
21use protobuf::Message as Message_imported_for_functions;
22use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
23
24#[derive(PartialEq,Clone,Default)]
25pub struct LabelPair {
26    // message fields
27    name: ::protobuf::SingularField<::std::string::String>,
28    value: ::protobuf::SingularField<::std::string::String>,
29    // special fields
30    pub unknown_fields: ::protobuf::UnknownFields,
31    pub cached_size: ::protobuf::CachedSize,
32}
33
34impl LabelPair {
35    pub fn new() -> LabelPair {
36        ::std::default::Default::default()
37    }
38
39    // optional string name = 1;
40
41    pub fn clear_name(&mut self) {
42        self.name.clear();
43    }
44
45    pub fn has_name(&self) -> bool {
46        self.name.is_some()
47    }
48
49    // Param is passed by value, moved
50    pub fn set_name(&mut self, v: ::std::string::String) {
51        self.name = ::protobuf::SingularField::some(v);
52    }
53
54    // Mutable pointer to the field.
55    // If field is not initialized, it is initialized with default value first.
56    pub fn mut_name(&mut self) -> &mut ::std::string::String {
57        if self.name.is_none() {
58            self.name.set_default();
59        }
60        self.name.as_mut().unwrap()
61    }
62
63    // Take field
64    pub fn take_name(&mut self) -> ::std::string::String {
65        self.name.take().unwrap_or_else(|| ::std::string::String::new())
66    }
67
68    pub fn get_name(&self) -> &str {
69        match self.name.as_ref() {
70            Some(v) => &v,
71            None => "",
72        }
73    }
74
75    // optional string value = 2;
76
77    pub fn clear_value(&mut self) {
78        self.value.clear();
79    }
80
81    pub fn has_value(&self) -> bool {
82        self.value.is_some()
83    }
84
85    // Param is passed by value, moved
86    pub fn set_value(&mut self, v: ::std::string::String) {
87        self.value = ::protobuf::SingularField::some(v);
88    }
89
90    // Mutable pointer to the field.
91    // If field is not initialized, it is initialized with default value first.
92    pub fn mut_value(&mut self) -> &mut ::std::string::String {
93        if self.value.is_none() {
94            self.value.set_default();
95        }
96        self.value.as_mut().unwrap()
97    }
98
99    // Take field
100    pub fn take_value(&mut self) -> ::std::string::String {
101        self.value.take().unwrap_or_else(|| ::std::string::String::new())
102    }
103
104    pub fn get_value(&self) -> &str {
105        match self.value.as_ref() {
106            Some(v) => &v,
107            None => "",
108        }
109    }
110}
111
112impl ::protobuf::Message for LabelPair {
113    fn is_initialized(&self) -> bool {
114        true
115    }
116
117    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
118        while !is.eof()? {
119            let (field_number, wire_type) = is.read_tag_unpack()?;
120            match field_number {
121                1 => {
122                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
123                },
124                2 => {
125                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.value)?;
126                },
127                _ => {
128                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
129                },
130            };
131        }
132        ::std::result::Result::Ok(())
133    }
134
135    // Compute sizes of nested messages
136    #[allow(unused_variables)]
137    fn compute_size(&self) -> u32 {
138        let mut my_size = 0;
139        if let Some(ref v) = self.name.as_ref() {
140            my_size += ::protobuf::rt::string_size(1, &v);
141        }
142        if let Some(ref v) = self.value.as_ref() {
143            my_size += ::protobuf::rt::string_size(2, &v);
144        }
145        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
146        self.cached_size.set(my_size);
147        my_size
148    }
149
150    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
151        if let Some(ref v) = self.name.as_ref() {
152            os.write_string(1, &v)?;
153        }
154        if let Some(ref v) = self.value.as_ref() {
155            os.write_string(2, &v)?;
156        }
157        os.write_unknown_fields(self.get_unknown_fields())?;
158        ::std::result::Result::Ok(())
159    }
160
161    fn get_cached_size(&self) -> u32 {
162        self.cached_size.get()
163    }
164
165    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
166        &self.unknown_fields
167    }
168
169    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
170        &mut self.unknown_fields
171    }
172
173    fn as_any(&self) -> &::std::any::Any {
174        self as &::std::any::Any
175    }
176    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
177        self as &mut ::std::any::Any
178    }
179    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
180        self
181    }
182
183    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
184        Self::descriptor_static()
185    }
186
187    fn new() -> LabelPair {
188        LabelPair::new()
189    }
190
191    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
192        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
193            lock: ::protobuf::lazy::ONCE_INIT,
194            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
195        };
196        unsafe {
197            descriptor.get(|| {
198                let mut fields = ::std::vec::Vec::new();
199                fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
200                    "name",
201                    |m: &LabelPair| { &m.name },
202                    |m: &mut LabelPair| { &mut m.name },
203                ));
204                fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
205                    "value",
206                    |m: &LabelPair| { &m.value },
207                    |m: &mut LabelPair| { &mut m.value },
208                ));
209                ::protobuf::reflect::MessageDescriptor::new::<LabelPair>(
210                    "LabelPair",
211                    fields,
212                    file_descriptor_proto()
213                )
214            })
215        }
216    }
217
218    fn default_instance() -> &'static LabelPair {
219        static mut instance: ::protobuf::lazy::Lazy<LabelPair> = ::protobuf::lazy::Lazy {
220            lock: ::protobuf::lazy::ONCE_INIT,
221            ptr: 0 as *const LabelPair,
222        };
223        unsafe {
224            instance.get(LabelPair::new)
225        }
226    }
227}
228
229impl ::protobuf::Clear for LabelPair {
230    fn clear(&mut self) {
231        self.clear_name();
232        self.clear_value();
233        self.unknown_fields.clear();
234    }
235}
236
237impl ::std::fmt::Debug for LabelPair {
238    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
239        ::protobuf::text_format::fmt(self, f)
240    }
241}
242
243impl ::protobuf::reflect::ProtobufValue for LabelPair {
244    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
245        ::protobuf::reflect::ProtobufValueRef::Message(self)
246    }
247}
248
249#[derive(PartialEq,Clone,Default)]
250pub struct Gauge {
251    // message fields
252    value: ::std::option::Option<f64>,
253    // special fields
254    pub unknown_fields: ::protobuf::UnknownFields,
255    pub cached_size: ::protobuf::CachedSize,
256}
257
258impl Gauge {
259    pub fn new() -> Gauge {
260        ::std::default::Default::default()
261    }
262
263    // optional double value = 1;
264
265    pub fn clear_value(&mut self) {
266        self.value = ::std::option::Option::None;
267    }
268
269    pub fn has_value(&self) -> bool {
270        self.value.is_some()
271    }
272
273    // Param is passed by value, moved
274    pub fn set_value(&mut self, v: f64) {
275        self.value = ::std::option::Option::Some(v);
276    }
277
278    pub fn get_value(&self) -> f64 {
279        self.value.unwrap_or(0.)
280    }
281}
282
283impl ::protobuf::Message for Gauge {
284    fn is_initialized(&self) -> bool {
285        true
286    }
287
288    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
289        while !is.eof()? {
290            let (field_number, wire_type) = is.read_tag_unpack()?;
291            match field_number {
292                1 => {
293                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
294                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
295                    }
296                    let tmp = is.read_double()?;
297                    self.value = ::std::option::Option::Some(tmp);
298                },
299                _ => {
300                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
301                },
302            };
303        }
304        ::std::result::Result::Ok(())
305    }
306
307    // Compute sizes of nested messages
308    #[allow(unused_variables)]
309    fn compute_size(&self) -> u32 {
310        let mut my_size = 0;
311        if let Some(v) = self.value {
312            my_size += 9;
313        }
314        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
315        self.cached_size.set(my_size);
316        my_size
317    }
318
319    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
320        if let Some(v) = self.value {
321            os.write_double(1, v)?;
322        }
323        os.write_unknown_fields(self.get_unknown_fields())?;
324        ::std::result::Result::Ok(())
325    }
326
327    fn get_cached_size(&self) -> u32 {
328        self.cached_size.get()
329    }
330
331    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
332        &self.unknown_fields
333    }
334
335    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
336        &mut self.unknown_fields
337    }
338
339    fn as_any(&self) -> &::std::any::Any {
340        self as &::std::any::Any
341    }
342    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
343        self as &mut ::std::any::Any
344    }
345    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
346        self
347    }
348
349    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
350        Self::descriptor_static()
351    }
352
353    fn new() -> Gauge {
354        Gauge::new()
355    }
356
357    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
358        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
359            lock: ::protobuf::lazy::ONCE_INIT,
360            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
361        };
362        unsafe {
363            descriptor.get(|| {
364                let mut fields = ::std::vec::Vec::new();
365                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
366                    "value",
367                    |m: &Gauge| { &m.value },
368                    |m: &mut Gauge| { &mut m.value },
369                ));
370                ::protobuf::reflect::MessageDescriptor::new::<Gauge>(
371                    "Gauge",
372                    fields,
373                    file_descriptor_proto()
374                )
375            })
376        }
377    }
378
379    fn default_instance() -> &'static Gauge {
380        static mut instance: ::protobuf::lazy::Lazy<Gauge> = ::protobuf::lazy::Lazy {
381            lock: ::protobuf::lazy::ONCE_INIT,
382            ptr: 0 as *const Gauge,
383        };
384        unsafe {
385            instance.get(Gauge::new)
386        }
387    }
388}
389
390impl ::protobuf::Clear for Gauge {
391    fn clear(&mut self) {
392        self.clear_value();
393        self.unknown_fields.clear();
394    }
395}
396
397impl ::std::fmt::Debug for Gauge {
398    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
399        ::protobuf::text_format::fmt(self, f)
400    }
401}
402
403impl ::protobuf::reflect::ProtobufValue for Gauge {
404    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
405        ::protobuf::reflect::ProtobufValueRef::Message(self)
406    }
407}
408
409#[derive(PartialEq,Clone,Default)]
410pub struct Counter {
411    // message fields
412    value: ::std::option::Option<f64>,
413    // special fields
414    pub unknown_fields: ::protobuf::UnknownFields,
415    pub cached_size: ::protobuf::CachedSize,
416}
417
418impl Counter {
419    pub fn new() -> Counter {
420        ::std::default::Default::default()
421    }
422
423    // optional double value = 1;
424
425    pub fn clear_value(&mut self) {
426        self.value = ::std::option::Option::None;
427    }
428
429    pub fn has_value(&self) -> bool {
430        self.value.is_some()
431    }
432
433    // Param is passed by value, moved
434    pub fn set_value(&mut self, v: f64) {
435        self.value = ::std::option::Option::Some(v);
436    }
437
438    pub fn get_value(&self) -> f64 {
439        self.value.unwrap_or(0.)
440    }
441}
442
443impl ::protobuf::Message for Counter {
444    fn is_initialized(&self) -> bool {
445        true
446    }
447
448    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
449        while !is.eof()? {
450            let (field_number, wire_type) = is.read_tag_unpack()?;
451            match field_number {
452                1 => {
453                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
454                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
455                    }
456                    let tmp = is.read_double()?;
457                    self.value = ::std::option::Option::Some(tmp);
458                },
459                _ => {
460                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
461                },
462            };
463        }
464        ::std::result::Result::Ok(())
465    }
466
467    // Compute sizes of nested messages
468    #[allow(unused_variables)]
469    fn compute_size(&self) -> u32 {
470        let mut my_size = 0;
471        if let Some(v) = self.value {
472            my_size += 9;
473        }
474        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
475        self.cached_size.set(my_size);
476        my_size
477    }
478
479    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
480        if let Some(v) = self.value {
481            os.write_double(1, v)?;
482        }
483        os.write_unknown_fields(self.get_unknown_fields())?;
484        ::std::result::Result::Ok(())
485    }
486
487    fn get_cached_size(&self) -> u32 {
488        self.cached_size.get()
489    }
490
491    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
492        &self.unknown_fields
493    }
494
495    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
496        &mut self.unknown_fields
497    }
498
499    fn as_any(&self) -> &::std::any::Any {
500        self as &::std::any::Any
501    }
502    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
503        self as &mut ::std::any::Any
504    }
505    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
506        self
507    }
508
509    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
510        Self::descriptor_static()
511    }
512
513    fn new() -> Counter {
514        Counter::new()
515    }
516
517    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
518        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
519            lock: ::protobuf::lazy::ONCE_INIT,
520            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
521        };
522        unsafe {
523            descriptor.get(|| {
524                let mut fields = ::std::vec::Vec::new();
525                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
526                    "value",
527                    |m: &Counter| { &m.value },
528                    |m: &mut Counter| { &mut m.value },
529                ));
530                ::protobuf::reflect::MessageDescriptor::new::<Counter>(
531                    "Counter",
532                    fields,
533                    file_descriptor_proto()
534                )
535            })
536        }
537    }
538
539    fn default_instance() -> &'static Counter {
540        static mut instance: ::protobuf::lazy::Lazy<Counter> = ::protobuf::lazy::Lazy {
541            lock: ::protobuf::lazy::ONCE_INIT,
542            ptr: 0 as *const Counter,
543        };
544        unsafe {
545            instance.get(Counter::new)
546        }
547    }
548}
549
550impl ::protobuf::Clear for Counter {
551    fn clear(&mut self) {
552        self.clear_value();
553        self.unknown_fields.clear();
554    }
555}
556
557impl ::std::fmt::Debug for Counter {
558    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
559        ::protobuf::text_format::fmt(self, f)
560    }
561}
562
563impl ::protobuf::reflect::ProtobufValue for Counter {
564    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
565        ::protobuf::reflect::ProtobufValueRef::Message(self)
566    }
567}
568
569#[derive(PartialEq,Clone,Default)]
570pub struct Quantile {
571    // message fields
572    quantile: ::std::option::Option<f64>,
573    value: ::std::option::Option<f64>,
574    // special fields
575    pub unknown_fields: ::protobuf::UnknownFields,
576    pub cached_size: ::protobuf::CachedSize,
577}
578
579impl Quantile {
580    pub fn new() -> Quantile {
581        ::std::default::Default::default()
582    }
583
584    // optional double quantile = 1;
585
586    pub fn clear_quantile(&mut self) {
587        self.quantile = ::std::option::Option::None;
588    }
589
590    pub fn has_quantile(&self) -> bool {
591        self.quantile.is_some()
592    }
593
594    // Param is passed by value, moved
595    pub fn set_quantile(&mut self, v: f64) {
596        self.quantile = ::std::option::Option::Some(v);
597    }
598
599    pub fn get_quantile(&self) -> f64 {
600        self.quantile.unwrap_or(0.)
601    }
602
603    // optional double value = 2;
604
605    pub fn clear_value(&mut self) {
606        self.value = ::std::option::Option::None;
607    }
608
609    pub fn has_value(&self) -> bool {
610        self.value.is_some()
611    }
612
613    // Param is passed by value, moved
614    pub fn set_value(&mut self, v: f64) {
615        self.value = ::std::option::Option::Some(v);
616    }
617
618    pub fn get_value(&self) -> f64 {
619        self.value.unwrap_or(0.)
620    }
621}
622
623impl ::protobuf::Message for Quantile {
624    fn is_initialized(&self) -> bool {
625        true
626    }
627
628    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
629        while !is.eof()? {
630            let (field_number, wire_type) = is.read_tag_unpack()?;
631            match field_number {
632                1 => {
633                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
634                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
635                    }
636                    let tmp = is.read_double()?;
637                    self.quantile = ::std::option::Option::Some(tmp);
638                },
639                2 => {
640                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
641                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
642                    }
643                    let tmp = is.read_double()?;
644                    self.value = ::std::option::Option::Some(tmp);
645                },
646                _ => {
647                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
648                },
649            };
650        }
651        ::std::result::Result::Ok(())
652    }
653
654    // Compute sizes of nested messages
655    #[allow(unused_variables)]
656    fn compute_size(&self) -> u32 {
657        let mut my_size = 0;
658        if let Some(v) = self.quantile {
659            my_size += 9;
660        }
661        if let Some(v) = self.value {
662            my_size += 9;
663        }
664        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
665        self.cached_size.set(my_size);
666        my_size
667    }
668
669    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
670        if let Some(v) = self.quantile {
671            os.write_double(1, v)?;
672        }
673        if let Some(v) = self.value {
674            os.write_double(2, v)?;
675        }
676        os.write_unknown_fields(self.get_unknown_fields())?;
677        ::std::result::Result::Ok(())
678    }
679
680    fn get_cached_size(&self) -> u32 {
681        self.cached_size.get()
682    }
683
684    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
685        &self.unknown_fields
686    }
687
688    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
689        &mut self.unknown_fields
690    }
691
692    fn as_any(&self) -> &::std::any::Any {
693        self as &::std::any::Any
694    }
695    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
696        self as &mut ::std::any::Any
697    }
698    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
699        self
700    }
701
702    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
703        Self::descriptor_static()
704    }
705
706    fn new() -> Quantile {
707        Quantile::new()
708    }
709
710    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
711        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
712            lock: ::protobuf::lazy::ONCE_INIT,
713            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
714        };
715        unsafe {
716            descriptor.get(|| {
717                let mut fields = ::std::vec::Vec::new();
718                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
719                    "quantile",
720                    |m: &Quantile| { &m.quantile },
721                    |m: &mut Quantile| { &mut m.quantile },
722                ));
723                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
724                    "value",
725                    |m: &Quantile| { &m.value },
726                    |m: &mut Quantile| { &mut m.value },
727                ));
728                ::protobuf::reflect::MessageDescriptor::new::<Quantile>(
729                    "Quantile",
730                    fields,
731                    file_descriptor_proto()
732                )
733            })
734        }
735    }
736
737    fn default_instance() -> &'static Quantile {
738        static mut instance: ::protobuf::lazy::Lazy<Quantile> = ::protobuf::lazy::Lazy {
739            lock: ::protobuf::lazy::ONCE_INIT,
740            ptr: 0 as *const Quantile,
741        };
742        unsafe {
743            instance.get(Quantile::new)
744        }
745    }
746}
747
748impl ::protobuf::Clear for Quantile {
749    fn clear(&mut self) {
750        self.clear_quantile();
751        self.clear_value();
752        self.unknown_fields.clear();
753    }
754}
755
756impl ::std::fmt::Debug for Quantile {
757    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
758        ::protobuf::text_format::fmt(self, f)
759    }
760}
761
762impl ::protobuf::reflect::ProtobufValue for Quantile {
763    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
764        ::protobuf::reflect::ProtobufValueRef::Message(self)
765    }
766}
767
768#[derive(PartialEq,Clone,Default)]
769pub struct Summary {
770    // message fields
771    sample_count: ::std::option::Option<u64>,
772    sample_sum: ::std::option::Option<f64>,
773    quantile: ::protobuf::RepeatedField<Quantile>,
774    // special fields
775    pub unknown_fields: ::protobuf::UnknownFields,
776    pub cached_size: ::protobuf::CachedSize,
777}
778
779impl Summary {
780    pub fn new() -> Summary {
781        ::std::default::Default::default()
782    }
783
784    // optional uint64 sample_count = 1;
785
786    pub fn clear_sample_count(&mut self) {
787        self.sample_count = ::std::option::Option::None;
788    }
789
790    pub fn has_sample_count(&self) -> bool {
791        self.sample_count.is_some()
792    }
793
794    // Param is passed by value, moved
795    pub fn set_sample_count(&mut self, v: u64) {
796        self.sample_count = ::std::option::Option::Some(v);
797    }
798
799    pub fn get_sample_count(&self) -> u64 {
800        self.sample_count.unwrap_or(0)
801    }
802
803    // optional double sample_sum = 2;
804
805    pub fn clear_sample_sum(&mut self) {
806        self.sample_sum = ::std::option::Option::None;
807    }
808
809    pub fn has_sample_sum(&self) -> bool {
810        self.sample_sum.is_some()
811    }
812
813    // Param is passed by value, moved
814    pub fn set_sample_sum(&mut self, v: f64) {
815        self.sample_sum = ::std::option::Option::Some(v);
816    }
817
818    pub fn get_sample_sum(&self) -> f64 {
819        self.sample_sum.unwrap_or(0.)
820    }
821
822    // repeated .io.prometheus.client.Quantile quantile = 3;
823
824    pub fn clear_quantile(&mut self) {
825        self.quantile.clear();
826    }
827
828    // Param is passed by value, moved
829    pub fn set_quantile(&mut self, v: ::protobuf::RepeatedField<Quantile>) {
830        self.quantile = v;
831    }
832
833    // Mutable pointer to the field.
834    pub fn mut_quantile(&mut self) -> &mut ::protobuf::RepeatedField<Quantile> {
835        &mut self.quantile
836    }
837
838    // Take field
839    pub fn take_quantile(&mut self) -> ::protobuf::RepeatedField<Quantile> {
840        ::std::mem::replace(&mut self.quantile, ::protobuf::RepeatedField::new())
841    }
842
843    pub fn get_quantile(&self) -> &[Quantile] {
844        &self.quantile
845    }
846}
847
848impl ::protobuf::Message for Summary {
849    fn is_initialized(&self) -> bool {
850        for v in &self.quantile {
851            if !v.is_initialized() {
852                return false;
853            }
854        };
855        true
856    }
857
858    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
859        while !is.eof()? {
860            let (field_number, wire_type) = is.read_tag_unpack()?;
861            match field_number {
862                1 => {
863                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
864                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
865                    }
866                    let tmp = is.read_uint64()?;
867                    self.sample_count = ::std::option::Option::Some(tmp);
868                },
869                2 => {
870                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
871                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
872                    }
873                    let tmp = is.read_double()?;
874                    self.sample_sum = ::std::option::Option::Some(tmp);
875                },
876                3 => {
877                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.quantile)?;
878                },
879                _ => {
880                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
881                },
882            };
883        }
884        ::std::result::Result::Ok(())
885    }
886
887    // Compute sizes of nested messages
888    #[allow(unused_variables)]
889    fn compute_size(&self) -> u32 {
890        let mut my_size = 0;
891        if let Some(v) = self.sample_count {
892            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
893        }
894        if let Some(v) = self.sample_sum {
895            my_size += 9;
896        }
897        for value in &self.quantile {
898            let len = value.compute_size();
899            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
900        };
901        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
902        self.cached_size.set(my_size);
903        my_size
904    }
905
906    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
907        if let Some(v) = self.sample_count {
908            os.write_uint64(1, v)?;
909        }
910        if let Some(v) = self.sample_sum {
911            os.write_double(2, v)?;
912        }
913        for v in &self.quantile {
914            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
915            os.write_raw_varint32(v.get_cached_size())?;
916            v.write_to_with_cached_sizes(os)?;
917        };
918        os.write_unknown_fields(self.get_unknown_fields())?;
919        ::std::result::Result::Ok(())
920    }
921
922    fn get_cached_size(&self) -> u32 {
923        self.cached_size.get()
924    }
925
926    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
927        &self.unknown_fields
928    }
929
930    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
931        &mut self.unknown_fields
932    }
933
934    fn as_any(&self) -> &::std::any::Any {
935        self as &::std::any::Any
936    }
937    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
938        self as &mut ::std::any::Any
939    }
940    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
941        self
942    }
943
944    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
945        Self::descriptor_static()
946    }
947
948    fn new() -> Summary {
949        Summary::new()
950    }
951
952    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
953        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
954            lock: ::protobuf::lazy::ONCE_INIT,
955            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
956        };
957        unsafe {
958            descriptor.get(|| {
959                let mut fields = ::std::vec::Vec::new();
960                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
961                    "sample_count",
962                    |m: &Summary| { &m.sample_count },
963                    |m: &mut Summary| { &mut m.sample_count },
964                ));
965                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
966                    "sample_sum",
967                    |m: &Summary| { &m.sample_sum },
968                    |m: &mut Summary| { &mut m.sample_sum },
969                ));
970                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Quantile>>(
971                    "quantile",
972                    |m: &Summary| { &m.quantile },
973                    |m: &mut Summary| { &mut m.quantile },
974                ));
975                ::protobuf::reflect::MessageDescriptor::new::<Summary>(
976                    "Summary",
977                    fields,
978                    file_descriptor_proto()
979                )
980            })
981        }
982    }
983
984    fn default_instance() -> &'static Summary {
985        static mut instance: ::protobuf::lazy::Lazy<Summary> = ::protobuf::lazy::Lazy {
986            lock: ::protobuf::lazy::ONCE_INIT,
987            ptr: 0 as *const Summary,
988        };
989        unsafe {
990            instance.get(Summary::new)
991        }
992    }
993}
994
995impl ::protobuf::Clear for Summary {
996    fn clear(&mut self) {
997        self.clear_sample_count();
998        self.clear_sample_sum();
999        self.clear_quantile();
1000        self.unknown_fields.clear();
1001    }
1002}
1003
1004impl ::std::fmt::Debug for Summary {
1005    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1006        ::protobuf::text_format::fmt(self, f)
1007    }
1008}
1009
1010impl ::protobuf::reflect::ProtobufValue for Summary {
1011    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
1012        ::protobuf::reflect::ProtobufValueRef::Message(self)
1013    }
1014}
1015
1016#[derive(PartialEq,Clone,Default)]
1017pub struct Untyped {
1018    // message fields
1019    value: ::std::option::Option<f64>,
1020    // special fields
1021    pub unknown_fields: ::protobuf::UnknownFields,
1022    pub cached_size: ::protobuf::CachedSize,
1023}
1024
1025impl Untyped {
1026    pub fn new() -> Untyped {
1027        ::std::default::Default::default()
1028    }
1029
1030    // optional double value = 1;
1031
1032    pub fn clear_value(&mut self) {
1033        self.value = ::std::option::Option::None;
1034    }
1035
1036    pub fn has_value(&self) -> bool {
1037        self.value.is_some()
1038    }
1039
1040    // Param is passed by value, moved
1041    pub fn set_value(&mut self, v: f64) {
1042        self.value = ::std::option::Option::Some(v);
1043    }
1044
1045    pub fn get_value(&self) -> f64 {
1046        self.value.unwrap_or(0.)
1047    }
1048}
1049
1050impl ::protobuf::Message for Untyped {
1051    fn is_initialized(&self) -> bool {
1052        true
1053    }
1054
1055    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1056        while !is.eof()? {
1057            let (field_number, wire_type) = is.read_tag_unpack()?;
1058            match field_number {
1059                1 => {
1060                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
1061                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1062                    }
1063                    let tmp = is.read_double()?;
1064                    self.value = ::std::option::Option::Some(tmp);
1065                },
1066                _ => {
1067                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1068                },
1069            };
1070        }
1071        ::std::result::Result::Ok(())
1072    }
1073
1074    // Compute sizes of nested messages
1075    #[allow(unused_variables)]
1076    fn compute_size(&self) -> u32 {
1077        let mut my_size = 0;
1078        if let Some(v) = self.value {
1079            my_size += 9;
1080        }
1081        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1082        self.cached_size.set(my_size);
1083        my_size
1084    }
1085
1086    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1087        if let Some(v) = self.value {
1088            os.write_double(1, v)?;
1089        }
1090        os.write_unknown_fields(self.get_unknown_fields())?;
1091        ::std::result::Result::Ok(())
1092    }
1093
1094    fn get_cached_size(&self) -> u32 {
1095        self.cached_size.get()
1096    }
1097
1098    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1099        &self.unknown_fields
1100    }
1101
1102    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1103        &mut self.unknown_fields
1104    }
1105
1106    fn as_any(&self) -> &::std::any::Any {
1107        self as &::std::any::Any
1108    }
1109    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
1110        self as &mut ::std::any::Any
1111    }
1112    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
1113        self
1114    }
1115
1116    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1117        Self::descriptor_static()
1118    }
1119
1120    fn new() -> Untyped {
1121        Untyped::new()
1122    }
1123
1124    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1125        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1126            lock: ::protobuf::lazy::ONCE_INIT,
1127            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1128        };
1129        unsafe {
1130            descriptor.get(|| {
1131                let mut fields = ::std::vec::Vec::new();
1132                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
1133                    "value",
1134                    |m: &Untyped| { &m.value },
1135                    |m: &mut Untyped| { &mut m.value },
1136                ));
1137                ::protobuf::reflect::MessageDescriptor::new::<Untyped>(
1138                    "Untyped",
1139                    fields,
1140                    file_descriptor_proto()
1141                )
1142            })
1143        }
1144    }
1145
1146    fn default_instance() -> &'static Untyped {
1147        static mut instance: ::protobuf::lazy::Lazy<Untyped> = ::protobuf::lazy::Lazy {
1148            lock: ::protobuf::lazy::ONCE_INIT,
1149            ptr: 0 as *const Untyped,
1150        };
1151        unsafe {
1152            instance.get(Untyped::new)
1153        }
1154    }
1155}
1156
1157impl ::protobuf::Clear for Untyped {
1158    fn clear(&mut self) {
1159        self.clear_value();
1160        self.unknown_fields.clear();
1161    }
1162}
1163
1164impl ::std::fmt::Debug for Untyped {
1165    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1166        ::protobuf::text_format::fmt(self, f)
1167    }
1168}
1169
1170impl ::protobuf::reflect::ProtobufValue for Untyped {
1171    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
1172        ::protobuf::reflect::ProtobufValueRef::Message(self)
1173    }
1174}
1175
1176#[derive(PartialEq,Clone,Default)]
1177pub struct Histogram {
1178    // message fields
1179    sample_count: ::std::option::Option<u64>,
1180    sample_sum: ::std::option::Option<f64>,
1181    bucket: ::protobuf::RepeatedField<Bucket>,
1182    // special fields
1183    pub unknown_fields: ::protobuf::UnknownFields,
1184    pub cached_size: ::protobuf::CachedSize,
1185}
1186
1187impl Histogram {
1188    pub fn new() -> Histogram {
1189        ::std::default::Default::default()
1190    }
1191
1192    // optional uint64 sample_count = 1;
1193
1194    pub fn clear_sample_count(&mut self) {
1195        self.sample_count = ::std::option::Option::None;
1196    }
1197
1198    pub fn has_sample_count(&self) -> bool {
1199        self.sample_count.is_some()
1200    }
1201
1202    // Param is passed by value, moved
1203    pub fn set_sample_count(&mut self, v: u64) {
1204        self.sample_count = ::std::option::Option::Some(v);
1205    }
1206
1207    pub fn get_sample_count(&self) -> u64 {
1208        self.sample_count.unwrap_or(0)
1209    }
1210
1211    // optional double sample_sum = 2;
1212
1213    pub fn clear_sample_sum(&mut self) {
1214        self.sample_sum = ::std::option::Option::None;
1215    }
1216
1217    pub fn has_sample_sum(&self) -> bool {
1218        self.sample_sum.is_some()
1219    }
1220
1221    // Param is passed by value, moved
1222    pub fn set_sample_sum(&mut self, v: f64) {
1223        self.sample_sum = ::std::option::Option::Some(v);
1224    }
1225
1226    pub fn get_sample_sum(&self) -> f64 {
1227        self.sample_sum.unwrap_or(0.)
1228    }
1229
1230    // repeated .io.prometheus.client.Bucket bucket = 3;
1231
1232    pub fn clear_bucket(&mut self) {
1233        self.bucket.clear();
1234    }
1235
1236    // Param is passed by value, moved
1237    pub fn set_bucket(&mut self, v: ::protobuf::RepeatedField<Bucket>) {
1238        self.bucket = v;
1239    }
1240
1241    // Mutable pointer to the field.
1242    pub fn mut_bucket(&mut self) -> &mut ::protobuf::RepeatedField<Bucket> {
1243        &mut self.bucket
1244    }
1245
1246    // Take field
1247    pub fn take_bucket(&mut self) -> ::protobuf::RepeatedField<Bucket> {
1248        ::std::mem::replace(&mut self.bucket, ::protobuf::RepeatedField::new())
1249    }
1250
1251    pub fn get_bucket(&self) -> &[Bucket] {
1252        &self.bucket
1253    }
1254}
1255
1256impl ::protobuf::Message for Histogram {
1257    fn is_initialized(&self) -> bool {
1258        for v in &self.bucket {
1259            if !v.is_initialized() {
1260                return false;
1261            }
1262        };
1263        true
1264    }
1265
1266    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1267        while !is.eof()? {
1268            let (field_number, wire_type) = is.read_tag_unpack()?;
1269            match field_number {
1270                1 => {
1271                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
1272                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1273                    }
1274                    let tmp = is.read_uint64()?;
1275                    self.sample_count = ::std::option::Option::Some(tmp);
1276                },
1277                2 => {
1278                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
1279                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1280                    }
1281                    let tmp = is.read_double()?;
1282                    self.sample_sum = ::std::option::Option::Some(tmp);
1283                },
1284                3 => {
1285                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.bucket)?;
1286                },
1287                _ => {
1288                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1289                },
1290            };
1291        }
1292        ::std::result::Result::Ok(())
1293    }
1294
1295    // Compute sizes of nested messages
1296    #[allow(unused_variables)]
1297    fn compute_size(&self) -> u32 {
1298        let mut my_size = 0;
1299        if let Some(v) = self.sample_count {
1300            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1301        }
1302        if let Some(v) = self.sample_sum {
1303            my_size += 9;
1304        }
1305        for value in &self.bucket {
1306            let len = value.compute_size();
1307            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1308        };
1309        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1310        self.cached_size.set(my_size);
1311        my_size
1312    }
1313
1314    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1315        if let Some(v) = self.sample_count {
1316            os.write_uint64(1, v)?;
1317        }
1318        if let Some(v) = self.sample_sum {
1319            os.write_double(2, v)?;
1320        }
1321        for v in &self.bucket {
1322            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1323            os.write_raw_varint32(v.get_cached_size())?;
1324            v.write_to_with_cached_sizes(os)?;
1325        };
1326        os.write_unknown_fields(self.get_unknown_fields())?;
1327        ::std::result::Result::Ok(())
1328    }
1329
1330    fn get_cached_size(&self) -> u32 {
1331        self.cached_size.get()
1332    }
1333
1334    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1335        &self.unknown_fields
1336    }
1337
1338    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1339        &mut self.unknown_fields
1340    }
1341
1342    fn as_any(&self) -> &::std::any::Any {
1343        self as &::std::any::Any
1344    }
1345    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
1346        self as &mut ::std::any::Any
1347    }
1348    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
1349        self
1350    }
1351
1352    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1353        Self::descriptor_static()
1354    }
1355
1356    fn new() -> Histogram {
1357        Histogram::new()
1358    }
1359
1360    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1361        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1362            lock: ::protobuf::lazy::ONCE_INIT,
1363            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1364        };
1365        unsafe {
1366            descriptor.get(|| {
1367                let mut fields = ::std::vec::Vec::new();
1368                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1369                    "sample_count",
1370                    |m: &Histogram| { &m.sample_count },
1371                    |m: &mut Histogram| { &mut m.sample_count },
1372                ));
1373                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
1374                    "sample_sum",
1375                    |m: &Histogram| { &m.sample_sum },
1376                    |m: &mut Histogram| { &mut m.sample_sum },
1377                ));
1378                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Bucket>>(
1379                    "bucket",
1380                    |m: &Histogram| { &m.bucket },
1381                    |m: &mut Histogram| { &mut m.bucket },
1382                ));
1383                ::protobuf::reflect::MessageDescriptor::new::<Histogram>(
1384                    "Histogram",
1385                    fields,
1386                    file_descriptor_proto()
1387                )
1388            })
1389        }
1390    }
1391
1392    fn default_instance() -> &'static Histogram {
1393        static mut instance: ::protobuf::lazy::Lazy<Histogram> = ::protobuf::lazy::Lazy {
1394            lock: ::protobuf::lazy::ONCE_INIT,
1395            ptr: 0 as *const Histogram,
1396        };
1397        unsafe {
1398            instance.get(Histogram::new)
1399        }
1400    }
1401}
1402
1403impl ::protobuf::Clear for Histogram {
1404    fn clear(&mut self) {
1405        self.clear_sample_count();
1406        self.clear_sample_sum();
1407        self.clear_bucket();
1408        self.unknown_fields.clear();
1409    }
1410}
1411
1412impl ::std::fmt::Debug for Histogram {
1413    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1414        ::protobuf::text_format::fmt(self, f)
1415    }
1416}
1417
1418impl ::protobuf::reflect::ProtobufValue for Histogram {
1419    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
1420        ::protobuf::reflect::ProtobufValueRef::Message(self)
1421    }
1422}
1423
1424#[derive(PartialEq,Clone,Default)]
1425pub struct Bucket {
1426    // message fields
1427    cumulative_count: ::std::option::Option<u64>,
1428    upper_bound: ::std::option::Option<f64>,
1429    // special fields
1430    pub unknown_fields: ::protobuf::UnknownFields,
1431    pub cached_size: ::protobuf::CachedSize,
1432}
1433
1434impl Bucket {
1435    pub fn new() -> Bucket {
1436        ::std::default::Default::default()
1437    }
1438
1439    // optional uint64 cumulative_count = 1;
1440
1441    pub fn clear_cumulative_count(&mut self) {
1442        self.cumulative_count = ::std::option::Option::None;
1443    }
1444
1445    pub fn has_cumulative_count(&self) -> bool {
1446        self.cumulative_count.is_some()
1447    }
1448
1449    // Param is passed by value, moved
1450    pub fn set_cumulative_count(&mut self, v: u64) {
1451        self.cumulative_count = ::std::option::Option::Some(v);
1452    }
1453
1454    pub fn get_cumulative_count(&self) -> u64 {
1455        self.cumulative_count.unwrap_or(0)
1456    }
1457
1458    // optional double upper_bound = 2;
1459
1460    pub fn clear_upper_bound(&mut self) {
1461        self.upper_bound = ::std::option::Option::None;
1462    }
1463
1464    pub fn has_upper_bound(&self) -> bool {
1465        self.upper_bound.is_some()
1466    }
1467
1468    // Param is passed by value, moved
1469    pub fn set_upper_bound(&mut self, v: f64) {
1470        self.upper_bound = ::std::option::Option::Some(v);
1471    }
1472
1473    pub fn get_upper_bound(&self) -> f64 {
1474        self.upper_bound.unwrap_or(0.)
1475    }
1476}
1477
1478impl ::protobuf::Message for Bucket {
1479    fn is_initialized(&self) -> bool {
1480        true
1481    }
1482
1483    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1484        while !is.eof()? {
1485            let (field_number, wire_type) = is.read_tag_unpack()?;
1486            match field_number {
1487                1 => {
1488                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
1489                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1490                    }
1491                    let tmp = is.read_uint64()?;
1492                    self.cumulative_count = ::std::option::Option::Some(tmp);
1493                },
1494                2 => {
1495                    if wire_type != ::protobuf::wire_format::WireTypeFixed64 {
1496                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1497                    }
1498                    let tmp = is.read_double()?;
1499                    self.upper_bound = ::std::option::Option::Some(tmp);
1500                },
1501                _ => {
1502                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1503                },
1504            };
1505        }
1506        ::std::result::Result::Ok(())
1507    }
1508
1509    // Compute sizes of nested messages
1510    #[allow(unused_variables)]
1511    fn compute_size(&self) -> u32 {
1512        let mut my_size = 0;
1513        if let Some(v) = self.cumulative_count {
1514            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
1515        }
1516        if let Some(v) = self.upper_bound {
1517            my_size += 9;
1518        }
1519        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1520        self.cached_size.set(my_size);
1521        my_size
1522    }
1523
1524    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1525        if let Some(v) = self.cumulative_count {
1526            os.write_uint64(1, v)?;
1527        }
1528        if let Some(v) = self.upper_bound {
1529            os.write_double(2, v)?;
1530        }
1531        os.write_unknown_fields(self.get_unknown_fields())?;
1532        ::std::result::Result::Ok(())
1533    }
1534
1535    fn get_cached_size(&self) -> u32 {
1536        self.cached_size.get()
1537    }
1538
1539    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
1540        &self.unknown_fields
1541    }
1542
1543    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
1544        &mut self.unknown_fields
1545    }
1546
1547    fn as_any(&self) -> &::std::any::Any {
1548        self as &::std::any::Any
1549    }
1550    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
1551        self as &mut ::std::any::Any
1552    }
1553    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
1554        self
1555    }
1556
1557    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
1558        Self::descriptor_static()
1559    }
1560
1561    fn new() -> Bucket {
1562        Bucket::new()
1563    }
1564
1565    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
1566        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
1567            lock: ::protobuf::lazy::ONCE_INIT,
1568            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
1569        };
1570        unsafe {
1571            descriptor.get(|| {
1572                let mut fields = ::std::vec::Vec::new();
1573                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
1574                    "cumulative_count",
1575                    |m: &Bucket| { &m.cumulative_count },
1576                    |m: &mut Bucket| { &mut m.cumulative_count },
1577                ));
1578                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeDouble>(
1579                    "upper_bound",
1580                    |m: &Bucket| { &m.upper_bound },
1581                    |m: &mut Bucket| { &mut m.upper_bound },
1582                ));
1583                ::protobuf::reflect::MessageDescriptor::new::<Bucket>(
1584                    "Bucket",
1585                    fields,
1586                    file_descriptor_proto()
1587                )
1588            })
1589        }
1590    }
1591
1592    fn default_instance() -> &'static Bucket {
1593        static mut instance: ::protobuf::lazy::Lazy<Bucket> = ::protobuf::lazy::Lazy {
1594            lock: ::protobuf::lazy::ONCE_INIT,
1595            ptr: 0 as *const Bucket,
1596        };
1597        unsafe {
1598            instance.get(Bucket::new)
1599        }
1600    }
1601}
1602
1603impl ::protobuf::Clear for Bucket {
1604    fn clear(&mut self) {
1605        self.clear_cumulative_count();
1606        self.clear_upper_bound();
1607        self.unknown_fields.clear();
1608    }
1609}
1610
1611impl ::std::fmt::Debug for Bucket {
1612    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1613        ::protobuf::text_format::fmt(self, f)
1614    }
1615}
1616
1617impl ::protobuf::reflect::ProtobufValue for Bucket {
1618    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
1619        ::protobuf::reflect::ProtobufValueRef::Message(self)
1620    }
1621}
1622
1623#[derive(PartialEq,Clone,Default)]
1624pub struct Metric {
1625    // message fields
1626    label: ::protobuf::RepeatedField<LabelPair>,
1627    gauge: ::protobuf::SingularPtrField<Gauge>,
1628    counter: ::protobuf::SingularPtrField<Counter>,
1629    summary: ::protobuf::SingularPtrField<Summary>,
1630    untyped: ::protobuf::SingularPtrField<Untyped>,
1631    histogram: ::protobuf::SingularPtrField<Histogram>,
1632    timestamp_ms: ::std::option::Option<i64>,
1633    // special fields
1634    pub unknown_fields: ::protobuf::UnknownFields,
1635    pub cached_size: ::protobuf::CachedSize,
1636}
1637
1638impl Metric {
1639    pub fn new() -> Metric {
1640        ::std::default::Default::default()
1641    }
1642
1643    // repeated .io.prometheus.client.LabelPair label = 1;
1644
1645    pub fn clear_label(&mut self) {
1646        self.label.clear();
1647    }
1648
1649    // Param is passed by value, moved
1650    pub fn set_label(&mut self, v: ::protobuf::RepeatedField<LabelPair>) {
1651        self.label = v;
1652    }
1653
1654    // Mutable pointer to the field.
1655    pub fn mut_label(&mut self) -> &mut ::protobuf::RepeatedField<LabelPair> {
1656        &mut self.label
1657    }
1658
1659    // Take field
1660    pub fn take_label(&mut self) -> ::protobuf::RepeatedField<LabelPair> {
1661        ::std::mem::replace(&mut self.label, ::protobuf::RepeatedField::new())
1662    }
1663
1664    pub fn get_label(&self) -> &[LabelPair] {
1665        &self.label
1666    }
1667
1668    // optional .io.prometheus.client.Gauge gauge = 2;
1669
1670    pub fn clear_gauge(&mut self) {
1671        self.gauge.clear();
1672    }
1673
1674    pub fn has_gauge(&self) -> bool {
1675        self.gauge.is_some()
1676    }
1677
1678    // Param is passed by value, moved
1679    pub fn set_gauge(&mut self, v: Gauge) {
1680        self.gauge = ::protobuf::SingularPtrField::some(v);
1681    }
1682
1683    // Mutable pointer to the field.
1684    // If field is not initialized, it is initialized with default value first.
1685    pub fn mut_gauge(&mut self) -> &mut Gauge {
1686        if self.gauge.is_none() {
1687            self.gauge.set_default();
1688        }
1689        self.gauge.as_mut().unwrap()
1690    }
1691
1692    // Take field
1693    pub fn take_gauge(&mut self) -> Gauge {
1694        self.gauge.take().unwrap_or_else(|| Gauge::new())
1695    }
1696
1697    pub fn get_gauge(&self) -> &Gauge {
1698        self.gauge.as_ref().unwrap_or_else(|| Gauge::default_instance())
1699    }
1700
1701    // optional .io.prometheus.client.Counter counter = 3;
1702
1703    pub fn clear_counter(&mut self) {
1704        self.counter.clear();
1705    }
1706
1707    pub fn has_counter(&self) -> bool {
1708        self.counter.is_some()
1709    }
1710
1711    // Param is passed by value, moved
1712    pub fn set_counter(&mut self, v: Counter) {
1713        self.counter = ::protobuf::SingularPtrField::some(v);
1714    }
1715
1716    // Mutable pointer to the field.
1717    // If field is not initialized, it is initialized with default value first.
1718    pub fn mut_counter(&mut self) -> &mut Counter {
1719        if self.counter.is_none() {
1720            self.counter.set_default();
1721        }
1722        self.counter.as_mut().unwrap()
1723    }
1724
1725    // Take field
1726    pub fn take_counter(&mut self) -> Counter {
1727        self.counter.take().unwrap_or_else(|| Counter::new())
1728    }
1729
1730    pub fn get_counter(&self) -> &Counter {
1731        self.counter.as_ref().unwrap_or_else(|| Counter::default_instance())
1732    }
1733
1734    // optional .io.prometheus.client.Summary summary = 4;
1735
1736    pub fn clear_summary(&mut self) {
1737        self.summary.clear();
1738    }
1739
1740    pub fn has_summary(&self) -> bool {
1741        self.summary.is_some()
1742    }
1743
1744    // Param is passed by value, moved
1745    pub fn set_summary(&mut self, v: Summary) {
1746        self.summary = ::protobuf::SingularPtrField::some(v);
1747    }
1748
1749    // Mutable pointer to the field.
1750    // If field is not initialized, it is initialized with default value first.
1751    pub fn mut_summary(&mut self) -> &mut Summary {
1752        if self.summary.is_none() {
1753            self.summary.set_default();
1754        }
1755        self.summary.as_mut().unwrap()
1756    }
1757
1758    // Take field
1759    pub fn take_summary(&mut self) -> Summary {
1760        self.summary.take().unwrap_or_else(|| Summary::new())
1761    }
1762
1763    pub fn get_summary(&self) -> &Summary {
1764        self.summary.as_ref().unwrap_or_else(|| Summary::default_instance())
1765    }
1766
1767    // optional .io.prometheus.client.Untyped untyped = 5;
1768
1769    pub fn clear_untyped(&mut self) {
1770        self.untyped.clear();
1771    }
1772
1773    pub fn has_untyped(&self) -> bool {
1774        self.untyped.is_some()
1775    }
1776
1777    // Param is passed by value, moved
1778    pub fn set_untyped(&mut self, v: Untyped) {
1779        self.untyped = ::protobuf::SingularPtrField::some(v);
1780    }
1781
1782    // Mutable pointer to the field.
1783    // If field is not initialized, it is initialized with default value first.
1784    pub fn mut_untyped(&mut self) -> &mut Untyped {
1785        if self.untyped.is_none() {
1786            self.untyped.set_default();
1787        }
1788        self.untyped.as_mut().unwrap()
1789    }
1790
1791    // Take field
1792    pub fn take_untyped(&mut self) -> Untyped {
1793        self.untyped.take().unwrap_or_else(|| Untyped::new())
1794    }
1795
1796    pub fn get_untyped(&self) -> &Untyped {
1797        self.untyped.as_ref().unwrap_or_else(|| Untyped::default_instance())
1798    }
1799
1800    // optional .io.prometheus.client.Histogram histogram = 7;
1801
1802    pub fn clear_histogram(&mut self) {
1803        self.histogram.clear();
1804    }
1805
1806    pub fn has_histogram(&self) -> bool {
1807        self.histogram.is_some()
1808    }
1809
1810    // Param is passed by value, moved
1811    pub fn set_histogram(&mut self, v: Histogram) {
1812        self.histogram = ::protobuf::SingularPtrField::some(v);
1813    }
1814
1815    // Mutable pointer to the field.
1816    // If field is not initialized, it is initialized with default value first.
1817    pub fn mut_histogram(&mut self) -> &mut Histogram {
1818        if self.histogram.is_none() {
1819            self.histogram.set_default();
1820        }
1821        self.histogram.as_mut().unwrap()
1822    }
1823
1824    // Take field
1825    pub fn take_histogram(&mut self) -> Histogram {
1826        self.histogram.take().unwrap_or_else(|| Histogram::new())
1827    }
1828
1829    pub fn get_histogram(&self) -> &Histogram {
1830        self.histogram.as_ref().unwrap_or_else(|| Histogram::default_instance())
1831    }
1832
1833    // optional int64 timestamp_ms = 6;
1834
1835    pub fn clear_timestamp_ms(&mut self) {
1836        self.timestamp_ms = ::std::option::Option::None;
1837    }
1838
1839    pub fn has_timestamp_ms(&self) -> bool {
1840        self.timestamp_ms.is_some()
1841    }
1842
1843    // Param is passed by value, moved
1844    pub fn set_timestamp_ms(&mut self, v: i64) {
1845        self.timestamp_ms = ::std::option::Option::Some(v);
1846    }
1847
1848    pub fn get_timestamp_ms(&self) -> i64 {
1849        self.timestamp_ms.unwrap_or(0)
1850    }
1851}
1852
1853impl ::protobuf::Message for Metric {
1854    fn is_initialized(&self) -> bool {
1855        for v in &self.label {
1856            if !v.is_initialized() {
1857                return false;
1858            }
1859        };
1860        for v in &self.gauge {
1861            if !v.is_initialized() {
1862                return false;
1863            }
1864        };
1865        for v in &self.counter {
1866            if !v.is_initialized() {
1867                return false;
1868            }
1869        };
1870        for v in &self.summary {
1871            if !v.is_initialized() {
1872                return false;
1873            }
1874        };
1875        for v in &self.untyped {
1876            if !v.is_initialized() {
1877                return false;
1878            }
1879        };
1880        for v in &self.histogram {
1881            if !v.is_initialized() {
1882                return false;
1883            }
1884        };
1885        true
1886    }
1887
1888    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1889        while !is.eof()? {
1890            let (field_number, wire_type) = is.read_tag_unpack()?;
1891            match field_number {
1892                1 => {
1893                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.label)?;
1894                },
1895                2 => {
1896                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.gauge)?;
1897                },
1898                3 => {
1899                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.counter)?;
1900                },
1901                4 => {
1902                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.summary)?;
1903                },
1904                5 => {
1905                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.untyped)?;
1906                },
1907                7 => {
1908                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.histogram)?;
1909                },
1910                6 => {
1911                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
1912                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
1913                    }
1914                    let tmp = is.read_int64()?;
1915                    self.timestamp_ms = ::std::option::Option::Some(tmp);
1916                },
1917                _ => {
1918                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
1919                },
1920            };
1921        }
1922        ::std::result::Result::Ok(())
1923    }
1924
1925    // Compute sizes of nested messages
1926    #[allow(unused_variables)]
1927    fn compute_size(&self) -> u32 {
1928        let mut my_size = 0;
1929        for value in &self.label {
1930            let len = value.compute_size();
1931            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1932        };
1933        if let Some(ref v) = self.gauge.as_ref() {
1934            let len = v.compute_size();
1935            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1936        }
1937        if let Some(ref v) = self.counter.as_ref() {
1938            let len = v.compute_size();
1939            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1940        }
1941        if let Some(ref v) = self.summary.as_ref() {
1942            let len = v.compute_size();
1943            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1944        }
1945        if let Some(ref v) = self.untyped.as_ref() {
1946            let len = v.compute_size();
1947            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1948        }
1949        if let Some(ref v) = self.histogram.as_ref() {
1950            let len = v.compute_size();
1951            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
1952        }
1953        if let Some(v) = self.timestamp_ms {
1954            my_size += ::protobuf::rt::value_size(6, v, ::protobuf::wire_format::WireTypeVarint);
1955        }
1956        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
1957        self.cached_size.set(my_size);
1958        my_size
1959    }
1960
1961    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
1962        for v in &self.label {
1963            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1964            os.write_raw_varint32(v.get_cached_size())?;
1965            v.write_to_with_cached_sizes(os)?;
1966        };
1967        if let Some(ref v) = self.gauge.as_ref() {
1968            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1969            os.write_raw_varint32(v.get_cached_size())?;
1970            v.write_to_with_cached_sizes(os)?;
1971        }
1972        if let Some(ref v) = self.counter.as_ref() {
1973            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1974            os.write_raw_varint32(v.get_cached_size())?;
1975            v.write_to_with_cached_sizes(os)?;
1976        }
1977        if let Some(ref v) = self.summary.as_ref() {
1978            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1979            os.write_raw_varint32(v.get_cached_size())?;
1980            v.write_to_with_cached_sizes(os)?;
1981        }
1982        if let Some(ref v) = self.untyped.as_ref() {
1983            os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1984            os.write_raw_varint32(v.get_cached_size())?;
1985            v.write_to_with_cached_sizes(os)?;
1986        }
1987        if let Some(ref v) = self.histogram.as_ref() {
1988            os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?;
1989            os.write_raw_varint32(v.get_cached_size())?;
1990            v.write_to_with_cached_sizes(os)?;
1991        }
1992        if let Some(v) = self.timestamp_ms {
1993            os.write_int64(6, v)?;
1994        }
1995        os.write_unknown_fields(self.get_unknown_fields())?;
1996        ::std::result::Result::Ok(())
1997    }
1998
1999    fn get_cached_size(&self) -> u32 {
2000        self.cached_size.get()
2001    }
2002
2003    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2004        &self.unknown_fields
2005    }
2006
2007    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2008        &mut self.unknown_fields
2009    }
2010
2011    fn as_any(&self) -> &::std::any::Any {
2012        self as &::std::any::Any
2013    }
2014    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
2015        self as &mut ::std::any::Any
2016    }
2017    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
2018        self
2019    }
2020
2021    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2022        Self::descriptor_static()
2023    }
2024
2025    fn new() -> Metric {
2026        Metric::new()
2027    }
2028
2029    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2030        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
2031            lock: ::protobuf::lazy::ONCE_INIT,
2032            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
2033        };
2034        unsafe {
2035            descriptor.get(|| {
2036                let mut fields = ::std::vec::Vec::new();
2037                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<LabelPair>>(
2038                    "label",
2039                    |m: &Metric| { &m.label },
2040                    |m: &mut Metric| { &mut m.label },
2041                ));
2042                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Gauge>>(
2043                    "gauge",
2044                    |m: &Metric| { &m.gauge },
2045                    |m: &mut Metric| { &mut m.gauge },
2046                ));
2047                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Counter>>(
2048                    "counter",
2049                    |m: &Metric| { &m.counter },
2050                    |m: &mut Metric| { &mut m.counter },
2051                ));
2052                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Summary>>(
2053                    "summary",
2054                    |m: &Metric| { &m.summary },
2055                    |m: &mut Metric| { &mut m.summary },
2056                ));
2057                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Untyped>>(
2058                    "untyped",
2059                    |m: &Metric| { &m.untyped },
2060                    |m: &mut Metric| { &mut m.untyped },
2061                ));
2062                fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Histogram>>(
2063                    "histogram",
2064                    |m: &Metric| { &m.histogram },
2065                    |m: &mut Metric| { &mut m.histogram },
2066                ));
2067                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
2068                    "timestamp_ms",
2069                    |m: &Metric| { &m.timestamp_ms },
2070                    |m: &mut Metric| { &mut m.timestamp_ms },
2071                ));
2072                ::protobuf::reflect::MessageDescriptor::new::<Metric>(
2073                    "Metric",
2074                    fields,
2075                    file_descriptor_proto()
2076                )
2077            })
2078        }
2079    }
2080
2081    fn default_instance() -> &'static Metric {
2082        static mut instance: ::protobuf::lazy::Lazy<Metric> = ::protobuf::lazy::Lazy {
2083            lock: ::protobuf::lazy::ONCE_INIT,
2084            ptr: 0 as *const Metric,
2085        };
2086        unsafe {
2087            instance.get(Metric::new)
2088        }
2089    }
2090}
2091
2092impl ::protobuf::Clear for Metric {
2093    fn clear(&mut self) {
2094        self.clear_label();
2095        self.clear_gauge();
2096        self.clear_counter();
2097        self.clear_summary();
2098        self.clear_untyped();
2099        self.clear_histogram();
2100        self.clear_timestamp_ms();
2101        self.unknown_fields.clear();
2102    }
2103}
2104
2105impl ::std::fmt::Debug for Metric {
2106    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2107        ::protobuf::text_format::fmt(self, f)
2108    }
2109}
2110
2111impl ::protobuf::reflect::ProtobufValue for Metric {
2112    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
2113        ::protobuf::reflect::ProtobufValueRef::Message(self)
2114    }
2115}
2116
2117#[derive(PartialEq,Clone,Default)]
2118pub struct MetricFamily {
2119    // message fields
2120    name: ::protobuf::SingularField<::std::string::String>,
2121    help: ::protobuf::SingularField<::std::string::String>,
2122    field_type: ::std::option::Option<MetricType>,
2123    metric: ::protobuf::RepeatedField<Metric>,
2124    // special fields
2125    pub unknown_fields: ::protobuf::UnknownFields,
2126    pub cached_size: ::protobuf::CachedSize,
2127}
2128
2129impl MetricFamily {
2130    pub fn new() -> MetricFamily {
2131        ::std::default::Default::default()
2132    }
2133
2134    // optional string name = 1;
2135
2136    pub fn clear_name(&mut self) {
2137        self.name.clear();
2138    }
2139
2140    pub fn has_name(&self) -> bool {
2141        self.name.is_some()
2142    }
2143
2144    // Param is passed by value, moved
2145    pub fn set_name(&mut self, v: ::std::string::String) {
2146        self.name = ::protobuf::SingularField::some(v);
2147    }
2148
2149    // Mutable pointer to the field.
2150    // If field is not initialized, it is initialized with default value first.
2151    pub fn mut_name(&mut self) -> &mut ::std::string::String {
2152        if self.name.is_none() {
2153            self.name.set_default();
2154        }
2155        self.name.as_mut().unwrap()
2156    }
2157
2158    // Take field
2159    pub fn take_name(&mut self) -> ::std::string::String {
2160        self.name.take().unwrap_or_else(|| ::std::string::String::new())
2161    }
2162
2163    pub fn get_name(&self) -> &str {
2164        match self.name.as_ref() {
2165            Some(v) => &v,
2166            None => "",
2167        }
2168    }
2169
2170    // optional string help = 2;
2171
2172    pub fn clear_help(&mut self) {
2173        self.help.clear();
2174    }
2175
2176    pub fn has_help(&self) -> bool {
2177        self.help.is_some()
2178    }
2179
2180    // Param is passed by value, moved
2181    pub fn set_help(&mut self, v: ::std::string::String) {
2182        self.help = ::protobuf::SingularField::some(v);
2183    }
2184
2185    // Mutable pointer to the field.
2186    // If field is not initialized, it is initialized with default value first.
2187    pub fn mut_help(&mut self) -> &mut ::std::string::String {
2188        if self.help.is_none() {
2189            self.help.set_default();
2190        }
2191        self.help.as_mut().unwrap()
2192    }
2193
2194    // Take field
2195    pub fn take_help(&mut self) -> ::std::string::String {
2196        self.help.take().unwrap_or_else(|| ::std::string::String::new())
2197    }
2198
2199    pub fn get_help(&self) -> &str {
2200        match self.help.as_ref() {
2201            Some(v) => &v,
2202            None => "",
2203        }
2204    }
2205
2206    // optional .io.prometheus.client.MetricType type = 3;
2207
2208    pub fn clear_field_type(&mut self) {
2209        self.field_type = ::std::option::Option::None;
2210    }
2211
2212    pub fn has_field_type(&self) -> bool {
2213        self.field_type.is_some()
2214    }
2215
2216    // Param is passed by value, moved
2217    pub fn set_field_type(&mut self, v: MetricType) {
2218        self.field_type = ::std::option::Option::Some(v);
2219    }
2220
2221    pub fn get_field_type(&self) -> MetricType {
2222        self.field_type.unwrap_or(MetricType::COUNTER)
2223    }
2224
2225    // repeated .io.prometheus.client.Metric metric = 4;
2226
2227    pub fn clear_metric(&mut self) {
2228        self.metric.clear();
2229    }
2230
2231    // Param is passed by value, moved
2232    pub fn set_metric(&mut self, v: ::protobuf::RepeatedField<Metric>) {
2233        self.metric = v;
2234    }
2235
2236    // Mutable pointer to the field.
2237    pub fn mut_metric(&mut self) -> &mut ::protobuf::RepeatedField<Metric> {
2238        &mut self.metric
2239    }
2240
2241    // Take field
2242    pub fn take_metric(&mut self) -> ::protobuf::RepeatedField<Metric> {
2243        ::std::mem::replace(&mut self.metric, ::protobuf::RepeatedField::new())
2244    }
2245
2246    pub fn get_metric(&self) -> &[Metric] {
2247        &self.metric
2248    }
2249}
2250
2251impl ::protobuf::Message for MetricFamily {
2252    fn is_initialized(&self) -> bool {
2253        for v in &self.metric {
2254            if !v.is_initialized() {
2255                return false;
2256            }
2257        };
2258        true
2259    }
2260
2261    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2262        while !is.eof()? {
2263            let (field_number, wire_type) = is.read_tag_unpack()?;
2264            match field_number {
2265                1 => {
2266                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
2267                },
2268                2 => {
2269                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.help)?;
2270                },
2271                3 => {
2272                    ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 3, &mut self.unknown_fields)?
2273                },
2274                4 => {
2275                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.metric)?;
2276                },
2277                _ => {
2278                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
2279                },
2280            };
2281        }
2282        ::std::result::Result::Ok(())
2283    }
2284
2285    // Compute sizes of nested messages
2286    #[allow(unused_variables)]
2287    fn compute_size(&self) -> u32 {
2288        let mut my_size = 0;
2289        if let Some(ref v) = self.name.as_ref() {
2290            my_size += ::protobuf::rt::string_size(1, &v);
2291        }
2292        if let Some(ref v) = self.help.as_ref() {
2293            my_size += ::protobuf::rt::string_size(2, &v);
2294        }
2295        if let Some(v) = self.field_type {
2296            my_size += ::protobuf::rt::enum_size(3, v);
2297        }
2298        for value in &self.metric {
2299            let len = value.compute_size();
2300            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
2301        };
2302        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
2303        self.cached_size.set(my_size);
2304        my_size
2305    }
2306
2307    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
2308        if let Some(ref v) = self.name.as_ref() {
2309            os.write_string(1, &v)?;
2310        }
2311        if let Some(ref v) = self.help.as_ref() {
2312            os.write_string(2, &v)?;
2313        }
2314        if let Some(v) = self.field_type {
2315            os.write_enum(3, v.value())?;
2316        }
2317        for v in &self.metric {
2318            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
2319            os.write_raw_varint32(v.get_cached_size())?;
2320            v.write_to_with_cached_sizes(os)?;
2321        };
2322        os.write_unknown_fields(self.get_unknown_fields())?;
2323        ::std::result::Result::Ok(())
2324    }
2325
2326    fn get_cached_size(&self) -> u32 {
2327        self.cached_size.get()
2328    }
2329
2330    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
2331        &self.unknown_fields
2332    }
2333
2334    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
2335        &mut self.unknown_fields
2336    }
2337
2338    fn as_any(&self) -> &::std::any::Any {
2339        self as &::std::any::Any
2340    }
2341    fn as_any_mut(&mut self) -> &mut ::std::any::Any {
2342        self as &mut ::std::any::Any
2343    }
2344    fn into_any(self: Box<Self>) -> ::std::boxed::Box<::std::any::Any> {
2345        self
2346    }
2347
2348    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
2349        Self::descriptor_static()
2350    }
2351
2352    fn new() -> MetricFamily {
2353        MetricFamily::new()
2354    }
2355
2356    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
2357        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
2358            lock: ::protobuf::lazy::ONCE_INIT,
2359            ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
2360        };
2361        unsafe {
2362            descriptor.get(|| {
2363                let mut fields = ::std::vec::Vec::new();
2364                fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
2365                    "name",
2366                    |m: &MetricFamily| { &m.name },
2367                    |m: &mut MetricFamily| { &mut m.name },
2368                ));
2369                fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
2370                    "help",
2371                    |m: &MetricFamily| { &m.help },
2372                    |m: &mut MetricFamily| { &mut m.help },
2373                ));
2374                fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<MetricType>>(
2375                    "type",
2376                    |m: &MetricFamily| { &m.field_type },
2377                    |m: &mut MetricFamily| { &mut m.field_type },
2378                ));
2379                fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Metric>>(
2380                    "metric",
2381                    |m: &MetricFamily| { &m.metric },
2382                    |m: &mut MetricFamily| { &mut m.metric },
2383                ));
2384                ::protobuf::reflect::MessageDescriptor::new::<MetricFamily>(
2385                    "MetricFamily",
2386                    fields,
2387                    file_descriptor_proto()
2388                )
2389            })
2390        }
2391    }
2392
2393    fn default_instance() -> &'static MetricFamily {
2394        static mut instance: ::protobuf::lazy::Lazy<MetricFamily> = ::protobuf::lazy::Lazy {
2395            lock: ::protobuf::lazy::ONCE_INIT,
2396            ptr: 0 as *const MetricFamily,
2397        };
2398        unsafe {
2399            instance.get(MetricFamily::new)
2400        }
2401    }
2402}
2403
2404impl ::protobuf::Clear for MetricFamily {
2405    fn clear(&mut self) {
2406        self.clear_name();
2407        self.clear_help();
2408        self.clear_field_type();
2409        self.clear_metric();
2410        self.unknown_fields.clear();
2411    }
2412}
2413
2414impl ::std::fmt::Debug for MetricFamily {
2415    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2416        ::protobuf::text_format::fmt(self, f)
2417    }
2418}
2419
2420impl ::protobuf::reflect::ProtobufValue for MetricFamily {
2421    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
2422        ::protobuf::reflect::ProtobufValueRef::Message(self)
2423    }
2424}
2425
2426#[derive(Clone,PartialEq,Eq,Debug,Hash)]
2427pub enum MetricType {
2428    COUNTER = 0,
2429    GAUGE = 1,
2430    SUMMARY = 2,
2431    UNTYPED = 3,
2432    HISTOGRAM = 4,
2433}
2434
2435impl ::protobuf::ProtobufEnum for MetricType {
2436    fn value(&self) -> i32 {
2437        *self as i32
2438    }
2439
2440    fn from_i32(value: i32) -> ::std::option::Option<MetricType> {
2441        match value {
2442            0 => ::std::option::Option::Some(MetricType::COUNTER),
2443            1 => ::std::option::Option::Some(MetricType::GAUGE),
2444            2 => ::std::option::Option::Some(MetricType::SUMMARY),
2445            3 => ::std::option::Option::Some(MetricType::UNTYPED),
2446            4 => ::std::option::Option::Some(MetricType::HISTOGRAM),
2447            _ => ::std::option::Option::None
2448        }
2449    }
2450
2451    fn values() -> &'static [Self] {
2452        static values: &'static [MetricType] = &[
2453            MetricType::COUNTER,
2454            MetricType::GAUGE,
2455            MetricType::SUMMARY,
2456            MetricType::UNTYPED,
2457            MetricType::HISTOGRAM,
2458        ];
2459        values
2460    }
2461
2462    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
2463        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
2464            lock: ::protobuf::lazy::ONCE_INIT,
2465            ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
2466        };
2467        unsafe {
2468            descriptor.get(|| {
2469                ::protobuf::reflect::EnumDescriptor::new("MetricType", file_descriptor_proto())
2470            })
2471        }
2472    }
2473}
2474
2475impl ::std::marker::Copy for MetricType {
2476}
2477
2478impl ::protobuf::reflect::ProtobufValue for MetricType {
2479    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef<'_> {
2480        ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
2481    }
2482}
2483
2484static file_descriptor_proto_data: &'static [u8] = b"\
2485    \n\x11proto_model.proto\x12\x14io.prometheus.client\"0\n\tLabelPair\x12\
2486    \x10\n\x04name\x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\
2487    \x20\x01(\tB\x02\x18\0\"\x1a\n\x05Gauge\x12\x11\n\x05value\x18\x01\x20\
2488    \x01(\x01B\x02\x18\0\"\x1c\n\x07Counter\x12\x11\n\x05value\x18\x01\x20\
2489    \x01(\x01B\x02\x18\0\"3\n\x08Quantile\x12\x14\n\x08quantile\x18\x01\x20\
2490    \x01(\x01B\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\x01B\x02\x18\0\
2491    \"q\n\x07Summary\x12\x18\n\x0csample_count\x18\x01\x20\x01(\x04B\x02\x18\
2492    \0\x12\x16\n\nsample_sum\x18\x02\x20\x01(\x01B\x02\x18\0\x124\n\x08quant\
2493    ile\x18\x03\x20\x03(\x0b2\x1e.io.prometheus.client.QuantileB\x02\x18\0\"\
2494    \x1c\n\x07Untyped\x12\x11\n\x05value\x18\x01\x20\x01(\x01B\x02\x18\0\"o\
2495    \n\tHistogram\x12\x18\n\x0csample_count\x18\x01\x20\x01(\x04B\x02\x18\0\
2496    \x12\x16\n\nsample_sum\x18\x02\x20\x01(\x01B\x02\x18\0\x120\n\x06bucket\
2497    \x18\x03\x20\x03(\x0b2\x1c.io.prometheus.client.BucketB\x02\x18\0\"?\n\
2498    \x06Bucket\x12\x1c\n\x10cumulative_count\x18\x01\x20\x01(\x04B\x02\x18\0\
2499    \x12\x17\n\x0bupper_bound\x18\x02\x20\x01(\x01B\x02\x18\0\"\xda\x02\n\
2500    \x06Metric\x122\n\x05label\x18\x01\x20\x03(\x0b2\x1f.io.prometheus.clien\
2501    t.LabelPairB\x02\x18\0\x12.\n\x05gauge\x18\x02\x20\x01(\x0b2\x1b.io.prom\
2502    etheus.client.GaugeB\x02\x18\0\x122\n\x07counter\x18\x03\x20\x01(\x0b2\
2503    \x1d.io.prometheus.client.CounterB\x02\x18\0\x122\n\x07summary\x18\x04\
2504    \x20\x01(\x0b2\x1d.io.prometheus.client.SummaryB\x02\x18\0\x122\n\x07unt\
2505    yped\x18\x05\x20\x01(\x0b2\x1d.io.prometheus.client.UntypedB\x02\x18\0\
2506    \x126\n\thistogram\x18\x07\x20\x01(\x0b2\x1f.io.prometheus.client.Histog\
2507    ramB\x02\x18\0\x12\x18\n\x0ctimestamp_ms\x18\x06\x20\x01(\x03B\x02\x18\0\
2508    \"\x98\x01\n\x0cMetricFamily\x12\x10\n\x04name\x18\x01\x20\x01(\tB\x02\
2509    \x18\0\x12\x10\n\x04help\x18\x02\x20\x01(\tB\x02\x18\0\x122\n\x04type\
2510    \x18\x03\x20\x01(\x0e2\x20.io.prometheus.client.MetricTypeB\x02\x18\0\
2511    \x120\n\x06metric\x18\x04\x20\x03(\x0b2\x1c.io.prometheus.client.MetricB\
2512    \x02\x18\0*Q\n\nMetricType\x12\x0b\n\x07COUNTER\x10\0\x12\t\n\x05GAUGE\
2513    \x10\x01\x12\x0b\n\x07SUMMARY\x10\x02\x12\x0b\n\x07UNTYPED\x10\x03\x12\r\
2514    \n\tHISTOGRAM\x10\x04\x1a\x02\x10\0B\0b\x06proto2\
2515";
2516
2517static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
2518    lock: ::protobuf::lazy::ONCE_INIT,
2519    ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
2520};
2521
2522fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
2523    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
2524}
2525
2526pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
2527    unsafe {
2528        file_descriptor_proto_lazy.get(|| {
2529            parse_descriptor_proto()
2530        })
2531    }
2532}