// 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.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.EthereumGetPublicKey)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumGetPublicKey {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetPublicKey.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetPublicKey.show_display)
    pub show_display: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumGetPublicKey.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional bool show_display = 2;

    pub fn show_display(&self) -> bool {
        self.show_display.unwrap_or(false)
    }

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

    pub fn has_show_display(&self) -> bool {
        self.show_display.is_some()
    }

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

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

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

    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.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                16 => {
                    self.show_display = ::std::option::Option::Some(is.read_bool()?);
                },
                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.show_display {
            my_size += 1 + 1;
        }
        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.show_display {
            os.write_bool(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() -> EthereumGetPublicKey {
        EthereumGetPublicKey::new()
    }

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

    fn default_instance() -> &'static EthereumGetPublicKey {
        static instance: EthereumGetPublicKey = EthereumGetPublicKey {
            address_n: ::std::vec::Vec::new(),
            show_display: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumGetPublicKey {
    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("EthereumGetPublicKey").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumPublicKey)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumPublicKey {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumPublicKey.node)
    pub node: ::protobuf::MessageField<super::messages_common::HDNodeType>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumPublicKey.xpub)
    pub xpub: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumPublicKey.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required string xpub = 2;

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

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

    pub fn has_xpub(&self) -> bool {
        self.xpub.is_some()
    }

    // Param is passed by value, moved
    pub fn set_xpub(&mut self, v: ::std::string::String) {
        self.xpub = ::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_xpub(&mut self) -> &mut ::std::string::String {
        if self.xpub.is_none() {
            self.xpub = ::std::option::Option::Some(::std::string::String::new());
        }
        self.xpub.as_mut().unwrap()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::HDNodeType>(
            "node",
            |m: &EthereumPublicKey| { &m.node },
            |m: &mut EthereumPublicKey| { &mut m.node },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "xpub",
            |m: &EthereumPublicKey| { &m.xpub },
            |m: &mut EthereumPublicKey| { &mut m.xpub },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumPublicKey>(
            "EthereumPublicKey",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.node.is_none() {
            return false;
        }
        if self.xpub.is_none() {
            return false;
        }
        for v in &self.node {
            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.node)?;
                },
                18 => {
                    self.xpub = ::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.node.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.xpub.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.node.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        }
        if let Some(v) = self.xpub.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() -> EthereumPublicKey {
        EthereumPublicKey::new()
    }

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

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

impl ::protobuf::MessageFull for EthereumPublicKey {
    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("EthereumPublicKey").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumGetAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumGetAddress {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.show_display)
    pub show_display: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.encoded_network)
    pub encoded_network: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumGetAddress.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumGetAddress.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional bool show_display = 2;

    pub fn show_display(&self) -> bool {
        self.show_display.unwrap_or(false)
    }

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

    pub fn has_show_display(&self) -> bool {
        self.show_display.is_some()
    }

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

    // optional bytes encoded_network = 3;

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

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

    pub fn has_encoded_network(&self) -> bool {
        self.encoded_network.is_some()
    }

    // Param is passed by value, moved
    pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
        self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.encoded_network.is_none() {
            self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.encoded_network.as_mut().unwrap()
    }

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

    // optional bool chunkify = 4;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

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

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &EthereumGetAddress| { &m.address_n },
            |m: &mut EthereumGetAddress| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_display",
            |m: &EthereumGetAddress| { &m.show_display },
            |m: &mut EthereumGetAddress| { &mut m.show_display },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "encoded_network",
            |m: &EthereumGetAddress| { &m.encoded_network },
            |m: &mut EthereumGetAddress| { &mut m.encoded_network },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &EthereumGetAddress| { &m.chunkify },
            |m: &mut EthereumGetAddress| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumGetAddress>(
            "EthereumGetAddress",
            fields,
            oneofs,
        )
    }
}

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

    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.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                16 => {
                    self.show_display = ::std::option::Option::Some(is.read_bool()?);
                },
                26 => {
                    self.encoded_network = ::std::option::Option::Some(is.read_bytes()?);
                },
                32 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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.show_display {
            my_size += 1 + 1;
        }
        if let Some(v) = self.encoded_network.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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.show_display {
            os.write_bool(2, v)?;
        }
        if let Some(v) = self.encoded_network.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(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() -> EthereumGetAddress {
        EthereumGetAddress::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.show_display = ::std::option::Option::None;
        self.encoded_network = ::std::option::Option::None;
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumGetAddress {
        static instance: EthereumGetAddress = EthereumGetAddress {
            address_n: ::std::vec::Vec::new(),
            show_display: ::std::option::Option::None,
            encoded_network: ::std::option::Option::None,
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumGetAddress {
    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("EthereumGetAddress").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumAddress {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumAddress._old_address)
    pub _old_address: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumAddress.address)
    pub address: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumAddress.mac)
    pub mac: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumAddress.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional bytes _old_address = 1;

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

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

    pub fn has__old_address(&self) -> bool {
        self._old_address.is_some()
    }

    // Param is passed by value, moved
    pub fn set__old_address(&mut self, v: ::std::vec::Vec<u8>) {
        self._old_address = ::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__old_address(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self._old_address.is_none() {
            self._old_address = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self._old_address.as_mut().unwrap()
    }

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

    // optional string address = 2;

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

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

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

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

    // optional bytes mac = 3;

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

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

    pub fn has_mac(&self) -> bool {
        self.mac.is_some()
    }

    // Param is passed by value, moved
    pub fn set_mac(&mut self, v: ::std::vec::Vec<u8>) {
        self.mac = ::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_mac(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.mac.is_none() {
            self.mac = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.mac.as_mut().unwrap()
    }

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

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

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

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

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self._old_address = ::std::option::Option::Some(is.read_bytes()?);
                },
                18 => {
                    self.address = ::std::option::Option::Some(is.read_string()?);
                },
                26 => {
                    self.mac = ::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._old_address.as_ref() {
            my_size += ::protobuf::rt::bytes_size(1, &v);
        }
        if let Some(v) = self.address.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.mac.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &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._old_address.as_ref() {
            os.write_bytes(1, v)?;
        }
        if let Some(v) = self.address.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.mac.as_ref() {
            os.write_bytes(3, 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() -> EthereumAddress {
        EthereumAddress::new()
    }

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

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

impl ::protobuf::MessageFull for EthereumAddress {
    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("EthereumAddress").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTx {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.nonce)
    pub nonce: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.gas_price)
    pub gas_price: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.gas_limit)
    pub gas_limit: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.to)
    pub to: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.value)
    pub value: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.data_initial_chunk)
    pub data_initial_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.data_length)
    pub data_length: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.chain_id)
    pub chain_id: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.tx_type)
    pub tx_type: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.definitions)
    pub definitions: ::protobuf::MessageField<EthereumDefinitions>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTx.payment_req)
    pub payment_req: ::protobuf::MessageField<super::messages_common::PaymentRequest>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTx.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional bytes nonce = 2;

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

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

    pub fn has_nonce(&self) -> bool {
        self.nonce.is_some()
    }

    // Param is passed by value, moved
    pub fn set_nonce(&mut self, v: ::std::vec::Vec<u8>) {
        self.nonce = ::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_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.nonce.is_none() {
            self.nonce = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.nonce.as_mut().unwrap()
    }

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

    // required bytes gas_price = 3;

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

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

    pub fn has_gas_price(&self) -> bool {
        self.gas_price.is_some()
    }

    // Param is passed by value, moved
    pub fn set_gas_price(&mut self, v: ::std::vec::Vec<u8>) {
        self.gas_price = ::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_gas_price(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.gas_price.is_none() {
            self.gas_price = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.gas_price.as_mut().unwrap()
    }

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

    // required bytes gas_limit = 4;

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

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

    pub fn has_gas_limit(&self) -> bool {
        self.gas_limit.is_some()
    }

    // Param is passed by value, moved
    pub fn set_gas_limit(&mut self, v: ::std::vec::Vec<u8>) {
        self.gas_limit = ::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_gas_limit(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.gas_limit.is_none() {
            self.gas_limit = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.gas_limit.as_mut().unwrap()
    }

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

    // optional string to = 11;

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

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

    pub fn has_to(&self) -> bool {
        self.to.is_some()
    }

    // Param is passed by value, moved
    pub fn set_to(&mut self, v: ::std::string::String) {
        self.to = ::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_to(&mut self) -> &mut ::std::string::String {
        if self.to.is_none() {
            self.to = ::std::option::Option::Some(::std::string::String::new());
        }
        self.to.as_mut().unwrap()
    }

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

    // optional bytes value = 6;

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

    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())
    }

    // optional bytes data_initial_chunk = 7;

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

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

    pub fn has_data_initial_chunk(&self) -> bool {
        self.data_initial_chunk.is_some()
    }

    // Param is passed by value, moved
    pub fn set_data_initial_chunk(&mut self, v: ::std::vec::Vec<u8>) {
        self.data_initial_chunk = ::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_data_initial_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.data_initial_chunk.is_none() {
            self.data_initial_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.data_initial_chunk.as_mut().unwrap()
    }

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

    // optional uint32 data_length = 8;

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

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

    pub fn has_data_length(&self) -> bool {
        self.data_length.is_some()
    }

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

    // required uint64 chain_id = 9;

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

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

    pub fn has_chain_id(&self) -> bool {
        self.chain_id.is_some()
    }

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

    // optional uint32 tx_type = 10;

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

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

    pub fn has_tx_type(&self) -> bool {
        self.tx_type.is_some()
    }

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

    // optional bool chunkify = 13;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

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

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(13);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &EthereumSignTx| { &m.address_n },
            |m: &mut EthereumSignTx| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "nonce",
            |m: &EthereumSignTx| { &m.nonce },
            |m: &mut EthereumSignTx| { &mut m.nonce },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "gas_price",
            |m: &EthereumSignTx| { &m.gas_price },
            |m: &mut EthereumSignTx| { &mut m.gas_price },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "gas_limit",
            |m: &EthereumSignTx| { &m.gas_limit },
            |m: &mut EthereumSignTx| { &mut m.gas_limit },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "to",
            |m: &EthereumSignTx| { &m.to },
            |m: &mut EthereumSignTx| { &mut m.to },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &EthereumSignTx| { &m.value },
            |m: &mut EthereumSignTx| { &mut m.value },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "data_initial_chunk",
            |m: &EthereumSignTx| { &m.data_initial_chunk },
            |m: &mut EthereumSignTx| { &mut m.data_initial_chunk },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "data_length",
            |m: &EthereumSignTx| { &m.data_length },
            |m: &mut EthereumSignTx| { &mut m.data_length },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chain_id",
            |m: &EthereumSignTx| { &m.chain_id },
            |m: &mut EthereumSignTx| { &mut m.chain_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "tx_type",
            |m: &EthereumSignTx| { &m.tx_type },
            |m: &mut EthereumSignTx| { &mut m.tx_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, EthereumDefinitions>(
            "definitions",
            |m: &EthereumSignTx| { &m.definitions },
            |m: &mut EthereumSignTx| { &mut m.definitions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &EthereumSignTx| { &m.chunkify },
            |m: &mut EthereumSignTx| { &mut m.chunkify },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::PaymentRequest>(
            "payment_req",
            |m: &EthereumSignTx| { &m.payment_req },
            |m: &mut EthereumSignTx| { &mut m.payment_req },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTx>(
            "EthereumSignTx",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.gas_price.is_none() {
            return false;
        }
        if self.gas_limit.is_none() {
            return false;
        }
        if self.chain_id.is_none() {
            return false;
        }
        for v in &self.definitions {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.payment_req {
            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.nonce = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.gas_price = ::std::option::Option::Some(is.read_bytes()?);
                },
                34 => {
                    self.gas_limit = ::std::option::Option::Some(is.read_bytes()?);
                },
                90 => {
                    self.to = ::std::option::Option::Some(is.read_string()?);
                },
                50 => {
                    self.value = ::std::option::Option::Some(is.read_bytes()?);
                },
                58 => {
                    self.data_initial_chunk = ::std::option::Option::Some(is.read_bytes()?);
                },
                64 => {
                    self.data_length = ::std::option::Option::Some(is.read_uint32()?);
                },
                72 => {
                    self.chain_id = ::std::option::Option::Some(is.read_uint64()?);
                },
                80 => {
                    self.tx_type = ::std::option::Option::Some(is.read_uint32()?);
                },
                98 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.definitions)?;
                },
                104 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                114 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.payment_req)?;
                },
                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.nonce.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.gas_price.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.gas_limit.as_ref() {
            my_size += ::protobuf::rt::bytes_size(4, &v);
        }
        if let Some(v) = self.to.as_ref() {
            my_size += ::protobuf::rt::string_size(11, &v);
        }
        if let Some(v) = self.value.as_ref() {
            my_size += ::protobuf::rt::bytes_size(6, &v);
        }
        if let Some(v) = self.data_initial_chunk.as_ref() {
            my_size += ::protobuf::rt::bytes_size(7, &v);
        }
        if let Some(v) = self.data_length {
            my_size += ::protobuf::rt::uint32_size(8, v);
        }
        if let Some(v) = self.chain_id {
            my_size += ::protobuf::rt::uint64_size(9, v);
        }
        if let Some(v) = self.tx_type {
            my_size += ::protobuf::rt::uint32_size(10, v);
        }
        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.chunkify {
            my_size += 1 + 1;
        }
        if let Some(v) = self.payment_req.as_ref() {
            let len = v.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.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.nonce.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.gas_price.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.gas_limit.as_ref() {
            os.write_bytes(4, v)?;
        }
        if let Some(v) = self.to.as_ref() {
            os.write_string(11, v)?;
        }
        if let Some(v) = self.value.as_ref() {
            os.write_bytes(6, v)?;
        }
        if let Some(v) = self.data_initial_chunk.as_ref() {
            os.write_bytes(7, v)?;
        }
        if let Some(v) = self.data_length {
            os.write_uint32(8, v)?;
        }
        if let Some(v) = self.chain_id {
            os.write_uint64(9, v)?;
        }
        if let Some(v) = self.tx_type {
            os.write_uint32(10, v)?;
        }
        if let Some(v) = self.definitions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(13, v)?;
        }
        if let Some(v) = self.payment_req.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(14, 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() -> EthereumSignTx {
        EthereumSignTx::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.nonce = ::std::option::Option::None;
        self.gas_price = ::std::option::Option::None;
        self.gas_limit = ::std::option::Option::None;
        self.to = ::std::option::Option::None;
        self.value = ::std::option::Option::None;
        self.data_initial_chunk = ::std::option::Option::None;
        self.data_length = ::std::option::Option::None;
        self.chain_id = ::std::option::Option::None;
        self.tx_type = ::std::option::Option::None;
        self.definitions.clear();
        self.chunkify = ::std::option::Option::None;
        self.payment_req.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumSignTx {
        static instance: EthereumSignTx = EthereumSignTx {
            address_n: ::std::vec::Vec::new(),
            nonce: ::std::option::Option::None,
            gas_price: ::std::option::Option::None,
            gas_limit: ::std::option::Option::None,
            to: ::std::option::Option::None,
            value: ::std::option::Option::None,
            data_initial_chunk: ::std::option::Option::None,
            data_length: ::std::option::Option::None,
            chain_id: ::std::option::Option::None,
            tx_type: ::std::option::Option::None,
            definitions: ::protobuf::MessageField::none(),
            chunkify: ::std::option::Option::None,
            payment_req: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumSignTx {
    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("EthereumSignTx").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTxEIP1559)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTxEIP1559 {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.nonce)
    pub nonce: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.max_gas_fee)
    pub max_gas_fee: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.max_priority_fee)
    pub max_priority_fee: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.gas_limit)
    pub gas_limit: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.to)
    pub to: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.value)
    pub value: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.data_initial_chunk)
    pub data_initial_chunk: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.data_length)
    pub data_length: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.chain_id)
    pub chain_id: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.access_list)
    pub access_list: ::std::vec::Vec<ethereum_sign_tx_eip1559::EthereumAccessList>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.definitions)
    pub definitions: ::protobuf::MessageField<EthereumDefinitions>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.payment_req)
    pub payment_req: ::protobuf::MessageField<super::messages_common::PaymentRequest>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes nonce = 2;

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

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

    pub fn has_nonce(&self) -> bool {
        self.nonce.is_some()
    }

    // Param is passed by value, moved
    pub fn set_nonce(&mut self, v: ::std::vec::Vec<u8>) {
        self.nonce = ::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_nonce(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.nonce.is_none() {
            self.nonce = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.nonce.as_mut().unwrap()
    }

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

    // required bytes max_gas_fee = 3;

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

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

    pub fn has_max_gas_fee(&self) -> bool {
        self.max_gas_fee.is_some()
    }

    // Param is passed by value, moved
    pub fn set_max_gas_fee(&mut self, v: ::std::vec::Vec<u8>) {
        self.max_gas_fee = ::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_max_gas_fee(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.max_gas_fee.is_none() {
            self.max_gas_fee = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.max_gas_fee.as_mut().unwrap()
    }

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

    // required bytes max_priority_fee = 4;

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

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

    pub fn has_max_priority_fee(&self) -> bool {
        self.max_priority_fee.is_some()
    }

    // Param is passed by value, moved
    pub fn set_max_priority_fee(&mut self, v: ::std::vec::Vec<u8>) {
        self.max_priority_fee = ::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_max_priority_fee(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.max_priority_fee.is_none() {
            self.max_priority_fee = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.max_priority_fee.as_mut().unwrap()
    }

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

    // required bytes gas_limit = 5;

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

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

    pub fn has_gas_limit(&self) -> bool {
        self.gas_limit.is_some()
    }

    // Param is passed by value, moved
    pub fn set_gas_limit(&mut self, v: ::std::vec::Vec<u8>) {
        self.gas_limit = ::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_gas_limit(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.gas_limit.is_none() {
            self.gas_limit = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.gas_limit.as_mut().unwrap()
    }

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

    // optional string to = 6;

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

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

    pub fn has_to(&self) -> bool {
        self.to.is_some()
    }

    // Param is passed by value, moved
    pub fn set_to(&mut self, v: ::std::string::String) {
        self.to = ::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_to(&mut self) -> &mut ::std::string::String {
        if self.to.is_none() {
            self.to = ::std::option::Option::Some(::std::string::String::new());
        }
        self.to.as_mut().unwrap()
    }

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

    // required bytes value = 7;

    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())
    }

    // optional bytes data_initial_chunk = 8;

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

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

    pub fn has_data_initial_chunk(&self) -> bool {
        self.data_initial_chunk.is_some()
    }

    // Param is passed by value, moved
    pub fn set_data_initial_chunk(&mut self, v: ::std::vec::Vec<u8>) {
        self.data_initial_chunk = ::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_data_initial_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.data_initial_chunk.is_none() {
            self.data_initial_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.data_initial_chunk.as_mut().unwrap()
    }

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

    // required uint32 data_length = 9;

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

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

    pub fn has_data_length(&self) -> bool {
        self.data_length.is_some()
    }

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

    // required uint64 chain_id = 10;

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

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

    pub fn has_chain_id(&self) -> bool {
        self.chain_id.is_some()
    }

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

    // optional bool chunkify = 13;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

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

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(14);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &EthereumSignTxEIP1559| { &m.address_n },
            |m: &mut EthereumSignTxEIP1559| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "nonce",
            |m: &EthereumSignTxEIP1559| { &m.nonce },
            |m: &mut EthereumSignTxEIP1559| { &mut m.nonce },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "max_gas_fee",
            |m: &EthereumSignTxEIP1559| { &m.max_gas_fee },
            |m: &mut EthereumSignTxEIP1559| { &mut m.max_gas_fee },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "max_priority_fee",
            |m: &EthereumSignTxEIP1559| { &m.max_priority_fee },
            |m: &mut EthereumSignTxEIP1559| { &mut m.max_priority_fee },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "gas_limit",
            |m: &EthereumSignTxEIP1559| { &m.gas_limit },
            |m: &mut EthereumSignTxEIP1559| { &mut m.gas_limit },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "to",
            |m: &EthereumSignTxEIP1559| { &m.to },
            |m: &mut EthereumSignTxEIP1559| { &mut m.to },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &EthereumSignTxEIP1559| { &m.value },
            |m: &mut EthereumSignTxEIP1559| { &mut m.value },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "data_initial_chunk",
            |m: &EthereumSignTxEIP1559| { &m.data_initial_chunk },
            |m: &mut EthereumSignTxEIP1559| { &mut m.data_initial_chunk },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "data_length",
            |m: &EthereumSignTxEIP1559| { &m.data_length },
            |m: &mut EthereumSignTxEIP1559| { &mut m.data_length },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chain_id",
            |m: &EthereumSignTxEIP1559| { &m.chain_id },
            |m: &mut EthereumSignTxEIP1559| { &mut m.chain_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "access_list",
            |m: &EthereumSignTxEIP1559| { &m.access_list },
            |m: &mut EthereumSignTxEIP1559| { &mut m.access_list },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, EthereumDefinitions>(
            "definitions",
            |m: &EthereumSignTxEIP1559| { &m.definitions },
            |m: &mut EthereumSignTxEIP1559| { &mut m.definitions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &EthereumSignTxEIP1559| { &m.chunkify },
            |m: &mut EthereumSignTxEIP1559| { &mut m.chunkify },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::PaymentRequest>(
            "payment_req",
            |m: &EthereumSignTxEIP1559| { &m.payment_req },
            |m: &mut EthereumSignTxEIP1559| { &mut m.payment_req },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTxEIP1559>(
            "EthereumSignTxEIP1559",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.nonce.is_none() {
            return false;
        }
        if self.max_gas_fee.is_none() {
            return false;
        }
        if self.max_priority_fee.is_none() {
            return false;
        }
        if self.gas_limit.is_none() {
            return false;
        }
        if self.value.is_none() {
            return false;
        }
        if self.data_length.is_none() {
            return false;
        }
        if self.chain_id.is_none() {
            return false;
        }
        for v in &self.access_list {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.definitions {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.payment_req {
            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.nonce = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.max_gas_fee = ::std::option::Option::Some(is.read_bytes()?);
                },
                34 => {
                    self.max_priority_fee = ::std::option::Option::Some(is.read_bytes()?);
                },
                42 => {
                    self.gas_limit = ::std::option::Option::Some(is.read_bytes()?);
                },
                50 => {
                    self.to = ::std::option::Option::Some(is.read_string()?);
                },
                58 => {
                    self.value = ::std::option::Option::Some(is.read_bytes()?);
                },
                66 => {
                    self.data_initial_chunk = ::std::option::Option::Some(is.read_bytes()?);
                },
                72 => {
                    self.data_length = ::std::option::Option::Some(is.read_uint32()?);
                },
                80 => {
                    self.chain_id = ::std::option::Option::Some(is.read_uint64()?);
                },
                90 => {
                    self.access_list.push(is.read_message()?);
                },
                98 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.definitions)?;
                },
                104 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                114 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.payment_req)?;
                },
                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.nonce.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.max_gas_fee.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.max_priority_fee.as_ref() {
            my_size += ::protobuf::rt::bytes_size(4, &v);
        }
        if let Some(v) = self.gas_limit.as_ref() {
            my_size += ::protobuf::rt::bytes_size(5, &v);
        }
        if let Some(v) = self.to.as_ref() {
            my_size += ::protobuf::rt::string_size(6, &v);
        }
        if let Some(v) = self.value.as_ref() {
            my_size += ::protobuf::rt::bytes_size(7, &v);
        }
        if let Some(v) = self.data_initial_chunk.as_ref() {
            my_size += ::protobuf::rt::bytes_size(8, &v);
        }
        if let Some(v) = self.data_length {
            my_size += ::protobuf::rt::uint32_size(9, v);
        }
        if let Some(v) = self.chain_id {
            my_size += ::protobuf::rt::uint64_size(10, v);
        }
        for value in &self.access_list {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        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.chunkify {
            my_size += 1 + 1;
        }
        if let Some(v) = self.payment_req.as_ref() {
            let len = v.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.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.nonce.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.max_gas_fee.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.max_priority_fee.as_ref() {
            os.write_bytes(4, v)?;
        }
        if let Some(v) = self.gas_limit.as_ref() {
            os.write_bytes(5, v)?;
        }
        if let Some(v) = self.to.as_ref() {
            os.write_string(6, v)?;
        }
        if let Some(v) = self.value.as_ref() {
            os.write_bytes(7, v)?;
        }
        if let Some(v) = self.data_initial_chunk.as_ref() {
            os.write_bytes(8, v)?;
        }
        if let Some(v) = self.data_length {
            os.write_uint32(9, v)?;
        }
        if let Some(v) = self.chain_id {
            os.write_uint64(10, v)?;
        }
        for v in &self.access_list {
            ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
        };
        if let Some(v) = self.definitions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(13, v)?;
        }
        if let Some(v) = self.payment_req.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(14, 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() -> EthereumSignTxEIP1559 {
        EthereumSignTxEIP1559::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.nonce = ::std::option::Option::None;
        self.max_gas_fee = ::std::option::Option::None;
        self.max_priority_fee = ::std::option::Option::None;
        self.gas_limit = ::std::option::Option::None;
        self.to = ::std::option::Option::None;
        self.value = ::std::option::Option::None;
        self.data_initial_chunk = ::std::option::Option::None;
        self.data_length = ::std::option::Option::None;
        self.chain_id = ::std::option::Option::None;
        self.access_list.clear();
        self.definitions.clear();
        self.chunkify = ::std::option::Option::None;
        self.payment_req.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumSignTxEIP1559 {
        static instance: EthereumSignTxEIP1559 = EthereumSignTxEIP1559 {
            address_n: ::std::vec::Vec::new(),
            nonce: ::std::option::Option::None,
            max_gas_fee: ::std::option::Option::None,
            max_priority_fee: ::std::option::Option::None,
            gas_limit: ::std::option::Option::None,
            to: ::std::option::Option::None,
            value: ::std::option::Option::None,
            data_initial_chunk: ::std::option::Option::None,
            data_length: ::std::option::Option::None,
            chain_id: ::std::option::Option::None,
            access_list: ::std::vec::Vec::new(),
            definitions: ::protobuf::MessageField::none(),
            chunkify: ::std::option::Option::None,
            payment_req: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumSignTxEIP1559 {
    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("EthereumSignTxEIP1559").unwrap()).clone()
    }
}

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

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

/// Nested message and enums of message `EthereumSignTxEIP1559`
pub mod ethereum_sign_tx_eip1559 {
    // @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct EthereumAccessList {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList.address)
        pub address: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList.storage_keys)
        pub storage_keys: ::std::vec::Vec<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTxEIP1559.EthereumAccessList.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required string address = 1;

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

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

        pub fn has_address(&self) -> bool {
            self.address.is_some()
        }

        // Param is passed by value, moved
        pub fn set_address(&mut self, v: ::std::string::String) {
            self.address = ::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_address(&mut self) -> &mut ::std::string::String {
            if self.address.is_none() {
                self.address = ::std::option::Option::Some(::std::string::String::new());
            }
            self.address.as_mut().unwrap()
        }

        // Take field
        pub fn take_address(&mut self) -> ::std::string::String {
            self.address.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_option_accessor::<_, _>(
                "address",
                |m: &EthereumAccessList| { &m.address },
                |m: &mut EthereumAccessList| { &mut m.address },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "storage_keys",
                |m: &EthereumAccessList| { &m.storage_keys },
                |m: &mut EthereumAccessList| { &mut m.storage_keys },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumAccessList>(
                "EthereumSignTxEIP1559.EthereumAccessList",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.address.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.address = ::std::option::Option::Some(is.read_string()?);
                    },
                    18 => {
                        self.storage_keys.push(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.address.as_ref() {
                my_size += ::protobuf::rt::string_size(1, &v);
            }
            for value in &self.storage_keys {
                my_size += ::protobuf::rt::bytes_size(2, &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<()> {
            if let Some(v) = self.address.as_ref() {
                os.write_string(1, v)?;
            }
            for v in &self.storage_keys {
                os.write_bytes(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() -> EthereumAccessList {
            EthereumAccessList::new()
        }

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

        fn default_instance() -> &'static EthereumAccessList {
            static instance: EthereumAccessList = EthereumAccessList {
                address: ::std::option::Option::None,
                storage_keys: ::std::vec::Vec::new(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

    impl ::protobuf::MessageFull for EthereumAccessList {
        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("EthereumSignTxEIP1559.EthereumAccessList").unwrap()).clone()
        }
    }

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumTxRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumTxRequest {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.data_length)
    pub data_length: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.signature_v)
    pub signature_v: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.signature_r)
    pub signature_r: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumTxRequest.signature_s)
    pub signature_s: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumTxRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional uint32 data_length = 1;

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

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

    pub fn has_data_length(&self) -> bool {
        self.data_length.is_some()
    }

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

    // optional uint32 signature_v = 2;

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

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

    pub fn has_signature_v(&self) -> bool {
        self.signature_v.is_some()
    }

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

    // optional bytes signature_r = 3;

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

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

    pub fn has_signature_r(&self) -> bool {
        self.signature_r.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature_r(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature_r = ::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_signature_r(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature_r.is_none() {
            self.signature_r = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature_r.as_mut().unwrap()
    }

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

    // optional bytes signature_s = 4;

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

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

    pub fn has_signature_s(&self) -> bool {
        self.signature_s.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature_s(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature_s = ::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_signature_s(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature_s.is_none() {
            self.signature_s = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature_s.as_mut().unwrap()
    }

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

    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_length",
            |m: &EthereumTxRequest| { &m.data_length },
            |m: &mut EthereumTxRequest| { &mut m.data_length },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "signature_v",
            |m: &EthereumTxRequest| { &m.signature_v },
            |m: &mut EthereumTxRequest| { &mut m.signature_v },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "signature_r",
            |m: &EthereumTxRequest| { &m.signature_r },
            |m: &mut EthereumTxRequest| { &mut m.signature_r },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "signature_s",
            |m: &EthereumTxRequest| { &m.signature_s },
            |m: &mut EthereumTxRequest| { &mut m.signature_s },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumTxRequest>(
            "EthereumTxRequest",
            fields,
            oneofs,
        )
    }
}

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

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

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.data_length = ::std::option::Option::Some(is.read_uint32()?);
                },
                16 => {
                    self.signature_v = ::std::option::Option::Some(is.read_uint32()?);
                },
                26 => {
                    self.signature_r = ::std::option::Option::Some(is.read_bytes()?);
                },
                34 => {
                    self.signature_s = ::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.data_length {
            my_size += ::protobuf::rt::uint32_size(1, v);
        }
        if let Some(v) = self.signature_v {
            my_size += ::protobuf::rt::uint32_size(2, v);
        }
        if let Some(v) = self.signature_r.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.signature_s.as_ref() {
            my_size += ::protobuf::rt::bytes_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_length {
            os.write_uint32(1, v)?;
        }
        if let Some(v) = self.signature_v {
            os.write_uint32(2, v)?;
        }
        if let Some(v) = self.signature_r.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.signature_s.as_ref() {
            os.write_bytes(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() -> EthereumTxRequest {
        EthereumTxRequest::new()
    }

    fn clear(&mut self) {
        self.data_length = ::std::option::Option::None;
        self.signature_v = ::std::option::Option::None;
        self.signature_r = ::std::option::Option::None;
        self.signature_s = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumTxRequest {
        static instance: EthereumTxRequest = EthereumTxRequest {
            data_length: ::std::option::Option::None,
            signature_v: ::std::option::Option::None,
            signature_r: ::std::option::Option::None,
            signature_s: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumTxRequest {
    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("EthereumTxRequest").unwrap()).clone()
    }
}

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

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

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

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

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

    // required bytes data_chunk = 1;

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

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

    pub fn has_data_chunk(&self) -> bool {
        self.data_chunk.is_some()
    }

    // Param is passed by value, moved
    pub fn set_data_chunk(&mut self, v: ::std::vec::Vec<u8>) {
        self.data_chunk = ::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_data_chunk(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.data_chunk.is_none() {
            self.data_chunk = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.data_chunk.as_mut().unwrap()
    }

    // Take field
    pub fn take_data_chunk(&mut self) -> ::std::vec::Vec<u8> {
        self.data_chunk.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::<_, _>(
            "data_chunk",
            |m: &EthereumTxAck| { &m.data_chunk },
            |m: &mut EthereumTxAck| { &mut m.data_chunk },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumTxAck>(
            "EthereumTxAck",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.data_chunk.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.data_chunk = ::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.data_chunk.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.data_chunk.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() -> EthereumTxAck {
        EthereumTxAck::new()
    }

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

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

impl ::protobuf::MessageFull for EthereumTxAck {
    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("EthereumTxAck").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignMessage {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.message)
    pub message: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.encoded_network)
    pub encoded_network: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignMessage.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignMessage.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes message = 2;

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

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

    pub fn has_message(&self) -> bool {
        self.message.is_some()
    }

    // Param is passed by value, moved
    pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
        self.message = ::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_message(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.message.is_none() {
            self.message = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.message.as_mut().unwrap()
    }

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

    // optional bytes encoded_network = 3;

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

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

    pub fn has_encoded_network(&self) -> bool {
        self.encoded_network.is_some()
    }

    // Param is passed by value, moved
    pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
        self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.encoded_network.is_none() {
            self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.encoded_network.as_mut().unwrap()
    }

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

    // optional bool chunkify = 4;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

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

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &EthereumSignMessage| { &m.address_n },
            |m: &mut EthereumSignMessage| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "message",
            |m: &EthereumSignMessage| { &m.message },
            |m: &mut EthereumSignMessage| { &mut m.message },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "encoded_network",
            |m: &EthereumSignMessage| { &m.encoded_network },
            |m: &mut EthereumSignMessage| { &mut m.encoded_network },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &EthereumSignMessage| { &m.chunkify },
            |m: &mut EthereumSignMessage| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignMessage>(
            "EthereumSignMessage",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.message.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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.message = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.encoded_network = ::std::option::Option::Some(is.read_bytes()?);
                },
                32 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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.message.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.encoded_network.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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.message.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.encoded_network.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(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() -> EthereumSignMessage {
        EthereumSignMessage::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.message = ::std::option::Option::None;
        self.encoded_network = ::std::option::Option::None;
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumSignMessage {
        static instance: EthereumSignMessage = EthereumSignMessage {
            address_n: ::std::vec::Vec::new(),
            message: ::std::option::Option::None,
            encoded_network: ::std::option::Option::None,
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumSignMessage {
    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("EthereumSignMessage").unwrap()).clone()
    }
}

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

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

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

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

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

    // required bytes signature = 2;

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

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

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature.as_mut().unwrap()
    }

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

    // required string address = 3;

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

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

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

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

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

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

    fn is_initialized(&self) -> bool {
        if self.signature.is_none() {
            return false;
        }
        if self.address.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 {
                18 => {
                    self.signature = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.address = ::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.signature.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.address.as_ref() {
            my_size += ::protobuf::rt::string_size(3, &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.signature.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.address.as_ref() {
            os.write_string(3, 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() -> EthereumMessageSignature {
        EthereumMessageSignature::new()
    }

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

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

impl ::protobuf::MessageFull for EthereumMessageSignature {
    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("EthereumMessageSignature").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumVerifyMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumVerifyMessage {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.signature)
    pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.message)
    pub message: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.address)
    pub address: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumVerifyMessage.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumVerifyMessage.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes signature = 2;

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

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

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature.as_mut().unwrap()
    }

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

    // required bytes message = 3;

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

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

    pub fn has_message(&self) -> bool {
        self.message.is_some()
    }

    // Param is passed by value, moved
    pub fn set_message(&mut self, v: ::std::vec::Vec<u8>) {
        self.message = ::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_message(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.message.is_none() {
            self.message = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.message.as_mut().unwrap()
    }

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

    // required string address = 4;

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

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

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

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

    // optional bool chunkify = 5;

    pub fn chunkify(&self) -> bool {
        self.chunkify.unwrap_or(false)
    }

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

    pub fn has_chunkify(&self) -> bool {
        self.chunkify.is_some()
    }

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

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

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

    fn is_initialized(&self) -> bool {
        if self.signature.is_none() {
            return false;
        }
        if self.message.is_none() {
            return false;
        }
        if self.address.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 {
                18 => {
                    self.signature = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.message = ::std::option::Option::Some(is.read_bytes()?);
                },
                34 => {
                    self.address = ::std::option::Option::Some(is.read_string()?);
                },
                40 => {
                    self.chunkify = ::std::option::Option::Some(is.read_bool()?);
                },
                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.signature.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.message.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.address.as_ref() {
            my_size += ::protobuf::rt::string_size(4, &v);
        }
        if let Some(v) = self.chunkify {
            my_size += 1 + 1;
        }
        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.signature.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.message.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.address.as_ref() {
            os.write_string(4, v)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(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() -> EthereumVerifyMessage {
        EthereumVerifyMessage::new()
    }

    fn clear(&mut self) {
        self.signature = ::std::option::Option::None;
        self.message = ::std::option::Option::None;
        self.address = ::std::option::Option::None;
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumVerifyMessage {
        static instance: EthereumVerifyMessage = EthereumVerifyMessage {
            signature: ::std::option::Option::None,
            message: ::std::option::Option::None,
            address: ::std::option::Option::None,
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumVerifyMessage {
    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("EthereumVerifyMessage").unwrap()).clone()
    }
}

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.ethereum.EthereumSignTypedHash)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct EthereumSignTypedHash {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.domain_separator_hash)
    pub domain_separator_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.message_hash)
    pub message_hash: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.ethereum.EthereumSignTypedHash.encoded_network)
    pub encoded_network: ::std::option::Option<::std::vec::Vec<u8>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.ethereum.EthereumSignTypedHash.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes domain_separator_hash = 2;

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

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

    pub fn has_domain_separator_hash(&self) -> bool {
        self.domain_separator_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_domain_separator_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.domain_separator_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_domain_separator_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.domain_separator_hash.is_none() {
            self.domain_separator_hash = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.domain_separator_hash.as_mut().unwrap()
    }

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

    // optional bytes message_hash = 3;

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

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

    pub fn has_message_hash(&self) -> bool {
        self.message_hash.is_some()
    }

    // Param is passed by value, moved
    pub fn set_message_hash(&mut self, v: ::std::vec::Vec<u8>) {
        self.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_message_hash(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.message_hash.is_none() {
            self.message_hash = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.message_hash.as_mut().unwrap()
    }

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

    // optional bytes encoded_network = 4;

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

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

    pub fn has_encoded_network(&self) -> bool {
        self.encoded_network.is_some()
    }

    // Param is passed by value, moved
    pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
        self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.encoded_network.is_none() {
            self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.encoded_network.as_mut().unwrap()
    }

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

    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_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &EthereumSignTypedHash| { &m.address_n },
            |m: &mut EthereumSignTypedHash| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "domain_separator_hash",
            |m: &EthereumSignTypedHash| { &m.domain_separator_hash },
            |m: &mut EthereumSignTypedHash| { &mut m.domain_separator_hash },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "message_hash",
            |m: &EthereumSignTypedHash| { &m.message_hash },
            |m: &mut EthereumSignTypedHash| { &mut m.message_hash },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "encoded_network",
            |m: &EthereumSignTypedHash| { &m.encoded_network },
            |m: &mut EthereumSignTypedHash| { &mut m.encoded_network },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<EthereumSignTypedHash>(
            "EthereumSignTypedHash",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.domain_separator_hash.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 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                18 => {
                    self.domain_separator_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    self.message_hash = ::std::option::Option::Some(is.read_bytes()?);
                },
                34 => {
                    self.encoded_network = ::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.domain_separator_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.message_hash.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        if let Some(v) = self.encoded_network.as_ref() {
            my_size += ::protobuf::rt::bytes_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<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.domain_separator_hash.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.message_hash.as_ref() {
            os.write_bytes(3, v)?;
        }
        if let Some(v) = self.encoded_network.as_ref() {
            os.write_bytes(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() -> EthereumSignTypedHash {
        EthereumSignTypedHash::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.domain_separator_hash = ::std::option::Option::None;
        self.message_hash = ::std::option::Option::None;
        self.encoded_network = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static EthereumSignTypedHash {
        static instance: EthereumSignTypedHash = EthereumSignTypedHash {
            address_n: ::std::vec::Vec::new(),
            domain_separator_hash: ::std::option::Option::None,
            message_hash: ::std::option::Option::None,
            encoded_network: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for EthereumSignTypedHash {
    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("EthereumSignTypedHash").unwrap()).clone()
    }
}

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

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

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

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

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

    // required bytes signature = 1;

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

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

    pub fn has_signature(&self) -> bool {
        self.signature.is_some()
    }

    // Param is passed by value, moved
    pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
        self.signature = ::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_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.signature.as_mut().unwrap()
    }

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

    // required string address = 2;

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

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

    pub fn has_address(&self) -> bool {
        self.address.is_some()
    }

    // Param is passed by value, moved
    pub fn set_address(&mut self, v: ::std::string::String) {
        self.address = ::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_address(&mut self) -> &mut ::std::string::String {
        if self.address.is_none() {
            self.address = ::std::option::Option::Some(::std::string::String::new());
        }
        self.address.as_mut().unwrap()
    }

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

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

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

    fn is_initialized(&self) -> bool {
        if self.signature.is_none() {
            return false;
        }
        if self.address.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.signature = ::std::option::Option::Some(is.read_bytes()?);
                },
                18 => {
                    self.address = ::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.signature.as_ref() {
            my_size += ::protobuf::rt::bytes_size(1, &v);
        }
        if let Some(v) = self.address.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.signature.as_ref() {
            os.write_bytes(1, v)?;
        }
        if let Some(v) = self.address.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() -> EthereumTypedDataSignature {
        EthereumTypedDataSignature::new()
    }

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

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

impl ::protobuf::MessageFull for EthereumTypedDataSignature {
    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("EthereumTypedDataSignature").unwrap()).clone()
    }
}

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

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

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

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

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

    // optional bytes encoded_network = 1;

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

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

    pub fn has_encoded_network(&self) -> bool {
        self.encoded_network.is_some()
    }

    // Param is passed by value, moved
    pub fn set_encoded_network(&mut self, v: ::std::vec::Vec<u8>) {
        self.encoded_network = ::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_encoded_network(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.encoded_network.is_none() {
            self.encoded_network = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.encoded_network.as_mut().unwrap()
    }

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

    // optional bytes encoded_token = 2;

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

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

    pub fn has_encoded_token(&self) -> bool {
        self.encoded_token.is_some()
    }

    // Param is passed by value, moved
    pub fn set_encoded_token(&mut self, v: ::std::vec::Vec<u8>) {
        self.encoded_token = ::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_encoded_token(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.encoded_token.is_none() {
            self.encoded_token = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.encoded_token.as_mut().unwrap()
    }

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

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

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

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

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.encoded_network = ::std::option::Option::Some(is.read_bytes()?);
                },
                18 => {
                    self.encoded_token = ::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.encoded_network.as_ref() {
            my_size += ::protobuf::rt::bytes_size(1, &v);
        }
        if let Some(v) = self.encoded_token.as_ref() {
            my_size += ::protobuf::rt::bytes_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.encoded_network.as_ref() {
            os.write_bytes(1, v)?;
        }
        if let Some(v) = self.encoded_token.as_ref() {
            os.write_bytes(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() -> EthereumDefinitions {
        EthereumDefinitions::new()
    }

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

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

impl ::protobuf::MessageFull for EthereumDefinitions {
    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("EthereumDefinitions").unwrap()).clone()
    }
}

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x17messages-ethereum.proto\x12\x1bhw.trezor.messages.ethereum\x1a\x15\
    messages-common.proto\"V\n\x14EthereumGetPublicKey\x12\x1b\n\taddress_n\
    \x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0cshow_display\x18\x02\x20\x01(\
    \x08R\x0bshowDisplay\"b\n\x11EthereumPublicKey\x129\n\x04node\x18\x01\
    \x20\x02(\x0b2%.hw.trezor.messages.common.HDNodeTypeR\x04node\x12\x12\n\
    \x04xpub\x18\x02\x20\x02(\tR\x04xpub\"\x99\x01\n\x12EthereumGetAddress\
    \x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0cshow_dis\
    play\x18\x02\x20\x01(\x08R\x0bshowDisplay\x12'\n\x0fencoded_network\x18\
    \x03\x20\x01(\x0cR\x0eencodedNetwork\x12\x1a\n\x08chunkify\x18\x04\x20\
    \x01(\x08R\x08chunkify\"c\n\x0fEthereumAddress\x12$\n\x0c_old_address\
    \x18\x01\x20\x01(\x0cR\nOldAddressB\x02\x18\x01\x12\x18\n\x07address\x18\
    \x02\x20\x01(\tR\x07address\x12\x10\n\x03mac\x18\x03\x20\x01(\x0cR\x03ma\
    c\"\xed\x03\n\x0eEthereumSignTx\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\
    \x08addressN\x12\x16\n\x05nonce\x18\x02\x20\x01(\x0c:\0R\x05nonce\x12\
    \x1b\n\tgas_price\x18\x03\x20\x02(\x0cR\x08gasPrice\x12\x1b\n\tgas_limit\
    \x18\x04\x20\x02(\x0cR\x08gasLimit\x12\x10\n\x02to\x18\x0b\x20\x01(\t:\0\
    R\x02to\x12\x16\n\x05value\x18\x06\x20\x01(\x0c:\0R\x05value\x12.\n\x12d\
    ata_initial_chunk\x18\x07\x20\x01(\x0c:\0R\x10dataInitialChunk\x12\"\n\
    \x0bdata_length\x18\x08\x20\x01(\r:\x010R\ndataLength\x12\x19\n\x08chain\
    _id\x18\t\x20\x02(\x04R\x07chainId\x12\x17\n\x07tx_type\x18\n\x20\x01(\r\
    R\x06txType\x12R\n\x0bdefinitions\x18\x0c\x20\x01(\x0b20.hw.trezor.messa\
    ges.ethereum.EthereumDefinitionsR\x0bdefinitions\x12\x1a\n\x08chunkify\
    \x18\r\x20\x01(\x08R\x08chunkify\x12J\n\x0bpayment_req\x18\x0e\x20\x01(\
    \x0b2).hw.trezor.messages.common.PaymentRequestR\npaymentReq\"\xbc\x05\n\
    \x15EthereumSignTxEIP1559\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08ad\
    dressN\x12\x14\n\x05nonce\x18\x02\x20\x02(\x0cR\x05nonce\x12\x1e\n\x0bma\
    x_gas_fee\x18\x03\x20\x02(\x0cR\tmaxGasFee\x12(\n\x10max_priority_fee\
    \x18\x04\x20\x02(\x0cR\x0emaxPriorityFee\x12\x1b\n\tgas_limit\x18\x05\
    \x20\x02(\x0cR\x08gasLimit\x12\x10\n\x02to\x18\x06\x20\x01(\t:\0R\x02to\
    \x12\x14\n\x05value\x18\x07\x20\x02(\x0cR\x05value\x12.\n\x12data_initia\
    l_chunk\x18\x08\x20\x01(\x0c:\0R\x10dataInitialChunk\x12\x1f\n\x0bdata_l\
    ength\x18\t\x20\x02(\rR\ndataLength\x12\x19\n\x08chain_id\x18\n\x20\x02(\
    \x04R\x07chainId\x12f\n\x0baccess_list\x18\x0b\x20\x03(\x0b2E.hw.trezor.\
    messages.ethereum.EthereumSignTxEIP1559.EthereumAccessListR\naccessList\
    \x12R\n\x0bdefinitions\x18\x0c\x20\x01(\x0b20.hw.trezor.messages.ethereu\
    m.EthereumDefinitionsR\x0bdefinitions\x12\x1a\n\x08chunkify\x18\r\x20\
    \x01(\x08R\x08chunkify\x12J\n\x0bpayment_req\x18\x0e\x20\x01(\x0b2).hw.t\
    rezor.messages.common.PaymentRequestR\npaymentReq\x1aQ\n\x12EthereumAcce\
    ssList\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07address\x12!\n\x0csto\
    rage_keys\x18\x02\x20\x03(\x0cR\x0bstorageKeys\"\x97\x01\n\x11EthereumTx\
    Request\x12\x1f\n\x0bdata_length\x18\x01\x20\x01(\rR\ndataLength\x12\x1f\
    \n\x0bsignature_v\x18\x02\x20\x01(\rR\nsignatureV\x12\x1f\n\x0bsignature\
    _r\x18\x03\x20\x01(\x0cR\nsignatureR\x12\x1f\n\x0bsignature_s\x18\x04\
    \x20\x01(\x0cR\nsignatureS\".\n\rEthereumTxAck\x12\x1d\n\ndata_chunk\x18\
    \x01\x20\x02(\x0cR\tdataChunk\"\x91\x01\n\x13EthereumSignMessage\x12\x1b\
    \n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\x07message\x18\
    \x02\x20\x02(\x0cR\x07message\x12'\n\x0fencoded_network\x18\x03\x20\x01(\
    \x0cR\x0eencodedNetwork\x12\x1a\n\x08chunkify\x18\x04\x20\x01(\x08R\x08c\
    hunkify\"R\n\x18EthereumMessageSignature\x12\x1c\n\tsignature\x18\x02\
    \x20\x02(\x0cR\tsignature\x12\x18\n\x07address\x18\x03\x20\x02(\tR\x07ad\
    dress\"\x85\x01\n\x15EthereumVerifyMessage\x12\x1c\n\tsignature\x18\x02\
    \x20\x02(\x0cR\tsignature\x12\x18\n\x07message\x18\x03\x20\x02(\x0cR\x07\
    message\x12\x18\n\x07address\x18\x04\x20\x02(\tR\x07address\x12\x1a\n\
    \x08chunkify\x18\x05\x20\x01(\x08R\x08chunkify\"\xb4\x01\n\x15EthereumSi\
    gnTypedHash\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x122\n\
    \x15domain_separator_hash\x18\x02\x20\x02(\x0cR\x13domainSeparatorHash\
    \x12!\n\x0cmessage_hash\x18\x03\x20\x01(\x0cR\x0bmessageHash\x12'\n\x0fe\
    ncoded_network\x18\x04\x20\x01(\x0cR\x0eencodedNetwork\"T\n\x1aEthereumT\
    ypedDataSignature\x12\x1c\n\tsignature\x18\x01\x20\x02(\x0cR\tsignature\
    \x12\x18\n\x07address\x18\x02\x20\x02(\tR\x07address\"c\n\x13EthereumDef\
    initions\x12'\n\x0fencoded_network\x18\x01\x20\x01(\x0cR\x0eencodedNetwo\
    rk\x12#\n\rencoded_token\x18\x02\x20\x01(\x0cR\x0cencodedTokenB<\n#com.s\
    atoshilabs.trezor.lib.protobufB\x15TrezorMessageEthereum\
";

/// `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_common::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(15);
            messages.push(EthereumGetPublicKey::generated_message_descriptor_data());
            messages.push(EthereumPublicKey::generated_message_descriptor_data());
            messages.push(EthereumGetAddress::generated_message_descriptor_data());
            messages.push(EthereumAddress::generated_message_descriptor_data());
            messages.push(EthereumSignTx::generated_message_descriptor_data());
            messages.push(EthereumSignTxEIP1559::generated_message_descriptor_data());
            messages.push(EthereumTxRequest::generated_message_descriptor_data());
            messages.push(EthereumTxAck::generated_message_descriptor_data());
            messages.push(EthereumSignMessage::generated_message_descriptor_data());
            messages.push(EthereumMessageSignature::generated_message_descriptor_data());
            messages.push(EthereumVerifyMessage::generated_message_descriptor_data());
            messages.push(EthereumSignTypedHash::generated_message_descriptor_data());
            messages.push(EthereumTypedDataSignature::generated_message_descriptor_data());
            messages.push(EthereumDefinitions::generated_message_descriptor_data());
            messages.push(ethereum_sign_tx_eip1559::EthereumAccessList::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(0);
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
