// This file is generated by rust-protobuf 2.24.1. Do not edit
// @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(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `opentelemetry/proto/collector/metrics/v1/metrics_service.proto`

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

#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct ExportMetricsServiceRequest {
    // message fields
    pub resource_metrics: ::protobuf::RepeatedField<super::metrics::ResourceMetrics>,
    // special fields
    #[cfg_attr(feature = "with-serde", serde(skip))]
    pub unknown_fields: ::protobuf::UnknownFields,
    #[cfg_attr(feature = "with-serde", serde(skip))]
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // repeated .opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1;


    pub fn get_resource_metrics(&self) -> &[super::metrics::ResourceMetrics] {
        &self.resource_metrics
    }
    pub fn clear_resource_metrics(&mut self) {
        self.resource_metrics.clear();
    }

    // Param is passed by value, moved
    pub fn set_resource_metrics(&mut self, v: ::protobuf::RepeatedField<super::metrics::ResourceMetrics>) {
        self.resource_metrics = v;
    }

    // Mutable pointer to the field.
    pub fn mut_resource_metrics(&mut self) -> &mut ::protobuf::RepeatedField<super::metrics::ResourceMetrics> {
        &mut self.resource_metrics
    }

    // Take field
    pub fn take_resource_metrics(&mut self) -> ::protobuf::RepeatedField<super::metrics::ResourceMetrics> {
        ::std::mem::replace(&mut self.resource_metrics, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for ExportMetricsServiceRequest {
    fn is_initialized(&self) -> bool {
        for v in &self.resource_metrics {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.resource_metrics)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        for value in &self.resource_metrics {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        for v in &self.resource_metrics {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::metrics::ResourceMetrics>>(
                "resource_metrics",
                |m: &ExportMetricsServiceRequest| { &m.resource_metrics },
                |m: &mut ExportMetricsServiceRequest| { &mut m.resource_metrics },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportMetricsServiceRequest>(
                "ExportMetricsServiceRequest",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ExportMetricsServiceRequest {
        static instance: ::protobuf::rt::LazyV2<ExportMetricsServiceRequest> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ExportMetricsServiceRequest::new)
    }
}

impl ::protobuf::Clear for ExportMetricsServiceRequest {
    fn clear(&mut self) {
        self.resource_metrics.clear();
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for ExportMetricsServiceRequest {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct ExportMetricsServiceResponse {
    // special fields
    #[cfg_attr(feature = "with-serde", serde(skip))]
    pub unknown_fields: ::protobuf::UnknownFields,
    #[cfg_attr(feature = "with-serde", serde(skip))]
    pub cached_size: ::protobuf::CachedSize,
}

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

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

impl ::protobuf::Message for ExportMetricsServiceResponse {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

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

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let fields = ::std::vec::Vec::new();
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportMetricsServiceResponse>(
                "ExportMetricsServiceResponse",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static ExportMetricsServiceResponse {
        static instance: ::protobuf::rt::LazyV2<ExportMetricsServiceResponse> = ::protobuf::rt::LazyV2::INIT;
        instance.get(ExportMetricsServiceResponse::new)
    }
}

impl ::protobuf::Clear for ExportMetricsServiceResponse {
    fn clear(&mut self) {
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for ExportMetricsServiceResponse {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n>opentelemetry/proto/collector/metrics/v1/metrics_service.proto\x12(op\
    entelemetry.proto.collector.metrics.v1\x1a,opentelemetry/proto/metrics/v\
    1/metrics.proto\"y\n\x1bExportMetricsServiceRequest\x12Z\n\x10resource_m\
    etrics\x18\x01\x20\x03(\x0b2/.opentelemetry.proto.metrics.v1.ResourceMet\
    ricsR\x0fresourceMetrics\"\x1e\n\x1cExportMetricsServiceResponse2\xac\
    \x01\n\x0eMetricsService\x12\x99\x01\n\x06Export\x12E.opentelemetry.prot\
    o.collector.metrics.v1.ExportMetricsServiceRequest\x1aF.opentelemetry.pr\
    oto.collector.metrics.v1.ExportMetricsServiceResponse\"\0B\x8f\x01\n+io.\
    opentelemetry.proto.collector.metrics.v1B\x13MetricsServiceProtoP\x01ZIg\
    ithub.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1\
    b\x06proto3\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}
