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

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

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

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

//! Generated file from `messages-ethereum-eip712.proto`

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTypedData {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.primary_type)
    pub primary_type: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.metamask_v4_compat)
    pub metamask_v4_compat: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.definitions)
    pub definitions: ::protobuf::MessageField<super::messages_ethereum::EthereumDefinitions>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.show_message_hash)
    pub show_message_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumSignTypedData.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required string primary_type = 2;

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

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

    pub fn has_primary_type(&self) -> bool {
        self.primary_type.is_some()
    }

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

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

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

    // optional bool metamask_v4_compat = 3;

    pub fn metamask_v4_compat(&self) -> bool {
        self.metamask_v4_compat.unwrap_or(true)
    }

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

    pub fn has_metamask_v4_compat(&self) -> bool {
        self.metamask_v4_compat.is_some()
    }

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

    // optional bytes show_message_hash = 5;

    pub fn show_message_hash(&self) -> &[u8] {
        match self.show_message_hash.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

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

    pub fn has_show_message_hash(&self) -> bool {
        self.show_message_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_show_message_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.show_message_hash = ::std::option::Option::Some(v);
    }

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

    // Take field
    pub fn take_show_message_hash(&mut self) -> ::std::vec::Vec<u8> {
        self.show_message_hash.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(5);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &EthereumSignTypedData| { &m.address_n },
            |m: &mut EthereumSignTypedData| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "primary_type",
            |m: &EthereumSignTypedData| { &m.primary_type },
            |m: &mut EthereumSignTypedData| { &mut m.primary_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "metamask_v4_compat",
            |m: &EthereumSignTypedData| { &m.metamask_v4_compat },
            |m: &mut EthereumSignTypedData| { &mut m.metamask_v4_compat },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_ethereum::EthereumDefinitions>(
            "definitions",
            |m: &EthereumSignTypedData| { &m.definitions },
            |m: &mut EthereumSignTypedData| { &mut m.definitions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_message_hash",
            |m: &EthereumSignTypedData| { &m.show_message_hash },
            |m: &mut EthereumSignTypedData| { &mut m.show_message_hash },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTypedData>(
            "EthereumSignTypedData",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.primary_type.is_none() {
            return false;
        }
        for v in &self.definitions {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.primary_type = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.metamask_v4_compat = ::std::option::Option::Some(is.read_bool()?);
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.definitions)?;
                },
                42 => {
                    self.show_message_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.primary_type.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.metamask_v4_compat {
            my_size += 1 + 1;
        }
        if let Some(v) = self.definitions.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.show_message_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(5, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.primary_type.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.metamask_v4_compat {
            os.write_bool(3, v)?;
        }
        if let Some(v) = self.definitions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.show_message_hash.as_ref() {
            os.write_bytes(5, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

    fn clear(&mut self) {
        self.address_n.clear();
        self.primary_type = ::std::option::Option::None;
        self.metamask_v4_compat = ::std::option::Option::None;
        self.definitions.clear();
        self.show_message_hash = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumSignTypedData {
        static instance: EthereumSignTypedData = EthereumSignTypedData {
            address_n: ::std::vec::Vec::new(),
            primary_type: ::std::option::Option::None,
            metamask_v4_compat: ::std::option::Option::None,
            definitions: ::protobuf::MessageField::none(),
            show_message_hash: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTypedDataStructRequest {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructRequest.name)
    pub name: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required string name = 1;

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

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

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

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

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

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

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

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

    fn is_initialized(&self) -> bool {
        if self.name.is_none() {
            return false;
        }
        true
    }

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

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

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

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

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

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

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTypedDataStructAck {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.members)
    pub members: ::std::vec::Vec<ethereum_typed_data_struct_ack::EthereumStructMember>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

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

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

    fn is_initialized(&self) -> bool {
        for v in &self.members {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

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

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.members {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

    fn clear(&mut self) {
        self.members.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumTypedDataStructAck {
        static instance: EthereumTypedDataStructAck = EthereumTypedDataStructAck {
            members: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

/// Nested message and enums of message `EthereumTypedDataStructAck`
pub mod ethereum_typed_data_struct_ack {
    // @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct EthereumStructMember {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember.type)
        pub type_: ::protobuf::MessageField<EthereumFieldType>,
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember.name)
        pub name: ::std::option::Option<::std::string::String>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumStructMember.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required string name = 2;

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

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

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

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

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(2);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, EthereumFieldType>(
                "type",
                |m: &EthereumStructMember| { &m.type_ },
                |m: &mut EthereumStructMember| { &mut m.type_ },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "name",
                |m: &EthereumStructMember| { &m.name },
                |m: &mut EthereumStructMember| { &mut m.name },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumStructMember>(
                "EthereumTypedDataStructAck.EthereumStructMember",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.type_.is_none() {
                return false;
            }
            if self.name.is_none() {
                return false;
            }
            for v in &self.type_ {
                if !v.is_initialized() {
                    return false;
                }
            };
            true
        }

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

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

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

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

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

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

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

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

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

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

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

    // @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct EthereumFieldType {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.data_type)
        pub data_type: ::std::option::Option<::protobuf::EnumOrUnknown<EthereumDataType>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.size)
        pub size: ::std::option::Option<u32>,
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.entry_type)
        pub entry_type: ::protobuf::MessageField<EthereumFieldType>,
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.struct_name)
        pub struct_name: ::std::option::Option<::std::string::String>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumFieldType.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required .hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType data_type = 1;

        pub fn data_type(&self) -> EthereumDataType {
            match self.data_type {
                Some(e) => e.enum_value_or(EthereumDataType::UINT),
                None => EthereumDataType::UINT,
            }
        }

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

        pub fn has_data_type(&self) -> bool {
            self.data_type.is_some()
        }

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

        // optional uint32 size = 2;

        pub fn size(&self) -> u32 {
            self.size.unwrap_or(0)
        }

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

        pub fn has_size(&self) -> bool {
            self.size.is_some()
        }

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

        // optional string struct_name = 4;

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

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

        pub fn has_struct_name(&self) -> bool {
            self.struct_name.is_some()
        }

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

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(4);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "data_type",
                |m: &EthereumFieldType| { &m.data_type },
                |m: &mut EthereumFieldType| { &mut m.data_type },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "size",
                |m: &EthereumFieldType| { &m.size },
                |m: &mut EthereumFieldType| { &mut m.size },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, EthereumFieldType>(
                "entry_type",
                |m: &EthereumFieldType| { &m.entry_type },
                |m: &mut EthereumFieldType| { &mut m.entry_type },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "struct_name",
                |m: &EthereumFieldType| { &m.struct_name },
                |m: &mut EthereumFieldType| { &mut m.struct_name },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumFieldType>(
                "EthereumTypedDataStructAck.EthereumFieldType",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.data_type.is_none() {
                return false;
            }
            for v in &self.entry_type {
                if !v.is_initialized() {
                    return false;
                }
            };
            true
        }

        fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
            while let Some(tag) = is.read_raw_tag_or_eof()? {
                match tag {
                    8 => {
                        self.data_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                    },
                    16 => {
                        self.size = ::std::option::Option::Some(is.read_uint32()?);
                    },
                    26 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.entry_type)?;
                    },
                    34 => {
                        self.struct_name = ::std::option::Option::Some(is.read_string()?);
                    },
                    tag => {
                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                    },
                };
            }
            ::std::result::Result::Ok(())
        }

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

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

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

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

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

        fn clear(&mut self) {
            self.data_type = ::std::option::Option::None;
            self.size = ::std::option::Option::None;
            self.entry_type.clear();
            self.struct_name = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static EthereumFieldType {
            static instance: EthereumFieldType = EthereumFieldType {
                data_type: ::std::option::Option::None,
                size: ::std::option::Option::None,
                entry_type: ::protobuf::MessageField::none(),
                struct_name: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
    // @@protoc_insertion_point(enum:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType)
    pub enum EthereumDataType {
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.UINT)
        UINT = 1,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.INT)
        INT = 2,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.BYTES)
        BYTES = 3,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.STRING)
        STRING = 4,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.BOOL)
        BOOL = 5,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.ADDRESS)
        ADDRESS = 6,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.ARRAY)
        ARRAY = 7,
        // @@protoc_insertion_point(enum_value:hw.trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataType.STRUCT)
        STRUCT = 8,
    }

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

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

        fn from_i32(value: i32) -> ::std::option::Option<EthereumDataType> {
            match value {
                1 => ::std::option::Option::Some(EthereumDataType::UINT),
                2 => ::std::option::Option::Some(EthereumDataType::INT),
                3 => ::std::option::Option::Some(EthereumDataType::BYTES),
                4 => ::std::option::Option::Some(EthereumDataType::STRING),
                5 => ::std::option::Option::Some(EthereumDataType::BOOL),
                6 => ::std::option::Option::Some(EthereumDataType::ADDRESS),
                7 => ::std::option::Option::Some(EthereumDataType::ARRAY),
                8 => ::std::option::Option::Some(EthereumDataType::STRUCT),
                _ => ::std::option::Option::None
            }
        }

        fn from_str(str: &str) -> ::std::option::Option<EthereumDataType> {
            match str {
                "UINT" => ::std::option::Option::Some(EthereumDataType::UINT),
                "INT" => ::std::option::Option::Some(EthereumDataType::INT),
                "BYTES" => ::std::option::Option::Some(EthereumDataType::BYTES),
                "STRING" => ::std::option::Option::Some(EthereumDataType::STRING),
                "BOOL" => ::std::option::Option::Some(EthereumDataType::BOOL),
                "ADDRESS" => ::std::option::Option::Some(EthereumDataType::ADDRESS),
                "ARRAY" => ::std::option::Option::Some(EthereumDataType::ARRAY),
                "STRUCT" => ::std::option::Option::Some(EthereumDataType::STRUCT),
                _ => ::std::option::Option::None
            }
        }

        const VALUES: &'static [EthereumDataType] = &[
            EthereumDataType::UINT,
            EthereumDataType::INT,
            EthereumDataType::BYTES,
            EthereumDataType::STRING,
            EthereumDataType::BOOL,
            EthereumDataType::ADDRESS,
            EthereumDataType::ARRAY,
            EthereumDataType::STRUCT,
        ];
    }

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

        fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
            let index = match self {
                EthereumDataType::UINT => 0,
                EthereumDataType::INT => 1,
                EthereumDataType::BYTES => 2,
                EthereumDataType::STRING => 3,
                EthereumDataType::BOOL => 4,
                EthereumDataType::ADDRESS => 5,
                EthereumDataType::ARRAY => 6,
                EthereumDataType::STRUCT => 7,
            };
            Self::enum_descriptor().value_by_index(index)
        }
    }

    // Note, `Default` is implemented although default value is not 0
    impl ::std::default::Default for EthereumDataType {
        fn default() -> Self {
            EthereumDataType::UINT
        }
    }

    impl EthereumDataType {
        pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
            ::protobuf::reflect::GeneratedEnumDescriptorData::new::<EthereumDataType>("EthereumTypedDataStructAck.EthereumDataType")
        }
    }
}

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTypedDataValueRequest {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueRequest.member_path)
    pub member_path: ::std::vec::Vec<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

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

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

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

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    is.read_repeated_packed_uint32_into(&mut self.member_path)?;
                },
                8 => {
                    self.member_path.push(is.read_uint32()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.member_path {
            os.write_uint32(1, *v)?;
        };
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

    fn clear(&mut self) {
        self.member_path.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumTypedDataValueRequest {
        static instance: EthereumTypedDataValueRequest = EthereumTypedDataValueRequest {
            member_path: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueAck)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTypedDataValueAck {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueAck.value)
    pub value: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum_eip712.EthereumTypedDataValueAck.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes value = 1;

    pub fn value(&self) -> &[u8] {
        match self.value.as_ref() {
            Some(v) => v,
            None => &[],
        }
    }

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

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

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

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

    // Take field
    pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
        self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
    }

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

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

    fn is_initialized(&self) -> bool {
        if self.value.is_none() {
            return false;
        }
        true
    }

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

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

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

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

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

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

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

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

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x1emessages-ethereum-eip712.proto\x12\"hw.trezor.messages.ethereum_ei\
    p712\x1a\x17messages-ethereum.proto\"\x8b\x02\n\x15EthereumSignTypedData\
    \x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0cprimary_\
    type\x18\x02\x20\x02(\tR\x0bprimaryType\x122\n\x12metamask_v4_compat\x18\
    \x03\x20\x01(\x08:\x04trueR\x10metamaskV4Compat\x12R\n\x0bdefinitions\
    \x18\x04\x20\x01(\x0b20.hw.trezor.messages.ethereum.EthereumDefinitionsR\
    \x0bdefinitions\x12*\n\x11show_message_hash\x18\x05\x20\x01(\x0cR\x0fsho\
    wMessageHash\"4\n\x1eEthereumTypedDataStructRequest\x12\x12\n\x04name\
    \x18\x01\x20\x02(\tR\x04name\"\xb4\x05\n\x1aEthereumTypedDataStructAck\
    \x12m\n\x07members\x18\x01\x20\x03(\x0b2S.hw.trezor.messages.ethereum_ei\
    p712.EthereumTypedDataStructAck.EthereumStructMemberR\x07members\x1a\x90\
    \x01\n\x14EthereumStructMember\x12d\n\x04type\x18\x01\x20\x02(\x0b2P.hw.\
    trezor.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumField\
    TypeR\x04type\x12\x12\n\x04name\x18\x02\x20\x02(\tR\x04name\x1a\xa7\x02\
    \n\x11EthereumFieldType\x12l\n\tdata_type\x18\x01\x20\x02(\x0e2O.hw.trez\
    or.messages.ethereum_eip712.EthereumTypedDataStructAck.EthereumDataTypeR\
    \x08dataType\x12\x12\n\x04size\x18\x02\x20\x01(\rR\x04size\x12o\n\nentry\
    _type\x18\x03\x20\x01(\x0b2P.hw.trezor.messages.ethereum_eip712.Ethereum\
    TypedDataStructAck.EthereumFieldTypeR\tentryType\x12\x1f\n\x0bstruct_nam\
    e\x18\x04\x20\x01(\tR\nstructName\"j\n\x10EthereumDataType\x12\x08\n\x04\
    UINT\x10\x01\x12\x07\n\x03INT\x10\x02\x12\t\n\x05BYTES\x10\x03\x12\n\n\
    \x06STRING\x10\x04\x12\x08\n\x04BOOL\x10\x05\x12\x0b\n\x07ADDRESS\x10\
    \x06\x12\t\n\x05ARRAY\x10\x07\x12\n\n\x06STRUCT\x10\x08\"@\n\x1dEthereum\
    TypedDataValueRequest\x12\x1f\n\x0bmember_path\x18\x01\x20\x03(\rR\nmemb\
    erPath\"1\n\x19EthereumTypedDataValueAck\x12\x14\n\x05value\x18\x01\x20\
    \x02(\x0cR\x05valueBB\n#com.satoshilabs.trezor.lib.protobufB\x1bTrezorMe\
    ssageEthereumEIP712\
";

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

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(1);
            deps.push(super::messages_ethereum::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(7);
            messages.push(EthereumSignTypedData::generated_message_descriptor_data());
            messages.push(EthereumTypedDataStructRequest::generated_message_descriptor_data());
            messages.push(EthereumTypedDataStructAck::generated_message_descriptor_data());
            messages.push(EthereumTypedDataValueRequest::generated_message_descriptor_data());
            messages.push(EthereumTypedDataValueAck::generated_message_descriptor_data());
            messages.push(ethereum_typed_data_struct_ack::EthereumStructMember::generated_message_descriptor_data());
            messages.push(ethereum_typed_data_struct_ack::EthereumFieldType::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(ethereum_typed_data_struct_ack::EthereumDataType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
