prometheus/proto/
proto_model.rs

1// This file is generated by rust-protobuf 3.7.2. Do not edit
2// .proto file is parsed by protoc 29.3
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 `proto_model.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// @@protoc_insertion_point(message:io.prometheus.client.LabelPair)
28#[derive(PartialEq,Clone,Default,Debug)]
29pub struct LabelPair {
30    // message fields
31    // @@protoc_insertion_point(field:io.prometheus.client.LabelPair.name)
32    pub name: ::std::option::Option<::std::string::String>,
33    // @@protoc_insertion_point(field:io.prometheus.client.LabelPair.value)
34    pub value: ::std::option::Option<::std::string::String>,
35    // special fields
36    // @@protoc_insertion_point(special_field:io.prometheus.client.LabelPair.special_fields)
37    pub special_fields: ::protobuf::SpecialFields,
38}
39
40impl<'a> ::std::default::Default for &'a LabelPair {
41    fn default() -> &'a LabelPair {
42        <LabelPair as ::protobuf::Message>::default_instance()
43    }
44}
45
46impl LabelPair {
47    pub fn new() -> LabelPair {
48        ::std::default::Default::default()
49    }
50
51    // optional string name = 1;
52
53    pub fn name(&self) -> &str {
54        match self.name.as_ref() {
55            Some(v) => v,
56            None => "",
57        }
58    }
59
60    pub fn clear_name(&mut self) {
61        self.name = ::std::option::Option::None;
62    }
63
64    pub fn has_name(&self) -> bool {
65        self.name.is_some()
66    }
67
68    // Param is passed by value, moved
69    pub fn set_name(&mut self, v: ::std::string::String) {
70        self.name = ::std::option::Option::Some(v);
71    }
72
73    // Mutable pointer to the field.
74    // If field is not initialized, it is initialized with default value first.
75    pub fn mut_name(&mut self) -> &mut ::std::string::String {
76        if self.name.is_none() {
77            self.name = ::std::option::Option::Some(::std::string::String::new());
78        }
79        self.name.as_mut().unwrap()
80    }
81
82    // Take field
83    pub fn take_name(&mut self) -> ::std::string::String {
84        self.name.take().unwrap_or_else(|| ::std::string::String::new())
85    }
86
87    // optional string value = 2;
88
89    pub fn value(&self) -> &str {
90        match self.value.as_ref() {
91            Some(v) => v,
92            None => "",
93        }
94    }
95
96    pub fn clear_value(&mut self) {
97        self.value = ::std::option::Option::None;
98    }
99
100    pub fn has_value(&self) -> bool {
101        self.value.is_some()
102    }
103
104    // Param is passed by value, moved
105    pub fn set_value(&mut self, v: ::std::string::String) {
106        self.value = ::std::option::Option::Some(v);
107    }
108
109    // Mutable pointer to the field.
110    // If field is not initialized, it is initialized with default value first.
111    pub fn mut_value(&mut self) -> &mut ::std::string::String {
112        if self.value.is_none() {
113            self.value = ::std::option::Option::Some(::std::string::String::new());
114        }
115        self.value.as_mut().unwrap()
116    }
117
118    // Take field
119    pub fn take_value(&mut self) -> ::std::string::String {
120        self.value.take().unwrap_or_else(|| ::std::string::String::new())
121    }
122
123    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
124        let mut fields = ::std::vec::Vec::with_capacity(2);
125        let mut oneofs = ::std::vec::Vec::with_capacity(0);
126        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
127            "name",
128            |m: &LabelPair| { &m.name },
129            |m: &mut LabelPair| { &mut m.name },
130        ));
131        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
132            "value",
133            |m: &LabelPair| { &m.value },
134            |m: &mut LabelPair| { &mut m.value },
135        ));
136        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<LabelPair>(
137            "LabelPair",
138            fields,
139            oneofs,
140        )
141    }
142}
143
144impl ::protobuf::Message for LabelPair {
145    const NAME: &'static str = "LabelPair";
146
147    fn is_initialized(&self) -> bool {
148        true
149    }
150
151    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
152        while let Some(tag) = is.read_raw_tag_or_eof()? {
153            match tag {
154                10 => {
155                    self.name = ::std::option::Option::Some(is.read_string()?);
156                },
157                18 => {
158                    self.value = ::std::option::Option::Some(is.read_string()?);
159                },
160                tag => {
161                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
162                },
163            };
164        }
165        ::std::result::Result::Ok(())
166    }
167
168    // Compute sizes of nested messages
169    #[allow(unused_variables)]
170    fn compute_size(&self) -> u64 {
171        let mut my_size = 0;
172        if let Some(v) = self.name.as_ref() {
173            my_size += ::protobuf::rt::string_size(1, &v);
174        }
175        if let Some(v) = self.value.as_ref() {
176            my_size += ::protobuf::rt::string_size(2, &v);
177        }
178        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
179        self.special_fields.cached_size().set(my_size as u32);
180        my_size
181    }
182
183    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
184        if let Some(v) = self.name.as_ref() {
185            os.write_string(1, v)?;
186        }
187        if let Some(v) = self.value.as_ref() {
188            os.write_string(2, v)?;
189        }
190        os.write_unknown_fields(self.special_fields.unknown_fields())?;
191        ::std::result::Result::Ok(())
192    }
193
194    fn special_fields(&self) -> &::protobuf::SpecialFields {
195        &self.special_fields
196    }
197
198    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
199        &mut self.special_fields
200    }
201
202    fn new() -> LabelPair {
203        LabelPair::new()
204    }
205
206    fn clear(&mut self) {
207        self.name = ::std::option::Option::None;
208        self.value = ::std::option::Option::None;
209        self.special_fields.clear();
210    }
211
212    fn default_instance() -> &'static LabelPair {
213        static instance: LabelPair = LabelPair {
214            name: ::std::option::Option::None,
215            value: ::std::option::Option::None,
216            special_fields: ::protobuf::SpecialFields::new(),
217        };
218        &instance
219    }
220}
221
222impl ::protobuf::MessageFull for LabelPair {
223    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
224        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
225        descriptor.get(|| file_descriptor().message_by_package_relative_name("LabelPair").unwrap()).clone()
226    }
227}
228
229impl ::std::fmt::Display for LabelPair {
230    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
231        ::protobuf::text_format::fmt(self, f)
232    }
233}
234
235impl ::protobuf::reflect::ProtobufValue for LabelPair {
236    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
237}
238
239// @@protoc_insertion_point(message:io.prometheus.client.Gauge)
240#[derive(PartialEq,Clone,Default,Debug)]
241pub struct Gauge {
242    // message fields
243    // @@protoc_insertion_point(field:io.prometheus.client.Gauge.value)
244    pub value: ::std::option::Option<f64>,
245    // special fields
246    // @@protoc_insertion_point(special_field:io.prometheus.client.Gauge.special_fields)
247    pub special_fields: ::protobuf::SpecialFields,
248}
249
250impl<'a> ::std::default::Default for &'a Gauge {
251    fn default() -> &'a Gauge {
252        <Gauge as ::protobuf::Message>::default_instance()
253    }
254}
255
256impl Gauge {
257    pub fn new() -> Gauge {
258        ::std::default::Default::default()
259    }
260
261    // optional double value = 1;
262
263    pub fn value(&self) -> f64 {
264        self.value.unwrap_or(0.)
265    }
266
267    pub fn clear_value(&mut self) {
268        self.value = ::std::option::Option::None;
269    }
270
271    pub fn has_value(&self) -> bool {
272        self.value.is_some()
273    }
274
275    // Param is passed by value, moved
276    pub fn set_value(&mut self, v: f64) {
277        self.value = ::std::option::Option::Some(v);
278    }
279
280    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
281        let mut fields = ::std::vec::Vec::with_capacity(1);
282        let mut oneofs = ::std::vec::Vec::with_capacity(0);
283        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
284            "value",
285            |m: &Gauge| { &m.value },
286            |m: &mut Gauge| { &mut m.value },
287        ));
288        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Gauge>(
289            "Gauge",
290            fields,
291            oneofs,
292        )
293    }
294}
295
296impl ::protobuf::Message for Gauge {
297    const NAME: &'static str = "Gauge";
298
299    fn is_initialized(&self) -> bool {
300        true
301    }
302
303    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
304        while let Some(tag) = is.read_raw_tag_or_eof()? {
305            match tag {
306                9 => {
307                    self.value = ::std::option::Option::Some(is.read_double()?);
308                },
309                tag => {
310                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
311                },
312            };
313        }
314        ::std::result::Result::Ok(())
315    }
316
317    // Compute sizes of nested messages
318    #[allow(unused_variables)]
319    fn compute_size(&self) -> u64 {
320        let mut my_size = 0;
321        if let Some(v) = self.value {
322            my_size += 1 + 8;
323        }
324        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
325        self.special_fields.cached_size().set(my_size as u32);
326        my_size
327    }
328
329    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
330        if let Some(v) = self.value {
331            os.write_double(1, v)?;
332        }
333        os.write_unknown_fields(self.special_fields.unknown_fields())?;
334        ::std::result::Result::Ok(())
335    }
336
337    fn special_fields(&self) -> &::protobuf::SpecialFields {
338        &self.special_fields
339    }
340
341    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
342        &mut self.special_fields
343    }
344
345    fn new() -> Gauge {
346        Gauge::new()
347    }
348
349    fn clear(&mut self) {
350        self.value = ::std::option::Option::None;
351        self.special_fields.clear();
352    }
353
354    fn default_instance() -> &'static Gauge {
355        static instance: Gauge = Gauge {
356            value: ::std::option::Option::None,
357            special_fields: ::protobuf::SpecialFields::new(),
358        };
359        &instance
360    }
361}
362
363impl ::protobuf::MessageFull for Gauge {
364    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
365        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
366        descriptor.get(|| file_descriptor().message_by_package_relative_name("Gauge").unwrap()).clone()
367    }
368}
369
370impl ::std::fmt::Display for Gauge {
371    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
372        ::protobuf::text_format::fmt(self, f)
373    }
374}
375
376impl ::protobuf::reflect::ProtobufValue for Gauge {
377    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
378}
379
380// @@protoc_insertion_point(message:io.prometheus.client.Counter)
381#[derive(PartialEq,Clone,Default,Debug)]
382pub struct Counter {
383    // message fields
384    // @@protoc_insertion_point(field:io.prometheus.client.Counter.value)
385    pub value: ::std::option::Option<f64>,
386    // special fields
387    // @@protoc_insertion_point(special_field:io.prometheus.client.Counter.special_fields)
388    pub special_fields: ::protobuf::SpecialFields,
389}
390
391impl<'a> ::std::default::Default for &'a Counter {
392    fn default() -> &'a Counter {
393        <Counter as ::protobuf::Message>::default_instance()
394    }
395}
396
397impl Counter {
398    pub fn new() -> Counter {
399        ::std::default::Default::default()
400    }
401
402    // optional double value = 1;
403
404    pub fn value(&self) -> f64 {
405        self.value.unwrap_or(0.)
406    }
407
408    pub fn clear_value(&mut self) {
409        self.value = ::std::option::Option::None;
410    }
411
412    pub fn has_value(&self) -> bool {
413        self.value.is_some()
414    }
415
416    // Param is passed by value, moved
417    pub fn set_value(&mut self, v: f64) {
418        self.value = ::std::option::Option::Some(v);
419    }
420
421    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
422        let mut fields = ::std::vec::Vec::with_capacity(1);
423        let mut oneofs = ::std::vec::Vec::with_capacity(0);
424        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
425            "value",
426            |m: &Counter| { &m.value },
427            |m: &mut Counter| { &mut m.value },
428        ));
429        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Counter>(
430            "Counter",
431            fields,
432            oneofs,
433        )
434    }
435}
436
437impl ::protobuf::Message for Counter {
438    const NAME: &'static str = "Counter";
439
440    fn is_initialized(&self) -> bool {
441        true
442    }
443
444    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
445        while let Some(tag) = is.read_raw_tag_or_eof()? {
446            match tag {
447                9 => {
448                    self.value = ::std::option::Option::Some(is.read_double()?);
449                },
450                tag => {
451                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
452                },
453            };
454        }
455        ::std::result::Result::Ok(())
456    }
457
458    // Compute sizes of nested messages
459    #[allow(unused_variables)]
460    fn compute_size(&self) -> u64 {
461        let mut my_size = 0;
462        if let Some(v) = self.value {
463            my_size += 1 + 8;
464        }
465        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
466        self.special_fields.cached_size().set(my_size as u32);
467        my_size
468    }
469
470    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
471        if let Some(v) = self.value {
472            os.write_double(1, v)?;
473        }
474        os.write_unknown_fields(self.special_fields.unknown_fields())?;
475        ::std::result::Result::Ok(())
476    }
477
478    fn special_fields(&self) -> &::protobuf::SpecialFields {
479        &self.special_fields
480    }
481
482    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
483        &mut self.special_fields
484    }
485
486    fn new() -> Counter {
487        Counter::new()
488    }
489
490    fn clear(&mut self) {
491        self.value = ::std::option::Option::None;
492        self.special_fields.clear();
493    }
494
495    fn default_instance() -> &'static Counter {
496        static instance: Counter = Counter {
497            value: ::std::option::Option::None,
498            special_fields: ::protobuf::SpecialFields::new(),
499        };
500        &instance
501    }
502}
503
504impl ::protobuf::MessageFull for Counter {
505    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
506        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
507        descriptor.get(|| file_descriptor().message_by_package_relative_name("Counter").unwrap()).clone()
508    }
509}
510
511impl ::std::fmt::Display for Counter {
512    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
513        ::protobuf::text_format::fmt(self, f)
514    }
515}
516
517impl ::protobuf::reflect::ProtobufValue for Counter {
518    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
519}
520
521// @@protoc_insertion_point(message:io.prometheus.client.Quantile)
522#[derive(PartialEq,Clone,Default,Debug)]
523pub struct Quantile {
524    // message fields
525    // @@protoc_insertion_point(field:io.prometheus.client.Quantile.quantile)
526    pub quantile: ::std::option::Option<f64>,
527    // @@protoc_insertion_point(field:io.prometheus.client.Quantile.value)
528    pub value: ::std::option::Option<f64>,
529    // special fields
530    // @@protoc_insertion_point(special_field:io.prometheus.client.Quantile.special_fields)
531    pub special_fields: ::protobuf::SpecialFields,
532}
533
534impl<'a> ::std::default::Default for &'a Quantile {
535    fn default() -> &'a Quantile {
536        <Quantile as ::protobuf::Message>::default_instance()
537    }
538}
539
540impl Quantile {
541    pub fn new() -> Quantile {
542        ::std::default::Default::default()
543    }
544
545    // optional double quantile = 1;
546
547    pub fn quantile(&self) -> f64 {
548        self.quantile.unwrap_or(0.)
549    }
550
551    pub fn clear_quantile(&mut self) {
552        self.quantile = ::std::option::Option::None;
553    }
554
555    pub fn has_quantile(&self) -> bool {
556        self.quantile.is_some()
557    }
558
559    // Param is passed by value, moved
560    pub fn set_quantile(&mut self, v: f64) {
561        self.quantile = ::std::option::Option::Some(v);
562    }
563
564    // optional double value = 2;
565
566    pub fn value(&self) -> f64 {
567        self.value.unwrap_or(0.)
568    }
569
570    pub fn clear_value(&mut self) {
571        self.value = ::std::option::Option::None;
572    }
573
574    pub fn has_value(&self) -> bool {
575        self.value.is_some()
576    }
577
578    // Param is passed by value, moved
579    pub fn set_value(&mut self, v: f64) {
580        self.value = ::std::option::Option::Some(v);
581    }
582
583    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
584        let mut fields = ::std::vec::Vec::with_capacity(2);
585        let mut oneofs = ::std::vec::Vec::with_capacity(0);
586        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
587            "quantile",
588            |m: &Quantile| { &m.quantile },
589            |m: &mut Quantile| { &mut m.quantile },
590        ));
591        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
592            "value",
593            |m: &Quantile| { &m.value },
594            |m: &mut Quantile| { &mut m.value },
595        ));
596        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Quantile>(
597            "Quantile",
598            fields,
599            oneofs,
600        )
601    }
602}
603
604impl ::protobuf::Message for Quantile {
605    const NAME: &'static str = "Quantile";
606
607    fn is_initialized(&self) -> bool {
608        true
609    }
610
611    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
612        while let Some(tag) = is.read_raw_tag_or_eof()? {
613            match tag {
614                9 => {
615                    self.quantile = ::std::option::Option::Some(is.read_double()?);
616                },
617                17 => {
618                    self.value = ::std::option::Option::Some(is.read_double()?);
619                },
620                tag => {
621                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
622                },
623            };
624        }
625        ::std::result::Result::Ok(())
626    }
627
628    // Compute sizes of nested messages
629    #[allow(unused_variables)]
630    fn compute_size(&self) -> u64 {
631        let mut my_size = 0;
632        if let Some(v) = self.quantile {
633            my_size += 1 + 8;
634        }
635        if let Some(v) = self.value {
636            my_size += 1 + 8;
637        }
638        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
639        self.special_fields.cached_size().set(my_size as u32);
640        my_size
641    }
642
643    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
644        if let Some(v) = self.quantile {
645            os.write_double(1, v)?;
646        }
647        if let Some(v) = self.value {
648            os.write_double(2, v)?;
649        }
650        os.write_unknown_fields(self.special_fields.unknown_fields())?;
651        ::std::result::Result::Ok(())
652    }
653
654    fn special_fields(&self) -> &::protobuf::SpecialFields {
655        &self.special_fields
656    }
657
658    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
659        &mut self.special_fields
660    }
661
662    fn new() -> Quantile {
663        Quantile::new()
664    }
665
666    fn clear(&mut self) {
667        self.quantile = ::std::option::Option::None;
668        self.value = ::std::option::Option::None;
669        self.special_fields.clear();
670    }
671
672    fn default_instance() -> &'static Quantile {
673        static instance: Quantile = Quantile {
674            quantile: ::std::option::Option::None,
675            value: ::std::option::Option::None,
676            special_fields: ::protobuf::SpecialFields::new(),
677        };
678        &instance
679    }
680}
681
682impl ::protobuf::MessageFull for Quantile {
683    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
684        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
685        descriptor.get(|| file_descriptor().message_by_package_relative_name("Quantile").unwrap()).clone()
686    }
687}
688
689impl ::std::fmt::Display for Quantile {
690    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
691        ::protobuf::text_format::fmt(self, f)
692    }
693}
694
695impl ::protobuf::reflect::ProtobufValue for Quantile {
696    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
697}
698
699// @@protoc_insertion_point(message:io.prometheus.client.Summary)
700#[derive(PartialEq,Clone,Default,Debug)]
701pub struct Summary {
702    // message fields
703    // @@protoc_insertion_point(field:io.prometheus.client.Summary.sample_count)
704    pub sample_count: ::std::option::Option<u64>,
705    // @@protoc_insertion_point(field:io.prometheus.client.Summary.sample_sum)
706    pub sample_sum: ::std::option::Option<f64>,
707    // @@protoc_insertion_point(field:io.prometheus.client.Summary.quantile)
708    pub quantile: ::std::vec::Vec<Quantile>,
709    // special fields
710    // @@protoc_insertion_point(special_field:io.prometheus.client.Summary.special_fields)
711    pub special_fields: ::protobuf::SpecialFields,
712}
713
714impl<'a> ::std::default::Default for &'a Summary {
715    fn default() -> &'a Summary {
716        <Summary as ::protobuf::Message>::default_instance()
717    }
718}
719
720impl Summary {
721    pub fn new() -> Summary {
722        ::std::default::Default::default()
723    }
724
725    // optional uint64 sample_count = 1;
726
727    pub fn sample_count(&self) -> u64 {
728        self.sample_count.unwrap_or(0)
729    }
730
731    pub fn clear_sample_count(&mut self) {
732        self.sample_count = ::std::option::Option::None;
733    }
734
735    pub fn has_sample_count(&self) -> bool {
736        self.sample_count.is_some()
737    }
738
739    // Param is passed by value, moved
740    pub fn set_sample_count(&mut self, v: u64) {
741        self.sample_count = ::std::option::Option::Some(v);
742    }
743
744    // optional double sample_sum = 2;
745
746    pub fn sample_sum(&self) -> f64 {
747        self.sample_sum.unwrap_or(0.)
748    }
749
750    pub fn clear_sample_sum(&mut self) {
751        self.sample_sum = ::std::option::Option::None;
752    }
753
754    pub fn has_sample_sum(&self) -> bool {
755        self.sample_sum.is_some()
756    }
757
758    // Param is passed by value, moved
759    pub fn set_sample_sum(&mut self, v: f64) {
760        self.sample_sum = ::std::option::Option::Some(v);
761    }
762
763    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
764        let mut fields = ::std::vec::Vec::with_capacity(3);
765        let mut oneofs = ::std::vec::Vec::with_capacity(0);
766        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
767            "sample_count",
768            |m: &Summary| { &m.sample_count },
769            |m: &mut Summary| { &mut m.sample_count },
770        ));
771        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
772            "sample_sum",
773            |m: &Summary| { &m.sample_sum },
774            |m: &mut Summary| { &mut m.sample_sum },
775        ));
776        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
777            "quantile",
778            |m: &Summary| { &m.quantile },
779            |m: &mut Summary| { &mut m.quantile },
780        ));
781        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Summary>(
782            "Summary",
783            fields,
784            oneofs,
785        )
786    }
787}
788
789impl ::protobuf::Message for Summary {
790    const NAME: &'static str = "Summary";
791
792    fn is_initialized(&self) -> bool {
793        true
794    }
795
796    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
797        while let Some(tag) = is.read_raw_tag_or_eof()? {
798            match tag {
799                8 => {
800                    self.sample_count = ::std::option::Option::Some(is.read_uint64()?);
801                },
802                17 => {
803                    self.sample_sum = ::std::option::Option::Some(is.read_double()?);
804                },
805                26 => {
806                    self.quantile.push(is.read_message()?);
807                },
808                tag => {
809                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
810                },
811            };
812        }
813        ::std::result::Result::Ok(())
814    }
815
816    // Compute sizes of nested messages
817    #[allow(unused_variables)]
818    fn compute_size(&self) -> u64 {
819        let mut my_size = 0;
820        if let Some(v) = self.sample_count {
821            my_size += ::protobuf::rt::uint64_size(1, v);
822        }
823        if let Some(v) = self.sample_sum {
824            my_size += 1 + 8;
825        }
826        for value in &self.quantile {
827            let len = value.compute_size();
828            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
829        };
830        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
831        self.special_fields.cached_size().set(my_size as u32);
832        my_size
833    }
834
835    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
836        if let Some(v) = self.sample_count {
837            os.write_uint64(1, v)?;
838        }
839        if let Some(v) = self.sample_sum {
840            os.write_double(2, v)?;
841        }
842        for v in &self.quantile {
843            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
844        };
845        os.write_unknown_fields(self.special_fields.unknown_fields())?;
846        ::std::result::Result::Ok(())
847    }
848
849    fn special_fields(&self) -> &::protobuf::SpecialFields {
850        &self.special_fields
851    }
852
853    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
854        &mut self.special_fields
855    }
856
857    fn new() -> Summary {
858        Summary::new()
859    }
860
861    fn clear(&mut self) {
862        self.sample_count = ::std::option::Option::None;
863        self.sample_sum = ::std::option::Option::None;
864        self.quantile.clear();
865        self.special_fields.clear();
866    }
867
868    fn default_instance() -> &'static Summary {
869        static instance: Summary = Summary {
870            sample_count: ::std::option::Option::None,
871            sample_sum: ::std::option::Option::None,
872            quantile: ::std::vec::Vec::new(),
873            special_fields: ::protobuf::SpecialFields::new(),
874        };
875        &instance
876    }
877}
878
879impl ::protobuf::MessageFull for Summary {
880    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
881        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
882        descriptor.get(|| file_descriptor().message_by_package_relative_name("Summary").unwrap()).clone()
883    }
884}
885
886impl ::std::fmt::Display for Summary {
887    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
888        ::protobuf::text_format::fmt(self, f)
889    }
890}
891
892impl ::protobuf::reflect::ProtobufValue for Summary {
893    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
894}
895
896// @@protoc_insertion_point(message:io.prometheus.client.Untyped)
897#[derive(PartialEq,Clone,Default,Debug)]
898pub struct Untyped {
899    // message fields
900    // @@protoc_insertion_point(field:io.prometheus.client.Untyped.value)
901    pub value: ::std::option::Option<f64>,
902    // special fields
903    // @@protoc_insertion_point(special_field:io.prometheus.client.Untyped.special_fields)
904    pub special_fields: ::protobuf::SpecialFields,
905}
906
907impl<'a> ::std::default::Default for &'a Untyped {
908    fn default() -> &'a Untyped {
909        <Untyped as ::protobuf::Message>::default_instance()
910    }
911}
912
913impl Untyped {
914    pub fn new() -> Untyped {
915        ::std::default::Default::default()
916    }
917
918    // optional double value = 1;
919
920    pub fn value(&self) -> f64 {
921        self.value.unwrap_or(0.)
922    }
923
924    pub fn clear_value(&mut self) {
925        self.value = ::std::option::Option::None;
926    }
927
928    pub fn has_value(&self) -> bool {
929        self.value.is_some()
930    }
931
932    // Param is passed by value, moved
933    pub fn set_value(&mut self, v: f64) {
934        self.value = ::std::option::Option::Some(v);
935    }
936
937    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
938        let mut fields = ::std::vec::Vec::with_capacity(1);
939        let mut oneofs = ::std::vec::Vec::with_capacity(0);
940        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
941            "value",
942            |m: &Untyped| { &m.value },
943            |m: &mut Untyped| { &mut m.value },
944        ));
945        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Untyped>(
946            "Untyped",
947            fields,
948            oneofs,
949        )
950    }
951}
952
953impl ::protobuf::Message for Untyped {
954    const NAME: &'static str = "Untyped";
955
956    fn is_initialized(&self) -> bool {
957        true
958    }
959
960    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
961        while let Some(tag) = is.read_raw_tag_or_eof()? {
962            match tag {
963                9 => {
964                    self.value = ::std::option::Option::Some(is.read_double()?);
965                },
966                tag => {
967                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
968                },
969            };
970        }
971        ::std::result::Result::Ok(())
972    }
973
974    // Compute sizes of nested messages
975    #[allow(unused_variables)]
976    fn compute_size(&self) -> u64 {
977        let mut my_size = 0;
978        if let Some(v) = self.value {
979            my_size += 1 + 8;
980        }
981        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
982        self.special_fields.cached_size().set(my_size as u32);
983        my_size
984    }
985
986    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
987        if let Some(v) = self.value {
988            os.write_double(1, v)?;
989        }
990        os.write_unknown_fields(self.special_fields.unknown_fields())?;
991        ::std::result::Result::Ok(())
992    }
993
994    fn special_fields(&self) -> &::protobuf::SpecialFields {
995        &self.special_fields
996    }
997
998    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
999        &mut self.special_fields
1000    }
1001
1002    fn new() -> Untyped {
1003        Untyped::new()
1004    }
1005
1006    fn clear(&mut self) {
1007        self.value = ::std::option::Option::None;
1008        self.special_fields.clear();
1009    }
1010
1011    fn default_instance() -> &'static Untyped {
1012        static instance: Untyped = Untyped {
1013            value: ::std::option::Option::None,
1014            special_fields: ::protobuf::SpecialFields::new(),
1015        };
1016        &instance
1017    }
1018}
1019
1020impl ::protobuf::MessageFull for Untyped {
1021    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1022        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1023        descriptor.get(|| file_descriptor().message_by_package_relative_name("Untyped").unwrap()).clone()
1024    }
1025}
1026
1027impl ::std::fmt::Display for Untyped {
1028    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1029        ::protobuf::text_format::fmt(self, f)
1030    }
1031}
1032
1033impl ::protobuf::reflect::ProtobufValue for Untyped {
1034    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1035}
1036
1037// @@protoc_insertion_point(message:io.prometheus.client.Histogram)
1038#[derive(PartialEq,Clone,Default,Debug)]
1039pub struct Histogram {
1040    // message fields
1041    // @@protoc_insertion_point(field:io.prometheus.client.Histogram.sample_count)
1042    pub sample_count: ::std::option::Option<u64>,
1043    // @@protoc_insertion_point(field:io.prometheus.client.Histogram.sample_sum)
1044    pub sample_sum: ::std::option::Option<f64>,
1045    // @@protoc_insertion_point(field:io.prometheus.client.Histogram.bucket)
1046    pub bucket: ::std::vec::Vec<Bucket>,
1047    // special fields
1048    // @@protoc_insertion_point(special_field:io.prometheus.client.Histogram.special_fields)
1049    pub special_fields: ::protobuf::SpecialFields,
1050}
1051
1052impl<'a> ::std::default::Default for &'a Histogram {
1053    fn default() -> &'a Histogram {
1054        <Histogram as ::protobuf::Message>::default_instance()
1055    }
1056}
1057
1058impl Histogram {
1059    pub fn new() -> Histogram {
1060        ::std::default::Default::default()
1061    }
1062
1063    // optional uint64 sample_count = 1;
1064
1065    pub fn sample_count(&self) -> u64 {
1066        self.sample_count.unwrap_or(0)
1067    }
1068
1069    pub fn clear_sample_count(&mut self) {
1070        self.sample_count = ::std::option::Option::None;
1071    }
1072
1073    pub fn has_sample_count(&self) -> bool {
1074        self.sample_count.is_some()
1075    }
1076
1077    // Param is passed by value, moved
1078    pub fn set_sample_count(&mut self, v: u64) {
1079        self.sample_count = ::std::option::Option::Some(v);
1080    }
1081
1082    // optional double sample_sum = 2;
1083
1084    pub fn sample_sum(&self) -> f64 {
1085        self.sample_sum.unwrap_or(0.)
1086    }
1087
1088    pub fn clear_sample_sum(&mut self) {
1089        self.sample_sum = ::std::option::Option::None;
1090    }
1091
1092    pub fn has_sample_sum(&self) -> bool {
1093        self.sample_sum.is_some()
1094    }
1095
1096    // Param is passed by value, moved
1097    pub fn set_sample_sum(&mut self, v: f64) {
1098        self.sample_sum = ::std::option::Option::Some(v);
1099    }
1100
1101    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
1102        let mut fields = ::std::vec::Vec::with_capacity(3);
1103        let mut oneofs = ::std::vec::Vec::with_capacity(0);
1104        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1105            "sample_count",
1106            |m: &Histogram| { &m.sample_count },
1107            |m: &mut Histogram| { &mut m.sample_count },
1108        ));
1109        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1110            "sample_sum",
1111            |m: &Histogram| { &m.sample_sum },
1112            |m: &mut Histogram| { &mut m.sample_sum },
1113        ));
1114        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1115            "bucket",
1116            |m: &Histogram| { &m.bucket },
1117            |m: &mut Histogram| { &mut m.bucket },
1118        ));
1119        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Histogram>(
1120            "Histogram",
1121            fields,
1122            oneofs,
1123        )
1124    }
1125}
1126
1127impl ::protobuf::Message for Histogram {
1128    const NAME: &'static str = "Histogram";
1129
1130    fn is_initialized(&self) -> bool {
1131        true
1132    }
1133
1134    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1135        while let Some(tag) = is.read_raw_tag_or_eof()? {
1136            match tag {
1137                8 => {
1138                    self.sample_count = ::std::option::Option::Some(is.read_uint64()?);
1139                },
1140                17 => {
1141                    self.sample_sum = ::std::option::Option::Some(is.read_double()?);
1142                },
1143                26 => {
1144                    self.bucket.push(is.read_message()?);
1145                },
1146                tag => {
1147                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1148                },
1149            };
1150        }
1151        ::std::result::Result::Ok(())
1152    }
1153
1154    // Compute sizes of nested messages
1155    #[allow(unused_variables)]
1156    fn compute_size(&self) -> u64 {
1157        let mut my_size = 0;
1158        if let Some(v) = self.sample_count {
1159            my_size += ::protobuf::rt::uint64_size(1, v);
1160        }
1161        if let Some(v) = self.sample_sum {
1162            my_size += 1 + 8;
1163        }
1164        for value in &self.bucket {
1165            let len = value.compute_size();
1166            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1167        };
1168        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1169        self.special_fields.cached_size().set(my_size as u32);
1170        my_size
1171    }
1172
1173    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1174        if let Some(v) = self.sample_count {
1175            os.write_uint64(1, v)?;
1176        }
1177        if let Some(v) = self.sample_sum {
1178            os.write_double(2, v)?;
1179        }
1180        for v in &self.bucket {
1181            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
1182        };
1183        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1184        ::std::result::Result::Ok(())
1185    }
1186
1187    fn special_fields(&self) -> &::protobuf::SpecialFields {
1188        &self.special_fields
1189    }
1190
1191    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1192        &mut self.special_fields
1193    }
1194
1195    fn new() -> Histogram {
1196        Histogram::new()
1197    }
1198
1199    fn clear(&mut self) {
1200        self.sample_count = ::std::option::Option::None;
1201        self.sample_sum = ::std::option::Option::None;
1202        self.bucket.clear();
1203        self.special_fields.clear();
1204    }
1205
1206    fn default_instance() -> &'static Histogram {
1207        static instance: Histogram = Histogram {
1208            sample_count: ::std::option::Option::None,
1209            sample_sum: ::std::option::Option::None,
1210            bucket: ::std::vec::Vec::new(),
1211            special_fields: ::protobuf::SpecialFields::new(),
1212        };
1213        &instance
1214    }
1215}
1216
1217impl ::protobuf::MessageFull for Histogram {
1218    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1219        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1220        descriptor.get(|| file_descriptor().message_by_package_relative_name("Histogram").unwrap()).clone()
1221    }
1222}
1223
1224impl ::std::fmt::Display for Histogram {
1225    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1226        ::protobuf::text_format::fmt(self, f)
1227    }
1228}
1229
1230impl ::protobuf::reflect::ProtobufValue for Histogram {
1231    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1232}
1233
1234// @@protoc_insertion_point(message:io.prometheus.client.Bucket)
1235#[derive(PartialEq,Clone,Default,Debug)]
1236pub struct Bucket {
1237    // message fields
1238    // @@protoc_insertion_point(field:io.prometheus.client.Bucket.cumulative_count)
1239    pub cumulative_count: ::std::option::Option<u64>,
1240    // @@protoc_insertion_point(field:io.prometheus.client.Bucket.upper_bound)
1241    pub upper_bound: ::std::option::Option<f64>,
1242    // special fields
1243    // @@protoc_insertion_point(special_field:io.prometheus.client.Bucket.special_fields)
1244    pub special_fields: ::protobuf::SpecialFields,
1245}
1246
1247impl<'a> ::std::default::Default for &'a Bucket {
1248    fn default() -> &'a Bucket {
1249        <Bucket as ::protobuf::Message>::default_instance()
1250    }
1251}
1252
1253impl Bucket {
1254    pub fn new() -> Bucket {
1255        ::std::default::Default::default()
1256    }
1257
1258    // optional uint64 cumulative_count = 1;
1259
1260    pub fn cumulative_count(&self) -> u64 {
1261        self.cumulative_count.unwrap_or(0)
1262    }
1263
1264    pub fn clear_cumulative_count(&mut self) {
1265        self.cumulative_count = ::std::option::Option::None;
1266    }
1267
1268    pub fn has_cumulative_count(&self) -> bool {
1269        self.cumulative_count.is_some()
1270    }
1271
1272    // Param is passed by value, moved
1273    pub fn set_cumulative_count(&mut self, v: u64) {
1274        self.cumulative_count = ::std::option::Option::Some(v);
1275    }
1276
1277    // optional double upper_bound = 2;
1278
1279    pub fn upper_bound(&self) -> f64 {
1280        self.upper_bound.unwrap_or(0.)
1281    }
1282
1283    pub fn clear_upper_bound(&mut self) {
1284        self.upper_bound = ::std::option::Option::None;
1285    }
1286
1287    pub fn has_upper_bound(&self) -> bool {
1288        self.upper_bound.is_some()
1289    }
1290
1291    // Param is passed by value, moved
1292    pub fn set_upper_bound(&mut self, v: f64) {
1293        self.upper_bound = ::std::option::Option::Some(v);
1294    }
1295
1296    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
1297        let mut fields = ::std::vec::Vec::with_capacity(2);
1298        let mut oneofs = ::std::vec::Vec::with_capacity(0);
1299        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1300            "cumulative_count",
1301            |m: &Bucket| { &m.cumulative_count },
1302            |m: &mut Bucket| { &mut m.cumulative_count },
1303        ));
1304        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1305            "upper_bound",
1306            |m: &Bucket| { &m.upper_bound },
1307            |m: &mut Bucket| { &mut m.upper_bound },
1308        ));
1309        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Bucket>(
1310            "Bucket",
1311            fields,
1312            oneofs,
1313        )
1314    }
1315}
1316
1317impl ::protobuf::Message for Bucket {
1318    const NAME: &'static str = "Bucket";
1319
1320    fn is_initialized(&self) -> bool {
1321        true
1322    }
1323
1324    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1325        while let Some(tag) = is.read_raw_tag_or_eof()? {
1326            match tag {
1327                8 => {
1328                    self.cumulative_count = ::std::option::Option::Some(is.read_uint64()?);
1329                },
1330                17 => {
1331                    self.upper_bound = ::std::option::Option::Some(is.read_double()?);
1332                },
1333                tag => {
1334                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1335                },
1336            };
1337        }
1338        ::std::result::Result::Ok(())
1339    }
1340
1341    // Compute sizes of nested messages
1342    #[allow(unused_variables)]
1343    fn compute_size(&self) -> u64 {
1344        let mut my_size = 0;
1345        if let Some(v) = self.cumulative_count {
1346            my_size += ::protobuf::rt::uint64_size(1, v);
1347        }
1348        if let Some(v) = self.upper_bound {
1349            my_size += 1 + 8;
1350        }
1351        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1352        self.special_fields.cached_size().set(my_size as u32);
1353        my_size
1354    }
1355
1356    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1357        if let Some(v) = self.cumulative_count {
1358            os.write_uint64(1, v)?;
1359        }
1360        if let Some(v) = self.upper_bound {
1361            os.write_double(2, v)?;
1362        }
1363        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1364        ::std::result::Result::Ok(())
1365    }
1366
1367    fn special_fields(&self) -> &::protobuf::SpecialFields {
1368        &self.special_fields
1369    }
1370
1371    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1372        &mut self.special_fields
1373    }
1374
1375    fn new() -> Bucket {
1376        Bucket::new()
1377    }
1378
1379    fn clear(&mut self) {
1380        self.cumulative_count = ::std::option::Option::None;
1381        self.upper_bound = ::std::option::Option::None;
1382        self.special_fields.clear();
1383    }
1384
1385    fn default_instance() -> &'static Bucket {
1386        static instance: Bucket = Bucket {
1387            cumulative_count: ::std::option::Option::None,
1388            upper_bound: ::std::option::Option::None,
1389            special_fields: ::protobuf::SpecialFields::new(),
1390        };
1391        &instance
1392    }
1393}
1394
1395impl ::protobuf::MessageFull for Bucket {
1396    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1397        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1398        descriptor.get(|| file_descriptor().message_by_package_relative_name("Bucket").unwrap()).clone()
1399    }
1400}
1401
1402impl ::std::fmt::Display for Bucket {
1403    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1404        ::protobuf::text_format::fmt(self, f)
1405    }
1406}
1407
1408impl ::protobuf::reflect::ProtobufValue for Bucket {
1409    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1410}
1411
1412// @@protoc_insertion_point(message:io.prometheus.client.Metric)
1413#[derive(PartialEq,Clone,Default,Debug)]
1414pub struct Metric {
1415    // message fields
1416    // @@protoc_insertion_point(field:io.prometheus.client.Metric.label)
1417    pub label: ::std::vec::Vec<LabelPair>,
1418    // @@protoc_insertion_point(field:io.prometheus.client.Metric.gauge)
1419    pub gauge: ::protobuf::MessageField<Gauge>,
1420    // @@protoc_insertion_point(field:io.prometheus.client.Metric.counter)
1421    pub counter: ::protobuf::MessageField<Counter>,
1422    // @@protoc_insertion_point(field:io.prometheus.client.Metric.summary)
1423    pub summary: ::protobuf::MessageField<Summary>,
1424    // @@protoc_insertion_point(field:io.prometheus.client.Metric.untyped)
1425    pub untyped: ::protobuf::MessageField<Untyped>,
1426    // @@protoc_insertion_point(field:io.prometheus.client.Metric.histogram)
1427    pub histogram: ::protobuf::MessageField<Histogram>,
1428    // @@protoc_insertion_point(field:io.prometheus.client.Metric.timestamp_ms)
1429    pub timestamp_ms: ::std::option::Option<i64>,
1430    // special fields
1431    // @@protoc_insertion_point(special_field:io.prometheus.client.Metric.special_fields)
1432    pub special_fields: ::protobuf::SpecialFields,
1433}
1434
1435impl<'a> ::std::default::Default for &'a Metric {
1436    fn default() -> &'a Metric {
1437        <Metric as ::protobuf::Message>::default_instance()
1438    }
1439}
1440
1441impl Metric {
1442    pub fn new() -> Metric {
1443        ::std::default::Default::default()
1444    }
1445
1446    // optional int64 timestamp_ms = 6;
1447
1448    pub fn timestamp_ms(&self) -> i64 {
1449        self.timestamp_ms.unwrap_or(0)
1450    }
1451
1452    pub fn clear_timestamp_ms(&mut self) {
1453        self.timestamp_ms = ::std::option::Option::None;
1454    }
1455
1456    pub fn has_timestamp_ms(&self) -> bool {
1457        self.timestamp_ms.is_some()
1458    }
1459
1460    // Param is passed by value, moved
1461    pub fn set_timestamp_ms(&mut self, v: i64) {
1462        self.timestamp_ms = ::std::option::Option::Some(v);
1463    }
1464
1465    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
1466        let mut fields = ::std::vec::Vec::with_capacity(7);
1467        let mut oneofs = ::std::vec::Vec::with_capacity(0);
1468        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1469            "label",
1470            |m: &Metric| { &m.label },
1471            |m: &mut Metric| { &mut m.label },
1472        ));
1473        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Gauge>(
1474            "gauge",
1475            |m: &Metric| { &m.gauge },
1476            |m: &mut Metric| { &mut m.gauge },
1477        ));
1478        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Counter>(
1479            "counter",
1480            |m: &Metric| { &m.counter },
1481            |m: &mut Metric| { &mut m.counter },
1482        ));
1483        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Summary>(
1484            "summary",
1485            |m: &Metric| { &m.summary },
1486            |m: &mut Metric| { &mut m.summary },
1487        ));
1488        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Untyped>(
1489            "untyped",
1490            |m: &Metric| { &m.untyped },
1491            |m: &mut Metric| { &mut m.untyped },
1492        ));
1493        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Histogram>(
1494            "histogram",
1495            |m: &Metric| { &m.histogram },
1496            |m: &mut Metric| { &mut m.histogram },
1497        ));
1498        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1499            "timestamp_ms",
1500            |m: &Metric| { &m.timestamp_ms },
1501            |m: &mut Metric| { &mut m.timestamp_ms },
1502        ));
1503        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Metric>(
1504            "Metric",
1505            fields,
1506            oneofs,
1507        )
1508    }
1509}
1510
1511impl ::protobuf::Message for Metric {
1512    const NAME: &'static str = "Metric";
1513
1514    fn is_initialized(&self) -> bool {
1515        true
1516    }
1517
1518    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1519        while let Some(tag) = is.read_raw_tag_or_eof()? {
1520            match tag {
1521                10 => {
1522                    self.label.push(is.read_message()?);
1523                },
1524                18 => {
1525                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.gauge)?;
1526                },
1527                26 => {
1528                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.counter)?;
1529                },
1530                34 => {
1531                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.summary)?;
1532                },
1533                42 => {
1534                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.untyped)?;
1535                },
1536                58 => {
1537                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.histogram)?;
1538                },
1539                48 => {
1540                    self.timestamp_ms = ::std::option::Option::Some(is.read_int64()?);
1541                },
1542                tag => {
1543                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1544                },
1545            };
1546        }
1547        ::std::result::Result::Ok(())
1548    }
1549
1550    // Compute sizes of nested messages
1551    #[allow(unused_variables)]
1552    fn compute_size(&self) -> u64 {
1553        let mut my_size = 0;
1554        for value in &self.label {
1555            let len = value.compute_size();
1556            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1557        };
1558        if let Some(v) = self.gauge.as_ref() {
1559            let len = v.compute_size();
1560            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1561        }
1562        if let Some(v) = self.counter.as_ref() {
1563            let len = v.compute_size();
1564            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1565        }
1566        if let Some(v) = self.summary.as_ref() {
1567            let len = v.compute_size();
1568            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1569        }
1570        if let Some(v) = self.untyped.as_ref() {
1571            let len = v.compute_size();
1572            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1573        }
1574        if let Some(v) = self.histogram.as_ref() {
1575            let len = v.compute_size();
1576            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1577        }
1578        if let Some(v) = self.timestamp_ms {
1579            my_size += ::protobuf::rt::int64_size(6, v);
1580        }
1581        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1582        self.special_fields.cached_size().set(my_size as u32);
1583        my_size
1584    }
1585
1586    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1587        for v in &self.label {
1588            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
1589        };
1590        if let Some(v) = self.gauge.as_ref() {
1591            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
1592        }
1593        if let Some(v) = self.counter.as_ref() {
1594            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
1595        }
1596        if let Some(v) = self.summary.as_ref() {
1597            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
1598        }
1599        if let Some(v) = self.untyped.as_ref() {
1600            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
1601        }
1602        if let Some(v) = self.histogram.as_ref() {
1603            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
1604        }
1605        if let Some(v) = self.timestamp_ms {
1606            os.write_int64(6, v)?;
1607        }
1608        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1609        ::std::result::Result::Ok(())
1610    }
1611
1612    fn special_fields(&self) -> &::protobuf::SpecialFields {
1613        &self.special_fields
1614    }
1615
1616    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1617        &mut self.special_fields
1618    }
1619
1620    fn new() -> Metric {
1621        Metric::new()
1622    }
1623
1624    fn clear(&mut self) {
1625        self.label.clear();
1626        self.gauge.clear();
1627        self.counter.clear();
1628        self.summary.clear();
1629        self.untyped.clear();
1630        self.histogram.clear();
1631        self.timestamp_ms = ::std::option::Option::None;
1632        self.special_fields.clear();
1633    }
1634
1635    fn default_instance() -> &'static Metric {
1636        static instance: Metric = Metric {
1637            label: ::std::vec::Vec::new(),
1638            gauge: ::protobuf::MessageField::none(),
1639            counter: ::protobuf::MessageField::none(),
1640            summary: ::protobuf::MessageField::none(),
1641            untyped: ::protobuf::MessageField::none(),
1642            histogram: ::protobuf::MessageField::none(),
1643            timestamp_ms: ::std::option::Option::None,
1644            special_fields: ::protobuf::SpecialFields::new(),
1645        };
1646        &instance
1647    }
1648}
1649
1650impl ::protobuf::MessageFull for Metric {
1651    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1652        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1653        descriptor.get(|| file_descriptor().message_by_package_relative_name("Metric").unwrap()).clone()
1654    }
1655}
1656
1657impl ::std::fmt::Display for Metric {
1658    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1659        ::protobuf::text_format::fmt(self, f)
1660    }
1661}
1662
1663impl ::protobuf::reflect::ProtobufValue for Metric {
1664    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1665}
1666
1667// @@protoc_insertion_point(message:io.prometheus.client.MetricFamily)
1668#[derive(PartialEq,Clone,Default,Debug)]
1669pub struct MetricFamily {
1670    // message fields
1671    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.name)
1672    pub name: ::std::option::Option<::std::string::String>,
1673    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.help)
1674    pub help: ::std::option::Option<::std::string::String>,
1675    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.type)
1676    pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<MetricType>>,
1677    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.metric)
1678    pub metric: ::std::vec::Vec<Metric>,
1679    // special fields
1680    // @@protoc_insertion_point(special_field:io.prometheus.client.MetricFamily.special_fields)
1681    pub special_fields: ::protobuf::SpecialFields,
1682}
1683
1684impl<'a> ::std::default::Default for &'a MetricFamily {
1685    fn default() -> &'a MetricFamily {
1686        <MetricFamily as ::protobuf::Message>::default_instance()
1687    }
1688}
1689
1690impl MetricFamily {
1691    pub fn new() -> MetricFamily {
1692        ::std::default::Default::default()
1693    }
1694
1695    // optional string name = 1;
1696
1697    pub fn name(&self) -> &str {
1698        match self.name.as_ref() {
1699            Some(v) => v,
1700            None => "",
1701        }
1702    }
1703
1704    pub fn clear_name(&mut self) {
1705        self.name = ::std::option::Option::None;
1706    }
1707
1708    pub fn has_name(&self) -> bool {
1709        self.name.is_some()
1710    }
1711
1712    // Param is passed by value, moved
1713    pub fn set_name(&mut self, v: ::std::string::String) {
1714        self.name = ::std::option::Option::Some(v);
1715    }
1716
1717    // Mutable pointer to the field.
1718    // If field is not initialized, it is initialized with default value first.
1719    pub fn mut_name(&mut self) -> &mut ::std::string::String {
1720        if self.name.is_none() {
1721            self.name = ::std::option::Option::Some(::std::string::String::new());
1722        }
1723        self.name.as_mut().unwrap()
1724    }
1725
1726    // Take field
1727    pub fn take_name(&mut self) -> ::std::string::String {
1728        self.name.take().unwrap_or_else(|| ::std::string::String::new())
1729    }
1730
1731    // optional string help = 2;
1732
1733    pub fn help(&self) -> &str {
1734        match self.help.as_ref() {
1735            Some(v) => v,
1736            None => "",
1737        }
1738    }
1739
1740    pub fn clear_help(&mut self) {
1741        self.help = ::std::option::Option::None;
1742    }
1743
1744    pub fn has_help(&self) -> bool {
1745        self.help.is_some()
1746    }
1747
1748    // Param is passed by value, moved
1749    pub fn set_help(&mut self, v: ::std::string::String) {
1750        self.help = ::std::option::Option::Some(v);
1751    }
1752
1753    // Mutable pointer to the field.
1754    // If field is not initialized, it is initialized with default value first.
1755    pub fn mut_help(&mut self) -> &mut ::std::string::String {
1756        if self.help.is_none() {
1757            self.help = ::std::option::Option::Some(::std::string::String::new());
1758        }
1759        self.help.as_mut().unwrap()
1760    }
1761
1762    // Take field
1763    pub fn take_help(&mut self) -> ::std::string::String {
1764        self.help.take().unwrap_or_else(|| ::std::string::String::new())
1765    }
1766
1767    // optional .io.prometheus.client.MetricType type = 3;
1768
1769    pub fn type_(&self) -> MetricType {
1770        match self.type_ {
1771            Some(e) => e.enum_value_or(MetricType::COUNTER),
1772            None => MetricType::COUNTER,
1773        }
1774    }
1775
1776    pub fn clear_type_(&mut self) {
1777        self.type_ = ::std::option::Option::None;
1778    }
1779
1780    pub fn has_type(&self) -> bool {
1781        self.type_.is_some()
1782    }
1783
1784    // Param is passed by value, moved
1785    pub fn set_type(&mut self, v: MetricType) {
1786        self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
1787    }
1788
1789    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
1790        let mut fields = ::std::vec::Vec::with_capacity(4);
1791        let mut oneofs = ::std::vec::Vec::with_capacity(0);
1792        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1793            "name",
1794            |m: &MetricFamily| { &m.name },
1795            |m: &mut MetricFamily| { &mut m.name },
1796        ));
1797        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1798            "help",
1799            |m: &MetricFamily| { &m.help },
1800            |m: &mut MetricFamily| { &mut m.help },
1801        ));
1802        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
1803            "type",
1804            |m: &MetricFamily| { &m.type_ },
1805            |m: &mut MetricFamily| { &mut m.type_ },
1806        ));
1807        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
1808            "metric",
1809            |m: &MetricFamily| { &m.metric },
1810            |m: &mut MetricFamily| { &mut m.metric },
1811        ));
1812        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MetricFamily>(
1813            "MetricFamily",
1814            fields,
1815            oneofs,
1816        )
1817    }
1818}
1819
1820impl ::protobuf::Message for MetricFamily {
1821    const NAME: &'static str = "MetricFamily";
1822
1823    fn is_initialized(&self) -> bool {
1824        true
1825    }
1826
1827    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1828        while let Some(tag) = is.read_raw_tag_or_eof()? {
1829            match tag {
1830                10 => {
1831                    self.name = ::std::option::Option::Some(is.read_string()?);
1832                },
1833                18 => {
1834                    self.help = ::std::option::Option::Some(is.read_string()?);
1835                },
1836                24 => {
1837                    self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?);
1838                },
1839                34 => {
1840                    self.metric.push(is.read_message()?);
1841                },
1842                tag => {
1843                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1844                },
1845            };
1846        }
1847        ::std::result::Result::Ok(())
1848    }
1849
1850    // Compute sizes of nested messages
1851    #[allow(unused_variables)]
1852    fn compute_size(&self) -> u64 {
1853        let mut my_size = 0;
1854        if let Some(v) = self.name.as_ref() {
1855            my_size += ::protobuf::rt::string_size(1, &v);
1856        }
1857        if let Some(v) = self.help.as_ref() {
1858            my_size += ::protobuf::rt::string_size(2, &v);
1859        }
1860        if let Some(v) = self.type_ {
1861            my_size += ::protobuf::rt::int32_size(3, v.value());
1862        }
1863        for value in &self.metric {
1864            let len = value.compute_size();
1865            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
1866        };
1867        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1868        self.special_fields.cached_size().set(my_size as u32);
1869        my_size
1870    }
1871
1872    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1873        if let Some(v) = self.name.as_ref() {
1874            os.write_string(1, v)?;
1875        }
1876        if let Some(v) = self.help.as_ref() {
1877            os.write_string(2, v)?;
1878        }
1879        if let Some(v) = self.type_ {
1880            os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?;
1881        }
1882        for v in &self.metric {
1883            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
1884        };
1885        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1886        ::std::result::Result::Ok(())
1887    }
1888
1889    fn special_fields(&self) -> &::protobuf::SpecialFields {
1890        &self.special_fields
1891    }
1892
1893    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1894        &mut self.special_fields
1895    }
1896
1897    fn new() -> MetricFamily {
1898        MetricFamily::new()
1899    }
1900
1901    fn clear(&mut self) {
1902        self.name = ::std::option::Option::None;
1903        self.help = ::std::option::Option::None;
1904        self.type_ = ::std::option::Option::None;
1905        self.metric.clear();
1906        self.special_fields.clear();
1907    }
1908
1909    fn default_instance() -> &'static MetricFamily {
1910        static instance: MetricFamily = MetricFamily {
1911            name: ::std::option::Option::None,
1912            help: ::std::option::Option::None,
1913            type_: ::std::option::Option::None,
1914            metric: ::std::vec::Vec::new(),
1915            special_fields: ::protobuf::SpecialFields::new(),
1916        };
1917        &instance
1918    }
1919}
1920
1921impl ::protobuf::MessageFull for MetricFamily {
1922    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1923        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1924        descriptor.get(|| file_descriptor().message_by_package_relative_name("MetricFamily").unwrap()).clone()
1925    }
1926}
1927
1928impl ::std::fmt::Display for MetricFamily {
1929    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1930        ::protobuf::text_format::fmt(self, f)
1931    }
1932}
1933
1934impl ::protobuf::reflect::ProtobufValue for MetricFamily {
1935    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1936}
1937
1938#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
1939// @@protoc_insertion_point(enum:io.prometheus.client.MetricType)
1940pub enum MetricType {
1941    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.COUNTER)
1942    COUNTER = 0,
1943    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.GAUGE)
1944    GAUGE = 1,
1945    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.SUMMARY)
1946    SUMMARY = 2,
1947    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.UNTYPED)
1948    UNTYPED = 3,
1949    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.HISTOGRAM)
1950    HISTOGRAM = 4,
1951}
1952
1953impl ::protobuf::Enum for MetricType {
1954    const NAME: &'static str = "MetricType";
1955
1956    fn value(&self) -> i32 {
1957        *self as i32
1958    }
1959
1960    fn from_i32(value: i32) -> ::std::option::Option<MetricType> {
1961        match value {
1962            0 => ::std::option::Option::Some(MetricType::COUNTER),
1963            1 => ::std::option::Option::Some(MetricType::GAUGE),
1964            2 => ::std::option::Option::Some(MetricType::SUMMARY),
1965            3 => ::std::option::Option::Some(MetricType::UNTYPED),
1966            4 => ::std::option::Option::Some(MetricType::HISTOGRAM),
1967            _ => ::std::option::Option::None
1968        }
1969    }
1970
1971    fn from_str(str: &str) -> ::std::option::Option<MetricType> {
1972        match str {
1973            "COUNTER" => ::std::option::Option::Some(MetricType::COUNTER),
1974            "GAUGE" => ::std::option::Option::Some(MetricType::GAUGE),
1975            "SUMMARY" => ::std::option::Option::Some(MetricType::SUMMARY),
1976            "UNTYPED" => ::std::option::Option::Some(MetricType::UNTYPED),
1977            "HISTOGRAM" => ::std::option::Option::Some(MetricType::HISTOGRAM),
1978            _ => ::std::option::Option::None
1979        }
1980    }
1981
1982    const VALUES: &'static [MetricType] = &[
1983        MetricType::COUNTER,
1984        MetricType::GAUGE,
1985        MetricType::SUMMARY,
1986        MetricType::UNTYPED,
1987        MetricType::HISTOGRAM,
1988    ];
1989}
1990
1991impl ::protobuf::EnumFull for MetricType {
1992    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
1993        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
1994        descriptor.get(|| file_descriptor().enum_by_package_relative_name("MetricType").unwrap()).clone()
1995    }
1996
1997    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
1998        let index = *self as usize;
1999        Self::enum_descriptor().value_by_index(index)
2000    }
2001}
2002
2003impl ::std::default::Default for MetricType {
2004    fn default() -> Self {
2005        MetricType::COUNTER
2006    }
2007}
2008
2009impl MetricType {
2010    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
2011        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<MetricType>("MetricType")
2012    }
2013}
2014
2015static file_descriptor_proto_data: &'static [u8] = b"\
2016    \n\x11proto_model.proto\x12\x14io.prometheus.client\"5\n\tLabelPair\x12\
2017    \x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x14\n\x05value\x18\x02\
2018    \x20\x01(\tR\x05value\"\x1d\n\x05Gauge\x12\x14\n\x05value\x18\x01\x20\
2019    \x01(\x01R\x05value\"\x1f\n\x07Counter\x12\x14\n\x05value\x18\x01\x20\
2020    \x01(\x01R\x05value\"<\n\x08Quantile\x12\x1a\n\x08quantile\x18\x01\x20\
2021    \x01(\x01R\x08quantile\x12\x14\n\x05value\x18\x02\x20\x01(\x01R\x05value\
2022    \"\x87\x01\n\x07Summary\x12!\n\x0csample_count\x18\x01\x20\x01(\x04R\x0b\
2023    sampleCount\x12\x1d\n\nsample_sum\x18\x02\x20\x01(\x01R\tsampleSum\x12:\
2024    \n\x08quantile\x18\x03\x20\x03(\x0b2\x1e.io.prometheus.client.QuantileR\
2025    \x08quantile\"\x1f\n\x07Untyped\x12\x14\n\x05value\x18\x01\x20\x01(\x01R\
2026    \x05value\"\x83\x01\n\tHistogram\x12!\n\x0csample_count\x18\x01\x20\x01(\
2027    \x04R\x0bsampleCount\x12\x1d\n\nsample_sum\x18\x02\x20\x01(\x01R\tsample\
2028    Sum\x124\n\x06bucket\x18\x03\x20\x03(\x0b2\x1c.io.prometheus.client.Buck\
2029    etR\x06bucket\"T\n\x06Bucket\x12)\n\x10cumulative_count\x18\x01\x20\x01(\
2030    \x04R\x0fcumulativeCount\x12\x1f\n\x0bupper_bound\x18\x02\x20\x01(\x01R\
2031    \nupperBound\"\xff\x02\n\x06Metric\x125\n\x05label\x18\x01\x20\x03(\x0b2\
2032    \x1f.io.prometheus.client.LabelPairR\x05label\x121\n\x05gauge\x18\x02\
2033    \x20\x01(\x0b2\x1b.io.prometheus.client.GaugeR\x05gauge\x127\n\x07counte\
2034    r\x18\x03\x20\x01(\x0b2\x1d.io.prometheus.client.CounterR\x07counter\x12\
2035    7\n\x07summary\x18\x04\x20\x01(\x0b2\x1d.io.prometheus.client.SummaryR\
2036    \x07summary\x127\n\x07untyped\x18\x05\x20\x01(\x0b2\x1d.io.prometheus.cl\
2037    ient.UntypedR\x07untyped\x12=\n\thistogram\x18\x07\x20\x01(\x0b2\x1f.io.\
2038    prometheus.client.HistogramR\thistogram\x12!\n\x0ctimestamp_ms\x18\x06\
2039    \x20\x01(\x03R\x0btimestampMs\"\xa2\x01\n\x0cMetricFamily\x12\x12\n\x04n\
2040    ame\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04help\x18\x02\x20\x01(\tR\
2041    \x04help\x124\n\x04type\x18\x03\x20\x01(\x0e2\x20.io.prometheus.client.M\
2042    etricTypeR\x04type\x124\n\x06metric\x18\x04\x20\x03(\x0b2\x1c.io.prometh\
2043    eus.client.MetricR\x06metric*M\n\nMetricType\x12\x0b\n\x07COUNTER\x10\0\
2044    \x12\t\n\x05GAUGE\x10\x01\x12\x0b\n\x07SUMMARY\x10\x02\x12\x0b\n\x07UNTY\
2045    PED\x10\x03\x12\r\n\tHISTOGRAM\x10\x04B\x16\n\x14io.prometheus.client\
2046";
2047
2048/// `FileDescriptorProto` object which was a source for this generated file
2049fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
2050    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
2051    file_descriptor_proto_lazy.get(|| {
2052        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
2053    })
2054}
2055
2056/// `FileDescriptor` object which allows dynamic access to files
2057pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
2058    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
2059    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
2060    file_descriptor.get(|| {
2061        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
2062            let mut deps = ::std::vec::Vec::with_capacity(0);
2063            let mut messages = ::std::vec::Vec::with_capacity(10);
2064            messages.push(LabelPair::generated_message_descriptor_data());
2065            messages.push(Gauge::generated_message_descriptor_data());
2066            messages.push(Counter::generated_message_descriptor_data());
2067            messages.push(Quantile::generated_message_descriptor_data());
2068            messages.push(Summary::generated_message_descriptor_data());
2069            messages.push(Untyped::generated_message_descriptor_data());
2070            messages.push(Histogram::generated_message_descriptor_data());
2071            messages.push(Bucket::generated_message_descriptor_data());
2072            messages.push(Metric::generated_message_descriptor_data());
2073            messages.push(MetricFamily::generated_message_descriptor_data());
2074            let mut enums = ::std::vec::Vec::with_capacity(1);
2075            enums.push(MetricType::generated_enum_descriptor_data());
2076            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
2077                file_descriptor_proto(),
2078                deps,
2079                messages,
2080                enums,
2081            )
2082        });
2083        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
2084    })
2085}