matrix-protos-rust 0.1.0

Rust protobuf bindings for interacting with matrix-io devices
Documentation
// This file is generated by rust-protobuf 2.25.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 `matrix_io/malos/v1/io.proto`

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

#[derive(PartialEq,Clone,Default)]
pub struct LedValue {
    // message fields
    pub red: u32,
    pub green: u32,
    pub blue: u32,
    pub white: u32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // uint32 red = 1;


    pub fn get_red(&self) -> u32 {
        self.red
    }
    pub fn clear_red(&mut self) {
        self.red = 0;
    }

    // Param is passed by value, moved
    pub fn set_red(&mut self, v: u32) {
        self.red = v;
    }

    // uint32 green = 2;


    pub fn get_green(&self) -> u32 {
        self.green
    }
    pub fn clear_green(&mut self) {
        self.green = 0;
    }

    // Param is passed by value, moved
    pub fn set_green(&mut self, v: u32) {
        self.green = v;
    }

    // uint32 blue = 3;


    pub fn get_blue(&self) -> u32 {
        self.blue
    }
    pub fn clear_blue(&mut self) {
        self.blue = 0;
    }

    // Param is passed by value, moved
    pub fn set_blue(&mut self, v: u32) {
        self.blue = v;
    }

    // uint32 white = 4;


    pub fn get_white(&self) -> u32 {
        self.white
    }
    pub fn clear_white(&mut self) {
        self.white = 0;
    }

    // Param is passed by value, moved
    pub fn set_white(&mut self, v: u32) {
        self.white = v;
    }
}

impl ::protobuf::Message for LedValue {
    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 {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.red = tmp;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.green = tmp;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.blue = tmp;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.white = tmp;
                },
                _ => {
                    ::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 self.red != 0 {
            my_size += ::protobuf::rt::value_size(1, self.red, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.green != 0 {
            my_size += ::protobuf::rt::value_size(2, self.green, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.blue != 0 {
            my_size += ::protobuf::rt::value_size(3, self.blue, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.white != 0 {
            my_size += ::protobuf::rt::value_size(4, self.white, ::protobuf::wire_format::WireTypeVarint);
        }
        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 self.red != 0 {
            os.write_uint32(1, self.red)?;
        }
        if self.green != 0 {
            os.write_uint32(2, self.green)?;
        }
        if self.blue != 0 {
            os.write_uint32(3, self.blue)?;
        }
        if self.white != 0 {
            os.write_uint32(4, self.white)?;
        }
        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() -> LedValue {
        LedValue::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "red",
                |m: &LedValue| { &m.red },
                |m: &mut LedValue| { &mut m.red },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "green",
                |m: &LedValue| { &m.green },
                |m: &mut LedValue| { &mut m.green },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "blue",
                |m: &LedValue| { &m.blue },
                |m: &mut LedValue| { &mut m.blue },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "white",
                |m: &LedValue| { &m.white },
                |m: &mut LedValue| { &mut m.white },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<LedValue>(
                "LedValue",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for LedValue {
    fn clear(&mut self) {
        self.red = 0;
        self.green = 0;
        self.blue = 0;
        self.white = 0;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
pub struct EverloopImage {
    // message fields
    pub led: ::protobuf::RepeatedField<LedValue>,
    pub everloop_length: i32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // repeated .matrix_io.malos.v1.io.LedValue led = 1;


    pub fn get_led(&self) -> &[LedValue] {
        &self.led
    }
    pub fn clear_led(&mut self) {
        self.led.clear();
    }

    // Param is passed by value, moved
    pub fn set_led(&mut self, v: ::protobuf::RepeatedField<LedValue>) {
        self.led = v;
    }

    // Mutable pointer to the field.
    pub fn mut_led(&mut self) -> &mut ::protobuf::RepeatedField<LedValue> {
        &mut self.led
    }

    // Take field
    pub fn take_led(&mut self) -> ::protobuf::RepeatedField<LedValue> {
        ::std::mem::replace(&mut self.led, ::protobuf::RepeatedField::new())
    }

    // int32 everloop_length = 2;


    pub fn get_everloop_length(&self) -> i32 {
        self.everloop_length
    }
    pub fn clear_everloop_length(&mut self) {
        self.everloop_length = 0;
    }

    // Param is passed by value, moved
    pub fn set_everloop_length(&mut self, v: i32) {
        self.everloop_length = v;
    }
}

impl ::protobuf::Message for EverloopImage {
    fn is_initialized(&self) -> bool {
        for v in &self.led {
            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.led)?;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.everloop_length = tmp;
                },
                _ => {
                    ::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.led {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if self.everloop_length != 0 {
            my_size += ::protobuf::rt::value_size(2, self.everloop_length, ::protobuf::wire_format::WireTypeVarint);
        }
        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.led {
            os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if self.everloop_length != 0 {
            os.write_int32(2, self.everloop_length)?;
        }
        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() -> EverloopImage {
        EverloopImage::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<LedValue>>(
                "led",
                |m: &EverloopImage| { &m.led },
                |m: &mut EverloopImage| { &mut m.led },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "everloop_length",
                |m: &EverloopImage| { &m.everloop_length },
                |m: &mut EverloopImage| { &mut m.everloop_length },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<EverloopImage>(
                "EverloopImage",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for EverloopImage {
    fn clear(&mut self) {
        self.led.clear();
        self.everloop_length = 0;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
pub struct ServoParams {
    // message fields
    pub pin: u32,
    pub angle: u32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // uint32 pin = 1;


    pub fn get_pin(&self) -> u32 {
        self.pin
    }
    pub fn clear_pin(&mut self) {
        self.pin = 0;
    }

    // Param is passed by value, moved
    pub fn set_pin(&mut self, v: u32) {
        self.pin = v;
    }

    // uint32 angle = 2;


    pub fn get_angle(&self) -> u32 {
        self.angle
    }
    pub fn clear_angle(&mut self) {
        self.angle = 0;
    }

    // Param is passed by value, moved
    pub fn set_angle(&mut self, v: u32) {
        self.angle = v;
    }
}

impl ::protobuf::Message for ServoParams {
    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 {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.pin = tmp;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.angle = tmp;
                },
                _ => {
                    ::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 self.pin != 0 {
            my_size += ::protobuf::rt::value_size(1, self.pin, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.angle != 0 {
            my_size += ::protobuf::rt::value_size(2, self.angle, ::protobuf::wire_format::WireTypeVarint);
        }
        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 self.pin != 0 {
            os.write_uint32(1, self.pin)?;
        }
        if self.angle != 0 {
            os.write_uint32(2, self.angle)?;
        }
        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() -> ServoParams {
        ServoParams::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "pin",
                |m: &ServoParams| { &m.pin },
                |m: &mut ServoParams| { &mut m.pin },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "angle",
                |m: &ServoParams| { &m.angle },
                |m: &mut ServoParams| { &mut m.angle },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ServoParams>(
                "ServoParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for ServoParams {
    fn clear(&mut self) {
        self.pin = 0;
        self.angle = 0;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
pub struct GpioParams {
    // message fields
    pub pin: u32,
    pub mode: GpioParams_EnumMode,
    pub value: u32,
    pub values: u32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // uint32 pin = 1;


    pub fn get_pin(&self) -> u32 {
        self.pin
    }
    pub fn clear_pin(&mut self) {
        self.pin = 0;
    }

    // Param is passed by value, moved
    pub fn set_pin(&mut self, v: u32) {
        self.pin = v;
    }

    // .matrix_io.malos.v1.io.GpioParams.EnumMode mode = 2;


    pub fn get_mode(&self) -> GpioParams_EnumMode {
        self.mode
    }
    pub fn clear_mode(&mut self) {
        self.mode = GpioParams_EnumMode::INPUT;
    }

    // Param is passed by value, moved
    pub fn set_mode(&mut self, v: GpioParams_EnumMode) {
        self.mode = v;
    }

    // uint32 value = 3;


    pub fn get_value(&self) -> u32 {
        self.value
    }
    pub fn clear_value(&mut self) {
        self.value = 0;
    }

    // Param is passed by value, moved
    pub fn set_value(&mut self, v: u32) {
        self.value = v;
    }

    // uint32 values = 4;


    pub fn get_values(&self) -> u32 {
        self.values
    }
    pub fn clear_values(&mut self) {
        self.values = 0;
    }

    // Param is passed by value, moved
    pub fn set_values(&mut self, v: u32) {
        self.values = v;
    }
}

impl ::protobuf::Message for GpioParams {
    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 {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.pin = tmp;
                },
                2 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.mode, 2, &mut self.unknown_fields)?
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.value = tmp;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.values = tmp;
                },
                _ => {
                    ::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 self.pin != 0 {
            my_size += ::protobuf::rt::value_size(1, self.pin, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.mode != GpioParams_EnumMode::INPUT {
            my_size += ::protobuf::rt::enum_size(2, self.mode);
        }
        if self.value != 0 {
            my_size += ::protobuf::rt::value_size(3, self.value, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.values != 0 {
            my_size += ::protobuf::rt::value_size(4, self.values, ::protobuf::wire_format::WireTypeVarint);
        }
        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 self.pin != 0 {
            os.write_uint32(1, self.pin)?;
        }
        if self.mode != GpioParams_EnumMode::INPUT {
            os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.mode))?;
        }
        if self.value != 0 {
            os.write_uint32(3, self.value)?;
        }
        if self.values != 0 {
            os.write_uint32(4, self.values)?;
        }
        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() -> GpioParams {
        GpioParams::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "pin",
                |m: &GpioParams| { &m.pin },
                |m: &mut GpioParams| { &mut m.pin },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<GpioParams_EnumMode>>(
                "mode",
                |m: &GpioParams| { &m.mode },
                |m: &mut GpioParams| { &mut m.mode },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "value",
                |m: &GpioParams| { &m.value },
                |m: &mut GpioParams| { &mut m.value },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "values",
                |m: &GpioParams| { &m.values },
                |m: &mut GpioParams| { &mut m.values },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<GpioParams>(
                "GpioParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for GpioParams {
    fn clear(&mut self) {
        self.pin = 0;
        self.mode = GpioParams_EnumMode::INPUT;
        self.value = 0;
        self.values = 0;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum GpioParams_EnumMode {
    INPUT = 0,
    OUTPUT = 1,
}

impl ::protobuf::ProtobufEnum for GpioParams_EnumMode {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<GpioParams_EnumMode> {
        match value {
            0 => ::std::option::Option::Some(GpioParams_EnumMode::INPUT),
            1 => ::std::option::Option::Some(GpioParams_EnumMode::OUTPUT),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [GpioParams_EnumMode] = &[
            GpioParams_EnumMode::INPUT,
            GpioParams_EnumMode::OUTPUT,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<GpioParams_EnumMode>("GpioParams.EnumMode", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for GpioParams_EnumMode {
}

impl ::std::default::Default for GpioParams_EnumMode {
    fn default() -> Self {
        GpioParams_EnumMode::INPUT
    }
}

impl ::protobuf::reflect::ProtobufValue for GpioParams_EnumMode {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct MicArrayParams {
    // message fields
    pub gain: i32,
    pub azimutal_angle: f32,
    pub polar_angle: f32,
    pub radial_distance_mm: f32,
    pub sound_speed_mmseg: f32,
    pub sampling_frequency_hz: u32,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // int32 gain = 1;


    pub fn get_gain(&self) -> i32 {
        self.gain
    }
    pub fn clear_gain(&mut self) {
        self.gain = 0;
    }

    // Param is passed by value, moved
    pub fn set_gain(&mut self, v: i32) {
        self.gain = v;
    }

    // float azimutal_angle = 2;


    pub fn get_azimutal_angle(&self) -> f32 {
        self.azimutal_angle
    }
    pub fn clear_azimutal_angle(&mut self) {
        self.azimutal_angle = 0.;
    }

    // Param is passed by value, moved
    pub fn set_azimutal_angle(&mut self, v: f32) {
        self.azimutal_angle = v;
    }

    // float polar_angle = 3;


    pub fn get_polar_angle(&self) -> f32 {
        self.polar_angle
    }
    pub fn clear_polar_angle(&mut self) {
        self.polar_angle = 0.;
    }

    // Param is passed by value, moved
    pub fn set_polar_angle(&mut self, v: f32) {
        self.polar_angle = v;
    }

    // float radial_distance_mm = 4;


    pub fn get_radial_distance_mm(&self) -> f32 {
        self.radial_distance_mm
    }
    pub fn clear_radial_distance_mm(&mut self) {
        self.radial_distance_mm = 0.;
    }

    // Param is passed by value, moved
    pub fn set_radial_distance_mm(&mut self, v: f32) {
        self.radial_distance_mm = v;
    }

    // float sound_speed_mmseg = 5;


    pub fn get_sound_speed_mmseg(&self) -> f32 {
        self.sound_speed_mmseg
    }
    pub fn clear_sound_speed_mmseg(&mut self) {
        self.sound_speed_mmseg = 0.;
    }

    // Param is passed by value, moved
    pub fn set_sound_speed_mmseg(&mut self, v: f32) {
        self.sound_speed_mmseg = v;
    }

    // uint32 sampling_frequency_hz = 6;


    pub fn get_sampling_frequency_hz(&self) -> u32 {
        self.sampling_frequency_hz
    }
    pub fn clear_sampling_frequency_hz(&mut self) {
        self.sampling_frequency_hz = 0;
    }

    // Param is passed by value, moved
    pub fn set_sampling_frequency_hz(&mut self, v: u32) {
        self.sampling_frequency_hz = v;
    }
}

impl ::protobuf::Message for MicArrayParams {
    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 {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_int32()?;
                    self.gain = tmp;
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.azimutal_angle = tmp;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.polar_angle = tmp;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.radial_distance_mm = tmp;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.sound_speed_mmseg = tmp;
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.sampling_frequency_hz = tmp;
                },
                _ => {
                    ::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 self.gain != 0 {
            my_size += ::protobuf::rt::value_size(1, self.gain, ::protobuf::wire_format::WireTypeVarint);
        }
        if self.azimutal_angle != 0. {
            my_size += 5;
        }
        if self.polar_angle != 0. {
            my_size += 5;
        }
        if self.radial_distance_mm != 0. {
            my_size += 5;
        }
        if self.sound_speed_mmseg != 0. {
            my_size += 5;
        }
        if self.sampling_frequency_hz != 0 {
            my_size += ::protobuf::rt::value_size(6, self.sampling_frequency_hz, ::protobuf::wire_format::WireTypeVarint);
        }
        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 self.gain != 0 {
            os.write_int32(1, self.gain)?;
        }
        if self.azimutal_angle != 0. {
            os.write_float(2, self.azimutal_angle)?;
        }
        if self.polar_angle != 0. {
            os.write_float(3, self.polar_angle)?;
        }
        if self.radial_distance_mm != 0. {
            os.write_float(4, self.radial_distance_mm)?;
        }
        if self.sound_speed_mmseg != 0. {
            os.write_float(5, self.sound_speed_mmseg)?;
        }
        if self.sampling_frequency_hz != 0 {
            os.write_uint32(6, self.sampling_frequency_hz)?;
        }
        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() -> MicArrayParams {
        MicArrayParams::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
                "gain",
                |m: &MicArrayParams| { &m.gain },
                |m: &mut MicArrayParams| { &mut m.gain },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "azimutal_angle",
                |m: &MicArrayParams| { &m.azimutal_angle },
                |m: &mut MicArrayParams| { &mut m.azimutal_angle },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "polar_angle",
                |m: &MicArrayParams| { &m.polar_angle },
                |m: &mut MicArrayParams| { &mut m.polar_angle },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "radial_distance_mm",
                |m: &MicArrayParams| { &m.radial_distance_mm },
                |m: &mut MicArrayParams| { &mut m.radial_distance_mm },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "sound_speed_mmseg",
                |m: &MicArrayParams| { &m.sound_speed_mmseg },
                |m: &mut MicArrayParams| { &mut m.sound_speed_mmseg },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "sampling_frequency_hz",
                |m: &MicArrayParams| { &m.sampling_frequency_hz },
                |m: &mut MicArrayParams| { &mut m.sampling_frequency_hz },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<MicArrayParams>(
                "MicArrayParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for MicArrayParams {
    fn clear(&mut self) {
        self.gain = 0;
        self.azimutal_angle = 0.;
        self.polar_angle = 0.;
        self.radial_distance_mm = 0.;
        self.sound_speed_mmseg = 0.;
        self.sampling_frequency_hz = 0;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(PartialEq,Clone,Default)]
pub struct WakeWordParams {
    // message fields
    pub wake_word: ::std::string::String,
    pub channel: WakeWordParams_MicChannel,
    pub lm_path: ::std::string::String,
    pub dic_path: ::std::string::String,
    pub enable_verbose: bool,
    pub stop_recognition: bool,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // string wake_word = 1;


    pub fn get_wake_word(&self) -> &str {
        &self.wake_word
    }
    pub fn clear_wake_word(&mut self) {
        self.wake_word.clear();
    }

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

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_wake_word(&mut self) -> &mut ::std::string::String {
        &mut self.wake_word
    }

    // Take field
    pub fn take_wake_word(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.wake_word, ::std::string::String::new())
    }

    // .matrix_io.malos.v1.io.WakeWordParams.MicChannel channel = 2;


    pub fn get_channel(&self) -> WakeWordParams_MicChannel {
        self.channel
    }
    pub fn clear_channel(&mut self) {
        self.channel = WakeWordParams_MicChannel::channel0;
    }

    // Param is passed by value, moved
    pub fn set_channel(&mut self, v: WakeWordParams_MicChannel) {
        self.channel = v;
    }

    // string lm_path = 3;


    pub fn get_lm_path(&self) -> &str {
        &self.lm_path
    }
    pub fn clear_lm_path(&mut self) {
        self.lm_path.clear();
    }

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

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_lm_path(&mut self) -> &mut ::std::string::String {
        &mut self.lm_path
    }

    // Take field
    pub fn take_lm_path(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.lm_path, ::std::string::String::new())
    }

    // string dic_path = 4;


    pub fn get_dic_path(&self) -> &str {
        &self.dic_path
    }
    pub fn clear_dic_path(&mut self) {
        self.dic_path.clear();
    }

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

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_dic_path(&mut self) -> &mut ::std::string::String {
        &mut self.dic_path
    }

    // Take field
    pub fn take_dic_path(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.dic_path, ::std::string::String::new())
    }

    // bool enable_verbose = 5;


    pub fn get_enable_verbose(&self) -> bool {
        self.enable_verbose
    }
    pub fn clear_enable_verbose(&mut self) {
        self.enable_verbose = false;
    }

    // Param is passed by value, moved
    pub fn set_enable_verbose(&mut self, v: bool) {
        self.enable_verbose = v;
    }

    // bool stop_recognition = 6;


    pub fn get_stop_recognition(&self) -> bool {
        self.stop_recognition
    }
    pub fn clear_stop_recognition(&mut self) {
        self.stop_recognition = false;
    }

    // Param is passed by value, moved
    pub fn set_stop_recognition(&mut self, v: bool) {
        self.stop_recognition = v;
    }
}

impl ::protobuf::Message for WakeWordParams {
    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 {
                1 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.wake_word)?;
                },
                2 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.channel, 2, &mut self.unknown_fields)?
                },
                3 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.lm_path)?;
                },
                4 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.dic_path)?;
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.enable_verbose = tmp;
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.stop_recognition = tmp;
                },
                _ => {
                    ::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 !self.wake_word.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.wake_word);
        }
        if self.channel != WakeWordParams_MicChannel::channel0 {
            my_size += ::protobuf::rt::enum_size(2, self.channel);
        }
        if !self.lm_path.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.lm_path);
        }
        if !self.dic_path.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.dic_path);
        }
        if self.enable_verbose != false {
            my_size += 2;
        }
        if self.stop_recognition != false {
            my_size += 2;
        }
        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 !self.wake_word.is_empty() {
            os.write_string(1, &self.wake_word)?;
        }
        if self.channel != WakeWordParams_MicChannel::channel0 {
            os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.channel))?;
        }
        if !self.lm_path.is_empty() {
            os.write_string(3, &self.lm_path)?;
        }
        if !self.dic_path.is_empty() {
            os.write_string(4, &self.dic_path)?;
        }
        if self.enable_verbose != false {
            os.write_bool(5, self.enable_verbose)?;
        }
        if self.stop_recognition != false {
            os.write_bool(6, self.stop_recognition)?;
        }
        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() -> WakeWordParams {
        WakeWordParams::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "wake_word",
                |m: &WakeWordParams| { &m.wake_word },
                |m: &mut WakeWordParams| { &mut m.wake_word },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<WakeWordParams_MicChannel>>(
                "channel",
                |m: &WakeWordParams| { &m.channel },
                |m: &mut WakeWordParams| { &mut m.channel },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "lm_path",
                |m: &WakeWordParams| { &m.lm_path },
                |m: &mut WakeWordParams| { &mut m.lm_path },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "dic_path",
                |m: &WakeWordParams| { &m.dic_path },
                |m: &mut WakeWordParams| { &mut m.dic_path },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "enable_verbose",
                |m: &WakeWordParams| { &m.enable_verbose },
                |m: &mut WakeWordParams| { &mut m.enable_verbose },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "stop_recognition",
                |m: &WakeWordParams| { &m.stop_recognition },
                |m: &mut WakeWordParams| { &mut m.stop_recognition },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<WakeWordParams>(
                "WakeWordParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for WakeWordParams {
    fn clear(&mut self) {
        self.wake_word.clear();
        self.channel = WakeWordParams_MicChannel::channel0;
        self.lm_path.clear();
        self.dic_path.clear();
        self.enable_verbose = false;
        self.stop_recognition = false;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum WakeWordParams_MicChannel {
    channel0 = 0,
    channel1 = 1,
    channel2 = 2,
    channel3 = 3,
    channel4 = 4,
    channel5 = 5,
    channel6 = 6,
    channel7 = 7,
    channel8 = 8,
}

impl ::protobuf::ProtobufEnum for WakeWordParams_MicChannel {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<WakeWordParams_MicChannel> {
        match value {
            0 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel0),
            1 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel1),
            2 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel2),
            3 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel3),
            4 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel4),
            5 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel5),
            6 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel6),
            7 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel7),
            8 => ::std::option::Option::Some(WakeWordParams_MicChannel::channel8),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [WakeWordParams_MicChannel] = &[
            WakeWordParams_MicChannel::channel0,
            WakeWordParams_MicChannel::channel1,
            WakeWordParams_MicChannel::channel2,
            WakeWordParams_MicChannel::channel3,
            WakeWordParams_MicChannel::channel4,
            WakeWordParams_MicChannel::channel5,
            WakeWordParams_MicChannel::channel6,
            WakeWordParams_MicChannel::channel7,
            WakeWordParams_MicChannel::channel8,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<WakeWordParams_MicChannel>("WakeWordParams.MicChannel", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for WakeWordParams_MicChannel {
}

impl ::std::default::Default for WakeWordParams_MicChannel {
    fn default() -> Self {
        WakeWordParams_MicChannel::channel0
    }
}

impl ::protobuf::reflect::ProtobufValue for WakeWordParams_MicChannel {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct MatrixDeviceParams {
    // message fields
    pub device_type: EnumMatrixDeviceType,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // .matrix_io.malos.v1.io.EnumMatrixDeviceType device_type = 1;


    pub fn get_device_type(&self) -> EnumMatrixDeviceType {
        self.device_type
    }
    pub fn clear_device_type(&mut self) {
        self.device_type = EnumMatrixDeviceType::UNDETECTED;
    }

    // Param is passed by value, moved
    pub fn set_device_type(&mut self, v: EnumMatrixDeviceType) {
        self.device_type = v;
    }
}

impl ::protobuf::Message for MatrixDeviceParams {
    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 {
                1 => {
                    ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.device_type, 1, &mut self.unknown_fields)?
                },
                _ => {
                    ::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 self.device_type != EnumMatrixDeviceType::UNDETECTED {
            my_size += ::protobuf::rt::enum_size(1, self.device_type);
        }
        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 self.device_type != EnumMatrixDeviceType::UNDETECTED {
            os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.device_type))?;
        }
        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() -> MatrixDeviceParams {
        MatrixDeviceParams::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<EnumMatrixDeviceType>>(
                "device_type",
                |m: &MatrixDeviceParams| { &m.device_type },
                |m: &mut MatrixDeviceParams| { &mut m.device_type },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<MatrixDeviceParams>(
                "MatrixDeviceParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for MatrixDeviceParams {
    fn clear(&mut self) {
        self.device_type = EnumMatrixDeviceType::UNDETECTED;
        self.unknown_fields.clear();
    }
}

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

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

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum EnumMatrixDeviceType {
    UNDETECTED = 0,
    CREATOR = 1,
    VOICE = 2,
}

impl ::protobuf::ProtobufEnum for EnumMatrixDeviceType {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<EnumMatrixDeviceType> {
        match value {
            0 => ::std::option::Option::Some(EnumMatrixDeviceType::UNDETECTED),
            1 => ::std::option::Option::Some(EnumMatrixDeviceType::CREATOR),
            2 => ::std::option::Option::Some(EnumMatrixDeviceType::VOICE),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [EnumMatrixDeviceType] = &[
            EnumMatrixDeviceType::UNDETECTED,
            EnumMatrixDeviceType::CREATOR,
            EnumMatrixDeviceType::VOICE,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<EnumMatrixDeviceType>("EnumMatrixDeviceType", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for EnumMatrixDeviceType {
}

impl ::std::default::Default for EnumMatrixDeviceType {
    fn default() -> Self {
        EnumMatrixDeviceType::UNDETECTED
    }
}

impl ::protobuf::reflect::ProtobufValue for EnumMatrixDeviceType {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x1bmatrix_io/malos/v1/io.proto\x12\x15matrix_io.malos.v1.io\"f\n\x08L\
    edValue\x12\x12\n\x03red\x18\x01\x20\x01(\rR\x03redB\0\x12\x16\n\x05gree\
    n\x18\x02\x20\x01(\rR\x05greenB\0\x12\x14\n\x04blue\x18\x03\x20\x01(\rR\
    \x04blueB\0\x12\x16\n\x05white\x18\x04\x20\x01(\rR\x05whiteB\0:\0\"q\n\r\
    EverloopImage\x123\n\x03led\x18\x01\x20\x03(\x0b2\x1f.matrix_io.malos.v1\
    .io.LedValueR\x03ledB\0\x12)\n\x0feverloop_length\x18\x02\x20\x01(\x05R\
    \x0eeverloopLengthB\0:\0\";\n\x0bServoParams\x12\x12\n\x03pin\x18\x01\
    \x20\x01(\rR\x03pinB\0\x12\x16\n\x05angle\x18\x02\x20\x01(\rR\x05angleB\
    \0:\0\"\xbb\x01\n\nGpioParams\x12\x12\n\x03pin\x18\x01\x20\x01(\rR\x03pi\
    nB\0\x12@\n\x04mode\x18\x02\x20\x01(\x0e2*.matrix_io.malos.v1.io.GpioPar\
    ams.EnumModeR\x04modeB\0\x12\x16\n\x05value\x18\x03\x20\x01(\rR\x05value\
    B\0\x12\x18\n\x06values\x18\x04\x20\x01(\rR\x06valuesB\0\"#\n\x08EnumMod\
    e\x12\t\n\x05INPUT\x10\0\x12\n\n\x06OUTPUT\x10\x01\x1a\0:\0\"\x88\x02\n\
    \x0eMicArrayParams\x12\x14\n\x04gain\x18\x01\x20\x01(\x05R\x04gainB\0\
    \x12'\n\x0eazimutal_angle\x18\x02\x20\x01(\x02R\razimutalAngleB\0\x12!\n\
    \x0bpolar_angle\x18\x03\x20\x01(\x02R\npolarAngleB\0\x12.\n\x12radial_di\
    stance_mm\x18\x04\x20\x01(\x02R\x10radialDistanceMmB\0\x12,\n\x11sound_s\
    peed_mmseg\x18\x05\x20\x01(\x02R\x0fsoundSpeedMmsegB\0\x124\n\x15samplin\
    g_frequency_hz\x18\x06\x20\x01(\rR\x13samplingFrequencyHzB\0:\0\"\x9c\
    \x03\n\x0eWakeWordParams\x12\x1d\n\twake_word\x18\x01\x20\x01(\tR\x08wak\
    eWordB\0\x12L\n\x07channel\x18\x02\x20\x01(\x0e20.matrix_io.malos.v1.io.\
    WakeWordParams.MicChannelR\x07channelB\0\x12\x19\n\x07lm_path\x18\x03\
    \x20\x01(\tR\x06lmPathB\0\x12\x1b\n\x08dic_path\x18\x04\x20\x01(\tR\x07d\
    icPathB\0\x12'\n\x0eenable_verbose\x18\x05\x20\x01(\x08R\renableVerboseB\
    \0\x12+\n\x10stop_recognition\x18\x06\x20\x01(\x08R\x0fstopRecognitionB\
    \0\"\x8c\x01\n\nMicChannel\x12\x0c\n\x08channel0\x10\0\x12\x0c\n\x08chan\
    nel1\x10\x01\x12\x0c\n\x08channel2\x10\x02\x12\x0c\n\x08channel3\x10\x03\
    \x12\x0c\n\x08channel4\x10\x04\x12\x0c\n\x08channel5\x10\x05\x12\x0c\n\
    \x08channel6\x10\x06\x12\x0c\n\x08channel7\x10\x07\x12\x0c\n\x08channel8\
    \x10\x08\x1a\0:\0\"f\n\x12MatrixDeviceParams\x12N\n\x0bdevice_type\x18\
    \x01\x20\x01(\x0e2+.matrix_io.malos.v1.io.EnumMatrixDeviceTypeR\ndeviceT\
    ypeB\0:\0*@\n\x14EnumMatrixDeviceType\x12\x0e\n\nUNDETECTED\x10\0\x12\
    \x0b\n\x07CREATOR\x10\x01\x12\t\n\x05VOICE\x10\x02\x1a\0B\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::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()
    })
}