// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc
//
// SPDX-License-Identifier: Apache-2.0

// This file is generated by rust-protobuf 2.17.0. Do not edit
// @generated

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

#![allow(unused_attributes)]
#![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 `resourcemodule/resourcemodule.proto`

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

#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
pub struct ResourceReading {
    // message fields
    conductingEquipmentTerminalReading: ::protobuf::SingularPtrField<super::commonmodule::ConductingEquipmentTerminalReading>,
    phaseMMTN: ::protobuf::SingularPtrField<super::commonmodule::PhaseMMTN>,
    readingMMTR: ::protobuf::SingularPtrField<super::commonmodule::ReadingMMTR>,
    readingMMXU: ::protobuf::SingularPtrField<super::commonmodule::ReadingMMXU>,
    // 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 ResourceReading {
    fn default() -> &'a ResourceReading {
        <ResourceReading as ::protobuf::Message>::default_instance()
    }
}

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

    // .commonmodule.ConductingEquipmentTerminalReading conductingEquipmentTerminalReading = 1;


    pub fn get_conductingEquipmentTerminalReading(&self) -> &super::commonmodule::ConductingEquipmentTerminalReading {
        self.conductingEquipmentTerminalReading.as_ref().unwrap_or_else(|| <super::commonmodule::ConductingEquipmentTerminalReading as ::protobuf::Message>::default_instance())
    }
    pub fn clear_conductingEquipmentTerminalReading(&mut self) {
        self.conductingEquipmentTerminalReading.clear();
    }

    pub fn has_conductingEquipmentTerminalReading(&self) -> bool {
        self.conductingEquipmentTerminalReading.is_some()
    }

    // Param is passed by value, moved
    pub fn set_conductingEquipmentTerminalReading(&mut self, v: super::commonmodule::ConductingEquipmentTerminalReading) {
        self.conductingEquipmentTerminalReading = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_conductingEquipmentTerminalReading(&mut self) -> &mut super::commonmodule::ConductingEquipmentTerminalReading {
        if self.conductingEquipmentTerminalReading.is_none() {
            self.conductingEquipmentTerminalReading.set_default();
        }
        self.conductingEquipmentTerminalReading.as_mut().unwrap()
    }

    // Take field
    pub fn take_conductingEquipmentTerminalReading(&mut self) -> super::commonmodule::ConductingEquipmentTerminalReading {
        self.conductingEquipmentTerminalReading.take().unwrap_or_else(|| super::commonmodule::ConductingEquipmentTerminalReading::new())
    }

    // .commonmodule.PhaseMMTN phaseMMTN = 2;


    pub fn get_phaseMMTN(&self) -> &super::commonmodule::PhaseMMTN {
        self.phaseMMTN.as_ref().unwrap_or_else(|| <super::commonmodule::PhaseMMTN as ::protobuf::Message>::default_instance())
    }
    pub fn clear_phaseMMTN(&mut self) {
        self.phaseMMTN.clear();
    }

    pub fn has_phaseMMTN(&self) -> bool {
        self.phaseMMTN.is_some()
    }

    // Param is passed by value, moved
    pub fn set_phaseMMTN(&mut self, v: super::commonmodule::PhaseMMTN) {
        self.phaseMMTN = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_phaseMMTN(&mut self) -> &mut super::commonmodule::PhaseMMTN {
        if self.phaseMMTN.is_none() {
            self.phaseMMTN.set_default();
        }
        self.phaseMMTN.as_mut().unwrap()
    }

    // Take field
    pub fn take_phaseMMTN(&mut self) -> super::commonmodule::PhaseMMTN {
        self.phaseMMTN.take().unwrap_or_else(|| super::commonmodule::PhaseMMTN::new())
    }

    // .commonmodule.ReadingMMTR readingMMTR = 3;


    pub fn get_readingMMTR(&self) -> &super::commonmodule::ReadingMMTR {
        self.readingMMTR.as_ref().unwrap_or_else(|| <super::commonmodule::ReadingMMTR as ::protobuf::Message>::default_instance())
    }
    pub fn clear_readingMMTR(&mut self) {
        self.readingMMTR.clear();
    }

    pub fn has_readingMMTR(&self) -> bool {
        self.readingMMTR.is_some()
    }

    // Param is passed by value, moved
    pub fn set_readingMMTR(&mut self, v: super::commonmodule::ReadingMMTR) {
        self.readingMMTR = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_readingMMTR(&mut self) -> &mut super::commonmodule::ReadingMMTR {
        if self.readingMMTR.is_none() {
            self.readingMMTR.set_default();
        }
        self.readingMMTR.as_mut().unwrap()
    }

    // Take field
    pub fn take_readingMMTR(&mut self) -> super::commonmodule::ReadingMMTR {
        self.readingMMTR.take().unwrap_or_else(|| super::commonmodule::ReadingMMTR::new())
    }

    // .commonmodule.ReadingMMXU readingMMXU = 4;


    pub fn get_readingMMXU(&self) -> &super::commonmodule::ReadingMMXU {
        self.readingMMXU.as_ref().unwrap_or_else(|| <super::commonmodule::ReadingMMXU as ::protobuf::Message>::default_instance())
    }
    pub fn clear_readingMMXU(&mut self) {
        self.readingMMXU.clear();
    }

    pub fn has_readingMMXU(&self) -> bool {
        self.readingMMXU.is_some()
    }

    // Param is passed by value, moved
    pub fn set_readingMMXU(&mut self, v: super::commonmodule::ReadingMMXU) {
        self.readingMMXU = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_readingMMXU(&mut self) -> &mut super::commonmodule::ReadingMMXU {
        if self.readingMMXU.is_none() {
            self.readingMMXU.set_default();
        }
        self.readingMMXU.as_mut().unwrap()
    }

    // Take field
    pub fn take_readingMMXU(&mut self) -> super::commonmodule::ReadingMMXU {
        self.readingMMXU.take().unwrap_or_else(|| super::commonmodule::ReadingMMXU::new())
    }
}

impl ::protobuf::Message for ResourceReading {
    fn is_initialized(&self) -> bool {
        for v in &self.conductingEquipmentTerminalReading {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.phaseMMTN {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.readingMMTR {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.readingMMXU {
            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_singular_message_into(wire_type, is, &mut self.conductingEquipmentTerminalReading)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.phaseMMTN)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.readingMMTR)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.readingMMXU)?;
                },
                _ => {
                    ::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;
        if let Some(ref v) = self.conductingEquipmentTerminalReading.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.phaseMMTN.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.readingMMTR.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.readingMMXU.as_ref() {
            let len = v.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<()> {
        if let Some(ref v) = self.conductingEquipmentTerminalReading.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.phaseMMTN.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.readingMMTR.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.readingMMXU.as_ref() {
            os.write_tag(4, ::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() -> ResourceReading {
        ResourceReading::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::ConductingEquipmentTerminalReading>>(
                "conductingEquipmentTerminalReading",
                |m: &ResourceReading| { &m.conductingEquipmentTerminalReading },
                |m: &mut ResourceReading| { &mut m.conductingEquipmentTerminalReading },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::PhaseMMTN>>(
                "phaseMMTN",
                |m: &ResourceReading| { &m.phaseMMTN },
                |m: &mut ResourceReading| { &mut m.phaseMMTN },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::ReadingMMTR>>(
                "readingMMTR",
                |m: &ResourceReading| { &m.readingMMTR },
                |m: &mut ResourceReading| { &mut m.readingMMTR },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::ReadingMMXU>>(
                "readingMMXU",
                |m: &ResourceReading| { &m.readingMMXU },
                |m: &mut ResourceReading| { &mut m.readingMMXU },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ResourceReading>(
                "ResourceReading",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for ResourceReading {
    fn clear(&mut self) {
        self.conductingEquipmentTerminalReading.clear();
        self.phaseMMTN.clear();
        self.readingMMTR.clear();
        self.readingMMXU.clear();
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
pub struct ResourceReadingProfile {
    // message fields
    readingMessageInfo: ::protobuf::SingularPtrField<super::commonmodule::ReadingMessageInfo>,
    conductingEquipment: ::protobuf::SingularPtrField<super::commonmodule::ConductingEquipment>,
    ied: ::protobuf::SingularPtrField<super::commonmodule::IED>,
    resourceReading: ::protobuf::SingularPtrField<ResourceReading>,
    // 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 ResourceReadingProfile {
    fn default() -> &'a ResourceReadingProfile {
        <ResourceReadingProfile as ::protobuf::Message>::default_instance()
    }
}

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

    // .commonmodule.ReadingMessageInfo readingMessageInfo = 1;


    pub fn get_readingMessageInfo(&self) -> &super::commonmodule::ReadingMessageInfo {
        self.readingMessageInfo.as_ref().unwrap_or_else(|| <super::commonmodule::ReadingMessageInfo as ::protobuf::Message>::default_instance())
    }
    pub fn clear_readingMessageInfo(&mut self) {
        self.readingMessageInfo.clear();
    }

    pub fn has_readingMessageInfo(&self) -> bool {
        self.readingMessageInfo.is_some()
    }

    // Param is passed by value, moved
    pub fn set_readingMessageInfo(&mut self, v: super::commonmodule::ReadingMessageInfo) {
        self.readingMessageInfo = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_readingMessageInfo(&mut self) -> &mut super::commonmodule::ReadingMessageInfo {
        if self.readingMessageInfo.is_none() {
            self.readingMessageInfo.set_default();
        }
        self.readingMessageInfo.as_mut().unwrap()
    }

    // Take field
    pub fn take_readingMessageInfo(&mut self) -> super::commonmodule::ReadingMessageInfo {
        self.readingMessageInfo.take().unwrap_or_else(|| super::commonmodule::ReadingMessageInfo::new())
    }

    // .commonmodule.ConductingEquipment conductingEquipment = 2;


    pub fn get_conductingEquipment(&self) -> &super::commonmodule::ConductingEquipment {
        self.conductingEquipment.as_ref().unwrap_or_else(|| <super::commonmodule::ConductingEquipment as ::protobuf::Message>::default_instance())
    }
    pub fn clear_conductingEquipment(&mut self) {
        self.conductingEquipment.clear();
    }

    pub fn has_conductingEquipment(&self) -> bool {
        self.conductingEquipment.is_some()
    }

    // Param is passed by value, moved
    pub fn set_conductingEquipment(&mut self, v: super::commonmodule::ConductingEquipment) {
        self.conductingEquipment = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_conductingEquipment(&mut self) -> &mut super::commonmodule::ConductingEquipment {
        if self.conductingEquipment.is_none() {
            self.conductingEquipment.set_default();
        }
        self.conductingEquipment.as_mut().unwrap()
    }

    // Take field
    pub fn take_conductingEquipment(&mut self) -> super::commonmodule::ConductingEquipment {
        self.conductingEquipment.take().unwrap_or_else(|| super::commonmodule::ConductingEquipment::new())
    }

    // .commonmodule.IED ied = 3;


    pub fn get_ied(&self) -> &super::commonmodule::IED {
        self.ied.as_ref().unwrap_or_else(|| <super::commonmodule::IED as ::protobuf::Message>::default_instance())
    }
    pub fn clear_ied(&mut self) {
        self.ied.clear();
    }

    pub fn has_ied(&self) -> bool {
        self.ied.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ied(&mut self, v: super::commonmodule::IED) {
        self.ied = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_ied(&mut self) -> &mut super::commonmodule::IED {
        if self.ied.is_none() {
            self.ied.set_default();
        }
        self.ied.as_mut().unwrap()
    }

    // Take field
    pub fn take_ied(&mut self) -> super::commonmodule::IED {
        self.ied.take().unwrap_or_else(|| super::commonmodule::IED::new())
    }

    // .resourcemodule.ResourceReading resourceReading = 4;


    pub fn get_resourceReading(&self) -> &ResourceReading {
        self.resourceReading.as_ref().unwrap_or_else(|| <ResourceReading as ::protobuf::Message>::default_instance())
    }
    pub fn clear_resourceReading(&mut self) {
        self.resourceReading.clear();
    }

    pub fn has_resourceReading(&self) -> bool {
        self.resourceReading.is_some()
    }

    // Param is passed by value, moved
    pub fn set_resourceReading(&mut self, v: ResourceReading) {
        self.resourceReading = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_resourceReading(&mut self) -> &mut ResourceReading {
        if self.resourceReading.is_none() {
            self.resourceReading.set_default();
        }
        self.resourceReading.as_mut().unwrap()
    }

    // Take field
    pub fn take_resourceReading(&mut self) -> ResourceReading {
        self.resourceReading.take().unwrap_or_else(|| ResourceReading::new())
    }
}

impl ::protobuf::Message for ResourceReadingProfile {
    fn is_initialized(&self) -> bool {
        for v in &self.readingMessageInfo {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.conductingEquipment {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.ied {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.resourceReading {
            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_singular_message_into(wire_type, is, &mut self.readingMessageInfo)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.conductingEquipment)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ied)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.resourceReading)?;
                },
                _ => {
                    ::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;
        if let Some(ref v) = self.readingMessageInfo.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.conductingEquipment.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.ied.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.resourceReading.as_ref() {
            let len = v.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<()> {
        if let Some(ref v) = self.readingMessageInfo.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.conductingEquipment.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.ied.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.resourceReading.as_ref() {
            os.write_tag(4, ::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() -> ResourceReadingProfile {
        ResourceReadingProfile::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::ReadingMessageInfo>>(
                "readingMessageInfo",
                |m: &ResourceReadingProfile| { &m.readingMessageInfo },
                |m: &mut ResourceReadingProfile| { &mut m.readingMessageInfo },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::ConductingEquipment>>(
                "conductingEquipment",
                |m: &ResourceReadingProfile| { &m.conductingEquipment },
                |m: &mut ResourceReadingProfile| { &mut m.conductingEquipment },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::IED>>(
                "ied",
                |m: &ResourceReadingProfile| { &m.ied },
                |m: &mut ResourceReadingProfile| { &mut m.ied },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ResourceReading>>(
                "resourceReading",
                |m: &ResourceReadingProfile| { &m.resourceReading },
                |m: &mut ResourceReadingProfile| { &mut m.resourceReading },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ResourceReadingProfile>(
                "ResourceReadingProfile",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for ResourceReadingProfile {
    fn clear(&mut self) {
        self.readingMessageInfo.clear();
        self.conductingEquipment.clear();
        self.ied.clear();
        self.resourceReading.clear();
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
pub struct ResourceStatus {
    // message fields
    statusValue: ::protobuf::SingularPtrField<super::commonmodule::StatusValue>,
    analogStatusGGIO: ::protobuf::RepeatedField<super::commonmodule::AnalogStatusGGIO>,
    booleanStatusGGIO: ::protobuf::RepeatedField<super::commonmodule::BooleanStatusGGIO>,
    integerStatusGGIO: ::protobuf::RepeatedField<super::commonmodule::IntegerStatusGGIO>,
    stringStatusGGIO: ::protobuf::RepeatedField<super::commonmodule::StringStatusGGIO>,
    // 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 ResourceStatus {
    fn default() -> &'a ResourceStatus {
        <ResourceStatus as ::protobuf::Message>::default_instance()
    }
}

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

    // .commonmodule.StatusValue statusValue = 1;


    pub fn get_statusValue(&self) -> &super::commonmodule::StatusValue {
        self.statusValue.as_ref().unwrap_or_else(|| <super::commonmodule::StatusValue as ::protobuf::Message>::default_instance())
    }
    pub fn clear_statusValue(&mut self) {
        self.statusValue.clear();
    }

    pub fn has_statusValue(&self) -> bool {
        self.statusValue.is_some()
    }

    // Param is passed by value, moved
    pub fn set_statusValue(&mut self, v: super::commonmodule::StatusValue) {
        self.statusValue = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_statusValue(&mut self) -> &mut super::commonmodule::StatusValue {
        if self.statusValue.is_none() {
            self.statusValue.set_default();
        }
        self.statusValue.as_mut().unwrap()
    }

    // Take field
    pub fn take_statusValue(&mut self) -> super::commonmodule::StatusValue {
        self.statusValue.take().unwrap_or_else(|| super::commonmodule::StatusValue::new())
    }

    // repeated .commonmodule.AnalogStatusGGIO analogStatusGGIO = 2;


    pub fn get_analogStatusGGIO(&self) -> &[super::commonmodule::AnalogStatusGGIO] {
        &self.analogStatusGGIO
    }
    pub fn clear_analogStatusGGIO(&mut self) {
        self.analogStatusGGIO.clear();
    }

    // Param is passed by value, moved
    pub fn set_analogStatusGGIO(&mut self, v: ::protobuf::RepeatedField<super::commonmodule::AnalogStatusGGIO>) {
        self.analogStatusGGIO = v;
    }

    // Mutable pointer to the field.
    pub fn mut_analogStatusGGIO(&mut self) -> &mut ::protobuf::RepeatedField<super::commonmodule::AnalogStatusGGIO> {
        &mut self.analogStatusGGIO
    }

    // Take field
    pub fn take_analogStatusGGIO(&mut self) -> ::protobuf::RepeatedField<super::commonmodule::AnalogStatusGGIO> {
        ::std::mem::replace(&mut self.analogStatusGGIO, ::protobuf::RepeatedField::new())
    }

    // repeated .commonmodule.BooleanStatusGGIO booleanStatusGGIO = 3;


    pub fn get_booleanStatusGGIO(&self) -> &[super::commonmodule::BooleanStatusGGIO] {
        &self.booleanStatusGGIO
    }
    pub fn clear_booleanStatusGGIO(&mut self) {
        self.booleanStatusGGIO.clear();
    }

    // Param is passed by value, moved
    pub fn set_booleanStatusGGIO(&mut self, v: ::protobuf::RepeatedField<super::commonmodule::BooleanStatusGGIO>) {
        self.booleanStatusGGIO = v;
    }

    // Mutable pointer to the field.
    pub fn mut_booleanStatusGGIO(&mut self) -> &mut ::protobuf::RepeatedField<super::commonmodule::BooleanStatusGGIO> {
        &mut self.booleanStatusGGIO
    }

    // Take field
    pub fn take_booleanStatusGGIO(&mut self) -> ::protobuf::RepeatedField<super::commonmodule::BooleanStatusGGIO> {
        ::std::mem::replace(&mut self.booleanStatusGGIO, ::protobuf::RepeatedField::new())
    }

    // repeated .commonmodule.IntegerStatusGGIO integerStatusGGIO = 4;


    pub fn get_integerStatusGGIO(&self) -> &[super::commonmodule::IntegerStatusGGIO] {
        &self.integerStatusGGIO
    }
    pub fn clear_integerStatusGGIO(&mut self) {
        self.integerStatusGGIO.clear();
    }

    // Param is passed by value, moved
    pub fn set_integerStatusGGIO(&mut self, v: ::protobuf::RepeatedField<super::commonmodule::IntegerStatusGGIO>) {
        self.integerStatusGGIO = v;
    }

    // Mutable pointer to the field.
    pub fn mut_integerStatusGGIO(&mut self) -> &mut ::protobuf::RepeatedField<super::commonmodule::IntegerStatusGGIO> {
        &mut self.integerStatusGGIO
    }

    // Take field
    pub fn take_integerStatusGGIO(&mut self) -> ::protobuf::RepeatedField<super::commonmodule::IntegerStatusGGIO> {
        ::std::mem::replace(&mut self.integerStatusGGIO, ::protobuf::RepeatedField::new())
    }

    // repeated .commonmodule.StringStatusGGIO stringStatusGGIO = 5;


    pub fn get_stringStatusGGIO(&self) -> &[super::commonmodule::StringStatusGGIO] {
        &self.stringStatusGGIO
    }
    pub fn clear_stringStatusGGIO(&mut self) {
        self.stringStatusGGIO.clear();
    }

    // Param is passed by value, moved
    pub fn set_stringStatusGGIO(&mut self, v: ::protobuf::RepeatedField<super::commonmodule::StringStatusGGIO>) {
        self.stringStatusGGIO = v;
    }

    // Mutable pointer to the field.
    pub fn mut_stringStatusGGIO(&mut self) -> &mut ::protobuf::RepeatedField<super::commonmodule::StringStatusGGIO> {
        &mut self.stringStatusGGIO
    }

    // Take field
    pub fn take_stringStatusGGIO(&mut self) -> ::protobuf::RepeatedField<super::commonmodule::StringStatusGGIO> {
        ::std::mem::replace(&mut self.stringStatusGGIO, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for ResourceStatus {
    fn is_initialized(&self) -> bool {
        for v in &self.statusValue {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.analogStatusGGIO {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.booleanStatusGGIO {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.integerStatusGGIO {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.stringStatusGGIO {
            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_singular_message_into(wire_type, is, &mut self.statusValue)?;
                },
                2 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.analogStatusGGIO)?;
                },
                3 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.booleanStatusGGIO)?;
                },
                4 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.integerStatusGGIO)?;
                },
                5 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.stringStatusGGIO)?;
                },
                _ => {
                    ::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;
        if let Some(ref v) = self.statusValue.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        for value in &self.analogStatusGGIO {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.booleanStatusGGIO {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.integerStatusGGIO {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        for value in &self.stringStatusGGIO {
            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<()> {
        if let Some(ref v) = self.statusValue.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        for v in &self.analogStatusGGIO {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.booleanStatusGGIO {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.integerStatusGGIO {
            os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        for v in &self.stringStatusGGIO {
            os.write_tag(5, ::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() -> ResourceStatus {
        ResourceStatus::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::StatusValue>>(
                "statusValue",
                |m: &ResourceStatus| { &m.statusValue },
                |m: &mut ResourceStatus| { &mut m.statusValue },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::AnalogStatusGGIO>>(
                "analogStatusGGIO",
                |m: &ResourceStatus| { &m.analogStatusGGIO },
                |m: &mut ResourceStatus| { &mut m.analogStatusGGIO },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::BooleanStatusGGIO>>(
                "booleanStatusGGIO",
                |m: &ResourceStatus| { &m.booleanStatusGGIO },
                |m: &mut ResourceStatus| { &mut m.booleanStatusGGIO },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::IntegerStatusGGIO>>(
                "integerStatusGGIO",
                |m: &ResourceStatus| { &m.integerStatusGGIO },
                |m: &mut ResourceStatus| { &mut m.integerStatusGGIO },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::StringStatusGGIO>>(
                "stringStatusGGIO",
                |m: &ResourceStatus| { &m.stringStatusGGIO },
                |m: &mut ResourceStatus| { &mut m.stringStatusGGIO },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ResourceStatus>(
                "ResourceStatus",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for ResourceStatus {
    fn clear(&mut self) {
        self.statusValue.clear();
        self.analogStatusGGIO.clear();
        self.booleanStatusGGIO.clear();
        self.integerStatusGGIO.clear();
        self.stringStatusGGIO.clear();
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
#[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))]
pub struct ResourceStatusProfile {
    // message fields
    statusMessageInfo: ::protobuf::SingularPtrField<super::commonmodule::StatusMessageInfo>,
    conductingEquipment: ::protobuf::SingularPtrField<super::commonmodule::ConductingEquipment>,
    ied: ::protobuf::SingularPtrField<super::commonmodule::IED>,
    resourceStatus: ::protobuf::SingularPtrField<ResourceStatus>,
    // 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 ResourceStatusProfile {
    fn default() -> &'a ResourceStatusProfile {
        <ResourceStatusProfile as ::protobuf::Message>::default_instance()
    }
}

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

    // .commonmodule.StatusMessageInfo statusMessageInfo = 1;


    pub fn get_statusMessageInfo(&self) -> &super::commonmodule::StatusMessageInfo {
        self.statusMessageInfo.as_ref().unwrap_or_else(|| <super::commonmodule::StatusMessageInfo as ::protobuf::Message>::default_instance())
    }
    pub fn clear_statusMessageInfo(&mut self) {
        self.statusMessageInfo.clear();
    }

    pub fn has_statusMessageInfo(&self) -> bool {
        self.statusMessageInfo.is_some()
    }

    // Param is passed by value, moved
    pub fn set_statusMessageInfo(&mut self, v: super::commonmodule::StatusMessageInfo) {
        self.statusMessageInfo = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_statusMessageInfo(&mut self) -> &mut super::commonmodule::StatusMessageInfo {
        if self.statusMessageInfo.is_none() {
            self.statusMessageInfo.set_default();
        }
        self.statusMessageInfo.as_mut().unwrap()
    }

    // Take field
    pub fn take_statusMessageInfo(&mut self) -> super::commonmodule::StatusMessageInfo {
        self.statusMessageInfo.take().unwrap_or_else(|| super::commonmodule::StatusMessageInfo::new())
    }

    // .commonmodule.ConductingEquipment conductingEquipment = 2;


    pub fn get_conductingEquipment(&self) -> &super::commonmodule::ConductingEquipment {
        self.conductingEquipment.as_ref().unwrap_or_else(|| <super::commonmodule::ConductingEquipment as ::protobuf::Message>::default_instance())
    }
    pub fn clear_conductingEquipment(&mut self) {
        self.conductingEquipment.clear();
    }

    pub fn has_conductingEquipment(&self) -> bool {
        self.conductingEquipment.is_some()
    }

    // Param is passed by value, moved
    pub fn set_conductingEquipment(&mut self, v: super::commonmodule::ConductingEquipment) {
        self.conductingEquipment = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_conductingEquipment(&mut self) -> &mut super::commonmodule::ConductingEquipment {
        if self.conductingEquipment.is_none() {
            self.conductingEquipment.set_default();
        }
        self.conductingEquipment.as_mut().unwrap()
    }

    // Take field
    pub fn take_conductingEquipment(&mut self) -> super::commonmodule::ConductingEquipment {
        self.conductingEquipment.take().unwrap_or_else(|| super::commonmodule::ConductingEquipment::new())
    }

    // .commonmodule.IED ied = 3;


    pub fn get_ied(&self) -> &super::commonmodule::IED {
        self.ied.as_ref().unwrap_or_else(|| <super::commonmodule::IED as ::protobuf::Message>::default_instance())
    }
    pub fn clear_ied(&mut self) {
        self.ied.clear();
    }

    pub fn has_ied(&self) -> bool {
        self.ied.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ied(&mut self, v: super::commonmodule::IED) {
        self.ied = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_ied(&mut self) -> &mut super::commonmodule::IED {
        if self.ied.is_none() {
            self.ied.set_default();
        }
        self.ied.as_mut().unwrap()
    }

    // Take field
    pub fn take_ied(&mut self) -> super::commonmodule::IED {
        self.ied.take().unwrap_or_else(|| super::commonmodule::IED::new())
    }

    // .resourcemodule.ResourceStatus resourceStatus = 4;


    pub fn get_resourceStatus(&self) -> &ResourceStatus {
        self.resourceStatus.as_ref().unwrap_or_else(|| <ResourceStatus as ::protobuf::Message>::default_instance())
    }
    pub fn clear_resourceStatus(&mut self) {
        self.resourceStatus.clear();
    }

    pub fn has_resourceStatus(&self) -> bool {
        self.resourceStatus.is_some()
    }

    // Param is passed by value, moved
    pub fn set_resourceStatus(&mut self, v: ResourceStatus) {
        self.resourceStatus = ::protobuf::SingularPtrField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_resourceStatus(&mut self) -> &mut ResourceStatus {
        if self.resourceStatus.is_none() {
            self.resourceStatus.set_default();
        }
        self.resourceStatus.as_mut().unwrap()
    }

    // Take field
    pub fn take_resourceStatus(&mut self) -> ResourceStatus {
        self.resourceStatus.take().unwrap_or_else(|| ResourceStatus::new())
    }
}

impl ::protobuf::Message for ResourceStatusProfile {
    fn is_initialized(&self) -> bool {
        for v in &self.statusMessageInfo {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.conductingEquipment {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.ied {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.resourceStatus {
            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_singular_message_into(wire_type, is, &mut self.statusMessageInfo)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.conductingEquipment)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ied)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.resourceStatus)?;
                },
                _ => {
                    ::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;
        if let Some(ref v) = self.statusMessageInfo.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.conductingEquipment.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.ied.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        }
        if let Some(ref v) = self.resourceStatus.as_ref() {
            let len = v.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<()> {
        if let Some(ref v) = self.statusMessageInfo.as_ref() {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.conductingEquipment.as_ref() {
            os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.ied.as_ref() {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        }
        if let Some(ref v) = self.resourceStatus.as_ref() {
            os.write_tag(4, ::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() -> ResourceStatusProfile {
        ResourceStatusProfile::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_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::StatusMessageInfo>>(
                "statusMessageInfo",
                |m: &ResourceStatusProfile| { &m.statusMessageInfo },
                |m: &mut ResourceStatusProfile| { &mut m.statusMessageInfo },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::ConductingEquipment>>(
                "conductingEquipment",
                |m: &ResourceStatusProfile| { &m.conductingEquipment },
                |m: &mut ResourceStatusProfile| { &mut m.conductingEquipment },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::commonmodule::IED>>(
                "ied",
                |m: &ResourceStatusProfile| { &m.ied },
                |m: &mut ResourceStatusProfile| { &mut m.ied },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ResourceStatus>>(
                "resourceStatus",
                |m: &ResourceStatusProfile| { &m.resourceStatus },
                |m: &mut ResourceStatusProfile| { &mut m.resourceStatus },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ResourceStatusProfile>(
                "ResourceStatusProfile",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for ResourceStatusProfile {
    fn clear(&mut self) {
        self.statusMessageInfo.clear();
        self.conductingEquipment.clear();
        self.ied.clear();
        self.resourceStatus.clear();
        self.unknown_fields.clear();
    }
}

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n#resourcemodule/resourcemodule.proto\x12\x0eresourcemodule\"\xd3\x02\n\
    \x0fResourceReading\x12\x86\x01\n\"conductingEquipmentTerminalReading\
    \x18\x01\x20\x01(\x0b20.commonmodule.ConductingEquipmentTerminalReadingR\
    \"conductingEquipmentTerminalReadingB\x04\x80\xb5\x18\x01\x127\n\tphaseM\
    MTN\x18\x02\x20\x01(\x0b2\x17.commonmodule.PhaseMMTNR\tphaseMMTNB\0\x12=\
    \n\x0breadingMMTR\x18\x03\x20\x01(\x0b2\x19.commonmodule.ReadingMMTRR\
    \x0breadingMMTRB\0\x12=\n\x0breadingMMXU\x18\x04\x20\x01(\x0b2\x19.commo\
    nmodule.ReadingMMXUR\x0breadingMMXUB\0:\0\"\xd9\x02\n\x16ResourceReading\
    Profile\x12V\n\x12readingMessageInfo\x18\x01\x20\x01(\x0b2\x20.commonmod\
    ule.ReadingMessageInfoR\x12readingMessageInfoB\x04\x80\xb5\x18\x01\x12]\
    \n\x13conductingEquipment\x18\x02\x20\x01(\x0b2!.commonmodule.Conducting\
    EquipmentR\x13conductingEquipmentB\x08\x90\xb5\x18\x01\x88\xb5\x18\x01\
    \x12-\n\x03ied\x18\x03\x20\x01(\x0b2\x11.commonmodule.IEDR\x03iedB\x08\
    \x88\xb5\x18\x01\x90\xb5\x18\x01\x12S\n\x0fresourceReading\x18\x04\x20\
    \x01(\x0b2\x1f.resourcemodule.ResourceReadingR\x0fresourceReadingB\x08\
    \x88\xb5\x18\x01\x90\xb5\x18\x01:\x04\xc0\xf3\x18\x01\"\xa3\x03\n\x0eRes\
    ourceStatus\x12A\n\x0bstatusValue\x18\x01\x20\x01(\x0b2\x19.commonmodule\
    .StatusValueR\x0bstatusValueB\x04\x80\xb5\x18\x01\x12P\n\x10analogStatus\
    GGIO\x18\x02\x20\x03(\x0b2\x1e.commonmodule.AnalogStatusGGIOR\x10analogS\
    tatusGGIOB\x04\x90\xb5\x18\0\x12S\n\x11booleanStatusGGIO\x18\x03\x20\x03\
    (\x0b2\x1f.commonmodule.BooleanStatusGGIOR\x11booleanStatusGGIOB\x04\x90\
    \xb5\x18\0\x12S\n\x11integerStatusGGIO\x18\x04\x20\x03(\x0b2\x1f.commonm\
    odule.IntegerStatusGGIOR\x11integerStatusGGIOB\x04\x90\xb5\x18\0\x12P\n\
    \x10stringStatusGGIO\x18\x05\x20\x03(\x0b2\x1e.commonmodule.StringStatus\
    GGIOR\x10stringStatusGGIOB\x04\x90\xb5\x18\0:\0\"\xd2\x02\n\x15ResourceS\
    tatusProfile\x12S\n\x11statusMessageInfo\x18\x01\x20\x01(\x0b2\x1f.commo\
    nmodule.StatusMessageInfoR\x11statusMessageInfoB\x04\x80\xb5\x18\x01\x12\
    ]\n\x13conductingEquipment\x18\x02\x20\x01(\x0b2!.commonmodule.Conductin\
    gEquipmentR\x13conductingEquipmentB\x08\x90\xb5\x18\x01\x88\xb5\x18\x01\
    \x12-\n\x03ied\x18\x03\x20\x01(\x0b2\x11.commonmodule.IEDR\x03iedB\x08\
    \x90\xb5\x18\x01\x88\xb5\x18\x01\x12P\n\x0eresourceStatus\x18\x04\x20\
    \x01(\x0b2\x1e.resourcemodule.ResourceStatusR\x0eresourceStatusB\x08\x88\
    \xb5\x18\x01\x90\xb5\x18\x01:\x04\xc0\xf3\x18\x01B\0b\x06proto3\
";

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

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::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()
    })
}
