// This file is generated by rust-protobuf 3.7.2. Do not edit
// .proto file is parsed by protoc 29.3
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `proto_model.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;

// @@protoc_insertion_point(message:io.prometheus.client.LabelPair)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct LabelPair {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.LabelPair.name)
    pub name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:io.prometheus.client.LabelPair.value)
    pub value: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.LabelPair.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a LabelPair {
    fn default() -> &'a LabelPair {
        <LabelPair as ::protobuf::Message>::default_instance()
    }
}

impl LabelPair {
    pub fn new() -> LabelPair {
        ::std::default::Default::default()
    }

    // optional string name = 1;

    pub fn name(&self) -> &str {
        match self.name.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_name(&mut self) {
        self.name = ::std::option::Option::None;
    }

    pub fn has_name(&self) -> bool {
        self.name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        if self.name.is_none() {
            self.name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.name.as_mut().unwrap()
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        self.name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional string value = 2;

    pub fn value(&self) -> &str {
        match self.value.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_value(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_value(&self) -> bool {
        self.value.is_some()
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: ::std::string::String) {
        self.value = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_value(&mut self) -> &mut ::std::string::String {
        if self.value.is_none() {
            self.value = ::std::option::Option::Some(::std::string::String::new());
        }
        self.value.as_mut().unwrap()
    }

    // Take field
    pub fn take_value(&mut self) -> ::std::string::String {
        self.value.take().unwrap_or_else(|| ::std::string::String::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "name",
            |m: &LabelPair| { &m.name },
            |m: &mut LabelPair| { &mut m.name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &LabelPair| { &m.value },
            |m: &mut LabelPair| { &mut m.value },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<LabelPair>(
            "LabelPair",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for LabelPair {
    const NAME: &'static str = "LabelPair";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.name = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.value = ::std::option::Option::Some(is.read_string()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.name.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.value.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.name.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.value.as_ref() {
            os.write_string(2, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> LabelPair {
        LabelPair::new()
    }

    fn clear(&mut self) {
        self.name = ::std::option::Option::None;
        self.value = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static LabelPair {
        static instance: LabelPair = LabelPair {
            name: ::std::option::Option::None,
            value: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for LabelPair {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("LabelPair").unwrap()).clone()
    }
}

impl ::std::fmt::Display for LabelPair {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for LabelPair {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Gauge)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Gauge {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Gauge.value)
    pub value: ::std::option::Option<f64>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Gauge.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Gauge {
    fn default() -> &'a Gauge {
        <Gauge as ::protobuf::Message>::default_instance()
    }
}

impl Gauge {
    pub fn new() -> Gauge {
        ::std::default::Default::default()
    }

    // optional double value = 1;

    pub fn value(&self) -> f64 {
        self.value.unwrap_or(0.)
    }

    pub fn clear_value(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_value(&self) -> bool {
        self.value.is_some()
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: f64) {
        self.value = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &Gauge| { &m.value },
            |m: &mut Gauge| { &mut m.value },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Gauge>(
            "Gauge",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Gauge {
    const NAME: &'static str = "Gauge";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                9 => {
                    self.value = ::std::option::Option::Some(is.read_double()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.value {
            my_size += 1 + 8;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.value {
            os.write_double(1, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Gauge {
        Gauge::new()
    }

    fn clear(&mut self) {
        self.value = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Gauge {
        static instance: Gauge = Gauge {
            value: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Gauge {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Gauge").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Gauge {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Gauge {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Counter)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Counter {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Counter.value)
    pub value: ::std::option::Option<f64>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Counter.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Counter {
    fn default() -> &'a Counter {
        <Counter as ::protobuf::Message>::default_instance()
    }
}

impl Counter {
    pub fn new() -> Counter {
        ::std::default::Default::default()
    }

    // optional double value = 1;

    pub fn value(&self) -> f64 {
        self.value.unwrap_or(0.)
    }

    pub fn clear_value(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_value(&self) -> bool {
        self.value.is_some()
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: f64) {
        self.value = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &Counter| { &m.value },
            |m: &mut Counter| { &mut m.value },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Counter>(
            "Counter",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Counter {
    const NAME: &'static str = "Counter";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                9 => {
                    self.value = ::std::option::Option::Some(is.read_double()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.value {
            my_size += 1 + 8;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.value {
            os.write_double(1, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Counter {
        Counter::new()
    }

    fn clear(&mut self) {
        self.value = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Counter {
        static instance: Counter = Counter {
            value: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Counter {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Counter").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Counter {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Counter {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Quantile)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Quantile {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Quantile.quantile)
    pub quantile: ::std::option::Option<f64>,
    // @@protoc_insertion_point(field:io.prometheus.client.Quantile.value)
    pub value: ::std::option::Option<f64>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Quantile.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Quantile {
    fn default() -> &'a Quantile {
        <Quantile as ::protobuf::Message>::default_instance()
    }
}

impl Quantile {
    pub fn new() -> Quantile {
        ::std::default::Default::default()
    }

    // optional double quantile = 1;

    pub fn quantile(&self) -> f64 {
        self.quantile.unwrap_or(0.)
    }

    pub fn clear_quantile(&mut self) {
        self.quantile = ::std::option::Option::None;
    }

    pub fn has_quantile(&self) -> bool {
        self.quantile.is_some()
    }

    // Param is passed by value, moved
    pub fn set_quantile(&mut self, v: f64) {
        self.quantile = ::std::option::Option::Some(v);
    }

    // optional double value = 2;

    pub fn value(&self) -> f64 {
        self.value.unwrap_or(0.)
    }

    pub fn clear_value(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_value(&self) -> bool {
        self.value.is_some()
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: f64) {
        self.value = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "quantile",
            |m: &Quantile| { &m.quantile },
            |m: &mut Quantile| { &mut m.quantile },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &Quantile| { &m.value },
            |m: &mut Quantile| { &mut m.value },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Quantile>(
            "Quantile",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Quantile {
    const NAME: &'static str = "Quantile";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                9 => {
                    self.quantile = ::std::option::Option::Some(is.read_double()?);
                },
                17 => {
                    self.value = ::std::option::Option::Some(is.read_double()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.quantile {
            my_size += 1 + 8;
        }
        if let Some(v) = self.value {
            my_size += 1 + 8;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.quantile {
            os.write_double(1, v)?;
        }
        if let Some(v) = self.value {
            os.write_double(2, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Quantile {
        Quantile::new()
    }

    fn clear(&mut self) {
        self.quantile = ::std::option::Option::None;
        self.value = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Quantile {
        static instance: Quantile = Quantile {
            quantile: ::std::option::Option::None,
            value: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Quantile {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Quantile").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Quantile {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Quantile {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Summary)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Summary {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Summary.sample_count)
    pub sample_count: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:io.prometheus.client.Summary.sample_sum)
    pub sample_sum: ::std::option::Option<f64>,
    // @@protoc_insertion_point(field:io.prometheus.client.Summary.quantile)
    pub quantile: ::std::vec::Vec<Quantile>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Summary.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Summary {
    fn default() -> &'a Summary {
        <Summary as ::protobuf::Message>::default_instance()
    }
}

impl Summary {
    pub fn new() -> Summary {
        ::std::default::Default::default()
    }

    // optional uint64 sample_count = 1;

    pub fn sample_count(&self) -> u64 {
        self.sample_count.unwrap_or(0)
    }

    pub fn clear_sample_count(&mut self) {
        self.sample_count = ::std::option::Option::None;
    }

    pub fn has_sample_count(&self) -> bool {
        self.sample_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_sample_count(&mut self, v: u64) {
        self.sample_count = ::std::option::Option::Some(v);
    }

    // optional double sample_sum = 2;

    pub fn sample_sum(&self) -> f64 {
        self.sample_sum.unwrap_or(0.)
    }

    pub fn clear_sample_sum(&mut self) {
        self.sample_sum = ::std::option::Option::None;
    }

    pub fn has_sample_sum(&self) -> bool {
        self.sample_sum.is_some()
    }

    // Param is passed by value, moved
    pub fn set_sample_sum(&mut self, v: f64) {
        self.sample_sum = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sample_count",
            |m: &Summary| { &m.sample_count },
            |m: &mut Summary| { &mut m.sample_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sample_sum",
            |m: &Summary| { &m.sample_sum },
            |m: &mut Summary| { &mut m.sample_sum },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "quantile",
            |m: &Summary| { &m.quantile },
            |m: &mut Summary| { &mut m.quantile },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Summary>(
            "Summary",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Summary {
    const NAME: &'static str = "Summary";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.sample_count = ::std::option::Option::Some(is.read_uint64()?);
                },
                17 => {
                    self.sample_sum = ::std::option::Option::Some(is.read_double()?);
                },
                26 => {
                    self.quantile.push(is.read_message()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.sample_count {
            my_size += ::protobuf::rt::uint64_size(1, v);
        }
        if let Some(v) = self.sample_sum {
            my_size += 1 + 8;
        }
        for value in &self.quantile {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.sample_count {
            os.write_uint64(1, v)?;
        }
        if let Some(v) = self.sample_sum {
            os.write_double(2, v)?;
        }
        for v in &self.quantile {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        };
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Summary {
        Summary::new()
    }

    fn clear(&mut self) {
        self.sample_count = ::std::option::Option::None;
        self.sample_sum = ::std::option::Option::None;
        self.quantile.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Summary {
        static instance: Summary = Summary {
            sample_count: ::std::option::Option::None,
            sample_sum: ::std::option::Option::None,
            quantile: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Summary {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Summary").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Summary {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Summary {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Untyped)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Untyped {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Untyped.value)
    pub value: ::std::option::Option<f64>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Untyped.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Untyped {
    fn default() -> &'a Untyped {
        <Untyped as ::protobuf::Message>::default_instance()
    }
}

impl Untyped {
    pub fn new() -> Untyped {
        ::std::default::Default::default()
    }

    // optional double value = 1;

    pub fn value(&self) -> f64 {
        self.value.unwrap_or(0.)
    }

    pub fn clear_value(&mut self) {
        self.value = ::std::option::Option::None;
    }

    pub fn has_value(&self) -> bool {
        self.value.is_some()
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: f64) {
        self.value = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &Untyped| { &m.value },
            |m: &mut Untyped| { &mut m.value },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Untyped>(
            "Untyped",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Untyped {
    const NAME: &'static str = "Untyped";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                9 => {
                    self.value = ::std::option::Option::Some(is.read_double()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.value {
            my_size += 1 + 8;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.value {
            os.write_double(1, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Untyped {
        Untyped::new()
    }

    fn clear(&mut self) {
        self.value = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Untyped {
        static instance: Untyped = Untyped {
            value: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Untyped {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Untyped").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Untyped {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Untyped {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Histogram)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Histogram {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Histogram.sample_count)
    pub sample_count: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:io.prometheus.client.Histogram.sample_sum)
    pub sample_sum: ::std::option::Option<f64>,
    // @@protoc_insertion_point(field:io.prometheus.client.Histogram.bucket)
    pub bucket: ::std::vec::Vec<Bucket>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Histogram.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Histogram {
    fn default() -> &'a Histogram {
        <Histogram as ::protobuf::Message>::default_instance()
    }
}

impl Histogram {
    pub fn new() -> Histogram {
        ::std::default::Default::default()
    }

    // optional uint64 sample_count = 1;

    pub fn sample_count(&self) -> u64 {
        self.sample_count.unwrap_or(0)
    }

    pub fn clear_sample_count(&mut self) {
        self.sample_count = ::std::option::Option::None;
    }

    pub fn has_sample_count(&self) -> bool {
        self.sample_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_sample_count(&mut self, v: u64) {
        self.sample_count = ::std::option::Option::Some(v);
    }

    // optional double sample_sum = 2;

    pub fn sample_sum(&self) -> f64 {
        self.sample_sum.unwrap_or(0.)
    }

    pub fn clear_sample_sum(&mut self) {
        self.sample_sum = ::std::option::Option::None;
    }

    pub fn has_sample_sum(&self) -> bool {
        self.sample_sum.is_some()
    }

    // Param is passed by value, moved
    pub fn set_sample_sum(&mut self, v: f64) {
        self.sample_sum = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sample_count",
            |m: &Histogram| { &m.sample_count },
            |m: &mut Histogram| { &mut m.sample_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sample_sum",
            |m: &Histogram| { &m.sample_sum },
            |m: &mut Histogram| { &mut m.sample_sum },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "bucket",
            |m: &Histogram| { &m.bucket },
            |m: &mut Histogram| { &mut m.bucket },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Histogram>(
            "Histogram",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Histogram {
    const NAME: &'static str = "Histogram";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.sample_count = ::std::option::Option::Some(is.read_uint64()?);
                },
                17 => {
                    self.sample_sum = ::std::option::Option::Some(is.read_double()?);
                },
                26 => {
                    self.bucket.push(is.read_message()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.sample_count {
            my_size += ::protobuf::rt::uint64_size(1, v);
        }
        if let Some(v) = self.sample_sum {
            my_size += 1 + 8;
        }
        for value in &self.bucket {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.sample_count {
            os.write_uint64(1, v)?;
        }
        if let Some(v) = self.sample_sum {
            os.write_double(2, v)?;
        }
        for v in &self.bucket {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        };
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Histogram {
        Histogram::new()
    }

    fn clear(&mut self) {
        self.sample_count = ::std::option::Option::None;
        self.sample_sum = ::std::option::Option::None;
        self.bucket.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Histogram {
        static instance: Histogram = Histogram {
            sample_count: ::std::option::Option::None,
            sample_sum: ::std::option::Option::None,
            bucket: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Histogram {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Histogram").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Histogram {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Histogram {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Bucket)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Bucket {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Bucket.cumulative_count)
    pub cumulative_count: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:io.prometheus.client.Bucket.upper_bound)
    pub upper_bound: ::std::option::Option<f64>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Bucket.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Bucket {
    fn default() -> &'a Bucket {
        <Bucket as ::protobuf::Message>::default_instance()
    }
}

impl Bucket {
    pub fn new() -> Bucket {
        ::std::default::Default::default()
    }

    // optional uint64 cumulative_count = 1;

    pub fn cumulative_count(&self) -> u64 {
        self.cumulative_count.unwrap_or(0)
    }

    pub fn clear_cumulative_count(&mut self) {
        self.cumulative_count = ::std::option::Option::None;
    }

    pub fn has_cumulative_count(&self) -> bool {
        self.cumulative_count.is_some()
    }

    // Param is passed by value, moved
    pub fn set_cumulative_count(&mut self, v: u64) {
        self.cumulative_count = ::std::option::Option::Some(v);
    }

    // optional double upper_bound = 2;

    pub fn upper_bound(&self) -> f64 {
        self.upper_bound.unwrap_or(0.)
    }

    pub fn clear_upper_bound(&mut self) {
        self.upper_bound = ::std::option::Option::None;
    }

    pub fn has_upper_bound(&self) -> bool {
        self.upper_bound.is_some()
    }

    // Param is passed by value, moved
    pub fn set_upper_bound(&mut self, v: f64) {
        self.upper_bound = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "cumulative_count",
            |m: &Bucket| { &m.cumulative_count },
            |m: &mut Bucket| { &mut m.cumulative_count },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "upper_bound",
            |m: &Bucket| { &m.upper_bound },
            |m: &mut Bucket| { &mut m.upper_bound },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Bucket>(
            "Bucket",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Bucket {
    const NAME: &'static str = "Bucket";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.cumulative_count = ::std::option::Option::Some(is.read_uint64()?);
                },
                17 => {
                    self.upper_bound = ::std::option::Option::Some(is.read_double()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.cumulative_count {
            my_size += ::protobuf::rt::uint64_size(1, v);
        }
        if let Some(v) = self.upper_bound {
            my_size += 1 + 8;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.cumulative_count {
            os.write_uint64(1, v)?;
        }
        if let Some(v) = self.upper_bound {
            os.write_double(2, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Bucket {
        Bucket::new()
    }

    fn clear(&mut self) {
        self.cumulative_count = ::std::option::Option::None;
        self.upper_bound = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Bucket {
        static instance: Bucket = Bucket {
            cumulative_count: ::std::option::Option::None,
            upper_bound: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Bucket {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Bucket").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Bucket {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Bucket {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.Metric)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Metric {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.label)
    pub label: ::std::vec::Vec<LabelPair>,
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.gauge)
    pub gauge: ::protobuf::MessageField<Gauge>,
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.counter)
    pub counter: ::protobuf::MessageField<Counter>,
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.summary)
    pub summary: ::protobuf::MessageField<Summary>,
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.untyped)
    pub untyped: ::protobuf::MessageField<Untyped>,
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.histogram)
    pub histogram: ::protobuf::MessageField<Histogram>,
    // @@protoc_insertion_point(field:io.prometheus.client.Metric.timestamp_ms)
    pub timestamp_ms: ::std::option::Option<i64>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.Metric.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a Metric {
    fn default() -> &'a Metric {
        <Metric as ::protobuf::Message>::default_instance()
    }
}

impl Metric {
    pub fn new() -> Metric {
        ::std::default::Default::default()
    }

    // optional int64 timestamp_ms = 6;

    pub fn timestamp_ms(&self) -> i64 {
        self.timestamp_ms.unwrap_or(0)
    }

    pub fn clear_timestamp_ms(&mut self) {
        self.timestamp_ms = ::std::option::Option::None;
    }

    pub fn has_timestamp_ms(&self) -> bool {
        self.timestamp_ms.is_some()
    }

    // Param is passed by value, moved
    pub fn set_timestamp_ms(&mut self, v: i64) {
        self.timestamp_ms = ::std::option::Option::Some(v);
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(7);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "label",
            |m: &Metric| { &m.label },
            |m: &mut Metric| { &mut m.label },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Gauge>(
            "gauge",
            |m: &Metric| { &m.gauge },
            |m: &mut Metric| { &mut m.gauge },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Counter>(
            "counter",
            |m: &Metric| { &m.counter },
            |m: &mut Metric| { &mut m.counter },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Summary>(
            "summary",
            |m: &Metric| { &m.summary },
            |m: &mut Metric| { &mut m.summary },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Untyped>(
            "untyped",
            |m: &Metric| { &m.untyped },
            |m: &mut Metric| { &mut m.untyped },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Histogram>(
            "histogram",
            |m: &Metric| { &m.histogram },
            |m: &mut Metric| { &mut m.histogram },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "timestamp_ms",
            |m: &Metric| { &m.timestamp_ms },
            |m: &mut Metric| { &mut m.timestamp_ms },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Metric>(
            "Metric",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for Metric {
    const NAME: &'static str = "Metric";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.label.push(is.read_message()?);
                },
                18 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.gauge)?;
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.counter)?;
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.summary)?;
                },
                42 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.untyped)?;
                },
                58 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.histogram)?;
                },
                48 => {
                    self.timestamp_ms = ::std::option::Option::Some(is.read_int64()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        for value in &self.label {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        if let Some(v) = self.gauge.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.counter.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.summary.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.untyped.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.histogram.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.timestamp_ms {
            my_size += ::protobuf::rt::int64_size(6, v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.label {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        if let Some(v) = self.gauge.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        }
        if let Some(v) = self.counter.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        }
        if let Some(v) = self.summary.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.untyped.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
        }
        if let Some(v) = self.histogram.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if let Some(v) = self.timestamp_ms {
            os.write_int64(6, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> Metric {
        Metric::new()
    }

    fn clear(&mut self) {
        self.label.clear();
        self.gauge.clear();
        self.counter.clear();
        self.summary.clear();
        self.untyped.clear();
        self.histogram.clear();
        self.timestamp_ms = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Metric {
        static instance: Metric = Metric {
            label: ::std::vec::Vec::new(),
            gauge: ::protobuf::MessageField::none(),
            counter: ::protobuf::MessageField::none(),
            summary: ::protobuf::MessageField::none(),
            untyped: ::protobuf::MessageField::none(),
            histogram: ::protobuf::MessageField::none(),
            timestamp_ms: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for Metric {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("Metric").unwrap()).clone()
    }
}

impl ::std::fmt::Display for Metric {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for Metric {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

// @@protoc_insertion_point(message:io.prometheus.client.MetricFamily)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MetricFamily {
    // message fields
    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.name)
    pub name: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.help)
    pub help: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.type)
    pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<MetricType>>,
    // @@protoc_insertion_point(field:io.prometheus.client.MetricFamily.metric)
    pub metric: ::std::vec::Vec<Metric>,
    // special fields
    // @@protoc_insertion_point(special_field:io.prometheus.client.MetricFamily.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a MetricFamily {
    fn default() -> &'a MetricFamily {
        <MetricFamily as ::protobuf::Message>::default_instance()
    }
}

impl MetricFamily {
    pub fn new() -> MetricFamily {
        ::std::default::Default::default()
    }

    // optional string name = 1;

    pub fn name(&self) -> &str {
        match self.name.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_name(&mut self) {
        self.name = ::std::option::Option::None;
    }

    pub fn has_name(&self) -> bool {
        self.name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        if self.name.is_none() {
            self.name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.name.as_mut().unwrap()
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        self.name.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional string help = 2;

    pub fn help(&self) -> &str {
        match self.help.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_help(&mut self) {
        self.help = ::std::option::Option::None;
    }

    pub fn has_help(&self) -> bool {
        self.help.is_some()
    }

    // Param is passed by value, moved
    pub fn set_help(&mut self, v: ::std::string::String) {
        self.help = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_help(&mut self) -> &mut ::std::string::String {
        if self.help.is_none() {
            self.help = ::std::option::Option::Some(::std::string::String::new());
        }
        self.help.as_mut().unwrap()
    }

    // Take field
    pub fn take_help(&mut self) -> ::std::string::String {
        self.help.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional .io.prometheus.client.MetricType type = 3;

    pub fn type_(&self) -> MetricType {
        match self.type_ {
            Some(e) => e.enum_value_or(MetricType::COUNTER),
            None => MetricType::COUNTER,
        }
    }

    pub fn clear_type_(&mut self) {
        self.type_ = ::std::option::Option::None;
    }

    pub fn has_type(&self) -> bool {
        self.type_.is_some()
    }

    // Param is passed by value, moved
    pub fn set_type(&mut self, v: MetricType) {
        self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "name",
            |m: &MetricFamily| { &m.name },
            |m: &mut MetricFamily| { &mut m.name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "help",
            |m: &MetricFamily| { &m.help },
            |m: &mut MetricFamily| { &mut m.help },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "type",
            |m: &MetricFamily| { &m.type_ },
            |m: &mut MetricFamily| { &mut m.type_ },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "metric",
            |m: &MetricFamily| { &m.metric },
            |m: &mut MetricFamily| { &mut m.metric },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MetricFamily>(
            "MetricFamily",
            fields,
            oneofs,
        )
    }
}

impl ::protobuf::Message for MetricFamily {
    const NAME: &'static str = "MetricFamily";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.name = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.help = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                },
                34 => {
                    self.metric.push(is.read_message()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.name.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.help.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.type_ {
            my_size += ::protobuf::rt::int32_size(3, v.value());
        }
        for value in &self.metric {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.name.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.help.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.type_ {
            os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?;
        }
        for v in &self.metric {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        };
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> MetricFamily {
        MetricFamily::new()
    }

    fn clear(&mut self) {
        self.name = ::std::option::Option::None;
        self.help = ::std::option::Option::None;
        self.type_ = ::std::option::Option::None;
        self.metric.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static MetricFamily {
        static instance: MetricFamily = MetricFamily {
            name: ::std::option::Option::None,
            help: ::std::option::Option::None,
            type_: ::std::option::Option::None,
            metric: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for MetricFamily {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("MetricFamily").unwrap()).clone()
    }
}

impl ::std::fmt::Display for MetricFamily {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for MetricFamily {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:io.prometheus.client.MetricType)
pub enum MetricType {
    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.COUNTER)
    COUNTER = 0,
    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.GAUGE)
    GAUGE = 1,
    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.SUMMARY)
    SUMMARY = 2,
    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.UNTYPED)
    UNTYPED = 3,
    // @@protoc_insertion_point(enum_value:io.prometheus.client.MetricType.HISTOGRAM)
    HISTOGRAM = 4,
}

impl ::protobuf::Enum for MetricType {
    const NAME: &'static str = "MetricType";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<MetricType> {
        match value {
            0 => ::std::option::Option::Some(MetricType::COUNTER),
            1 => ::std::option::Option::Some(MetricType::GAUGE),
            2 => ::std::option::Option::Some(MetricType::SUMMARY),
            3 => ::std::option::Option::Some(MetricType::UNTYPED),
            4 => ::std::option::Option::Some(MetricType::HISTOGRAM),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<MetricType> {
        match str {
            "COUNTER" => ::std::option::Option::Some(MetricType::COUNTER),
            "GAUGE" => ::std::option::Option::Some(MetricType::GAUGE),
            "SUMMARY" => ::std::option::Option::Some(MetricType::SUMMARY),
            "UNTYPED" => ::std::option::Option::Some(MetricType::UNTYPED),
            "HISTOGRAM" => ::std::option::Option::Some(MetricType::HISTOGRAM),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [MetricType] = &[
        MetricType::COUNTER,
        MetricType::GAUGE,
        MetricType::SUMMARY,
        MetricType::UNTYPED,
        MetricType::HISTOGRAM,
    ];
}

impl ::protobuf::EnumFull for MetricType {
    fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().enum_by_package_relative_name("MetricType").unwrap()).clone()
    }

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = *self as usize;
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for MetricType {
    fn default() -> Self {
        MetricType::COUNTER
    }
}

impl MetricType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<MetricType>("MetricType")
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x11proto_model.proto\x12\x14io.prometheus.client\"5\n\tLabelPair\x12\
    \x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x14\n\x05value\x18\x02\
    \x20\x01(\tR\x05value\"\x1d\n\x05Gauge\x12\x14\n\x05value\x18\x01\x20\
    \x01(\x01R\x05value\"\x1f\n\x07Counter\x12\x14\n\x05value\x18\x01\x20\
    \x01(\x01R\x05value\"<\n\x08Quantile\x12\x1a\n\x08quantile\x18\x01\x20\
    \x01(\x01R\x08quantile\x12\x14\n\x05value\x18\x02\x20\x01(\x01R\x05value\
    \"\x87\x01\n\x07Summary\x12!\n\x0csample_count\x18\x01\x20\x01(\x04R\x0b\
    sampleCount\x12\x1d\n\nsample_sum\x18\x02\x20\x01(\x01R\tsampleSum\x12:\
    \n\x08quantile\x18\x03\x20\x03(\x0b2\x1e.io.prometheus.client.QuantileR\
    \x08quantile\"\x1f\n\x07Untyped\x12\x14\n\x05value\x18\x01\x20\x01(\x01R\
    \x05value\"\x83\x01\n\tHistogram\x12!\n\x0csample_count\x18\x01\x20\x01(\
    \x04R\x0bsampleCount\x12\x1d\n\nsample_sum\x18\x02\x20\x01(\x01R\tsample\
    Sum\x124\n\x06bucket\x18\x03\x20\x03(\x0b2\x1c.io.prometheus.client.Buck\
    etR\x06bucket\"T\n\x06Bucket\x12)\n\x10cumulative_count\x18\x01\x20\x01(\
    \x04R\x0fcumulativeCount\x12\x1f\n\x0bupper_bound\x18\x02\x20\x01(\x01R\
    \nupperBound\"\xff\x02\n\x06Metric\x125\n\x05label\x18\x01\x20\x03(\x0b2\
    \x1f.io.prometheus.client.LabelPairR\x05label\x121\n\x05gauge\x18\x02\
    \x20\x01(\x0b2\x1b.io.prometheus.client.GaugeR\x05gauge\x127\n\x07counte\
    r\x18\x03\x20\x01(\x0b2\x1d.io.prometheus.client.CounterR\x07counter\x12\
    7\n\x07summary\x18\x04\x20\x01(\x0b2\x1d.io.prometheus.client.SummaryR\
    \x07summary\x127\n\x07untyped\x18\x05\x20\x01(\x0b2\x1d.io.prometheus.cl\
    ient.UntypedR\x07untyped\x12=\n\thistogram\x18\x07\x20\x01(\x0b2\x1f.io.\
    prometheus.client.HistogramR\thistogram\x12!\n\x0ctimestamp_ms\x18\x06\
    \x20\x01(\x03R\x0btimestampMs\"\xa2\x01\n\x0cMetricFamily\x12\x12\n\x04n\
    ame\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04help\x18\x02\x20\x01(\tR\
    \x04help\x124\n\x04type\x18\x03\x20\x01(\x0e2\x20.io.prometheus.client.M\
    etricTypeR\x04type\x124\n\x06metric\x18\x04\x20\x03(\x0b2\x1c.io.prometh\
    eus.client.MetricR\x06metric*M\n\nMetricType\x12\x0b\n\x07COUNTER\x10\0\
    \x12\t\n\x05GAUGE\x10\x01\x12\x0b\n\x07SUMMARY\x10\x02\x12\x0b\n\x07UNTY\
    PED\x10\x03\x12\r\n\tHISTOGRAM\x10\x04B\x16\n\x14io.prometheus.client\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(0);
            let mut messages = ::std::vec::Vec::with_capacity(10);
            messages.push(LabelPair::generated_message_descriptor_data());
            messages.push(Gauge::generated_message_descriptor_data());
            messages.push(Counter::generated_message_descriptor_data());
            messages.push(Quantile::generated_message_descriptor_data());
            messages.push(Summary::generated_message_descriptor_data());
            messages.push(Untyped::generated_message_descriptor_data());
            messages.push(Histogram::generated_message_descriptor_data());
            messages.push(Bucket::generated_message_descriptor_data());
            messages.push(Metric::generated_message_descriptor_data());
            messages.push(MetricFamily::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(MetricType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
